The Cardiovascular system utilizes circuit methodology to characterize the intravascular fluid dynamics throughout the body. More...

#include <Cardiovascular.h>

Inheritance diagram for biogears::Cardiovascular:

Public Member Functions

virtual ~Cardiovascular () override
 
const char * classname () const override
 
size_t hash_code () const override
 
void Clear () override
 
void Initialize () override
 Initializes system properties. More...
 
virtual bool Load (const CDM::BioGearsCardiovascularSystemData &in)
 
virtual CDM::BioGearsCardiovascularSystemDataUnload () const override
 
SEScalarCalculateCardiovascularSOFA ()
 
void AtSteadyState () override
 Cardiovascular system at steady state. More...
 
void PreProcess () override
 Preprocess prepares the cardiovascular system for the circuit solver. More...
 
void Process () override
 Process solves the cardiovascular circuit. More...
 
void PostProcess () override
 Update the cardiovascular circuit. More...
 
- Public Member Functions inherited from biogears::SECardiovascularSystem
 SECardiovascularSystem (Logger *logger)
 
 ~SECardiovascularSystem () override
 
const SEScalarGetScalar (const char *name) override
 Deletes all members. More...
 
const SEScalarGetScalar (const std::string &name) override
 
bool Load (const CDM::CardiovascularSystemData &in)
 
Tree< const char * > GetPhysiologyRequestGraph () const override
 
bool HasArterialPressure () const
 
SEScalarPressureGetArterialPressure ()
 
double GetArterialPressure (const PressureUnit &unit) const
 
bool HasBloodVolume () const
 
SEScalarVolumeGetBloodVolume ()
 
double GetBloodVolume (const VolumeUnit &unit) const
 
bool HasCardiacIndex () const
 
SEScalarVolumePerTimeAreaGetCardiacIndex ()
 
double GetCardiacIndex (const VolumePerTimeAreaUnit &unit) const
 
bool HasCardiacOutput () const
 
SEScalarVolumePerTimeGetCardiacOutput ()
 
double GetCardiacOutput (const VolumePerTimeUnit &unit) const
 
bool HasCentralVenousPressure () const
 
SEScalarPressureGetCentralVenousPressure ()
 
double GetCentralVenousPressure (const PressureUnit &unit) const
 
bool HasCerebralBloodFlow () const
 
SEScalarVolumePerTimeGetCerebralBloodFlow ()
 
double GetCerebralBloodFlow (const VolumePerTimeUnit &unit) const
 
bool HasCerebralPerfusionPressure () const
 
SEScalarPressureGetCerebralPerfusionPressure ()
 
double GetCerebralPerfusionPressure (const PressureUnit &unit) const
 
bool HasDiastolicArterialPressure () const
 
SEScalarPressureGetDiastolicArterialPressure ()
 
double GetDiastolicArterialPressure (const PressureUnit &unit) const
 
bool HasHeartEjectionFraction () const
 
SEScalarFractionGetHeartEjectionFraction ()
 
double GetHeartEjectionFraction () const
 
bool HasHeartRate () const
 
SEScalarFrequencyGetHeartRate ()
 
double GetHeartRate (const FrequencyUnit &unit) const
 
CDM::enumHeartRhythm::value GetHeartRhythm () const
 
void SetHeartRhythm (CDM::enumHeartRhythm::value Rhythm)
 
bool HasHeartRhythm () const
 
void InvalidateHeartRhythm ()
 
bool HasHeartStrokeVolume () const
 
SEScalarVolumeGetHeartStrokeVolume ()
 
double GetHeartStrokeVolume (const VolumeUnit &unit) const
 
bool HasIntracranialPressure () const
 
SEScalarPressureGetIntracranialPressure ()
 
double GetIntracranialPressure (const PressureUnit &unit) const
 
bool HasMeanArterialPressure () const
 
SEScalarPressureGetMeanArterialPressure ()
 
double GetMeanArterialPressure (const PressureUnit &unit) const
 
bool HasMeanArterialCarbonDioxidePartialPressure () const
 
SEScalarPressureGetMeanArterialCarbonDioxidePartialPressure ()
 
double GetMeanArterialCarbonDioxidePartialPressure (const PressureUnit &unit) const
 
bool HasMeanArterialCarbonDioxidePartialPressureDelta () const
 
SEScalarPressureGetMeanArterialCarbonDioxidePartialPressureDelta ()
 
double GetMeanArterialCarbonDioxidePartialPressureDelta (const PressureUnit &unit) const
 
bool HasMeanCentralVenousPressure () const
 
SEScalarPressureGetMeanCentralVenousPressure ()
 
double GetMeanCentralVenousPressure (const PressureUnit &unit) const
 
bool HasMeanSkinFlow () const
 
SEScalarVolumePerTimeGetMeanSkinFlow ()
 
double GetMeanSkinFlow (const VolumePerTimeUnit &unit) const
 
bool HasPulmonaryArterialPressure () const
 
SEScalarPressureGetPulmonaryArterialPressure ()
 
double GetPulmonaryArterialPressure (const PressureUnit &unit) const
 
bool HasPulmonaryCapillariesWedgePressure () const
 
SEScalarPressureGetPulmonaryCapillariesWedgePressure ()
 
double GetPulmonaryCapillariesWedgePressure (const PressureUnit &unit) const
 
bool HasPulmonaryDiastolicArterialPressure () const
 
SEScalarPressureGetPulmonaryDiastolicArterialPressure ()
 
double GetPulmonaryDiastolicArterialPressure (const PressureUnit &unit) const
 
