-- | Assigns symbols and units (quantities) to mechanics-related concepts.
module Data.Drasil.Quantities.SolidMechanics where

import Language.Drasil
import Language.Drasil.ShortHands (cE, cS, cP, cK, lSigma, lNu)

import Drasil.Database (mkUid)
import Data.Drasil.Concepts.SolidMechanics as CSM (elastMod, mobShear, nrmStrss,
    shearRes, stffness)
import qualified Data.Drasil.Concepts.Physics as CP (strain)
import Data.Drasil.SI_Units (newton, pascal)
import Data.Drasil.Units.SolidMechanics (stiffnessU)

-- * With Units

elastMod, mobShear, nrmStrss, shearRes, stffness :: DefinedQuantityDict

elastMod :: DefinedQuantityDict
elastMod = ConceptChunk -> Symbol -> Space -> UnitDefn -> DefinedQuantityDict
dqd ConceptChunk
CSM.elastMod Symbol
cE     Space
Real UnitDefn
pascal
mobShear :: DefinedQuantityDict
mobShear = ConceptChunk -> Symbol -> Space -> UnitDefn -> DefinedQuantityDict
dqd ConceptChunk
CSM.mobShear Symbol
cS     Space
Real UnitDefn
newton
shearRes :: DefinedQuantityDict
shearRes = ConceptChunk -> Symbol -> Space -> UnitDefn -> DefinedQuantityDict
dqd ConceptChunk
CSM.shearRes Symbol
cP     Space
Real UnitDefn
newton
stffness :: DefinedQuantityDict
stffness = ConceptChunk -> Symbol -> Space -> UnitDefn -> DefinedQuantityDict
dqd ConceptChunk
CSM.stffness Symbol
cK     Space
Real UnitDefn
stiffnessU
nrmStrss :: DefinedQuantityDict
nrmStrss = ConceptChunk -> Symbol -> Space -> UnitDefn -> DefinedQuantityDict
dqd ConceptChunk
CSM.nrmStrss Symbol
lSigma Space
Real UnitDefn
pascal

-- * Without Units

poissnsR :: DefinedQuantityDict
poissnsR :: DefinedQuantityDict
poissnsR = UID
-> NP
-> Sentence
-> (Stage -> Symbol)
-> Space
-> DefinedQuantityDict
quantNoUnit' (String -> UID
mkUid String
"poissnsR") (String -> NP
forall a. String -> NPG a
nounPhraseSP String
"Poisson's ratio")
  (String -> Sentence
S String
"the ratio of perpendicular" Sentence -> Sentence -> Sentence
+:+ ConceptChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
CP.strain Sentence -> Sentence -> Sentence
+:+ String -> Sentence
S String
"to parallel" Sentence -> Sentence -> Sentence
+:+ ConceptChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
CP.strain)
  (Symbol -> Stage -> Symbol
forall a b. a -> b -> a
const Symbol
lNu) Space
Real