{-# LANGUAGE PostfixOperators #-}
module Drasil.SSP.DataDefs (dataDefs, intersliceWtrF, angleA, angleB, lengthB,
lengthLb, lengthLs, slcHeight, normStressDD, tangStressDD, ratioVariation,
convertFunc1, convertFunc2, nrmForceSumDD, watForceSumDD) where
import Prelude hiding (cos, sin, tan)
import Language.Drasil
import Theory.Drasil (DataDefinition, ddE)
import qualified Language.Drasil.Sentence.Combinators as S
import Data.Drasil.Concepts.Documentation (assumption)
import Data.Drasil.Concepts.Math (equation)
import Data.Drasil.Quantities.Math as QM (pi_)
import Data.Drasil.Theories.Physics (torqueDD)
import Drasil.SSP.Assumptions (assumpSBSBISL)
import Drasil.SSP.Defs (slice)
import Drasil.SSP.References (chen2005, fredlund1977, karchewski2012, huston2008)
import Drasil.SSP.Unitals (baseAngle, baseLngth, baseWthX, constF, fricAngle,
fs, genericA, intNormForce, indxn, inx, inxi, inxiM1, midpntHght,
fn, ft, mobShrC, normToShear, scalFunc, shrResC, slipDist, slipHght, slopeDist,
slopeHght, surfAngle, surfLngth, totNormStress, tangStress, nrmForceSum,
watForceSum, sliceHghtRight, sliceHghtLeft, waterHght, waterWeight, watrForce)
dataDefs :: [DataDefinition]
dataDefs :: [DataDefinition]
dataDefs = [DataDefinition
intersliceWtrF, DataDefinition
angleA, DataDefinition
angleB, DataDefinition
lengthB, DataDefinition
lengthLb, DataDefinition
lengthLs,
DataDefinition
slcHeight, DataDefinition
normStressDD, DataDefinition
tangStressDD, DataDefinition
torqueDD, DataDefinition
ratioVariation, DataDefinition
convertFunc1,
DataDefinition
convertFunc2, DataDefinition
nrmForceSumDD, DataDefinition
watForceSumDD, DataDefinition
sliceHghtRightDD, DataDefinition
sliceHghtLeftDD]
intersliceWtrF :: DataDefinition
intersliceWtrF :: DataDefinition
intersliceWtrF = SimpleQDef
-> [DecRef]
-> Maybe Derivation
-> String
-> [Sentence]
-> DataDefinition
ddE SimpleQDef
intersliceWtrFQD [Citation -> DecRef
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> DecRef
dRef Citation
fredlund1977] Maybe Derivation
forall a. Maybe a
Nothing String
"intersliceWtrF"
[]
intersliceWtrFQD :: SimpleQDef
intersliceWtrFQD :: SimpleQDef
intersliceWtrFQD = UnitalChunk -> Expr -> SimpleQDef
forall c e. (Quantity c, MayHaveUnit c) => c -> e -> QDefinition e
mkQuantDef UnitalChunk
watrForce Expr
intersliceWtrFEqn
intersliceWtrFEqn :: Expr
intersliceWtrFEqn :: Expr
intersliceWtrFEqn = [(Expr, Expr)] -> Expr
forall r. ExprC r => [(r, r)] -> r
completeCase [(Expr, Expr)
case1,(Expr, Expr)
case2,(Expr, Expr)
case3]
where case1 :: (Expr, Expr)
case1 = (Expr -> Expr
forall r. (ExprC r, LiteralC r) => r -> r
half (Expr -> Expr
forall r. (ExprC r, LiteralC r) => r -> r
square (UncertQ -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UncertQ
slopeHght Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$- UnitalChunk -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UnitalChunk
slipHght)) Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$*
UncertQ -> Expr
forall c. (HasUID c, HasSymbol c) => c -> Expr
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UncertQ
waterWeight Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$+ (Expr -> Expr
forall r. (ExprC r, LiteralC r) => r -> r
square (UncertQ -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UncertQ
waterHght Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$- UncertQ -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UncertQ
slopeHght) Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$*
UncertQ -> Expr
forall c. (HasUID c, HasSymbol c) => c -> Expr
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UncertQ
waterWeight), UncertQ -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UncertQ
waterHght Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$>= UncertQ -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UncertQ
slopeHght)
case2 :: (Expr, Expr)
case2 = (Expr -> Expr
forall r. (ExprC r, LiteralC r) => r -> r
half (Expr -> Expr
forall r. (ExprC r, LiteralC r) => r -> r
square (UncertQ -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UncertQ
waterHght Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$- UnitalChunk -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UnitalChunk
slipHght)) Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$* UncertQ -> Expr
forall c. (HasUID c, HasSymbol c) => c -> Expr
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UncertQ
waterWeight,
(UncertQ -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UncertQ
slopeHght Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$> UncertQ -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UncertQ
waterHght)
Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$&&
(UncertQ -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UncertQ
waterHght Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$> UnitalChunk -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UnitalChunk
slipHght))
case3 :: (Expr, Expr)
case3 = (Integer -> Expr
forall r. LiteralC r => Integer -> r
exactDbl Integer
0, UncertQ -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UncertQ
waterHght Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$<= UnitalChunk -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UnitalChunk
slipHght)
angleA :: DataDefinition
angleA :: DataDefinition
angleA = SimpleQDef
-> [DecRef]
-> Maybe Derivation
-> String
-> [Sentence]
-> DataDefinition
ddE SimpleQDef
angleAQD [Citation -> DecRef
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> DecRef
dRef Citation
fredlund1977] Maybe Derivation
forall a. Maybe a
Nothing String
"angleA"
[Sentence
angleANotes]
angleAQD :: SimpleQDef
angleAQD :: SimpleQDef
angleAQD = UnitalChunk -> Expr -> SimpleQDef
forall c e. (Quantity c, MayHaveUnit c) => c -> e -> QDefinition e
mkQuantDef UnitalChunk
baseAngle Expr
angleAEqn
angleAEqn :: Expr
angleAEqn :: Expr
angleAEqn = Expr -> Expr
forall r. ExprC r => r -> r
arctan ((UnitalChunk -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UnitalChunk
slipHght Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$- UnitalChunk -> Integer -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> Integer -> r
inx UnitalChunk
slipHght (-Integer
1)) Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$/
(UnitalChunk -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UnitalChunk
slipDist Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$- UnitalChunk -> Integer -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> Integer -> r
inx UnitalChunk
slipDist (-Integer
1)))
angleANotes :: Sentence
angleANotes :: Sentence
angleANotes = [Sentence] -> Sentence
foldlSent [String -> Sentence
S String
"This", ConceptChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
equation, String -> Sentence
S String
"is based" Sentence -> Sentence -> Sentence
`S.onThe`
CI -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase CI
assumption, String -> Sentence
S String
"that the base" Sentence -> Sentence -> Sentence
`S.ofA` IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase IdeaDict
slice,
String -> Sentence
S String
"is a straight line", Sentence -> Sentence
sParen (ConceptInstance -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence
refS ConceptInstance
assumpSBSBISL)]
angleB :: DataDefinition
angleB :: DataDefinition
angleB = SimpleQDef
-> [DecRef]
-> Maybe Derivation
-> String
-> [Sentence]
-> DataDefinition
ddE SimpleQDef
angleBQD [Citation -> DecRef
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> DecRef
dRef Citation
fredlund1977] Maybe Derivation
forall a. Maybe a
Nothing String
"angleB"
[Sentence
angleBNotes]
angleBQD :: SimpleQDef
angleBQD :: SimpleQDef
angleBQD = UnitalChunk -> Expr -> SimpleQDef
forall c e. (Quantity c, MayHaveUnit c) => c -> e -> QDefinition e
mkQuantDef UnitalChunk
surfAngle Expr
angleBEqn
angleBEqn :: Expr
angleBEqn :: Expr
angleBEqn = Expr -> Expr
forall r. ExprC r => r -> r
arctan ((UncertQ -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UncertQ
slopeHght Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$- UncertQ -> Integer -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> Integer -> r
inx UncertQ
slopeHght (-Integer
1)) Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$/
(UncertQ -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UncertQ
slopeDist Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$- UncertQ -> Integer -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> Integer -> r
inx UncertQ
slopeDist (-Integer
1)))
angleBNotes :: Sentence
angleBNotes :: Sentence
angleBNotes = [Sentence] -> Sentence
foldlSent [String -> Sentence
S String
"This", ConceptChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
equation, String -> Sentence
S String
"is based" Sentence -> Sentence -> Sentence
`S.onThe`
CI -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase CI
assumption, String -> Sentence
S String
"that the surface" Sentence -> Sentence -> Sentence
`S.ofA` IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase IdeaDict
slice,
String -> Sentence
S String
"is a straight line", Sentence -> Sentence
sParen (ConceptInstance -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence
refS ConceptInstance
assumpSBSBISL)]
lengthB :: DataDefinition
lengthB :: DataDefinition
lengthB = SimpleQDef
-> [DecRef]
-> Maybe Derivation
-> String
-> [Sentence]
-> DataDefinition
ddE SimpleQDef
lengthBQD [Citation -> DecRef
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> DecRef
dRef Citation
fredlund1977] Maybe Derivation
forall a. Maybe a
Nothing String
"lengthB" []
lengthBQD :: SimpleQDef
lengthBQD :: SimpleQDef
lengthBQD = UnitalChunk -> Expr -> SimpleQDef
forall c e. (Quantity c, MayHaveUnit c) => c -> e -> QDefinition e
mkQuantDef UnitalChunk
baseWthX Expr
lengthBEqn
lengthBEqn :: Expr
lengthBEqn :: Expr
lengthBEqn = UnitalChunk -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UnitalChunk
slipDist Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$- UnitalChunk -> Integer -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> Integer -> r
inx UnitalChunk
slipDist (-Integer
1)
lengthLb :: DataDefinition
lengthLb :: DataDefinition
lengthLb = SimpleQDef
-> [DecRef]
-> Maybe Derivation
-> String
-> [Sentence]
-> DataDefinition
ddE SimpleQDef
lengthLbQD [Citation -> DecRef
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> DecRef
dRef Citation
fredlund1977] Maybe Derivation
forall a. Maybe a
Nothing String
"lengthLb"
[Sentence
lengthLbNotes]
lengthLbQD :: SimpleQDef
lengthLbQD :: SimpleQDef
lengthLbQD = UnitalChunk -> Expr -> SimpleQDef
forall c e. (Quantity c, MayHaveUnit c) => c -> e -> QDefinition e
mkQuantDef UnitalChunk
baseLngth Expr
lengthLbEqn
lengthLbEqn :: Expr
lengthLbEqn :: Expr
lengthLbEqn = UnitalChunk -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UnitalChunk
baseWthX Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$* Expr -> Expr
forall r. ExprC r => r -> r
sec (UnitalChunk -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UnitalChunk
baseAngle)
lengthLbNotes :: Sentence
lengthLbNotes :: Sentence
lengthLbNotes = [Sentence] -> Sentence
foldlSent [UnitalChunk
baseWthX UnitalChunk -> DataDefinition -> Sentence
forall q r.
(HasSymbol q, HasUID q, Referable r, HasShortName r) =>
q -> r -> Sentence
`definedIn'''`
DataDefinition
lengthB Sentence -> Sentence -> Sentence
`S.and_` (UnitalChunk
baseAngle UnitalChunk -> DataDefinition -> Sentence
forall q r.
(HasSymbol q, HasUID q, Referable r, HasShortName r) =>
q -> r -> Sentence
`definedIn'''` DataDefinition
angleA)]
lengthLs :: DataDefinition
lengthLs :: DataDefinition
lengthLs = SimpleQDef
-> [DecRef]
-> Maybe Derivation
-> String
-> [Sentence]
-> DataDefinition
ddE SimpleQDef
lengthLsQD [Citation -> DecRef
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> DecRef
dRef Citation
fredlund1977] Maybe Derivation
forall a. Maybe a
Nothing String
"lengthLs"
[Sentence
lengthLsNotes]
lengthLsQD :: SimpleQDef
lengthLsQD :: SimpleQDef
lengthLsQD = UnitalChunk -> Expr -> SimpleQDef
forall c e. (Quantity c, MayHaveUnit c) => c -> e -> QDefinition e
mkQuantDef UnitalChunk
surfLngth Expr
lengthLsEqn
lengthLsEqn :: Expr
lengthLsEqn :: Expr
lengthLsEqn = UnitalChunk -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UnitalChunk
baseWthX Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$* Expr -> Expr
forall r. ExprC r => r -> r
sec (UnitalChunk -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UnitalChunk
surfAngle)
lengthLsNotes :: Sentence
lengthLsNotes :: Sentence
lengthLsNotes = [Sentence] -> Sentence
foldlSent [UnitalChunk
baseWthX UnitalChunk -> DataDefinition -> Sentence
forall q r.
(HasSymbol q, HasUID q, Referable r, HasShortName r) =>
q -> r -> Sentence
`definedIn'''`
DataDefinition
lengthB Sentence -> Sentence -> Sentence
`S.and_` (UnitalChunk
surfAngle UnitalChunk -> DataDefinition -> Sentence
forall q r.
(HasSymbol q, HasUID q, Referable r, HasShortName r) =>
q -> r -> Sentence
`definedIn'''` DataDefinition
angleB)]
slcHeight :: DataDefinition
slcHeight :: DataDefinition
slcHeight = SimpleQDef
-> [DecRef]
-> Maybe Derivation
-> String
-> [Sentence]
-> DataDefinition
ddE SimpleQDef
slcHeightQD [Citation -> DecRef
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> DecRef
dRef Citation
fredlund1977] Maybe Derivation
forall a. Maybe a
Nothing String
"slcHeight"
[Sentence]
slcHeightNotes
slcHeightQD :: SimpleQDef
slcHeightQD :: SimpleQDef
slcHeightQD = UnitalChunk -> Expr -> SimpleQDef
forall c e. (Quantity c, MayHaveUnit c) => c -> e -> QDefinition e
mkQuantDef UnitalChunk
midpntHght Expr
slcHeightEqn
slcHeightEqn :: Expr
slcHeightEqn :: Expr
slcHeightEqn = Expr
forall r. (ExprC r, LiteralC r) => r
oneHalf Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$* (UnitalChunk -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UnitalChunk
sliceHghtRight Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$+ UnitalChunk -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UnitalChunk
sliceHghtLeft)
slcHeightNotes :: [Sentence]
slcHeightNotes :: [Sentence]
slcHeightNotes = [String -> Sentence
S String
"This" Sentence -> Sentence -> Sentence
+:+ ConceptChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
equation Sentence -> Sentence -> Sentence
+:+ String -> Sentence
S String
"is based on the" Sentence -> Sentence -> Sentence
+:+
CI -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase CI
assumption Sentence -> Sentence -> Sentence
+:+ String -> Sentence
S String
"that the surface" Sentence -> Sentence -> Sentence
`S.and_` String -> Sentence
S String
"base of a slice" Sentence -> Sentence -> Sentence
+:+
String -> Sentence
S String
"are straight lines" Sentence -> Sentence -> Sentence
+:+. Sentence -> Sentence
sParen (ConceptInstance -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence
refS ConceptInstance
assumpSBSBISL),
UnitalChunk -> Sentence
forall c. (HasUID c, HasSymbol c) => c -> Sentence
ch UnitalChunk
sliceHghtRight Sentence -> Sentence -> Sentence
`S.and_` UnitalChunk -> Sentence
forall c. (HasUID c, HasSymbol c) => c -> Sentence
ch UnitalChunk
sliceHghtLeft Sentence -> Sentence -> Sentence
+:+ String -> Sentence
S String
"are defined in" Sentence -> Sentence -> Sentence
+:+
DataDefinition -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence
refS DataDefinition
sliceHghtRightDD Sentence -> Sentence -> Sentence
`S.and_` DataDefinition -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence
refS DataDefinition
sliceHghtLeftDD Sentence -> Sentence -> Sentence
`sC`
(String -> Sentence
S String
"respectively" !.)]
normStressDD :: DataDefinition
normStressDD :: DataDefinition
normStressDD = SimpleQDef
-> [DecRef]
-> Maybe Derivation
-> String
-> [Sentence]
-> DataDefinition
ddE SimpleQDef
normStressQD [Citation -> DecRef
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> DecRef
dRef Citation
huston2008] Maybe Derivation
forall a. Maybe a
Nothing String
"normStress" []
normStressQD :: SimpleQDef
normStressQD :: SimpleQDef
normStressQD = UnitalChunk -> Expr -> SimpleQDef
forall c e. (Quantity c, MayHaveUnit c) => c -> e -> QDefinition e
mkQuantDef UnitalChunk
totNormStress Expr
normStressEqn
normStressEqn :: Expr
normStressEqn :: Expr
normStressEqn = UnitalChunk -> Expr
forall c. (HasUID c, HasSymbol c) => c -> Expr
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
fn Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$/ UnitalChunk -> Expr
forall c. (HasUID c, HasSymbol c) => c -> Expr
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
genericA
tangStressDD :: DataDefinition
tangStressDD :: DataDefinition
tangStressDD = SimpleQDef
-> [DecRef]
-> Maybe Derivation
-> String
-> [Sentence]
-> DataDefinition
ddE SimpleQDef
tangStressQD [Citation -> DecRef
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> DecRef
dRef Citation
huston2008] Maybe Derivation
forall a. Maybe a
Nothing String
"tangStress" []
tangStressQD :: SimpleQDef
tangStressQD :: SimpleQDef
tangStressQD = UnitalChunk -> Expr -> SimpleQDef
forall c e. (Quantity c, MayHaveUnit c) => c -> e -> QDefinition e
mkQuantDef UnitalChunk
tangStress Expr
tangStressEqn
tangStressEqn :: Expr
tangStressEqn :: Expr
tangStressEqn = UnitalChunk -> Expr
forall c. (HasUID c, HasSymbol c) => c -> Expr
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
ft Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$/ UnitalChunk -> Expr
forall c. (HasUID c, HasSymbol c) => c -> Expr
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
genericA
ratioVariation :: DataDefinition
ratioVariation :: DataDefinition
ratioVariation = SimpleQDef
-> [DecRef]
-> Maybe Derivation
-> String
-> [Sentence]
-> DataDefinition
ddE SimpleQDef
ratioVarQD [Citation -> DecRef
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> DecRef
dRef Citation
fredlund1977] Maybe Derivation
forall a. Maybe a
Nothing
String
"ratioVariation" []
ratioVarQD :: SimpleQDef
ratioVarQD :: SimpleQDef
ratioVarQD = DefinedQuantityDict -> Expr -> SimpleQDef
forall c e. (Quantity c, MayHaveUnit c) => c -> e -> QDefinition e
mkQuantDef DefinedQuantityDict
scalFunc Expr
ratioVarEqn
ratioVarEqn :: Expr
ratioVarEqn :: Expr
ratioVarEqn = [(Expr, Expr)] -> Expr
forall r. ExprC r => [(r, r)] -> r
completeCase [(Expr, Expr)
case1, (Expr, Expr)
case2]
where case1 :: (Expr, Expr)
case1 = (Integer -> Expr
forall r. LiteralC r => Integer -> r
exactDbl Integer
1, DefinedQuantityDict -> Expr
forall c. (HasUID c, HasSymbol c) => c -> Expr
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy DefinedQuantityDict
constF)
case2 :: (Expr, Expr)
case2 = (Expr -> Expr
forall r. ExprC r => r -> r
sin (DefinedQuantityDict -> Expr
forall c. (HasUID c, HasSymbol c) => c -> Expr
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy DefinedQuantityDict
QM.pi_ Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$* ((UnitalChunk -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UnitalChunk
slipDist Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$- Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
idx (UnitalChunk -> Expr
forall c. (HasUID c, HasSymbol c) => c -> Expr
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
slipDist) (Integer -> Expr
forall r. LiteralC r => Integer -> r
int Integer
0)) Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$/
(UnitalChunk -> Expr
forall r a. (ExprC r, Quantity a) => a -> r
indxn UnitalChunk
slipDist Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$- Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
idx (UnitalChunk -> Expr
forall c. (HasUID c, HasSymbol c) => c -> Expr
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
slipDist) (Integer -> Expr
forall r. LiteralC r => Integer -> r
int Integer
0)))), Expr -> Expr
forall r. ExprC r => r -> r
not_ (DefinedQuantityDict -> Expr
forall c. (HasUID c, HasSymbol c) => c -> Expr
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy DefinedQuantityDict
constF))
convertFunc1 :: DataDefinition
convertFunc1 :: DataDefinition
convertFunc1 = SimpleQDef
-> [DecRef]
-> Maybe Derivation
-> String
-> [Sentence]
-> DataDefinition
ddE SimpleQDef
convertFunc1QD ((Citation -> DecRef) -> [Citation] -> [DecRef]
forall a b. (a -> b) -> [a] -> [b]
map Citation -> DecRef
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> DecRef
dRef [Citation
chen2005, Citation
karchewski2012]) Maybe Derivation
forall a. Maybe a
Nothing
String
"convertFunc1" [Sentence
convertFunc1Notes]
convertFunc1QD :: SimpleQDef
convertFunc1QD :: SimpleQDef
convertFunc1QD = DefinedQuantityDict -> Expr -> SimpleQDef
forall c e. (Quantity c, MayHaveUnit c) => c -> e -> QDefinition e
mkQuantDef DefinedQuantityDict
shrResC Expr
convertFunc1Eqn
convertFunc1Eqn :: Expr
convertFunc1Eqn :: Expr
convertFunc1Eqn = (DefinedQuantityDict -> Expr
forall c. (HasUID c, HasSymbol c) => c -> Expr
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy DefinedQuantityDict
normToShear Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$* DefinedQuantityDict -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi DefinedQuantityDict
scalFunc Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$*
Expr -> Expr
forall r. ExprC r => r -> r
cos (UnitalChunk -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UnitalChunk
baseAngle) Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$- Expr -> Expr
forall r. ExprC r => r -> r
sin (UnitalChunk -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UnitalChunk
baseAngle)) Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$* Expr -> Expr
forall r. ExprC r => r -> r
tan (UncertQ -> Expr
forall c. (HasUID c, HasSymbol c) => c -> Expr
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UncertQ
fricAngle) Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$-
((DefinedQuantityDict -> Expr
forall c. (HasUID c, HasSymbol c) => c -> Expr
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy DefinedQuantityDict
normToShear Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$* DefinedQuantityDict -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi DefinedQuantityDict
scalFunc Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$* Expr -> Expr
forall r. ExprC r => r -> r
sin (UnitalChunk -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UnitalChunk
baseAngle) Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$+
Expr -> Expr
forall r. ExprC r => r -> r
cos (UnitalChunk -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UnitalChunk
baseAngle)) Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$* ConstrConcept -> Expr
forall c. (HasUID c, HasSymbol c) => c -> Expr
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy ConstrConcept
fs)
convertFunc1Notes :: Sentence
convertFunc1Notes :: Sentence
convertFunc1Notes = [Sentence] -> Sentence
foldlSent [DefinedQuantityDict
scalFunc DefinedQuantityDict -> DataDefinition -> Sentence
forall q r.
(HasSymbol q, HasUID q, Referable r, HasShortName r) =>
q -> r -> Sentence
`definedIn'''` DataDefinition
ratioVariation Sentence -> Sentence -> Sentence
`S.and_` (UnitalChunk
baseAngle UnitalChunk -> DataDefinition -> Sentence
forall q r.
(HasSymbol q, HasUID q, Referable r, HasShortName r) =>
q -> r -> Sentence
`definedIn'''` DataDefinition
angleA)]
convertFunc2 :: DataDefinition
convertFunc2 :: DataDefinition
convertFunc2 = SimpleQDef
-> [DecRef]
-> Maybe Derivation
-> String
-> [Sentence]
-> DataDefinition
ddE SimpleQDef
convertFunc2QD ((Citation -> DecRef) -> [Citation] -> [DecRef]
forall a b. (a -> b) -> [a] -> [b]
map Citation -> DecRef
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> DecRef
dRef [Citation
chen2005, Citation
karchewski2012]) Maybe Derivation
forall a. Maybe a
Nothing
String
"convertFunc2" [Sentence
convertFunc2Notes]
convertFunc2QD :: SimpleQDef
convertFunc2QD :: SimpleQDef
convertFunc2QD = DefinedQuantityDict -> Expr -> SimpleQDef
forall c e. (Quantity c, MayHaveUnit c) => c -> e -> QDefinition e
mkQuantDef DefinedQuantityDict
mobShrC Expr
convertFunc2Eqn
convertFunc2Eqn :: Expr
convertFunc2Eqn :: Expr
convertFunc2Eqn = ((DefinedQuantityDict -> Expr
forall c. (HasUID c, HasSymbol c) => c -> Expr
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy DefinedQuantityDict
normToShear Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$* DefinedQuantityDict -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi DefinedQuantityDict
scalFunc Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$*
Expr -> Expr
forall r. ExprC r => r -> r
cos (UnitalChunk -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UnitalChunk
baseAngle) Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$- Expr -> Expr
forall r. ExprC r => r -> r
sin (UnitalChunk -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UnitalChunk
baseAngle)) Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$* Expr -> Expr
forall r. ExprC r => r -> r
tan (UncertQ -> Expr
forall c. (HasUID c, HasSymbol c) => c -> Expr
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UncertQ
fricAngle) Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$-
((DefinedQuantityDict -> Expr
forall c. (HasUID c, HasSymbol c) => c -> Expr
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy DefinedQuantityDict
normToShear Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$* DefinedQuantityDict -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi DefinedQuantityDict
scalFunc Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$* Expr -> Expr
forall r. ExprC r => r -> r
sin (UnitalChunk -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UnitalChunk
baseAngle) Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$+
Expr -> Expr
forall r. ExprC r => r -> r
cos (UnitalChunk -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UnitalChunk
baseAngle)) Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$* ConstrConcept -> Expr
forall c. (HasUID c, HasSymbol c) => c -> Expr
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy ConstrConcept
fs)) Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$/
DefinedQuantityDict -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxiM1 DefinedQuantityDict
shrResC
convertFunc2Notes :: Sentence
convertFunc2Notes :: Sentence
convertFunc2Notes = (SepType -> FoldType -> [Sentence] -> Sentence
foldlList SepType
Comma FoldType
List
[DefinedQuantityDict
scalFunc DefinedQuantityDict -> DataDefinition -> Sentence
forall q r.
(HasSymbol q, HasUID q, Referable r, HasShortName r) =>
q -> r -> Sentence
`definedIn'''` DataDefinition
ratioVariation, UnitalChunk
baseAngle UnitalChunk -> DataDefinition -> Sentence
forall q r.
(HasSymbol q, HasUID q, Referable r, HasShortName r) =>
q -> r -> Sentence
`definedIn'''` DataDefinition
angleA,
DefinedQuantityDict
shrResC DefinedQuantityDict -> DataDefinition -> Sentence
forall q r.
(HasSymbol q, HasUID q, Referable r, HasShortName r) =>
q -> r -> Sentence
`definedIn'''` DataDefinition
convertFunc1] !.)
nrmForceSumDD, watForceSumDD, sliceHghtRightDD,
sliceHghtLeftDD :: DataDefinition
nrmForceSumDD :: DataDefinition
nrmForceSumDD = SimpleQDef
-> [DecRef]
-> Maybe Derivation
-> String
-> [Sentence]
-> DataDefinition
ddE SimpleQDef
nrmForceSumQD [Citation -> DecRef
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> DecRef
dRef Citation
fredlund1977] Maybe Derivation
forall a. Maybe a
Nothing
String
"nrmForceSumDD" []
watForceSumDD :: DataDefinition
watForceSumDD = SimpleQDef
-> [DecRef]
-> Maybe Derivation
-> String
-> [Sentence]
-> DataDefinition
ddE SimpleQDef
watForceSumQD [Citation -> DecRef
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> DecRef
dRef Citation
fredlund1977] Maybe Derivation
forall a. Maybe a
Nothing
String
"watForceSumDD" []
sliceHghtRightDD :: DataDefinition
sliceHghtRightDD = SimpleQDef
-> [DecRef]
-> Maybe Derivation
-> String
-> [Sentence]
-> DataDefinition
ddE SimpleQDef
sliceHghtRightQD [Citation -> DecRef
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> DecRef
dRef Citation
fredlund1977] Maybe Derivation
forall a. Maybe a
Nothing
String
"sliceHghtRightDD" []
sliceHghtLeftDD :: DataDefinition
sliceHghtLeftDD = SimpleQDef
-> [DecRef]
-> Maybe Derivation
-> String
-> [Sentence]
-> DataDefinition
ddE SimpleQDef
sliceHghtLeftQD [Citation -> DecRef
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> DecRef
dRef Citation
fredlund1977] Maybe Derivation
forall a. Maybe a
Nothing
String
"sliceHghtLeftDD" []
nrmForceSumQD :: SimpleQDef
nrmForceSumQD :: SimpleQDef
nrmForceSumQD = UnitalChunk -> Expr -> SimpleQDef
forall c e. (Quantity c, MayHaveUnit c) => c -> e -> QDefinition e
ec UnitalChunk
nrmForceSum (UnitalChunk -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UnitalChunk
intNormForce Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$+ UnitalChunk -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxiM1 UnitalChunk
intNormForce)
watForceSumQD :: SimpleQDef
watForceSumQD :: SimpleQDef
watForceSumQD = UnitalChunk -> Expr -> SimpleQDef
forall c e. (Quantity c, MayHaveUnit c) => c -> e -> QDefinition e
ec UnitalChunk
watForceSum (UnitalChunk -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UnitalChunk
watrForce Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$+ UnitalChunk -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxiM1 UnitalChunk
watrForce)
sliceHghtRightQD :: SimpleQDef
sliceHghtRightQD :: SimpleQDef
sliceHghtRightQD = UnitalChunk -> Expr -> SimpleQDef
forall c e. (Quantity c, MayHaveUnit c) => c -> e -> QDefinition e
ec UnitalChunk
sliceHghtRight (UncertQ -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UncertQ
slopeHght Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$- UnitalChunk -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxi UnitalChunk
slipHght)
sliceHghtLeftQD :: SimpleQDef
sliceHghtLeftQD :: SimpleQDef
sliceHghtLeftQD = UnitalChunk -> Expr -> SimpleQDef
forall c e. (Quantity c, MayHaveUnit c) => c -> e -> QDefinition e
ec UnitalChunk
sliceHghtLeft (UncertQ -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxiM1 UncertQ
slopeHght Expr -> Expr -> Expr
forall r. ExprC r => r -> r -> r
$- UnitalChunk -> Expr
forall r e. (ExprC r, LiteralC r, Quantity e) => e -> r
inxiM1 UnitalChunk
slipHght)