EnergyModel.h
1/* Distributed under the Apache License, Version 2.0.
2 See accompanying NOTICE file for details.*/
3
4#pragma once
5
6#include "engine/common/system/Model.h"
7#include "engine/common/system/Systems.h"
8#include "cdm/circuit/thermal/SEThermalCircuitCalculator.h"
9
10class SEPatient;
16
17namespace pulse
18{
19 class PBPhysiology;
20 class EngineTest;
24 class PULSE_DECL EnergyModel : public EnergySystem, public Model
25 {
26 friend PBPhysiology;//friend the serialization class
27 friend EngineTest;
28 public:
29 EnergyModel(Data& data);
30 ~EnergyModel(void);
31
32 void Clear() override;
33
34 // Set members to a stable homeostatic state
35 void Initialize() override;
36 // Set pointers and other member varialbes common to both homeostatic initialization and loading a state
37 void SetUp() override;
38
39 void AtSteadyState() override;
40 void PreProcess() override;
41 void Process(bool solve_and_transport=true) override;
42 void PostProcess(bool solve_and_transport=true) override;
43
44 protected:
45 void ComputeExposedModelParameters() override;
46
47 // Preprocess Methods
48 void CalculateMetabolicHeatGeneration();
49 void Perspiration();
50 void UpdateHeatResistance();
51 // Actions/Conditions
52 void Exercise();
53 // These are both part of the consume meal condition.
54 //void Dehydration(double time); // Need to revisit
55 //void Starvation(double time); // Need to revisit
56 void Dehydration();
57 // Used in Reset & Starvation
58 void CalculateBasalMetabolicRate();
59
60 // Process Methods
61 void CalculateVitalSigns();
62
63 // Serializable member variables (Set in Initialize and in schema)
64 double m_UsableEnergyStore_J;
65 double m_PeakPowerEnergyStore_J;
66 double m_MediumPowerEnergyStore_J;
67 double m_EnduranceEnergyStore_J;
68 SERunningAverage* m_BloodpH;
69 SERunningAverage* m_BicarbonateMolarity_mmol_Per_L;
70
71 // Stateless member variable (Set in SetUp())
72 // Cmpts,Substance, and nodes
73 SELiquidCompartment* m_SkinExtracellular;
74 SELiquidSubstanceQuantity* m_AortaHCO3;
75 //Nodes
76 SEThermalCircuitNode* m_coreNode;
77 SEThermalCircuitNode* m_skinNode;
78 //Paths
79 SEThermalCircuitPath* m_groundToCorePath;
80 SEThermalCircuitPath* m_coreToGroundPath;
81 SEThermalCircuitPath* m_coreToSkinPath;
82 SEFluidCircuitPath* m_skinExtravascularToSweatingGroundPath;
83 //Circuits
84 SEThermalCircuit* m_InternalTemperatureCircuit;
85 SEThermalCircuit* m_TemperatureCircuit;
86 SEThermalCircuitCalculator* m_circuitCalculator;
87 //Substances
88 SESubstanceCompound* m_Sweat;
89 };
90END_NAMESPACE
91
Definition: PBPhysiology.h:24
Definition: SECircuitCalculator.h:24
Definition: SEFluidCircuitPath.h:9
Definition: SELiquidCompartment.h:11
Definition: SELiquidSubstanceQuantity.h:12
Definition: SEPatient.h:13
Definition: SERunningAverage.h:8
Definition: SESubstanceCompound.h:10
Definition: SEThermalCircuit.h:12
Definition: SEThermalCircuitNode.h:10
Definition: SEThermalCircuitPath.h:9
Definition: Logger.h:14

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.