{-# LANGUAGE PostfixOperators #-}
module Drasil.SWHSNoPCM.Assumptions where --all of this file is exported

import Language.Drasil
import Language.Drasil.Chunk.Concept.NamedCombinators
import qualified Language.Drasil.NounPhrase.Combinators as NP
import qualified Language.Drasil.Sentence.Combinators as S

import Data.Drasil.Concepts.Documentation (model, assumpDom, material_)

import Data.Drasil.Quantities.PhysicalProperties (vol)
import Data.Drasil.Quantities.Physics (pressure)
import Data.Drasil.Quantities.Thermodynamics (boilPt, meltPt)

import Data.Drasil.Concepts.Thermodynamics as CT (heat)
import qualified Data.Drasil.Quantities.Thermodynamics as QT (temp)

import Drasil.SWHS.Assumptions (assumpTEO, assumpHTCC, assumpCWTAT,
  assumpLCCCW, assumpTHCCoT, assumpTHCCoL, assumpS14, assumpPIT, assumpVCN)
import Drasil.SWHS.Concepts (tank, water)
-- import Drasil.SWHS.References (swhsCitations)
import Drasil.SWHS.Unitals (volHtGen, tempC, tempInit, tempW, htCapW, wDensity)

-------------------------
-- 4.2.1 : Assumptions --
-------------------------

assumptions :: [ConceptInstance]
assumptions :: [ConceptInstance]
assumptions = [ConceptInstance
assumpTEO, ConceptInstance
assumpHTCC, ConceptInstance
assumpCWTAT, ConceptInstance
assumpDWCoW, ConceptInstance
assumpSHECoW,
  ConceptInstance
assumpLCCCW, ConceptInstance
assumpTHCCoT, ConceptInstance
assumpTHCCoL, ConceptInstance
assumpCTNTD, ConceptInstance
assumpWAL, ConceptInstance
assumpPIT,
  ConceptInstance
assumpNIHGBW, ConceptInstance
assumpAPT, ConceptInstance
assumpVCN]
  
assumpS3, assumpS4, assumpS5, assumpS9_npcm, assumpS12, assumpS13 :: Sentence
assumpDWCoW, assumpSHECoW, assumpCTNTD, assumpNIHGBW, assumpAPT,
  assumpWAL :: ConceptInstance

assumpS3 :: Sentence
assumpS3 = 
  [Sentence] -> Sentence
foldlSent [forall n. NounPhrase n => n -> Sentence
atStartNP (NP -> NP
NP.the (ConceptChunk
water forall c d. (NamedIdea c, NamedIdea d) => c -> d -> NP
`inThe` ConceptChunk
tank)),
  String -> Sentence
S String
"is fully mixed, so the", forall n. NamedIdea n => n -> Sentence
phrase ConstrConcept
tempW Sentence -> Sentence -> Sentence
`S.isThe`
  String -> Sentence
S String
"same throughout the entire", forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
tank]

assumpS4 :: Sentence
assumpS4 = 
  [Sentence] -> Sentence
foldlSent [forall n. NounPhrase n => n -> Sentence
atStartNP (forall t. NamedIdea t => t -> NP
the UncertQ
wDensity), String -> Sentence
S String
"has no spatial variation; that is"
  Sentence -> Sentence -> Sentence
`sC` String -> Sentence
S String
"it is constant over their entire", forall n. NamedIdea n => n -> Sentence
phrase UnitalChunk
vol]

assumpDWCoW :: ConceptInstance
assumpDWCoW = forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic String
"assumpDWCoW" Sentence
assumpS4
  String
"Density-Water-Constant-over-Volume" ConceptChunk
assumpDom

assumpS5 :: Sentence
assumpS5 = 
  [Sentence] -> Sentence
foldlSent [forall n. NounPhrase n => n -> Sentence
atStartNP (forall t. NamedIdea t => t -> NP
the UncertQ
htCapW), String -> Sentence
S String
"has no spatial variation; that", 
  String -> Sentence
S String
"is, it is constant over its entire", forall n. NamedIdea n => n -> Sentence
phrase UnitalChunk
vol]

assumpSHECoW :: ConceptInstance
assumpSHECoW = forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic String
"assumpSHECoW" Sentence
assumpS5
  String
"Specific-Heat-Energy-Constant-over-Volume" ConceptChunk
assumpDom

assumpS9_npcm :: Sentence
assumpS9_npcm = 
  [Sentence] -> Sentence
foldlSent [forall n. NounPhrase n => n -> Sentence
atStartNP (forall t. NamedIdea t => t -> NP
the IdeaDict
model), String -> Sentence
S String
"only accounts for charging",
  forall n. NounPhrase n => n -> Sentence
phraseNP (forall t. NamedIdea t => t -> NP
the ConceptChunk
tank) Sentence -> Sentence -> Sentence
`sC` (String -> Sentence
S String
"not discharging" !.), forall n. NounPhrase n => n -> Sentence
atStartNP (forall t. NamedIdea t => t -> NP
the ConstrConcept
tempW), String -> Sentence
S String
"can only",
  String -> Sentence
S String
"increase, or remain constant; it cannot decrease. This implies that the",
  forall n. NamedIdea n => n -> Sentence
phrase UncertQ
tempInit, String -> Sentence
S String
"is less than (or equal to) the", forall n. NamedIdea n => n -> Sentence
phrase UncertQ
tempC]

assumpCTNTD :: ConceptInstance
assumpCTNTD = forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic String
"assumpCTNTD" Sentence
assumpS9_npcm
  String
"Charging-Tank-No-Temp-Discharge" ConceptChunk
assumpDom

assumpS12 :: Sentence
assumpS12 = 
  String -> Sentence
S String
"No internal" Sentence -> Sentence -> Sentence
+:+ forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
heat Sentence -> Sentence -> Sentence
+:+ String -> Sentence
S String
"is generated by the water; therefore, the"
  Sentence -> Sentence -> Sentence
+:+ forall n. NamedIdea n => n -> Sentence
phrase UnitalChunk
volHtGen Sentence -> Sentence -> Sentence
+:+. String -> Sentence
S String
"is zero"

assumpNIHGBW :: ConceptInstance
assumpNIHGBW = forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic String
"assumpNIHGBW" Sentence
assumpS12
  String
"No-Internal-Heat-Generation-By-Water" ConceptChunk
assumpDom

assumpWAL :: ConceptInstance
assumpWAL = forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic String
"assumpWAL" (Sentence -> Sentence
assumpS14 forall a b. (a -> b) -> a -> b
$ forall n. NamedIdea n => n -> Sentence
phrase IdeaDict
material_ Sentence -> Sentence -> Sentence
+:+
  Sentence -> Sentence
sParen (forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
water Sentence -> Sentence -> Sentence
+:+ String -> Sentence
S String
"in this case")) String
"Water-Always-Liquid" ConceptChunk
assumpDom

assumpS13 :: Sentence
assumpS13 = 
  forall n. NounPhrase n => n -> Sentence
atStartNP (NP -> NP
NP.the (UnitalChunk
pressure forall c d. (NamedIdea c, NamedIdea d) => c -> d -> NP
`inThe` ConceptChunk
tank)) Sentence -> Sentence -> Sentence
+:+ String -> Sentence
S String
"is atmospheric, so the" Sentence -> Sentence -> Sentence
+:+
  forall n. NounPhrase n => n -> Sentence
phraseNP (UnitalChunk
meltPt forall c d. (NamedIdea c, NamedIdea d) => c -> d -> NP
`and_` UnitalChunk
boilPt) Sentence -> Sentence -> Sentence
+:+ String -> Sentence
S String
"of water are" Sentence -> Sentence -> Sentence
+:+
  String -> Sentence
S (forall a. Show a => a -> String
show (Integer
0 :: Integer)) Sentence -> Sentence -> Sentence
:+: USymb -> Sentence
Sy (forall c. Unitary c => c -> USymb
unit_symb UnitalChunk
QT.temp) Sentence -> Sentence -> Sentence
`S.and_`
  String -> Sentence
S (forall a. Show a => a -> String
show (Integer
100 :: Integer)) Sentence -> Sentence -> Sentence
:+: USymb -> Sentence
Sy (forall c. Unitary c => c -> USymb
unit_symb UnitalChunk
QT.temp) Sentence -> Sentence -> Sentence
`sC` (String -> Sentence
S String
"respectively" !.)

assumpAPT :: ConceptInstance
assumpAPT = forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic String
"assumpAPT" Sentence
assumpS13
  String
"Atmospheric-Pressure-Tank" ConceptChunk
assumpDom