The Environment class characterizes the environment and manages interactions between the body its surroundings. More...

#include <Environment.h>

Inheritance diagram for biogears::Environment:

Public Member Functions

virtual ~Environment () override
 
const char * classname () const override
 
size_t hash_code () const override
 
void Clear () override
 
void Initialize () override
 Initializes system properties to valid homeostatic values. More...
 
virtual bool Load (const CDM::BioGearsEnvironmentData &in)
 
virtual CDM::BioGearsEnvironmentDataUnload () const override
 
void AtSteadyState () override
 Notify systems that steady state has been achieved. More...
 
void PreProcess () override
 Preprocess prepares the cardiovascular system for the circuit solver. More...
 
void Process () override
 There is nothing to do here. Processing the combined Energy-Environment circuit is handled by the Energy system. More...
 
void PostProcess () override
 There is nothing to do here. Postprocessing the combined Energy-Environment circuit is handled by the Energy system. More...
 
void StateChange () override
 Resets environment parameters. More...
 
- Public Member Functions inherited from biogears::SEEnvironment
 SEEnvironment (SESubstanceManager &substances)
 
 ~SEEnvironment () override
 
bool Load (const CDM::EnvironmentData &in)
 
bool Load (const char *patientFile)
 
bool Load (const std::string &patientFile)
 
Tree< const char * > GetPhysiologyRequestGraph () const override
 
bool ProcessChange (const SEEnvironmentChange &action)
 
bool ProcessChange (const SEInitialEnvironment &change)
 
const SEScalarGetScalar (const char *name) override
 
const SEScalarGetScalar (const std::string &name) override
 
std::string GetName () const
 
const char * GetName_cStr () const
 
void SetName (const char *name)
 
void SetName (const std::string &name)
 
bool HasName () const
 
void InvalidateName ()
 
bool HasConditions () const
 
SEEnvironmentalConditionsGetConditions ()
 
const SEEnvironmentalConditionsGetConditions () const
 
void RemoveConditions ()
 
bool HasConvectiveHeatLoss () const
 
SEScalarPowerGetConvectiveHeatLoss ()
 
double GetConvectiveHeatLoss (const PowerUnit &unit) const
 
bool HasConvectiveHeatTranferCoefficient () const
 
SEScalarHeatConductancePerAreaGetConvectiveHeatTranferCoefficient ()
 
double GetConvectiveHeatTranferCoefficient (const HeatConductancePerAreaUnit &unit) const
 
bool HasEvaporativeHeatLoss () const
 
SEScalarPowerGetEvaporativeHeatLoss ()
 
double GetEvaporativeHeatLoss (const PowerUnit &unit) const
 
bool HasEvaporativeHeatTranferCoefficient () const
 
SEScalarHeatConductancePerAreaGetEvaporativeHeatTranferCoefficient ()
 
double GetEvaporativeHeatTranferCoefficient (const HeatConductancePerAreaUnit &unit) const
 
bool HasRadiativeHeatLoss () const
 
SEScalarPowerGetRadiativeHeatLoss ()
 
double GetRadiativeHeatLoss (const PowerUnit &unit) const
 
bool HasRadiativeHeatTranferCoefficient () const
 
SEScalarHeatConductancePerAreaGetRadiativeHeatTranferCoefficient ()
 
double GetRadiativeHeatTranferCoefficient (const HeatConductancePerAreaUnit &unit) const
 
bool HasRespirationHeatLoss () const
 
SEScalarPowerGetRespirationHeatLoss ()
 
double GetRespirationHeatLoss (const PowerUnit &unit) const
 
bool HasSkinHeatLoss () const
 
SEScalarPowerGetSkinHeatLoss ()
 
double GetSkinHeatLoss (const PowerUnit &unit) const
 
- Public Member Functions inherited from biogears::SESystem
 SESystem (Logger *logger)
 
virtual ~SESystem ()
 
bool Load (const CDM::SystemData &in)
 
- Public Member Functions inherited from biogears::Loggable
 Loggable ()
 
 Loggable (Logger *log)
 
virtual ~Loggable ()
 
virtual LoggerGetLogger () const
 

Static Public Member Functions

static size_t TypeHash ()
 
static constexpr char const *const TypeTag ()
 
- Static Public Member Functions inherited from biogears::SEEnvironment
static size_t TypeHash ()
 
