Skip to content

Commit

Permalink
Merge pull request #3981 from daijingz/CP4
Browse files Browse the repository at this point in the history
#3252 Sentence Reworking (for the SWHSNoPCM Example)
  • Loading branch information
JacquesCarette authored Oct 26, 2024
2 parents 5ed2a9c + 06dfe4f commit a41270e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ assumpDWCoW, assumpSHECoW, assumpCTNTD, assumpNIHGBW, assumpAPT,

assumpS3 =
foldlSent [atStartNP (NP.the (water `inThe` tank)),
S "is fully mixed, so the", phrase tempW `S.isThe`
S "is fully mixed" `sC` S "so the", phrase tempW `S.isThe`
S "same throughout the entire", phrase tank]

assumpS4 =
Expand All @@ -48,22 +48,22 @@ assumpDWCoW = cic "assumpDWCoW" assumpS4

assumpS5 =
foldlSent [atStartNP (the htCapW), S "has no spatial variation; that",
S "is, it is constant over its entire", phrase vol]
S "is" `sC` S "it is constant over its entire", phrase vol]

assumpSHECoW = cic "assumpSHECoW" assumpS5
"Specific-Heat-Energy-Constant-over-Volume" assumpDom

assumpS9_npcm =
foldlSent [atStartNP (the model), S "only accounts for charging",
phraseNP (the tank) `sC` (S "not discharging" !.), atStartNP (the tempW), S "can only",
S "increase, or remain constant; it cannot decrease. This implies that the",
phrase tempInit, S "is less than (or equal to) the", phrase tempC]
S "increase" `sC` S "or remain constant; it cannot decrease. This implies that the",
phrase tempInit `S.is` S "less than (or equal to) the", phrase tempC]

assumpCTNTD = cic "assumpCTNTD" assumpS9_npcm
"Charging-Tank-No-Temp-Discharge" assumpDom

assumpS12 =
S "No internal" +:+ phrase heat +:+ S "is generated by the water; therefore, the"
S "No internal" +:+ phrase heat `S.is` S "generated by the water; therefore, the"
+:+ phrase volHtGen +:+. S "is zero"

assumpNIHGBW = cic "assumpNIHGBW" assumpS12
Expand All @@ -73,7 +73,7 @@ assumpWAL = cic "assumpWAL" (assumpS14 $ phrase material_ +:+
sParen (phrase water +:+ S "in this case")) "Water-Always-Liquid" assumpDom

assumpS13 =
atStartNP (NP.the (pressure `inThe` tank)) +:+ S "is atmospheric, so the" +:+
atStartNP (NP.the (pressure `inThe` tank)) `S.is` S "atmospheric" `sC` S "so the" +:+
phraseNP (meltPt `and_` boilPt) +:+ S "of water are" +:+
S (show (0 :: Integer)) :+: Sy (unit_symb QT.temp) `S.and_`
S (show (100 :: Integer)) :+: Sy (unit_symb QT.temp) `sC` (S "respectively" !.)
Expand Down
5 changes: 2 additions & 3 deletions code/drasil-example/swhsnopcm/lib/Drasil/SWHSNoPCM/Body.hs
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,7 @@ introStartNoPCM = atStart' progName +:+ S "provide a novel way of storing" +:+.
introEnd :: Sentence -> CI -> Sentence
introEnd progSent pro = foldlSent_ [progSent +:+ S "The developed program",
S "will be referred to as", titleize pro, sParen (short pro),
S "based on the original, manually created version of" +:+
namedRef externalLinkRef' (S "SWHSNoPCM")]
S "based on the original" `sC` S "manually created version" `S.of_` namedRef externalLinkRef' (S "SWHSNoPCM")]

externalLinkRef' :: Reference
externalLinkRef' = makeURI "SWHSNoPCM_SRSLink"
Expand Down Expand Up @@ -268,7 +267,7 @@ scope = phrase thermalAnalysis `S.of_` S "a single" +:+ phrase sWHT

orgDocEnd :: Sentence
orgDocEnd = foldlSent_ [atStartNP (the inModel),
S "to be solved is referred to as" +:+. refS eBalanceOnWtr,
S "to be solved" `S.is` S "referred to as" +:+. refS eBalanceOnWtr,
atStartNP (the inModel), S "provides the", titleize ode,
sParen (short ode), S "that models the" +:+. phrase progName,
short progName, S "solves this", short ode]
Expand Down
10 changes: 5 additions & 5 deletions code/drasil-example/swhsnopcm/lib/Drasil/SWHSNoPCM/Changes.hs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ likelyChgs = [likeChgDT]
likeChgDT :: ConceptInstance
likeChgDT = cic "likeChgDT" (
foldlSent [chgsStart assumpCTNTD (S "The"), phrase model,
S "currently only accounts for charging of the tank. That is, increasing the",
S "currently only accounts" `S.for` S "charging of the tank. That is" `sC` S "increasing the",
phraseNP (temp `ofThe` water), S "to match the",(phrase temp `S.ofThe` S "coil" !.),
S "A more complete", phrase model, S "would also account for discharging of", phraseNP (the tank)])
S "A more complete", phrase model, S "would also account" `S.for` S "discharging" `S.of_` phraseNP (the tank)])
"Discharging-Tank" likeChgDom


Expand All @@ -32,11 +32,11 @@ unlikelyChgs = [unlikeChgWFS, unlikeChgNIHG]

unlikeChgWFS :: ConceptInstance
unlikeChgWFS = cic "unlikeChgWFS" (
foldlSent [chgsStart assumpWAL (S "It is unlikely for the change of"),
phrase water, S "from liquid to a solid, or from liquid to gas to be considered"])
foldlSent [chgsStart assumpWAL (S "It is unlikely" `S.for` S "the change of"),
phrase water, S "from liquid to a solid" `sC` S "or from liquid to gas to be considered"])
"Water-Fixed-States" unlikeChgDom

unlikeChgNIHG :: ConceptInstance
unlikeChgNIHG = cic "unlikeChgNIHG" (
foldlSent [chgsStart assumpNIHGBW (S "Is used for the derivations of"),
foldlSent [chgsStart assumpNIHGBW (S "Is used" `S.for` S "the derivations of"),
refS eBalanceOnWtr] ) "No-Internal-Heat-Generation" unlikeChgDom
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import Drasil.SWHSNoPCM.Unitals (inputs)
inputInitVals :: ConceptInstance
inputInitVals = cic "inputInitVals" (foldlSent [
titleize input_, S "the following", plural value, S "described in the table for",
namedRef inputInitValsTable (S "Required Inputs")`sC` S "which define", inReqDesc])
namedRef inputInitValsTable (S "Required Inputs") `sC` S "which define", inReqDesc])
"Input-Initial-Values" funcReqDom

--
Expand Down

0 comments on commit a41270e

Please sign in to comment.