6#include "engine/common/system/Model.h"
7#include "engine/common/system/Systems.h"
8#include "cdm/circuit/fluid/SEFluidCircuitCalculator.h"
9#include "cdm/compartment/fluid/SELiquidCompartmentGraph.h"
39 class PULSE_DECL CardiovascularModel :
public CardiovascularSystem,
public Model
44 CardiovascularModel(Data& data);
45 virtual ~CardiovascularModel();
47 void Clear()
override;
50 void Initialize()
override;
52 void SetUp()
override;
54 void SetHeartRhythm(eHeartRhythm Rhythm)
override;
55 void SetHeartRhythm(eHeartRhythm Rhythm,
bool force);
57 void AtSteadyState()
override;
58 void PreProcess()
override;
59 void Process(
bool solve_and_transport=
true)
override;
60 void PostProcess(
bool solve_and_transport=
true)
override;
63 void ComputeExposedModelParameters()
override;
67 void TunePaths(
double systemicResistanceScale,
double systemicComplianceScale,
double aortaResistanceScale,
double aortaComplianceScale,
double rightHeartResistanceScale,
double venaCavaComplianceScale);
68 void TuneTissue(
double time_s,
DataTrack& track, std::ofstream& circuitFile);
71 void ChronicRenalStenosis();
73 void ChronicHeartFailure();
74 void ChronicPericardialEffusion();
78 void AdjustVascularTone();
79void MetabolicToneResponse();
80 void BeginDriverCycle();
81void RecordAndResetCardiacCycle();
82 void CalculateHeartElastance();
83 void ProcessActions();
86double CalculateDepthForce(
double compressionDepth_cm);
87double ShapeCPRForce(
double compressionForce_N);
88void ApplyCPRForce(
double compressionForce_N);
91 void PericardialEffusion();
92 void PericardialEffusionPressureApplication();
93 void TraumaticBrainInjury();
94 void UpdatePulmonaryCapillaries();
95 void CalculateHemothorax();
97 void CalculatePleuralCavityVenousEffects();
100 void CalculateVitalSigns();
105 bool m_HeartFlowDetected;
106 bool m_FullyCompressedHeart;
107 double m_StabilizedHeartRateBaseline_Per_min;
108 double m_StabilizedMeanArterialPressureBaseline_mmHg;
109 double m_CurrentDriverCycleTime_s;
110 double m_DriverCyclePeriod_s;
111 double m_LeftHeartElastanceModifier;
112 double m_LeftHeartElastance_mmHg_Per_mL;
113 double m_LeftHeartElastanceMax_mmHg_Per_mL;
114 double m_LeftHeartElastanceMin_mmHg_Per_mL;
115 double m_RightHeartElastance_mmHg_Per_mL;
116 double m_RightHeartElastanceMax_mmHg_Per_mL;
117 double m_RightHeartElastanceMin_mmHg_Per_mL;
119 eSwitch m_EnableFeedbackAfterArrhythmiaTrasition;
120 bool m_StartCardiacArrest;
121 bool m_TransitionArrhythmia;
122 double m_CardiacArrestVitalsUpdateTimer_s;
132 double m_CompressionFrequencyCurrentTime_s;
133 double m_CompressionFrequencyDuration_s;
134 double m_CompressionPeriod_s;
135 double m_CompressionPeriodCurrentTime_s;
137 double m_CardiacCycleDiastolicVolume_mL;
138 double m_CardiacCycleAortaPressureLow_mmHg;
139 double m_CardiacCycleAortaPressureHigh_mmHg;
140 double m_CardiacCycleLeftHeartPressureLow_mmHg;
141 double m_CardiacCycleLeftHeartPressureHigh_mmHg;
142 double m_CardiacCyclePulmonaryArteryPressureLow_mmHg;
143 double m_CardiacCyclePulmonaryArteryPressureHigh_mmHg;
144 double m_CardiacCycleRightHeartPressureLow_mmHg;
145 double m_CardiacCycleRightHeartPressureHigh_mmHg;
146 double m_LastCardiacCycleMeanArterialCO2PartialPressure_mmHg;
147 double m_CardiacCycleStrokeVolume_mL;
148 double m_PeripheralVolumeHigh_mL;
149 double m_PeripheralVolumeLow_mL;
151 std::vector<double> m_LeftCardiacCyclePerfusionVolumes_mL;
152 std::vector<double> m_RightCardiacCyclePerfusionVolumes_mL;
167 struct HemorrhageTrack
170 std::map<SELiquidCompartment* , std::vector<SELiquidCompartmentLink*>> CmptHemorrhageLinks;
172 std::map<SEHemorrhage*, HemorrhageTrack*> m_HemorrhageTrack;
175 double m_MAPCollapse_mmHg;
176 double m_MinIndividialSystemicResistance_mmHg_s_Per_mL;
252 std::vector<SEFluidCircuitPath*> m_HeartCompliancePaths;
253 std::vector<SEFluidCircuitPath*> m_AortaCompliancePaths;
254 std::vector<SEFluidCircuitPath*> m_AortaResistancePaths;
255 std::vector<SEFluidCircuitPath*> m_VenaCavaCompliancePaths;
256 std::vector<SEFluidCircuitPath*> m_VenaCavaResistancePaths;
257 std::vector<SEFluidCircuitPath*> m_RespiratoryCompliancePaths;
258 std::vector<SEFluidCircuitPath*> m_PulmonaryResistancePaths;
259 std::vector<SEFluidCircuitPath*> m_SystemicCompliancePaths;
260 std::vector<SEFluidCircuitPath*> m_SystemicResistancePaths;
261 std::vector<SEFluidCircuitPath*> m_MuscleResistancePaths;
262 std::vector<SEFluidCircuitPath*> m_SkinPaths;
265 std::vector<SEFluidCircuitPath*> m_LeftPulmonaryArteriesToVeins;
266 std::vector<SEFluidCircuitPath*> m_LeftPulmonaryArteriesToCapillaries;
267 std::vector<SEFluidCircuitPath*> m_RightPulmonaryArteriesToVeins;
268 std::vector<SEFluidCircuitPath*> m_RightPulmonaryArteriesToCapillaries;
Definition: DataTrack.h:17
Definition: PBPhysiology.h:24
Definition: SECardiovascularMechanicsModifiers.h:9
Definition: SECircuitCalculator.h:24
Definition: SEFluidCircuit.h:12
Definition: SEFluidCircuitNode.h:10
Definition: SEFluidCircuitPath.h:9
Definition: SEGasCompartment.h:14
Definition: SEHemorrhage.h:35
Definition: SELiquidCompartmentGraph.h:16
Definition: SELiquidCompartment.h:11
Definition: SELiquidCompartmentLink.h:11
Definition: SELiquidSubstanceQuantity.h:12
Definition: SEPatient.h:13
Definition: SERunningAverage.h:8
Definition: SESubstanceTransport.h:86
Definition: SETemporalInterpolator.h:8