What’s New in the Pulse Physiology Engine 4.4.0
×
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 void Burn();
54 // These are both part of the consume meal condition.
55 //void Dehydration(double time); // Need to revisit
56 //void Starvation(double time); // Need to revisit
57 void Dehydration();
58 // Used in Reset & Starvation
59 void CalculateBasalMetabolicRate();
60
61 // Process Methods
62 void CalculateVitalSigns();
63
64 // Serializable member variables (Set in Initialize and in schema)
65 double m_UsableEnergyStore_J;
66 double m_PeakPowerEnergyStore_J;
67 double m_MediumPowerEnergyStore_J;
68 double m_EnduranceEnergyStore_J;
69 SERunningAverage* m_BloodpH;
70 SERunningAverage* m_BicarbonateMolarity_mmol_Per_L;
71
72 // Stateless member variable (Set in SetUp())
73 double m_BurnMetabolicContributionIncrement_W; // Assumes Burn() called first in PreProcess, as this parameter is used in subsequent methods in PreProcess
74 // Cmpts,Substance, and nodes
75 SELiquidCompartment* m_SkinExtracellular;
76 SELiquidSubstanceQuantity* m_AortaHCO3;
77 //Nodes
78 SEThermalCircuitNode* m_coreNode;
79 SEThermalCircuitNode* m_skinNode;
80 //Paths
81 SEThermalCircuitPath* m_groundToCorePath;
82 SEThermalCircuitPath* m_coreToGroundPath;
83 SEThermalCircuitPath* m_coreToSkinPath;
84 SEThermalCircuitPath* m_skinToGroundPath;
85 SEFluidCircuitPath* m_skinExtravascularToSweatingGroundPath;
86 //Circuits
87 SEThermalCircuit* m_InternalTemperatureCircuit;
88 SEThermalCircuit* m_TemperatureCircuit;
89 SEThermalCircuitCalculator* m_circuitCalculator;
90 //Substances
91 SESubstanceCompound* m_Sweat;
92 };
93END_NAMESPACE
94
Definition: PBPhysiology.h:25
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.