static constexpr char const *const TypeTag ()
 
- Static Public Member Functions inherited from biogears::SESystem
static const SEScalarGetScalar (const char *name, std::vector< SESystem * > *systems)
 
static const SEScalarGetScalar (const std::string &name, std::vector< SESystem * > *systems)
 

Protected Member Functions

 Environment (BioGears &bg)
 
virtual void Unload (CDM::BioGearsEnvironmentData &data) const
 
void SetUp () override
 
void ProcessActions ()
 Apply environment specific actions. More...
 
void CalculateSupplementalValues ()
 Calculate intermediate values to be used later. More...
 
void CalculateRadiation ()
 Determine the effects of radiation. More...
 
void CalculateConvection ()
 Determine the effects of convection. More...
 
void CalculateEvaporation ()
 Determine the effects of evaporation. More...
 
void CalculateRespiration ()
 Determine the effects of respiration. More...
 
- Protected Member Functions inherited from biogears::SEEnvironment
void Unload (CDM::EnvironmentData &data) const
 
- Protected Member Functions inherited from biogears::SESystem
void Unload (CDM::SystemData &data) const
 
- Protected Member Functions inherited from biogears::Loggable
virtual void Debug (const char *msg, const char *origin="") const
 
virtual void Debug (const std::string &msg, const std::string &origin=empty) const
 
virtual void Debug (std::ostream &msg, const std::string &origin=empty) const
 
virtual void Info (const char *msg, const char *origin="") const
 
virtual void Info (const std::string &msg, const std::string &origin=empty) const
 
virtual void Info (std::ostream &msg, const std::string &origin=empty) const
 
virtual void Warning (const char *msg, const char *origin="") const
 
virtual void Warning (const std::string &msg, const std::string &origin=empty) const
 
virtual void Warning (std::ostream &msg, const std::string &origin=empty) const
 
virtual void Error (const char *msg, const char *origin="") const
 
virtual void Error (const std::string msg, const std::string origin=empty) const
 
virtual void Error (std::ostream &msg, const std::string &origin=empty) const
 
virtual void Fatal (const char *msg, const char *origin="") const
 
virtual void Fatal (const std::string &msg, const std::string &origin=empty) const
 
virtual void Fatal (std::ostream &msg, const std::string &origin=empty) const
 
- Protected Member Functions inherited from biogears::BioGearsSystem
virtual void LoadState ()
 

Static Protected Member Functions

static auto make_unique (BioGears &bg) -> std::unique_ptr< Environment >
 

Protected Attributes

BioGearsm_data
 
double m_dLewisRelation
 
double m_dHeatOfVaporizationOfWater_J_Per_kg
 
double m_dWaterVaporPressureInAmbientAir_Pa
 
double m_dWaterVaporPressureAtSkin_Pa
 
double m_WaterSpecificHeat_J_Per_kg_K
 
double m_WaterViscosity_N_s_Per_m2
 
double m_WaterThermalConductivity_W_Per_m_K
 
double m_ThermalExpansion_Per_K
 
double m_PatientEquivalentDiameter_m
 
SEPatientm_Patient
 
SEPatientActionCollectionm_PatientActions
 
SEEnvironmentActionCollectionm_EnvironmentActions
 
SEGasCompartmentm_AmbientGases
 
SELiquidCompartmentm_AmbientAerosols
 
SEThermalCircuitm_EnvironmentCircuit
 
SEThermalCircuitNodem_ThermalEnvironment
 
SEThermalCircuitNodem_SkinNode
 
SEThermalCircuitNodem_ClothingNode
 
SEThermalCircuitNodem_EnclosureNode
 
SEThermalCircuitPathm_SkinToClothing
 
SEThermalCircuitPathm_ActiveHeatTransferRatePath
 
SEThermalCircuitPathm_ActiveTemperaturePath
 
SEThermalCircuitPathm_ActiveSwitchPath
 
SEThermalCircuitPathm_ClothingToEnclosurePath
 
SEThermalCircuitPathm_GroundToEnclosurePath
 
SEThermalCircuitPathm_ClothingToEnvironmentPath
 
SEThermalCircuitPathm_GroundToEnvironmentPath
 
SEThermalCircuitPathm_EnvironmentSkinToGroundPath
 
SEThermalCircuitPathm_EnvironmentCoreToGroundPath
 
