module Drasil.SWHSNoPCM.Unitals where

import Language.Drasil

import Data.Drasil.SI_Units (centigrade)
import Data.Drasil.Quantities.Thermodynamics (temp)

import Drasil.SWHS.Unitals (absTol, arMax, arMin, coilHTC, coilHTCMax,
  coilHTCMin, coilSA, coilSAMax, diam, htCapW, htCapWMax, htCapWMin, lInit,
  relTol, tankLength, tankLengthMax, tankLengthMin, tempC, timeFinal,
  timeFinalMax, timeStep, wDensity, wDensityMax, wDensityMin)

inputs :: [QuantityDict]
inputs :: [QuantityDict]
inputs = (UncertQ -> QuantityDict) -> [UncertQ] -> [QuantityDict]
forall a b. (a -> b) -> [a] -> [b]
map UncertQ -> QuantityDict
forall q. (Quantity q, MayHaveUnit q) => q -> QuantityDict
qw [UncertQ]
constrained [QuantityDict] -> [QuantityDict] -> [QuantityDict]
forall a. [a] -> [a] -> [a]
++ (UncertainChunk -> QuantityDict)
-> [UncertainChunk] -> [QuantityDict]
forall a b. (a -> b) -> [a] -> [b]
map UncertainChunk -> QuantityDict
forall q. (Quantity q, MayHaveUnit q) => q -> QuantityDict
qw [UncertainChunk]
unconstrained

unconstrained :: [UncertainChunk]
unconstrained :: [UncertainChunk]
unconstrained = [UncertainChunk
absTol, UncertainChunk
relTol]

constrained :: [UncertQ]
constrained :: [UncertQ]
constrained =  [UncertQ
coilSA, UncertQ
htCapW, UncertQ
coilHTC, UncertQ
tempInit,
  UncertQ
timeFinal, UncertQ
tankLength, UncertQ
tempC, UncertQ
timeStep, UncertQ
wDensity, UncertQ
diam]
  -- w_E, temp_W

tempInit :: UncertQ
tempInit :: UncertQ
tempInit = String
-> NP
-> String
-> Symbol
-> UnitDefn
-> Space
-> [ConstraintE]
-> Expr
-> Uncertainty
-> UncertQ
forall u.
IsUnit u =>
String
-> NP
-> String
-> Symbol
-> u
-> Space
-> [ConstraintE]
-> Expr
-> Uncertainty
-> UncertQ
uqc String
"tempInit" (String -> NP
nounPhraseSP String
"initial temperature")
  String
"the temperature at the beginning of the simulation"
  (Symbol -> Symbol -> Symbol
sub (UnitalChunk -> Symbol
forall q. HasSymbol q => q -> Symbol
eqSymb UnitalChunk
temp) Symbol
lInit) UnitDefn
centigrade Space
Real
  [RealInterval Expr Expr -> ConstraintE
physRange (RealInterval Expr Expr -> ConstraintE)
-> RealInterval Expr Expr -> ConstraintE
forall a b. (a -> b) -> a -> b
$ (Inclusive, Expr) -> (Inclusive, Expr) -> RealInterval Expr Expr
forall a b. (Inclusive, a) -> (Inclusive, b) -> RealInterval a b
Bounded (Inclusive
Exc, Integer -> Expr
forall r. LiteralC r => Integer -> r
exactDbl Integer
0) (Inclusive
Exc, Integer -> Expr
forall r. LiteralC r => Integer -> r
exactDbl Integer
100)] (Integer -> Expr
forall r. LiteralC r => Integer -> r
exactDbl Integer
40) Uncertainty
defaultUncrt

specParamValList :: [ConstQDef]
specParamValList :: [ConstQDef]
specParamValList = [ConstQDef
tankLengthMin, ConstQDef
tankLengthMax,
  ConstQDef
wDensityMin, ConstQDef
wDensityMax, ConstQDef
coilSAMax, ConstQDef
htCapWMin, ConstQDef
htCapWMax, 
  ConstQDef
coilHTCMin, ConstQDef
coilHTCMax, ConstQDef
timeFinalMax, ConstQDef
arMin, ConstQDef
arMax]