diff --git a/code/drasil-example/Drasil/SWHS/GenDefs.hs b/code/drasil-example/Drasil/SWHS/GenDefs.hs index 2af4f8f61a..632e23d6bd 100644 --- a/code/drasil-example/Drasil/SWHS/GenDefs.hs +++ b/code/drasil-example/Drasil/SWHS/GenDefs.hs @@ -8,17 +8,18 @@ import Utils.Drasil import Control.Lens ((^.)) import Data.Drasil.Concepts.Math (rOfChng, unit_) +import Data.Drasil.Concepts.Thermodynamics (lawConvCooling) import Data.Drasil.Quantities.Math (uNormalVect, surface, gradient) import Data.Drasil.Quantities.PhysicalProperties as QPP (vol, mass, density) import Data.Drasil.Quantities.Physics as QP (time) import Data.Drasil.Quantities.Thermodynamics as QT (heatCapSpec, temp) -import Drasil.SWHS.Assumptions (assumpCWTAT, assumpLCCCW, assumpTPCAV, - assumpDWPCoV, assumpSHECoV, assumpTHCCoT) -import Drasil.SWHS.Concepts (gaussDiv) +import Drasil.SWHS.Assumptions (assumpCWTAT, assumpLCCCW, assumpLCCWP, + assumpTPCAV, assumpDWPCoV, assumpSHECoV, assumpTHCCoT) +import Drasil.SWHS.Concepts (coil, gaussDiv, phaseChangeMaterial) import Drasil.SWHS.References (koothoor2013) -import Drasil.SWHS.TMods (consThermE) +import Drasil.SWHS.TMods (consThermE, nwtnCooling) import Drasil.SWHS.Unitals (coilHTC, htFluxC, htFluxIn, htFluxOut, htFluxP, inSA, outSA, pcmHTC, tempC, tempPCM, tempW, thFluxVect, volHtGen) @@ -53,7 +54,7 @@ rocTempSimpRel = sy QPP.mass * sy QT.heatCapSpec * htFluxWaterFromCoil :: GenDefn htFluxWaterFromCoil = gd htFluxWaterFromCoilRC (getUnit htFluxC) Nothing [makeCite koothoor2013] "htFluxWaterFromCoil" - [makeRef2S assumpLCCCW, makeRef2S assumpTHCCoT] + [newtonLawNote htFluxC assumpLCCCW coil, makeRef2S assumpTHCCoT] htFluxWaterFromCoilRC :: RelationConcept htFluxWaterFromCoilRC = makeRC "htFluxWaterFromCoilRC" (htFluxC ^. term) @@ -67,7 +68,8 @@ htFluxWaterFromCoilRel = sy htFluxC $= sy coilHTC * (sy tempC - apply1 tempW tim htFluxPCMFromWater :: GenDefn htFluxPCMFromWater = gd htFluxPCMFromWaterRC (getUnit htFluxP) Nothing - [makeCite koothoor2013] "htFluxPCMFromWater" [makeRef2S assumpLCCCW] + [makeCite koothoor2013] "htFluxPCMFromWater" + [newtonLawNote htFluxP assumpLCCWP phaseChangeMaterial] htFluxPCMFromWaterRC :: RelationConcept htFluxPCMFromWaterRC = makeRC "htFluxPCMFromWaterRC" (htFluxP ^. term) @@ -76,6 +78,12 @@ htFluxPCMFromWaterRC = makeRC "htFluxPCMFromWaterRC" (htFluxP ^. term) htFluxPCMFromWaterRel :: Relation htFluxPCMFromWaterRel = sy htFluxP $= sy pcmHTC * (apply1 tempW time - apply1 tempPCM time) +newtonLawNote :: UnitalChunk -> ConceptInstance -> ConceptChunk -> Sentence +newtonLawNote u a c = foldlSent [ch u `sIs` S "found by assuming that", + phrase lawConvCooling, S "applies" +:+. sParen (makeRef2S a), S "This law", + sParen (S "defined" `sIn` makeRef2S nwtnCooling) `sIs` S "used on", + phrase surface `ofThe` phrase c] + -------------------------------------- -- General Definitions Derivation -- -------------------------------------- diff --git a/code/stable/nopcm/SRS/NoPCM_SRS.tex b/code/stable/nopcm/SRS/NoPCM_SRS.tex index f01db52b71..96633dc807 100644 --- a/code/stable/nopcm/SRS/NoPCM_SRS.tex +++ b/code/stable/nopcm/SRS/NoPCM_SRS.tex @@ -426,7 +426,8 @@ \subsubsection{Theoretical Models} Source & \cite[(pg. 8)]{incroperaEtAl2007} \\ \midrule \\ -RefBy & +RefBy & \hyperref[GD:htFluxWaterFromCoil]{GD: htFluxWaterFromCoil} + \\ \bottomrule \end{tabular} \end{minipage} @@ -523,7 +524,7 @@ \subsubsection{General Definitions} \item{$t$ is the time (s)} \end{symbDescription} \\ \midrule \\ -Notes & \hyperref[assumpLCCCW]{A: Newton-Law-Convective-Cooling-Coil-Water} +Notes & ${q_{\text{C}}}$ is found by assuming that Newton's law of cooling applies (\hyperref[assumpLCCCW]{A: Newton-Law-Convective-Cooling-Coil-Water}). This law (defined in \hyperref[TM:nwtnCooling]{TM: nwtnCooling}) is used on the surface of the heating coil. \hyperref[assumpTHCCoT]{A: Temp-Heating-Coil-Constant-over-Time} @@ -919,7 +920,7 @@ \section{Traceability Matrices and Graphs} \\ \hyperref[GD:rocTempSimp]{GD: rocTempSimp} & & X & & & X & & & \\ -\hyperref[GD:htFluxWaterFromCoil]{GD: htFluxWaterFromCoil} & & & & & & & & +\hyperref[GD:htFluxWaterFromCoil]{GD: htFluxWaterFromCoil} & & & & X & & & & \\ \hyperref[IM:eBalanceOnWtr]{IM: eBalanceOnWtr} & X & & & & X & X & & \\ diff --git a/code/stable/nopcm/Website/NoPCM_SRS.html b/code/stable/nopcm/Website/NoPCM_SRS.html index e53332b7e4..14cb7e5567 100644 --- a/code/stable/nopcm/Website/NoPCM_SRS.html +++ b/code/stable/nopcm/Website/NoPCM_SRS.html @@ -818,7 +818,11 @@

Theoretical Models

RefBy -

+ +

+ GD: htFluxWaterFromCoil +

+ @@ -1008,7 +1012,7 @@

Notes

- A: Newton-Law-Convective-Cooling-Coil-Water + qC is found by assuming that Newton's law of cooling applies (A: Newton-Law-Convective-Cooling-Coil-Water). This law (defined in TM: nwtnCooling) is used on the surface of the heating coil.

A: Temp-Heating-Coil-Constant-over-Time @@ -2267,7 +2271,7 @@

Traceability Matrices and Graphs

- + X diff --git a/code/stable/swhs/SRS/SWHS_SRS.tex b/code/stable/swhs/SRS/SWHS_SRS.tex index 2343ff945c..987bae9220 100644 --- a/code/stable/swhs/SRS/SWHS_SRS.tex +++ b/code/stable/swhs/SRS/SWHS_SRS.tex @@ -375,10 +375,10 @@ \subsubsection{Assumptions} \item[Temp-PCM-Constant-Across-Volume:\phantomsection\label{assumpTPCAV}]{The temperature of the phase change material is the same throughout the volume of PCM. (RefBy: \hyperref[GD:rocTempSimp]{GD: rocTempSimp}, \hyperref[likeChgUTP]{LC: Uniform-Temperature-PCM}, \hyperref[IM:eBalanceOnWtr]{IM: eBalanceOnWtr}, and \hyperref[IM:eBalanceOnPCM]{IM: eBalanceOnPCM}.)} \item[Density-Water-PCM-Constant-over-Volume:\phantomsection\label{assumpDWPCoV}]{The density of water and density of PCM have no spatial variation; that is, they are each constant over their entire volume. (RefBy: \hyperref[GD:rocTempSimp]{GD: rocTempSimp}.)} \item[Specific-Heat-Energy-Constant-over-Volume:\phantomsection\label{assumpSHECov}]{The specific heat capacity of water, specific heat capacity of PCM as a solid, and specific heat capacity of PCM as a liquid have no spatial variation; that is, they are each constant over their entire volume. (RefBy: \hyperref[GD:rocTempSimp]{GD: rocTempSimp}.)} -\item[Newton-Law-Convective-Cooling-Coil-Water:\phantomsection\label{assumpLCCCW}]{Newton's law of convective cooling applies between the heating coil and the water. (RefBy: \hyperref[GD:htFluxWaterFromCoil]{GD: htFluxWaterFromCoil} and \hyperref[GD:htFluxPCMFromWater]{GD: htFluxPCMFromWater}.)} +\item[Newton-Law-Convective-Cooling-Coil-Water:\phantomsection\label{assumpLCCCW}]{Newton's law of convective cooling applies between the heating coil and the water. (RefBy: \hyperref[GD:htFluxWaterFromCoil]{GD: htFluxWaterFromCoil}.)} \item[Temp-Heating-Coil-Constant-over-Time:\phantomsection\label{assumpTHCCoT}]{The temperature of the heating coil is constant over time. (RefBy: \hyperref[likeChgTCVOD]{LC: Temperature-Coil-Variable-Over-Day} and \hyperref[GD:htFluxWaterFromCoil]{GD: htFluxWaterFromCoil}.)} \item[Temp-Heating-Coil-Constant-over-Length:\phantomsection\label{assumpTHCCoL}]{The temperature of the heating coil does not vary along its length. (RefBy: \hyperref[likeChgTCVOL]{LC: Temperature-Coil-Variable-Over-Length} and \hyperref[IM:eBalanceOnWtr]{IM: eBalanceOnWtr}.)} -\item[Law-Convective-Cooling-Water-PCM:\phantomsection\label{assumpLCCWP}]{Newton's law of convective cooling applies between the water and the PCM.} +\item[Law-Convective-Cooling-Water-PCM:\phantomsection\label{assumpLCCWP}]{Newton's law of convective cooling applies between the water and the PCM. (RefBy: \hyperref[GD:htFluxPCMFromWater]{GD: htFluxPCMFromWater}.)} \item[Charging-Tank-No-Temp-Discharge:\phantomsection\label{assumpCTNOD}]{The model only accounts for charging of the tank, not discharging. The temperature of the water and temperature of the phase change material can only increase, or remain constant; they do not decrease. This implies that the initial temperature \hyperref[assumpSITWP]{A: Same-Initial-Temp-Water-PCM} is less than (or equal) to the temperature of the heating coil. (RefBy: \hyperref[likeChgDT]{LC: Discharging-Tank} and \hyperref[IM:eBalanceOnWtr]{IM: eBalanceOnWtr}.)} \item[Same-Initial-Temp-Water-PCM:\phantomsection\label{assumpSITWP}]{The initial temperature of the water and the PCM is the same. (RefBy: \hyperref[likeChgDITPW]{LC: Different-Initial-Temps-PCM-Water}, \hyperref[IM:eBalanceOnWtr]{IM: eBalanceOnWtr}, \hyperref[IM:eBalanceOnPCM]{IM: eBalanceOnPCM}, and \hyperref[assumpCTNOD]{A: Charging-Tank-No-Temp-Discharge}.)} \item[PCM-Initially-Solid:\phantomsection\label{assumpPIS}]{The simulation will start with the PCM in a solid state. (RefBy: \hyperref[IM:heatEInPCM]{IM: heatEInPCM} and \hyperref[IM:eBalanceOnPCM]{IM: eBalanceOnPCM}.)} @@ -546,7 +546,8 @@ \subsubsection{Theoretical Models} Source & \cite[(pg. 8)]{incroperaEtAl2007} \\ \midrule \\ -RefBy & +RefBy & \hyperref[GD:htFluxWaterFromCoil]{GD: htFluxWaterFromCoil} and \hyperref[GD:htFluxPCMFromWater]{GD: htFluxPCMFromWater} + \\ \bottomrule \end{tabular} \end{minipage} @@ -643,7 +644,7 @@ \subsubsection{General Definitions} \item{$t$ is the time (s)} \end{symbDescription} \\ \midrule \\ -Notes & \hyperref[assumpLCCCW]{A: Newton-Law-Convective-Cooling-Coil-Water} +Notes & ${q_{\text{C}}}$ is found by assuming that Newton's law of cooling applies (\hyperref[assumpLCCCW]{A: Newton-Law-Convective-Cooling-Coil-Water}). This law (defined in \hyperref[TM:nwtnCooling]{TM: nwtnCooling}) is used on the surface of the heating coil. \hyperref[assumpTHCCoT]{A: Temp-Heating-Coil-Constant-over-Time} @@ -683,7 +684,7 @@ \subsubsection{General Definitions} \item{${T_{\text{P}}}$ is the temperature of the phase change material (${}^{\circ}$C)} \end{symbDescription} \\ \midrule \\ -Notes & \hyperref[assumpLCCCW]{A: Newton-Law-Convective-Cooling-Coil-Water} +Notes & ${q_{\text{P}}}$ is found by assuming that Newton's law of cooling applies (\hyperref[assumpLCCWP]{A: Law-Convective-Cooling-Water-PCM}). This law (defined in \hyperref[TM:nwtnCooling]{TM: nwtnCooling}) is used on the surface of the phase change material. \\ \midrule \\ Source & \cite{koothoor2013} @@ -1508,7 +1509,7 @@ \section{Traceability Matrices and Graphs} \\ \hyperref[GD:htFluxWaterFromCoil]{GD: htFluxWaterFromCoil} & & & & & & & X & X & & & & & & & & & & & & \\ -\hyperref[GD:htFluxPCMFromWater]{GD: htFluxPCMFromWater} & & & & & & & X & & & & & & & & & & & & & +\hyperref[GD:htFluxPCMFromWater]{GD: htFluxPCMFromWater} & & & & & & & & & & X & & & & & & & & & & \\ \hyperref[IM:eBalanceOnWtr]{IM: eBalanceOnWtr} & & & X & X & & & & & X & & X & X & & X & X & X & & & X & \\ @@ -1602,9 +1603,9 @@ \section{Traceability Matrices and Graphs} \\ \hyperref[GD:rocTempSimp]{GD: rocTempSimp} & & & & & & & & X & & & & X & & & & & & \\ -\hyperref[GD:htFluxWaterFromCoil]{GD: htFluxWaterFromCoil} & & & & & & & & & & & & & & & & & & +\hyperref[GD:htFluxWaterFromCoil]{GD: htFluxWaterFromCoil} & & & & & & & & & & & X & & & & & & & \\ -\hyperref[GD:htFluxPCMFromWater]{GD: htFluxPCMFromWater} & & & & & & & & & & & & & & & & & & +\hyperref[GD:htFluxPCMFromWater]{GD: htFluxPCMFromWater} & & & & & & & & & & & X & & & & & & & \\ \hyperref[IM:eBalanceOnWtr]{IM: eBalanceOnWtr} & X & X & & & & & & & & & & X & X & X & X & X & & \\ diff --git a/code/stable/swhs/Website/SWHS_SRS.html b/code/stable/swhs/Website/SWHS_SRS.html index d414b4e953..14dc0b8355 100644 --- a/code/stable/swhs/Website/SWHS_SRS.html +++ b/code/stable/swhs/Website/SWHS_SRS.html @@ -764,7 +764,7 @@

Assumptions

- Newton-Law-Convective-Cooling-Coil-Water: Newton's law of convective cooling applies between the heating coil and the water. (RefBy: GD: htFluxWaterFromCoil and GD: htFluxPCMFromWater.) + Newton-Law-Convective-Cooling-Coil-Water: Newton's law of convective cooling applies between the heating coil and the water. (RefBy: GD: htFluxWaterFromCoil.)

@@ -779,7 +779,7 @@

Assumptions

- Law-Convective-Cooling-Water-PCM: Newton's law of convective cooling applies between the water and the PCM. + Law-Convective-Cooling-Water-PCM: Newton's law of convective cooling applies between the water and the PCM. (RefBy: GD: htFluxPCMFromWater.)

@@ -1135,7 +1135,11 @@

Theoretical Models

RefBy -

+ +

+ GD: htFluxWaterFromCoil and GD: htFluxPCMFromWater +

+ @@ -1325,7 +1329,7 @@

Notes

- A: Newton-Law-Convective-Cooling-Coil-Water + qC is found by assuming that Newton's law of cooling applies (A: Newton-Law-Convective-Cooling-Coil-Water). This law (defined in TM: nwtnCooling) is used on the surface of the heating coil.

A: Temp-Heating-Coil-Constant-over-Time @@ -1395,7 +1399,7 @@

Notes

- A: Newton-Law-Convective-Cooling-Coil-Water + qP is found by assuming that Newton's law of cooling applies (A: Law-Convective-Cooling-Water-PCM). This law (defined in TM: nwtnCooling) is used on the surface of the phase change material.

@@ -3527,10 +3531,10 @@

Traceability Matrices and Graphs

- X + X @@ -4529,7 +4533,7 @@

Traceability Matrices and Graphs

- + X @@ -4550,7 +4554,7 @@

Traceability Matrices and Graphs

- + X