bool HasPulmonaryMeanArterialPressure () const
 
SEScalarPressureGetPulmonaryMeanArterialPressure ()
 
double GetPulmonaryMeanArterialPressure (const PressureUnit &unit) const
 
bool HasPulmonaryMeanCapillaryFlow () const
 
SEScalarVolumePerTimeGetPulmonaryMeanCapillaryFlow ()
 
double GetPulmonaryMeanCapillaryFlow (const VolumePerTimeUnit &unit) const
 
bool HasPulmonaryMeanShuntFlow () const
 
SEScalarVolumePerTimeGetPulmonaryMeanShuntFlow ()
 
double GetPulmonaryMeanShuntFlow (const VolumePerTimeUnit &unit) const
 
bool HasPulmonarySystolicArterialPressure () const
 
SEScalarPressureGetPulmonarySystolicArterialPressure ()
 
double GetPulmonarySystolicArterialPressure (const PressureUnit &unit) const
 
bool HasPulmonaryVascularResistance () const
 
SEScalarFlowResistanceGetPulmonaryVascularResistance ()
 
double GetPulmonaryVascularResistance (const FlowResistanceUnit &unit) const
 
bool HasPulmonaryVascularResistanceIndex () const
 
SEScalarPressureTimePerVolumeAreaGetPulmonaryVascularResistanceIndex ()
 
double GetPulmonaryVascularResistanceIndex (const PressureTimePerVolumeAreaUnit &unit) const
 
bool HasPulsePressure () const
 
SEScalarPressureGetPulsePressure ()
 
double GetPulsePressure (const PressureUnit &unit) const
 
bool HasSystolicArterialPressure () const
 
SEScalarPressureGetSystolicArterialPressure ()
 
double GetSystolicArterialPressure (const PressureUnit &unit) const
 
bool HasSystemicVascularResistance () const
 
SEScalarFlowResistanceGetSystemicVascularResistance ()
 
