#include <Energy.h>
Inherits PulseEnergySystem.
Public Member Functions | |
~Energy (void) | |
void | Clear () |
void | Initialize () |
Initializes system properties to valid homeostatic values. More... | |
void | SetUp () |
Initializes the energy specific quantities. More... | |
void | AtSteadyState () |
Applies an imposed dehydration time to the current fluid stores. More... | |
void | PreProcess () |
Prepares the energy system for the circuit solver. More... | |
void | Process (bool solve_and_transport=true) |
Processes the temperature circuit and calculates extravascular transport. More... | |
void | PostProcess (bool solve_and_transport=true) |
Updates the parameters for the temperature circuit. More... | |
![]() | |
PulseEnergySystem (Logger *logger) | |
virtual | ~PulseEnergySystem ()=default |
virtual const SEScalar * | GetScalar (const std::string &name) override |
![]() | |
SEEnergySystem (Logger *logger) | |
virtual | ~SEEnergySystem () |
virtual bool | HasAchievedExerciseLevel () const |
virtual SEScalar0To1 & | GetAchievedExerciseLevel () |
virtual double | GetAchievedExerciseLevel () const |
virtual bool | HasCoreTemperature () const |
virtual SEScalarTemperature & | GetCoreTemperature () |
virtual double | GetCoreTemperature (const TemperatureUnit &unit) const |
virtual bool | HasCreatinineProductionRate () const |
virtual SEScalarAmountPerTime & | GetCreatinineProductionRate () |
virtual double | GetCreatinineProductionRate (const AmountPerTimeUnit &unit) const |
virtual bool | HasExerciseMeanArterialPressureDelta () const |
virtual SEScalarPressure & | GetExerciseMeanArterialPressureDelta () |
virtual double | GetExerciseMeanArterialPressureDelta (const PressureUnit &unit) const |
virtual bool | HasFatigueLevel () const |
virtual SEScalar0To1 & | GetFatigueLevel () |
virtual double | GetFatigueLevel () const |
virtual bool | HasKetoneProductionRate () const |
virtual SEScalarAmountPerTime & | GetKetoneProductionRate () |
virtual double | GetKetoneProductionRate (const AmountPerTimeUnit &unit) const |
virtual bool | HasLactateProductionRate () const |
virtual SEScalarAmountPerTime & | GetLactateProductionRate () |
virtual double | GetLactateProductionRate (const AmountPerTimeUnit &unit) const |
virtual bool | HasSkinTemperature () const |
virtual SEScalarTemperature & | GetSkinTemperature () |
virtual double | GetSkinTemperature (const TemperatureUnit &unit) const |
virtual bool | HasSweatRate () const |
virtual SEScalarMassPerTime & | GetSweatRate () |
virtual double | GetSweatRate (const MassPerTimeUnit &unit) const |
virtual bool | HasTotalMetabolicRate () const |
virtual SEScalarPower & | GetTotalMetabolicRate () |
virtual double | GetTotalMetabolicRate (const PowerUnit &unit) const |
virtual bool | HasTotalWorkRateLevel () const |
virtual SEScalar0To1 & | GetTotalWorkRateLevel () |
virtual double | GetTotalWorkRateLevel () const |
![]() | |
SESystem (Logger *logger) | |
virtual | ~SESystem () |
![]() | |
Loggable (Logger *logger=nullptr) | |
Loggable (std::string const &logfile) | |
virtual | ~Loggable () |
virtual Logger * | GetLogger () const |
virtual void | SetLogger (Logger &logger) |
virtual void | Debug (std::string const &msg, std::string const &origin=empty) const |
virtual void | Debug (std::stringstream &msg, std::string const &origin=empty) const |
virtual void | Debug (std::ostream &msg, std::string const &origin=empty) const |
virtual void | Info (std::string const &msg, std::string const &origin=empty) const |
virtual void | Info (std::stringstream &msg, std::string const &origin=empty) const |
virtual void | Info (const std::stringstream &msg, std::string const &origin=empty) const |
virtual void | Info (std::ostream &msg, std::string const &origin=empty) const |
virtual void | Warning (std::string const &msg, std::string const &origin=empty) const |
virtual void | Warning (std::stringstream &msg, std::string const &origin=empty) const |
virtual void | Warning (std::ostream &msg, std::string const &origin=empty) const |
virtual void | Error (std::string const &msg, std::string const &origin=empty) const |
virtual void | Error (std::stringstream &msg, std::string const &origin=empty) const |
virtual void | Error (std::ostream &msg, std::string const &origin=empty) const |
virtual void | Fatal (std::string const &msg, std::string const &origin=empty) const |
virtual void | Fatal (std::stringstream &msg, std::string const &origin=empty) const |
virtual void | Fatal (std::ostream &msg, std::string const &origin=empty) const |
std::string | to_string (int i) |
std::string | to_string (unsigned int i) |
std::string | to_string (size_t t) |
std::string | to_string (float f) |
std::string | to_string (double d) |
Protected Member Functions | |
Energy (PulseData &data) | |
void | ComputeExposedModelParameters () override |
void | CalculateMetabolicHeatGeneration () |
Calculates the metabolic rate, depending on the current state of the patient. More... | |
void | CalculateSweatRate () |
Calculates the sweat rate if the core temperature is too high. More... | |
void | UpdateHeatResistance () |
Updates the variable core to skin heat transfer resistance. More... | |
void | Exercise () |
The exercise function updates the patient's metabolic rate if the exercise action is present and computes energy-store recovery post exercise. More... | |
void | CalculateBasalMetabolicRate () |
Calculates the basal metabolic rate from the Harris-Benedict formula. More... | |
void | CalculateVitalSigns () |
Checks the patient's thermal and metabolic state. More... | |
Friends | |
class | PulseData |
class | PBPulsePhysiology |
class | PulseEngineTest |
Additional Inherited Members | |
![]() | |
static const SEScalar * | GetScalar (const std::string &name, std::vector< SESystem *> *systems) |
![]() | |
static const std::string | empty |
Detailed Description
Constructor & Destructor Documentation
◆ Energy()
|
protected |
◆ ~Energy()
Energy::~Energy | ( | void | ) |
Member Function Documentation
◆ AtSteadyState()
|
virtual |
Applies an imposed dehydration time to the current fluid stores.
Starvation uses a coarse time-step approach with an assumed time-step of one day. This coarse time-step is used to to manually decrement all of the fluid stores which represents the loss due to urination, sweating, and other mechanisms. For time-steps longer than one day there is a reduced fluid loss. Applies an imposed starvation time to the current nutrient stores
Starvation uses a coarse time-step approach with an assumed time-step of one day. This coarse time-step is used to to manually decrement all of the nutrient stores which represents the loss due to metabolic consumption. For time durations greater than one day, there is a decrease in the basal metabolic rate due to mass loss from increased starvation times.
Implements PulseSystem.
◆ CalculateBasalMetabolicRate()
|
protected |
Calculates the basal metabolic rate from the Harris-Benedict formula.
The Harris-Benedict formula uses the patient height, weight age and sex to determine the basal metabolic requirements.
◆ CalculateMetabolicHeatGeneration()
|
protected |
Calculates the metabolic rate, depending on the current state of the patient.
The metabolic rate is dictated by the current state of the core temperature. This function includes states of increased metabolic rate due to shivering or severe hyperthermia. Additionally, an extreme drop in core temperature leads to decreasing metabolic rate. If the core temperature does not meet any of the criteria for increases/decreases, the metabolic rate will be calculated as the basal metabolic rate.
[herman2008physics]
◆ CalculateSweatRate()
|
protected |
Calculates the sweat rate if the core temperature is too high.
The sweat rate is calculated from a core temperature control function. The mass lost due to sweating is accounted for and a flow source from the skin extravascular to ground path is updated to ensure fluid loss
[herman2008physics]
- Todo:
- Convert to sweat density once specific gravity calculation is in
◆ CalculateVitalSigns()
|
protected |
Checks the patient's thermal and metabolic state.
The core and skin temperatures are recorded in this function. In addition, the current metabolic state of the patient may trigger the following events: hypothermia, hyperthermia, dehydration, fasciculation or fatigue. These events are only triggered if the current state falls within the criteria of the specific event
[Stocks2004HumanPhysiologicalResponseCold]
[mallet2001hypothermia]
- Event:
- Patient: Core temperature has fallen below 35 degrees Celsius. Patient is hypothermic.
- Irreversible:
- State: Core temperature has fallen below 20 degrees Celsius.
[mallet2001hypothermia]
- Event:
- Patient: Core temperature has exceeded 38.3 degrees Celsius. Patient is hyperthermic.
- Todo:
- Move to blood chemistry
- Event:
- The patient is in a state of metabolic acidosis
- Irreversible:
- State: arterial blood pH has dropped below 6.5.
- Event:
- The patient has exited the state state of metabolic acidosis
- Event:
- The patient is in a state of metabolic alkalosis
- Irreversible:
- State: arterial blood pH has increased above 8.5.
- Event:
- The patient has exited the state of metabolic alkalosis
◆ Clear()
|
virtual |
Reimplemented from SEEnergySystem.
◆ ComputeExposedModelParameters()
|
overrideprotectedvirtual |
Implements PulseEnergySystem.
◆ Exercise()
|
protected |
The exercise function updates the patient's metabolic rate if the exercise action is present and computes energy-store recovery post exercise.
The exercise function adds to the body's basal metabolic rate a value that is specified by the exercise action. The metabolic rate set-point is specified by the action but limited by the amount of energy available. The energy limit is computed, and the actual metabolic rate is ramped to the limited set-point. The body's actual work rate as a fraction of the total possible work rate and the body's actual work rate as a fraction of the action-requested work rate are set in this method.
- Todo:
- Log an event or info message that available energy is insufficient to meet demand.
◆ Initialize()
|
virtual |
Initializes system properties to valid homeostatic values.
For stabilization only! Called AFTER Setup when stabilizing a new patient
[herman2008physics]
Reimplemented from PulseSystem.
◆ PostProcess()
|
virtual |
Updates the parameters for the temperature circuit.
Updates the resulting heat transfer rates, temperatures and nodal heat values; effectively moving the next values to the current ones before time can be advanced.
Implements PulseSystem.
◆ PreProcess()
|
virtual |
Prepares the energy system for the circuit solver.
The PreProcess function performs function in preparation to update the thermal circuit. It also processes energy-related actions (exercise) and computes a sweat rate.
Implements PulseSystem.
◆ Process()
|
virtual |
Processes the temperature circuit and calculates extravascular transport.
The Process function solves the temperature circuit for all path heat transfer rates and nodal temperatures. Additionally, the process function also initiates the flow transport of the metabolic substance quantities from the vascular to extravascular space. After this is complete, the vital signs of the patient are updated with regards to the new state.
Implements PulseSystem.
◆ SetUp()
|
virtual |
Initializes the energy specific quantities.
Called during both State loading and Patient Stabilization Pull and setup up our data (can be from other systems) Initialize will be called after this and can overwrite any of this data (only if stabilizing)
The energy local member variables, system level quantities, and metabolic-specific substance quantities are initialized here. These variables are used in the numerous metabolic and thermal regulation functions contained in the energy system. Encompassing them in this function allows for easy initialization either at the beginning of a simulation or after a system crash
Implements PulseSystem.
◆ UpdateHeatResistance()
|
protected |
Updates the variable core to skin heat transfer resistance.
The variable core to skin heat transfer resistance is updated here according to the inverse of the skin blood flow.
Friends And Related Function Documentation
◆ PBPulsePhysiology
|
friend |
◆ PulseData
|
friend |
◆ PulseEngineTest
|
friend |
Member Data Documentation
◆ m_AortaHCO3
|
protected |
◆ m_BicarbonateMolarity_mmol_Per_L
|
protected |
◆ m_BloodpH
|
protected |
◆ m_circuitCalculator
|
protected |
◆ m_coreNode
|
protected |
◆ m_coreToSkinPath
|
protected |
◆ m_data
|
protected |
◆ m_dT_s
|
protected |
◆ m_EnduranceEnergyStore_J
|
protected |
◆ m_InternalTemperatureCircuit
|
protected |
◆ m_MediumPowerEnergyStore_J
|
protected |
◆ m_PeakPowerEnergyStore_J
|
protected |
◆ m_skinExtravascularToSweatingGroundPath
|
protected |
◆ m_skinNode
|
protected |
◆ m_TemperatureCircuit
|
protected |
◆ m_temperatureGroundToCorePath
|
protected |
◆ m_UsableEnergyStore_J
|
protected |