module Drasil.SWHSNoPCM.ODEs (noPCMODEOpts, noPCMODEInfo) where import Language.Drasil (ExprC(sy),LiteralC(exactDbl), InitialValueProblem, makeAIVP) import Language.Drasil.Code (odeInfo', odeOptions, quantvar, ODEInfo, ODEMethod(RK45), ODEOptions) import Drasil.SWHS.Unitals (tauW, tempC, tempInit, timeFinal, timeStep, absTol, relTol) import Drasil.SWHSNoPCM.IMods(eBalanceOnWtrRC) noPCMODEOpts :: ODEOptions noPCMODEOpts :: ODEOptions noPCMODEOpts = ODEMethod -> CodeExpr -> CodeExpr -> CodeExpr -> ODEOptions odeOptions ODEMethod RK45 (UncertainChunk -> CodeExpr forall c. (HasUID c, HasSymbol c) => c -> CodeExpr forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r sy UncertainChunk absTol) (UncertainChunk -> CodeExpr forall c. (HasUID c, HasSymbol c) => c -> CodeExpr forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r sy UncertainChunk relTol) (UncertQ -> CodeExpr forall c. (HasUID c, HasSymbol c) => c -> CodeExpr forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r sy UncertQ timeStep) noPCMIVP :: InitialValueProblem noPCMIVP :: InitialValueProblem noPCMIVP = Expr -> Expr -> [Expr] -> InitialValueProblem makeAIVP (Integer -> Expr forall r. LiteralC r => Integer -> r exactDbl Integer 0) (UncertQ -> Expr forall c. (HasUID c, HasSymbol c) => c -> Expr forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r sy UncertQ timeFinal) [UncertQ -> Expr forall c. (HasUID c, HasSymbol c) => c -> Expr forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r sy UncertQ tempInit] noPCMODEInfo :: ODEInfo noPCMODEInfo :: ODEInfo noPCMODEInfo = [CodeVarChunk] -> ODEOptions -> DifferentialModel -> InitialValueProblem -> ODEInfo odeInfo' [UnitalChunk -> CodeVarChunk forall c. (Quantity c, MayHaveUnit c) => c -> CodeVarChunk quantvar UnitalChunk tauW, UncertQ -> CodeVarChunk forall c. (Quantity c, MayHaveUnit c) => c -> CodeVarChunk quantvar UncertQ tempC] ODEOptions noPCMODEOpts DifferentialModel eBalanceOnWtrRC InitialValueProblem noPCMIVP