- Protected Attributes inherited from biogears::SEEnvironment
std::string m_Name
 
SEScalarPowerm_ConvectiveHeatLoss
 
SEScalarHeatConductancePerAream_ConvectiveHeatTranferCoefficient
 
SEScalarPowerm_EvaporativeHeatLoss
 
SEScalarHeatConductancePerAream_EvaporativeHeatTranferCoefficient
 
SEScalarPowerm_RadiativeHeatLoss
 
SEScalarHeatConductancePerAream_RadiativeHeatTranferCoefficient
 
SEScalarPowerm_RespirationHeatLoss
 
SEScalarPowerm_SkinHeatLoss
 
SEEnvironmentalConditionsm_Conditions
 
SESubstanceManagerm_Substances
 
- Protected Attributes inherited from biogears::SESystem
std::stringstream m_ss
 
- Protected Attributes inherited from biogears::Loggable
Loggerm_Logger
 

Friends

class BioGears
 
class BioGearsEngineTest
 

Additional Inherited Members

- Static Public Attributes inherited from biogears::Loggable
static const std::string empty
 
static const char * empty_cStr
 

Detailed Description

The Environment class characterizes the environment and manages interactions between the body its surroundings.

Constructor & Destructor Documentation

biogears::Environment::Environment ( BioGears bg)
protected
biogears::Environment::~Environment ( )
overridevirtual

Member Function Documentation

void biogears::Environment::AtSteadyState ( )
overridevirtual

Notify systems that steady state has been achieved.

Reimplemented from biogears::BioGearsSystem.

void biogears::Environment::CalculateConvection ( )
protected

Determine the effects of convection.

This determines the circuit element values and system data outputs associated with convection heat transfer based on feedback.

void biogears::Environment::CalculateEvaporation ( )
protected

Determine the effects of evaporation.

This determines the circuit element values and system data outputs associated with evaporation heat transfer based on feedback.

: The units of this constant are incorrect on the CDM–they should be W_Per_m2_Pa (no support for this unit currently)

void biogears::Environment::CalculateRadiation ( )
protected

Determine the effects of radiation.

This determines the circuit element values and system data outputs associated with radiation heat transfer based on feedback.

void biogears::Environment::CalculateRespiration ( )
protected

Determine the effects of respiration.

This determines the circuit element values and system data outputs associated with respiration heat transfer based on feedback.

void biogears::Environment::CalculateSupplementalValues ( )
protected

Calculate intermediate values to be used later.

These computed values will be used in the other feedback methods.

const char* biogears::Environment::classname ( ) const
inlineoverridevirtual

Reimplemented from biogears::SEEnvironment.

void biogears::Environment::Clear ( )
overridevirtual

Reimplemented from biogears::SEEnvironment.

size_t biogears::Environment::hash_code ( ) const
inlineoverridevirtual

Reimplemented from biogears::SEEnvironment.

void biogears::Environment::Initialize ( )
overridevirtual

Initializes system properties to valid homeostatic values.

Reimplemented from biogears::BioGearsSystem.

bool biogears::Environment::Load ( const CDM::BioGearsEnvironmentData in)
virtual
auto biogears::Environment::make_unique ( BioGears bg) -> std::unique_ptr<Environment>
staticprotected
void biogears::Environment::PostProcess ( )
overridevirtual

There is nothing to do here. Postprocessing the combined Energy-Environment circuit is handled by the Energy system.

Implements biogears::BioGearsSystem.

void biogears::Environment::PreProcess ( )
overridevirtual

Preprocess prepares the cardiovascular system for the circuit solver.

This function uses feedback to calculate thermal properties and circuit element values for the next engine state.

Implements biogears::BioGearsSystem.

void biogears::Environment::Process ( )
overridevirtual

There is nothing to do here. Processing the combined Energy-Environment circuit is handled by the Energy system.

Implements biogears::BioGearsSystem.

void biogears::Environment::ProcessActions ( )
protected

Apply environment specific actions.

Handle active heating and/or cooling. This will set the active heat flow source and/or the active temperature source. The applied area or fraction is used to determine the average patient application, since we're using a one dimensional model. They can be called individually or will sum together if called in combination. Note that the action manager will handle removing the actions (i.e. will return false for has calls).

