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/SEGasCompartmentGraph.h"
10#include "cdm/compartment/fluid/SELiquidCompartmentGraph.h"
39 class PULSE_DECL RespiratoryModel :
public RespiratorySystem,
public Model
44 RespiratoryModel(Data& data);
45 virtual ~RespiratoryModel();
47 virtual void Clear()
override;
50 virtual void Initialize()
override;
52 virtual void SetUp()
override;
54 virtual void AtSteadyState()
override;
55 virtual void PreProcess()
override;
56 virtual void Process(
bool solve_and_transport=
true)
override;
57 virtual void PostProcess(
bool solve_and_transport=
true)
override;
60 void ComputeExposedModelParameters()
override;
61 eLungCompartment GetLungCompartment(
const std::string& cmpt);
62 std::string GetCompartmentName(eLungCompartment m);
69 void CalculateFatigue();
70 void UpdateChestWallCompliances();
72 void UpdateResistances();
73 void UpdateAlveolarCompliances();
74 void UpdateInspiratoryExpiratoryRatio();
75 void UpdateDiffusion();
76 void UpdatePulmonaryCapillary();
77 void UpdatePulmonaryShunt();
78 SESegment* GetSegement(
const std::vector<SESegment*>& segments,
double volume_L);
80 void SetRespiratoryResistance();
81 void SetRespiratoryCompliance();
86 void MechanicalVentilation();
87 void SupplementalOxygen();
89 void CalculateDriver();
91 void SetBreathCycleFractions();
92 void ConsciousRespiration();
93 double VolumeToDriverPressure(
double TargetVolume);
94 void UpdateDriverPressure();
95void CalculateMechanoreceptors();
96 void UpdateDriverPeriod();
97 double UpdateTargetVentilation(
double targetAlveolarVentilation_L_Per_min);
99 void ProcessAerosolSubstances();
102 void CalculateVitalSigns();
108 bool m_BreathingCycle;
110 double m_TopBreathTotalVolume_L;
111 double m_TopCarinaO2;
112 double m_TopBreathElapsedTime_min;
113 double m_BottomBreathElapsedTime_min;
114 double m_BottomBreathTotalVolume_L;
115 double m_BottomBreathAlveoliPressure_cmH2O;
116 double m_BottomBreathAirwayPressure_cmH2O;
117 double m_PeakAlveolarPressure_cmH2O;
118 double m_MaximalAlveolarPressure_cmH2O;
119 double m_LastCardiacCycleBloodPH;
124 std::vector<double> m_AlveoliVolumeIncrement_L;
125 std::vector<double> m_TopBreathAcinarZoneVolumes_L;
126 std::vector<double> m_BottomBreathAcinarZoneVolumes_L;
127 double m_PreviousPleuralVolume_L;
130 double m_ArterialO2PartialPressure_mmHg;
131 double m_ArterialCO2PartialPressure_mmHg;
132 double m_BreathingCycleTime_s;
133 double m_DriverPressure_cmH2O;
134 double m_ElapsedBreathingCycleTime_min;
135 double m_IERatioScaleFactor;
136 double m_PeakInspiratoryPressure_cmH2O;
137 double m_PeakExpiratoryPressure_cmH2O;
138 double m_PreviousTargetAlveolarVentilation_L_Per_min;
139 double m_VentilationFrequency_Per_min;
140 double m_VentilationPeriod_s;
141 double m_VentilationToTidalVolumeSlope;
146 double m_ExpiratoryHoldFraction;
147 double m_ExpiratoryReleaseFraction;
148 double m_ExpiratoryRiseFraction;
149 double m_InspiratoryHoldFraction;
150 double m_InspiratoryReleaseFraction;
151 double m_InspiratoryRiseFraction;
152 double m_InspiratoryToExpiratoryPauseFraction;
153 double m_ResidueFraction;
154 double m_PreviousDyspneaSeverity;
155 double m_MechanoreceptorsDyspneaFactor;
158 bool m_ActiveConsciousRespirationCommand;
161 double m_LeftAlveoliDecrease_L;
162 double m_RightAlveoliDecrease_L;
165 double m_RespiratoryResistanceOverride_cmH2O_s_Per_L;
166 double m_RespiratoryComplianceOverride_L_Per_cmH2O;
171 double m_MaxDriverPressure_cmH2O;
173 double m_CentralControlGainConstant;
174 double m_DefaultOpenResistance_cmH2O_s_Per_L;
175 double m_DefaultClosedResistance_cmH2O_s_Per_L;
176 double m_PeripheralControlGainConstant;
177 double m_RespOpenResistance_cmH2O_s_Per_L;
178 double m_RespClosedResistance_cmH2O_s_Per_L;
179 double m_VentilationTidalVolumeIntercept;
180 double m_VentilatoryOcclusionPressure_cmH2O;
181 double m_MinimumAllowableTidalVolume_L;
182 double m_MinimumAllowableInpiratoryAndExpiratoryPeriod_s;
184 double m_AverageLocalTissueBronchodilationEffects;
220 std::vector<SELiquidCompartment*> m_AerosolEffects;
245 std::map<eLungCompartment, LungComponent> m_LungComponents;
Definition: PBPhysiology.h:24
Definition: SECircuitCalculator.h:24
Definition: SEConsciousRespirationCommand.h:8
Definition: SEFluidCircuit.h:12
Definition: SEFluidCircuitNode.h:10
Definition: SEFluidCircuitPath.h:9
Definition: SEGasCompartment.h:14
Definition: SEGasSubstanceQuantity.h:10
Definition: SELiquidCompartment.h:11
Definition: SELiquidSubstanceQuantity.h:12
Definition: SEPatientActionCollection.h:50
Definition: SEPatient.h:13
Definition: SERespiratoryMechanicsModifiers.h:9
Definition: SERunningAverage.h:8
Definition: SESegment.h:7
Definition: SESubstance.h:15
Definition: SESubstanceTransport.h:86