double GetSystemicVascularResistance (const FlowResistanceUnit &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::SECardiovascularSystem
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

 Cardiovascular (BioGears &bg)
 
virtual void Unload (CDM::BioGearsCardiovascularSystemData &data) const
 
void SetUp () override
 Initializes parameters for Cardiovascular Class. More...
 
void ProcessOverride ()
 determine override requirements from user defined inputs More...
 
void OverrideControlLoop ()
 
- Protected Member Functions inherited from biogears::SECardiovascularSystem
void Unload (CDM::CardiovascularSystemData &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< Cardiovascular >
 

Protected Attributes

BioGearsm_data
 
- Protected Attributes inherited from biogears::SECardiovascularSystem
SEScalarPressurem_ArterialPressure
 
SEScalarVolumem_BloodVolume
 
SEScalarVolumePerTimeAream_CardiacIndex
 
SEScalarVolumePerTimem_CardiacOutput
 
SEScalarPressurem_CentralVenousPressure
 
SEScalarVolumePerTimem_CerebralBloodFlow
 
SEScalarPressurem_CerebralPerfusionPressure
 
SEScalarPressurem_DiastolicArterialPressure
 
SEScalarFractionm_HeartEjectionFraction
 
SEScalarFrequencym_HeartRate
 
CDM::enumHeartRhythm::value m_HeartRhythm
 
SEScalarVolumem_HeartStrokeVolume
 
SEScalarPressurem_IntracranialPressure
 
SEScalarPressurem_MeanArterialPressure
 
SEScalarPressurem_MeanArterialCarbonDioxidePartialPressure
 
SEScalarPressurem_MeanArterialCarbonDioxidePartialPressureDelta
 
SEScalarPressurem_MeanCentralVenousPressure
 
SEScalarVolumePerTimem_MeanSkinFlow
 
SEScalarPressurem_PulmonaryArterialPressure
 
SEScalarPressurem_PulmonaryCapillariesWedgePressure
 
SEScalarPressurem_PulmonaryDiastolicArterialPressure
 
SEScalarPressurem_PulmonaryMeanArterialPressure
 
SEScalarVolumePerTimem_PulmonaryMeanCapillaryFlow
 
SEScalarVolumePerTimem_PulmonaryMeanShuntFlow
 
SEScalarPressurem_PulmonarySystolicArterialPressure
 
SEScalarFlowResistancem_PulmonaryVascularResistance
 
SEScalarPressureTimePerVolumeAream_PulmonaryVascularResistanceIndex
 
SEScalarPressurem_PulsePressure
 
SEScalarPressurem_SystolicArterialPressure
 
SEScalarFlowResistancem_SystemicVascularResistance
 
- Protected Attributes inherited from biogears::SESystem
std::stringstream m_ss
 
- Protected Attributes inherited from biogears::Loggable
Loggerm_Logger
 

Private Member Functions

void ChronicRenalStenosis ()
 Establishes the renal stenosis condition in one or both of the renal arteries. More...
 
void ChronicAnemia ()
 Establishes the anemia condition by removing hemoglobin and reducing blood viscosity (simulated by vascular resistance reduction). More...
 
void ChronicHeartFailure ()
 Establishes the chronic heart failure condition. More...
 
void ChronicPericardialEffusion ()
 Establishes the pericardial effusion condition. More...
 
void HeartDriver ()
 Calculates the contraction and relaxation of the left and right heart during the cardiac cycle. More...
 
void AdjustVascularTone ()
 Adjusts vascular tone due to Efferent reflex, drug, and other effects. More...
 
void BeginCardiacCycle ()
 Sets up the evolution of the next cardiac cycle. More...
 
void CalculateHeartElastance ()
 Calculation of the left and right ventricular elastance. More...
 
void TuneCircuit ()
 Tune the cardiovascular circuit during stabilization. More...
 
void TunePaths (double systemicResistanceScale, double systemicComplianceScale, double aortaResistanceScale, double aortaComplianceScale, double rightHeartResistanceScale, double venaCavaComplianceScale)
 Method that changes path parameters during circuit tuning. More...
 
void MetabolicToneResponse ()
 Calculates metabolic and thermal feedback on the systemic vascular tone. More...
 
void ProcessActions ()
 Holds the action methods for the cardiovascular system. More...
 
void CPR ()
 The CPR function controls the force applied during a chest compression action. More...
 
void CalculateAndSetCPRcompressionForce ()
 Calculates and sets the pressure on the heart pressure sources when a CPR compression is applied. More...
 
void Hemorrhage ()
 The hemorrhage function simulates bleeding from a specified compartment. More...
 
void PericardialEffusion ()
 The function initiates a flow source on the pericardium. It is used by both the action and condition. More...
 
void PericardialEffusionPressureApplication ()
 The pericardial effusion pressure application function calculates the pressure applied to the heart due to a pericardial effusion. More...
 
void CardiacArrest ()
 The cardiac arrest action causes the sudden loss of heart function and breathing. More...
 
void TraumaticBrainInjury ()
 The traumatic brain injury action increases flow resistance in the brain. More...
 
void CalculateVitalSigns ()
 CalculateVitalSigns computes and/or updates cardiovascular system level data. More...
 
void CalculateHeartRate ()
 Calculates the heart rate from the period. More...
 
void RecordAndResetCardiacCycle ()
 Sets the systolic and diastolic pressures. More...
 

Private Attributes

bool m_StartSystole
 
bool m_HeartFlowDetected
 
bool m_EnterCardiacArrest
 
double m_CardiacCyclePeriod_s
 
double m_CurrentCardiacCycleDuration_s
 
double m_LeftHeartElastanceModifier
 
double m_LeftHeartElastance_mmHg_Per_mL
 
double m_LeftHeartElastanceMax_mmHg_Per_mL
 
double m_LeftHeartElastanceMin_mmHg_Per_mL
 
double m_RightHeartElastance_mmHg_Per_mL
 
double m_RightHeartElastanceMax_mmHg_Per_mL
 
double m_RightHeartElastanceMin_mmHg_Per_mL
 
double m_CompressionTime_s
 
double m_CompressionRatio
 
double m_CompressionPeriod_s
 
double m_CurrentCardiacCycleTime_s
 
double m_CardiacCycleDiastolicVolume_mL
 
double m_CardiacCycleAortaPressureLow_mmHg
 
double m_CardiacCycleAortaPressureHigh_mmHg
 
double m_CardiacCyclePulmonaryArteryPressureLow_mmHg
 
double m_CardiacCyclePulmonaryArteryPressureHigh_mmHg
 
double m_LastCardiacCycleMeanArterialCO2PartialPressure_mmHg
 
double m_CardiacCycleStrokeVolume_mL
 
RunningAverage m_CardiacCycleArterialPressure_mmHg
 
RunningAverage m_CardiacCycleArterialCO2PartialPressure_mmHg
 
RunningAverage m_CardiacCyclePulmonaryCapillariesWedgePressure_mmHg
 
RunningAverage m_CardiacCyclePulmonaryCapillariesFlow_mL_Per_s
 
RunningAverage m_CardiacCyclePulmonaryShuntFlow_mL_Per_s
 
RunningAverage m_CardiacCyclePulmonaryArteryPressure_mmHg
 
RunningAverage m_CardiacCycleCentralVenousPressure_mmHg
 
RunningAverage m_CardiacCycleSkinFlow_mL_Per_s
 
double m_dT_s
 
bool m_TuneCircuit = true
 
std::string m_TuningFile
 
double m_minIndividialSystemicResistance__mmHg_s_Per_mL
 
double m_OverrideHR_Conformant_Per_min
 
double m_OverrideLHEMin_Conformant_mmHg
 
double m_OverrideRHEMin_Conformant_mmHg
 
double m_OverrideLHEMax_Conformant_mmHg
 
double m_OverrideRHEMax_Conformant_mmHg
 
double m_overrideTime_s
 
bool m_OverrideOnOffCheck = false
 
SEFluidCircuitCalculator m_circuitCalculator
 
SELiquidTransporter m_transporter
 
SEPatientm_patient
 
SEFluidCircuitm_CirculatoryCircuit
 
SELiquidCompartmentGraphm_CirculatoryGraph
 
SEFluidCircuitNodem_MainPulmonaryArteries
 
SEFluidCircuitNodem_LeftAtrium1
 
SEFluidCircuitPathm_AortaCompliance
 
SEFluidCircuitPathm_AortaResistance
 
SEFluidCircuitPathm_VenaCavaCompliance
 
SEFluidCircuitPathm_RightHeartResistance
 
SEFluidCircuitPathm_LeftPulmonaryArteriesToVeins
 
SEFluidCircuitPathm_LeftPulmonaryArteriesToCapillaries
 
SEFluidCircuitPathm_RightPulmonaryArteriesToVeins
 
SEFluidCircuitPathm_RightPulmonaryArteriesToCapillaries
 
SEFluidCircuitPathm_pAortaToBone
 
SEFluidCircuitPathm_pAortaToBrain
 
SEFluidCircuitPathm_pBrainToVenaCava
 
SEFluidCircuitPathm_pAortaToLiver
 
SEFluidCircuitPathm_pAortaToLeftKidney
 
SEFluidCircuitPathm_pAortaToLargeIntestine
 
SEFluidCircuitPathm_pAortaToMuscle
 
SEFluidCircuitPathm_pMuscleToVenaCava
 
SEFluidCircuitPathm_pAortaToMyocardium
 
SEFluidCircuitPathm_pMyocardiumToVenaCava
 
SEFluidCircuitPathm_pAortaToRightKidney
 
SEFluidCircuitPathm_pAortaToSkin
 
SEFluidCircuitPathm_pAortaToSmallIntestine
 
SEFluidCircuitPathm_pAortaToSplanchnic
 
SEFluidCircuitPathm_pAortaToSpleen
 
SEFluidCircuitPathm_pVenaCavaHemorrhage
 
SEFluidCircuitPathm_pGndToPericardium
 
SEFluidCircuitPathm_pPericardiumToGnd
 
SEFluidCircuitPathm_pRightHeartToGnd
 
SEFluidCircuitPathm_pRightHeart
 
SEFluidCircuitPathm_pLeftHeartToGnd
 
SEFluidCircuitPathm_pLeftHeart
 
SEFluidCircuitPathm_LeftHeartToAorta
 
SEFluidCircuitPathm_pBrainResistanceUpstream
 
SEFluidCircuitPathm_pBrainResistanceDownstream
 
SEFluidCircuitPathm_leftRenalArteryPath
 
SEFluidCircuitPathm_rightRenalArteryPath
 
SELiquidCompartmentm_Aorta
 
SELiquidSubstanceQuantitym_AortaCO2
 
SELiquidCompartmentm_Brain
 
SELiquidCompartmentm_LeftHeart
 
SELiquidCompartmentm_LeftPulmonaryCapillaries
 
SELiquidCompartmentm_LeftPulmonaryArteries
 
SELiquidCompartmentm_LeftPulmonaryVeins
 
SELiquidCompartmentm_Pericardium
 
SELiquidCompartmentm_RightHeart
 
SELiquidCompartmentm_RightPulmonaryCapillaries
 
SELiquidCompartmentm_RightPulmonaryArteries
 
SELiquidCompartmentm_RightPulmonaryVeins
 
SELiquidCompartmentm_VenaCava
 
std::vector< SEFluidCircuitPath * > m_systemicResistancePaths
 
std::vector< SEFluidCircuitPath * > m_systemicCompliancePaths
 
std::vector< SEFluidCircuitPath * > m_tissueResistancePaths
 
std::vector< SEFluidCircuitPath * > m_cerebralResistancePaths
 
std::vector< SEFluidCircuitPath * > m_splanchnicResistancePaths
 
std::vector< SEFluidCircuitPath * > m_extrasplanchnicResistancePaths
 
std::vector< SEFluidCircuitPath * > m_myocardiumResistancePaths
 
std::vector< SEFluidCircuitPath * > m_muscleResistancePaths
 
SEPatientActionCollectionm_PatientActions
 

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 Cardiovascular system utilizes circuit methodology to characterize the intravascular fluid dynamics throughout the body.

The Cardiovascular system utilizes circuit methodology to evaluate the hemodynamics throughout the human body. The cardiovascular system consists of a representation of the human vasculature. The heart model is the driving force that creates blood flow through the cardiovascular system. The resulting blood flow is utilized by other physiologic systems as a means of transporting the oxygen, carbon dioxide and other substances throughout the human body. The system may be modified to mimic real world insults and interventions. Due to its interconnectedness with other systems, if alterations are made to the cardiovascular system then the feedback will be felt in the other physiologic systems.

Constructor & Destructor Documentation

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

Member Function Documentation

void biogears::Cardiovascular::AdjustVascularTone ( )
private

Adjusts vascular tone due to Efferent reflex, drug, and other effects.

Adjusts vascular tone due to Efferent reflex, drug, and other effects

Todo:
Add dilation (decreased resistance) to myocardium supply path if myocardium oxygen deficit event is active.
void biogears::Cardiovascular::AtSteadyState ( )
overridevirtual

Cardiovascular system at steady state.

Initializes Cardiovascular conditions if any are present.

  • Anemia
  • Renal Stenosis
  • Heart Failure
  • Pericardial Effusion

Reimplemented from biogears::BioGearsSystem.

void biogears::Cardiovascular::BeginCardiacCycle ( )
private

Sets up the evolution of the next cardiac cycle.

This function is directed from Cardiovascular::HeartDriver. It set's up the evolution of the proceeding cardiac cycle. It is used to apply the effects of drugs or exercise on the cardiovascular system. These effects will persist for the remainder of the cardiac cycle, at which point this function is called again if a new heart beat is warranted (i.e. not in cardiac arrest).

Todo:
need to reset the heart elastance min and max at the end of each stabilization period in AtSteadyState()
void biogears::Cardiovascular::CalculateAndSetCPRcompressionForce ( )
private

Calculates and sets the pressure on the heart pressure sources when a CPR compression is applied.

Calculates and sets the pressure on the heart pressure sources when a CPR compression is applied.

SEScalar & biogears::Cardiovascular::CalculateCardiovascularSOFA ( )
void biogears::Cardiovascular::CalculateHeartElastance ( )
private

Calculation of the left and right ventricular elastance.

This function calculates the left and right ventricular elastance at the current time in the cardiac cycle. The elastance takes the form of a double hill function with a period equivalent to the cardiac cycle length. [93]

void biogears::Cardiovascular::CalculateHeartRate ( )
private

Calculates the heart rate from the period.

When flow is detected, the heart rate is computed from the cardiac cycle duration. Because a time step is added right before the flow detection (in case the cardiac cycle is continuing) we must peel off the time step here.

void biogears::Cardiovascular::CalculateVitalSigns ( )
private

CalculateVitalSigns computes and/or updates cardiovascular system level data.

Calculate vital signs obtains the pressures in the aorta, pulmonary arteries, pulmonary veins and vena cava. Waveform data for the system, such as arterial pressure, is set every at every time slice. Mean data, such as mean arterial pressure, is set using a running average. Data that are more useful filtered are also set from a running mean. Several events and irreversible states are detected and set by this method.

Todo:
Make sure irreversible state is hit before we get here.
Error:
Fatal: Diastolic pressure has fallen below -2
Error:
Fatal: Systolic pressure has exceeded 700
Event:
Patient: Hypovolemic Shock: blood volume below 70% of its normal value
Event:
Patient: blood loss below 60%, irreversible state enacted
Irreversible:
Over half the patients blood volume has been lost.
Event:
Patient: Cardiogenic Shock: Cardiac Index has fallen below 2.2 L/min-m^2, Systolic Arterial Pressure is below 90 mmHg, and Pulmonary Capillary Wedge Pressure is above 15.0. [69]
Event:
Patient: Tachycardia: heart rate exceeds 100 beats per minute. This state is alleviated if it decreases below 90.
Event:
Patient: Bradycardia: heart rate falls below 60 beats per minute. This state is alleviated if it increases above 65.
Event:
Patient: Asystole: Heart Rate has fallen below minimum value and is being set to 0.
Event:
Patient: Irreversible State: heart has been in asystole for over 45 min:
Irreversible:
Heart has been in asystole for over 45 min
void biogears::Cardiovascular::CardiacArrest ( )
private

The cardiac arrest action causes the sudden loss of heart function and breathing.

Cardiac arrest is the sudden loss of effective blood circulation. When the cardiac arrest action is active, the heart will not beat effectively and breathing will not occur.

void biogears::Cardiovascular::ChronicAnemia ( )
private

Establishes the anemia condition by removing hemoglobin and reducing blood viscosity (simulated by vascular resistance reduction).

We are modeling iron deficiency anemia as a chronic reduction in hemoglobin in the blood as well as a reduction in the cardiovascular resistances to lower the systemic vascular resistance that is seen with the reduced viscosity. The oxygen carrying capacity of the blood is reduced due to the decrease in hemoglobin content.

Error:
if too much hemoglobin is removed, we will no longer meet validation, so set to maximum amount that can be removed.
void biogears::Cardiovascular::ChronicHeartFailure ( )
private

Establishes the chronic heart failure condition.

Heart failure is a chronic condition that is modeled by a permanent reduction in the left heart contractility. The user may scale the severity of this action with a fraction from 0 to 1, with 0 being non-existent to 1 being severe heart failure.

void biogears::Cardiovascular::ChronicPericardialEffusion ( )
private

Establishes the pericardial effusion condition.

Pericardial effusion can be either chronic (slow) or acute (fast). Chronic effusion will eventually lead to tamponade, acute effusion leads immediately to tamponade and imminent death. The chronic effusion parameters are set in the BioGears engine so that life-threatening tamponade will occur in about 30 minutes after the insult.

Error:
Cannot specify volume accumulation greater than 1000 mL. Accumulated volume is now set at 1000 mL.
Error:
Cannot specify volume accumulation less than 0 mL. Accumulated volume is now set at 0 mL.
void biogears::Cardiovascular::ChronicRenalStenosis ( )
private

Establishes the renal stenosis condition in one or both of the renal arteries.

Stenosed renal arteries are slightly occluded, which increases the resistance from the aorta to the kidney. This is implemented as a condition, which specifies what percent of the artery is occluded and which artery or arteries are being affected.

Todo:
move this to CV
Error:
Cannot specify left occlusion fraction less than zero
Error:
Cannot specify right occlusion fraction less than zero
Error:
Cannot specify left occlusion fraction greater than one
Error:
Cannot specify right occlusion fraction greater than one
const char* biogears::Cardiovascular::classname ( ) const
inlineoverridevirtual

Reimplemented from biogears::SECardiovascularSystem.

void biogears::Cardiovascular::Clear ( )
overridevirtual

Reimplemented from biogears::SECardiovascularSystem.

void biogears::Cardiovascular::CPR ( )
private

The CPR function controls the force applied during a chest compression action.

The user may apply a chest compression to continue blood circulation if the heart no longer has an effective rhythm. The compression can either be defined by an explicit force or by a fraction of the maximum allowable force. If the compression input is a force scale then the method controls the shape of the force pulse and converts the force pressure for application to the heart. If the compression input is force, then the raw force is converted to pressure and applied to the heart. The pressure is applied at the pressure source on the LeftHeart3ToGround and RightHeart3ToGround paths in the cardiovascular circuit.

Error:
Warning: CPR compression ratio must be a positive value between 0 and 1 inclusive.
size_t biogears::Cardiovascular::hash_code ( ) const
inlineoverridevirtual

Reimplemented from biogears::SECardiovascularSystem.

void biogears::Cardiovascular::HeartDriver ( )
private

Calculates the contraction and relaxation of the left and right heart during the cardiac cycle.

This function tracks the progress of the current cardiac cycle, and modifies the compliance of the left and right heart to drive the cardiovascular circuit. The reduced compliance at the beginning of the cycle acts to increase the pressure, driving flow out of the heart. The compliance is then reduced allowing flow into the heart. This represents the systolic and diastolic portion of the cardiac cycle. The compliance is driven by an elastance equation. This function also keeps track of the cardiac cycle time and calls BeginCardiacCycle() at the start of systole portion of each cycle. Modifications to heart rate and heart compliance are calculated by BeginCardiacCycle() and applied for the remained of the current cardiac cycle. Changes to things like heart rate and heart contractility can only occur at the top of the current cardiac cycle, after the last cardiac cycle has completed. This helps to avoid discontinuous behavior such as the complete cessation of heart function mid contraction.

void biogears::Cardiovascular::Hemorrhage ( )
private

The hemorrhage function simulates bleeding from a specified compartment.

The cardiovascular circuit has paths from each compartment to ground (initially open) that represent bleeding sites. When a hemorrhage is activated, the current pressure at the location and the user specified bleed rate are used to determine a resistance for the appropriate bleeding path. A resistance is set (rather than a flow source) so that pulsatile flow characteristics can be observed and so that bleeding rate diminishes with blood volume. Tourniquets can be applied to the extremities, which increase the resistance on the paths into and out of the heomrrhage compartment.

Todo:
Enforce limits and remove fatal errors.
void biogears::Cardiovascular::Initialize ( )
overridevirtual

Initializes system properties.

Reimplemented from biogears::BioGearsSystem.

bool biogears::Cardiovascular::Load ( const CDM::BioGearsCardiovascularSystemData in)
virtual
auto biogears::Cardiovascular::make_unique ( BioGears bg) -> std::unique_ptr<Cardiovascular>
staticprotected
void biogears::Cardiovascular::MetabolicToneResponse ( )
private

Calculates metabolic and thermal feedback on the systemic vascular tone.

This method controls the vascular tone response to metabolic changes. As the metabolic rate increases, the resistances to non-vital organs is increased while the resistance to the muscle and skin is reduced, thus increasing heat convective rejection (see Energy::UpdateHeatResistance()). In the case of decreasing core temperature the resistance to the skin is increased to shunt blood flow and reduce heat transfer from the core to skin.

Todo:
Possibly add a thermoreception model to nervous and move the computation there.

[98]

void biogears::Cardiovascular::OverrideControlLoop ( )
protected
void biogears::Cardiovascular::PericardialEffusion ( )
private

The function initiates a flow source on the pericardium. It is used by both the action and condition.

The pericardial effusion action may be called during run time. It initiates a flow source on the pericardium which leads to increased pericardium volume. As the volume increases, a pressure source is applied to the left and right heart nodes, simulating the restriction of the swelling pericardium.

Error:
Effusion rate is out of physiologic bounds. Effusion rate is reset to 1.0 milliliters per second.
Error:
Cannot specify effusion rate less than zero. Effusion rate is now set to 0.0.
void biogears::Cardiovascular::PericardialEffusionPressureApplication ( )
private

The pericardial effusion pressure application function calculates the pressure applied to the heart due to a pericardial effusion.

The pressure applied to the left and right heart is dictated by the pericardium pressure. The response is tuned to 40% of this value to achieve the correct physiologic response.

void biogears::Cardiovascular::PostProcess ( )
overridevirtual

Update the cardiovascular circuit.

The current time-step's circuit solution is set to the next time-step when it is passed to PostProcess.

Implements biogears::BioGearsSystem.

void biogears::Cardiovascular::PreProcess ( )
overridevirtual

Preprocess prepares the cardiovascular system for the circuit solver.

This function calculates the appropriate modifications to the cardiovascular circuit for the time within the cardiac cycle and it processes the actions on the cardiovascular system.

Implements biogears::BioGearsSystem.

void biogears::Cardiovascular::Process ( )
overridevirtual

Process solves the cardiovascular circuit.

Modifications to the cardiovascular system are made during the preprocess step of the cardiovascular and other systems. The new state of the circuit is solved using BioGears Circuit Methodology. Advective substance transport is computed using the BioGears Substance Transport Methodology. Finally, vitals sign data is computed and system data is populated in the CalculateVitalSigns method.

Implements biogears::BioGearsSystem.

void biogears::Cardiovascular::ProcessActions ( )
private

Holds the action methods for the cardiovascular system.

This method holds the actions for the CV system so that only one method need be called in preprocess.

  • Hemorrhage
  • Pericardial Effusion
  • CPR
  • CardiacArrest
void biogears::Cardiovascular::ProcessOverride ( )
protected

determine override requirements from user defined inputs

User specified override outputs that are specific to the cardiovascular system are implemented here. If overrides aren't present for this system then this function will not be called during preprocess.

void biogears::Cardiovascular::RecordAndResetCardiacCycle ( )
private

Sets the systolic and diastolic pressures.

The systemic arterial and pulmonary arterial systolic and diastolic pressures are set here. The variables used to track the maximum and minimum pressures are then reset for the next cardiac cycle.

void biogears::Cardiovascular::SetUp ( )
overrideprotectedvirtual

Initializes parameters for Cardiovascular Class.

Initializes member variables and system level values on the common data model.

Todo:
We are assuming that the complex renal system is connected. Make it agnostic.

Implements biogears::BioGearsSystem.

void biogears::Cardiovascular::TraumaticBrainInjury ( )
private

The traumatic brain injury action increases flow resistance in the brain.

The user may specify a brain injury of varying severity to apply during runtime. The brain resistance is scaled based on severity, which impacts flow and pressure in the brain, simulating the effects of a non-localized brain injury.

void biogears::Cardiovascular::TuneCircuit ( )
private

Tune the cardiovascular circuit during stabilization.

Tunes the resistors and capacitors associated with tissue compartments during stabilization to achieve the requested patient parameters

void biogears::Cardiovascular::TunePaths ( double  systemicResistanceScale,
double  systemicComplianceScale,
double  aortaResistanceScale,
double  aortaComplianceScale,
double  rightHeartResistanceScale,
double  venaCavaComplianceScale 
)
private

Method that changes path parameters during circuit tuning.

Method that changes path parameters during circuit tuning.

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

Reimplemented from biogears::SECardiovascularSystem.

void biogears::Cardiovascular::Unload ( CDM::BioGearsCardiovascularSystemData data) const
protectedvirtual

Friends And Related Function Documentation

friend class BioGears
friend
friend class BioGearsEngineTest
friend

Member Data Documentation

SELiquidCompartment* biogears::Cardiovascular::m_Aorta
private
SELiquidSubstanceQuantity* biogears::Cardiovascular::m_AortaCO2
private
SEFluidCircuitPath* biogears::Cardiovascular::m_AortaCompliance
private
SEFluidCircuitPath* biogears::Cardiovascular::m_AortaResistance
private
SELiquidCompartment* biogears::Cardiovascular::m_Brain
private
double biogears::Cardiovascular::m_CardiacCycleAortaPressureHigh_mmHg
private
double biogears::Cardiovascular::m_CardiacCycleAortaPressureLow_mmHg
private
RunningAverage biogears::Cardiovascular::m_CardiacCycleArterialCO2PartialPressure_mmHg
private
RunningAverage biogears::Cardiovascular::m_CardiacCycleArterialPressure_mmHg
private
RunningAverage biogears::Cardiovascular::m_CardiacCycleCentralVenousPressure_mmHg
private
double biogears::Cardiovascular::m_CardiacCycleDiastolicVolume_mL
private
double biogears::Cardiovascular::m_CardiacCyclePeriod_s
private
RunningAverage biogears::Cardiovascular::m_CardiacCyclePulmonaryArteryPressure_mmHg
private
double biogears::Cardiovascular::m_CardiacCyclePulmonaryArteryPressureHigh_mmHg
private
double biogears::Cardiovascular::m_CardiacCyclePulmonaryArteryPressureLow_mmHg
private
RunningAverage biogears::Cardiovascular::m_CardiacCyclePulmonaryCapillariesFlow_mL_Per_s
private
RunningAverage biogears::Cardiovascular::m_CardiacCyclePulmonaryCapillariesWedgePressure_mmHg
private
RunningAverage biogears::Cardiovascular::m_CardiacCyclePulmonaryShuntFlow_mL_Per_s
private
RunningAverage biogears::Cardiovascular::m_CardiacCycleSkinFlow_mL_Per_s
private
double biogears::Cardiovascular::m_CardiacCycleStrokeVolume_mL
private
std::vector<SEFluidCircuitPath*> biogears::Cardiovascular::m_cerebralResistancePaths
private
SEFluidCircuitCalculator biogears::Cardiovascular::m_circuitCalculator
private
SEFluidCircuit* biogears::Cardiovascular::m_CirculatoryCircuit
private
SELiquidCompartmentGraph* biogears::Cardiovascular::m_CirculatoryGraph
private
double biogears::Cardiovascular::m_CompressionPeriod_s
private
double biogears::Cardiovascular::m_CompressionRatio
private
double biogears::Cardiovascular::m_CompressionTime_s
private
double biogears::Cardiovascular::m_CurrentCardiacCycleDuration_s
private
double biogears::Cardiovascular::m_CurrentCardiacCycleTime_s
private
BioGears& biogears::Cardiovascular::m_data
protected
double biogears::Cardiovascular::m_dT_s
private
bool biogears::Cardiovascular::m_EnterCardiacArrest
private
std::vector<SEFluidCircuitPath*> biogears::Cardiovascular::m_extrasplanchnicResistancePaths
private
bool biogears::Cardiovascular::m_HeartFlowDetected
private
double biogears::Cardiovascular::m_LastCardiacCycleMeanArterialCO2PartialPressure_mmHg
private
SEFluidCircuitNode* biogears::Cardiovascular::m_LeftAtrium1
private
SELiquidCompartment* biogears::Cardiovascular::m_LeftHeart
private
double biogears::Cardiovascular::m_LeftHeartElastance_mmHg_Per_mL
private
double biogears::Cardiovascular::m_LeftHeartElastanceMax_mmHg_Per_mL
private
double biogears::Cardiovascular::m_LeftHeartElastanceMin_mmHg_Per_mL
private
double biogears::Cardiovascular::m_LeftHeartElastanceModifier
private
SEFluidCircuitPath* biogears::Cardiovascular::m_LeftHeartToAorta
private
SELiquidCompartment* biogears::Cardiovascular::m_LeftPulmonaryArteries
private
SEFluidCircuitPath* biogears::Cardiovascular::m_LeftPulmonaryArteriesToCapillaries
private
SEFluidCircuitPath* biogears::Cardiovascular::m_LeftPulmonaryArteriesToVeins
private
SELiquidCompartment* biogears::Cardiovascular::m_LeftPulmonaryCapillaries
private
SELiquidCompartment* biogears::Cardiovascular::m_LeftPulmonaryVeins
private
SEFluidCircuitPath* biogears::Cardiovascular::m_leftRenalArteryPath
private
SEFluidCircuitNode* biogears::Cardiovascular::m_MainPulmonaryArteries
private
double biogears::Cardiovascular::m_minIndividialSystemicResistance__mmHg_s_Per_mL
private
std::vector<SEFluidCircuitPath*> biogears::Cardiovascular::m_muscleResistancePaths
private
std::vector<SEFluidCircuitPath*> biogears::Cardiovascular::m_myocardiumResistancePaths
private
double biogears::Cardiovascular::m_OverrideHR_Conformant_Per_min
private
double biogears::Cardiovascular::m_OverrideLHEMax_Conformant_mmHg
private
double biogears::Cardiovascular::m_OverrideLHEMin_Conformant_mmHg
private
bool biogears::Cardiovascular::m_OverrideOnOffCheck = false
private
double biogears::Cardiovascular::m_OverrideRHEMax_Conformant_mmHg
private
double biogears::Cardiovascular::m_OverrideRHEMin_Conformant_mmHg
private
double biogears::Cardiovascular::m_overrideTime_s
private
SEFluidCircuitPath* biogears::Cardiovascular::m_pAortaToBone
private
SEFluidCircuitPath* biogears::Cardiovascular::m_pAortaToBrain
private
SEFluidCircuitPath* biogears::Cardiovascular::m_pAortaToLargeIntestine
private
SEFluidCircuitPath* biogears::Cardiovascular::m_pAortaToLeftKidney
private
SEFluidCircuitPath* biogears::Cardiovascular::m_pAortaToLiver
private
SEFluidCircuitPath* biogears::Cardiovascular::m_pAortaToMuscle
private
SEFluidCircuitPath* biogears::Cardiovascular::m_pAortaToMyocardium
private
SEFluidCircuitPath* biogears::Cardiovascular::m_pAortaToRightKidney
private
SEFluidCircuitPath* biogears::Cardiovascular::m_pAortaToSkin
private
SEFluidCircuitPath* biogears::Cardiovascular::m_pAortaToSmallIntestine
private
SEFluidCircuitPath* biogears::Cardiovascular::m_pAortaToSplanchnic
private
SEFluidCircuitPath* biogears::Cardiovascular::m_pAortaToSpleen
private
SEPatient* biogears::Cardiovascular::m_patient
private
SEPatientActionCollection* biogears::Cardiovascular::m_PatientActions
private
SEFluidCircuitPath* biogears::Cardiovascular::m_pBrainResistanceDownstream
private
SEFluidCircuitPath* biogears::Cardiovascular::m_pBrainResistanceUpstream
private
SEFluidCircuitPath* biogears::Cardiovascular::m_pBrainToVenaCava
private
SELiquidCompartment* biogears::Cardiovascular::m_Pericardium
private
SEFluidCircuitPath* biogears::Cardiovascular::m_pGndToPericardium
private
SEFluidCircuitPath* biogears::Cardiovascular::m_pLeftHeart
private
SEFluidCircuitPath* biogears::Cardiovascular::m_pLeftHeartToGnd
private
SEFluidCircuitPath* biogears::Cardiovascular::m_pMuscleToVenaCava
private
SEFluidCircuitPath* biogears::Cardiovascular::m_pMyocardiumToVenaCava
private
SEFluidCircuitPath* biogears::Cardiovascular::m_pPericardiumToGnd
private
SEFluidCircuitPath* biogears::Cardiovascular::m_pRightHeart
private
SEFluidCircuitPath* biogears::Cardiovascular::m_pRightHeartToGnd
private
SEFluidCircuitPath* biogears::Cardiovascular::m_pVenaCavaHemorrhage
private
SELiquidCompartment* biogears::Cardiovascular::m_RightHeart
private
double biogears::Cardiovascular::m_RightHeartElastance_mmHg_Per_mL
private
double biogears::Cardiovascular::m_RightHeartElastanceMax_mmHg_Per_mL
private
double biogears::Cardiovascular::m_RightHeartElastanceMin_mmHg_Per_mL
private
SEFluidCircuitPath* biogears::Cardiovascular::m_RightHeartResistance
private
SELiquidCompartment* biogears::Cardiovascular::m_RightPulmonaryArteries
private
SEFluidCircuitPath* biogears::Cardiovascular::m_RightPulmonaryArteriesToCapillaries
private
SEFluidCircuitPath* biogears::Cardiovascular::m_RightPulmonaryArteriesToVeins
private
SELiquidCompartment* biogears::Cardiovascular::m_RightPulmonaryCapillaries
private
SELiquidCompartment* biogears::Cardiovascular::m_RightPulmonaryVeins
private
SEFluidCircuitPath* biogears::Cardiovascular::m_rightRenalArteryPath
private
std::vector<SEFluidCircuitPath*> biogears::Cardiovascular::m_splanchnicResistancePaths
private
bool biogears::Cardiovascular::m_StartSystole
private
std::vector<SEFluidCircuitPath*> biogears::Cardiovascular::m_systemicCompliancePaths
private
std::vector<SEFluidCircuitPath*> biogears::Cardiovascular::m_systemicResistancePaths
private
std::vector<SEFluidCircuitPath*> biogears::Cardiovascular::m_tissueResistancePaths
private
SELiquidTransporter biogears::Cardiovascular::m_transporter
private
bool biogears::Cardiovascular::m_TuneCircuit = true
private
std::string biogears::Cardiovascular::m_TuningFile
private
SELiquidCompartment* biogears::Cardiovascular::m_VenaCava
private
SEFluidCircuitPath* biogears::Cardiovascular::m_VenaCavaCompliance
private