Error:
Warning: SurfaceArea and SurfaceAreaFraction are both set. The largest fraction will be used.
Error:
Warning: Neither SurfaceArea nor SurfaceAreaFraction are set. A fraction of 1 will be used.
Error:
Warning: Thermal application effective area exceeds the total skin surface area. A fraction of 1 will be used.
Error:
Warning: SurfaceArea and SurfaceAreaFraction are both set. The largest fraction will be used.
Error:
Warning: Neither SurfaceArea nor SurfaceAreaFraction are set. A fraction of 1 will be used.
Error:
Warning: Thermal application effective area exceeds the total skin surface area. A fraction of 1 will be used.
Error:
Warning: AppliedSurfaceArea and AppliedSurfaceAreaFraction are both set. The largest fraction will be used.
Error:
Warning: Neither AppliedSurfaceArea nor AppliedSurfaceAreaFraction are set. A fraction of 1 will be used.
Error:
Warning: Thermal application effective area exceeds the total skin surface area. A fraction of 1 will be used.
void biogears::Environment::SetUp ( )
overrideprotectedvirtual
void biogears::Environment::StateChange ( )
overridevirtual

Resets environment parameters.

This is called any time the environment change action/condition. It sets the ambient node values needed for the fluid systems.

Error:
Fatal: Total ambient/environment gas volume fractions must sum to 1.0.

Implements biogears::SEEnvironment.

static size_t biogears::Environment::TypeHash ( )
inlinestatic
static constexpr char const* const biogears::Environment::TypeTag ( )
inlinestatic
CDM::BioGearsEnvironmentData * biogears::Environment::Unload ( ) const
overridevirtual

Reimplemented from biogears::SEEnvironment.

void biogears::Environment::Unload ( CDM::BioGearsEnvironmentData data) const
protectedvirtual

Friends And Related Function Documentation

friend class BioGears
friend
friend class BioGearsEngineTest
friend

Member Data Documentation

SEThermalCircuitPath* biogears::Environment::m_ActiveHeatTransferRatePath
protected
SEThermalCircuitPath* biogears::Environment::m_ActiveSwitchPath
protected
SEThermalCircuitPath* biogears::Environment::m_ActiveTemperaturePath
protected
SELiquidCompartment* biogears::Environment::m_AmbientAerosols
protected
SEGasCompartment* biogears::Environment::m_AmbientGases
protected
SEThermalCircuitNode* biogears::Environment::m_ClothingNode
protected
SEThermalCircuitPath* biogears::Environment::m_ClothingToEnclosurePath
protected
SEThermalCircuitPath* biogears::Environment::m_ClothingToEnvironmentPath
protected
BioGears& biogears::Environment::m_data
protected
double biogears::Environment::m_dHeatOfVaporizationOfWater_J_Per_kg
protected
double biogears::Environment::m_dLewisRelation
protected
double biogears::Environment::m_dWaterVaporPressureAtSkin_Pa
protected
double biogears::Environment::m_dWaterVaporPressureInAmbientAir_Pa
protected
SEThermalCircuitNode* biogears::Environment::m_EnclosureNode
protected
SEEnvironmentActionCollection* biogears::Environment::m_EnvironmentActions
protected
SEThermalCircuit* biogears::Environment::m_EnvironmentCircuit
protected
SEThermalCircuitPath* biogears::Environment::m_EnvironmentCoreToGroundPath
protected
SEThermalCircuitPath* biogears::Environment::m_EnvironmentSkinToGroundPath
protected
SEThermalCircuitPath* biogears::Environment::m_GroundToEnclosurePath
protected
SEThermalCircuitPath* biogears::Environment::m_GroundToEnvironmentPath
protected
SEPatient* biogears::Environment::m_Patient
protected
SEPatientActionCollection* biogears::Environment::m_PatientActions
protected
double biogears::Environment::m_PatientEquivalentDiameter_m
protected
SEThermalCircuitNode* biogears::Environment::m_SkinNode
protected
SEThermalCircuitPath* biogears::Environment::m_SkinToClothing
protected
SEThermalCircuitNode* biogears::Environment::m_ThermalEnvironment
protected
double biogears::Environment::m_ThermalExpansion_Per_K
protected
double biogears::Environment::m_WaterSpecificHeat_J_Per_kg_K
protected
double biogears::Environment::m_WaterThermalConductivity_W_Per_m_K
protected
double biogears::Environment::m_WaterViscosity_N_s_Per_m2
protected