Skip to content

Medical Breathing

This page summarizes the mathematical models used by ACE Medical Breathing. For the numerical methods used to apply the differential equations, see General Considerations.

The model uses two gas reservoirs: alveoli and blood, connected as follows:

Surroundings⇄Vent.Alveoli⇄Perf.Blood

Ventilation exchanges gas with the surroundings and perfusion drives exchange of gas between alveoli and blood. O2 in blood gets continuously converted to CO2. Gas exchanges are simplified as continuous flows. No simulation of actual breathing cycles is done.

Tidal and capacity volumes of the lungs are scaled by pneumothorax (PTX):

VT=VT,0⋅(1−ξPTX)VC=VC,0⋅(1−ξPTX)
  • VT [ml]: Tidal volume.
  • VC [ml]: Lung capacity.
  • VT,0=500⋅2/3 ml: Default tidal volume.
  • VC,0=6000⋅2/3 ml: Default lung capacity.
  • ξPTX∈[0,0.75]: PTX progress, expressed as the fraction of lung volume lost.

The factors of 2/3 account for dead space.

Respiratory rate RR increases to compensate for the loss of lung volume:

RR=min⁡(RRmax⁡, RR01−ξPTX)
  • RR [min−1]: Respiratory rate in breaths per minute.
  • RR0 [min−1]: Default respiratory rate (m_fDefaultRespiratoryRateBPM).
  • RRmax⁡ [min−1]: Maximum respiratory rate (m_fMaxRespiratoryRateBPM).

The volume-fraction-based ventilation rate is given below:

kV=RR60 s/min⋅VTVC
  • kV [s−1]: Fractional ventilation rate.

Ventilation equilibrates partial gas pressures between alveoli and surroundings:

ΦV,O2=kV⋅(pO2max⁡−pO2)ΦV,CO2=kV⋅pCO2
  • pO2, pCO2 [kPa]: Alveolar O2 and CO2 partial pressures.
  • pO2max⁡ [kPa]: Supplied O2 pressure, normally 19.925 kPa.
  • ΦV,O2 [kPa/s]: Ventilation rate of increase in alveolar O2 partial pressure.
  • ΦV,CO2 [kPa/s]: Ventilation rate of decrease in alveolar CO2 partial pressure.

The CO2 partial pressure of the surroundings is currently approximated as 0 kPa. An equipped O2 mask raises pO2max⁡ to 95 kPa and enforces kV≥0.015 s−1.

O2 is consumed by cellular respiration and CO2 is produced in return. The ratio between production and consumption depends on the chemical reactions that take place (i.e. aerobic vs anaerobic conditions) and the ratio is given by the respiratory exchange rate RER. The values are adjusted through linear interpolation between hypoxic and normal SpO2 values:

φCR,O2=lerp(φCR,O2hypo, φCR,O20, λ)RER=lerp(RERhypo, RER0, λ) λ=clamp⁡(SpO2−SpO2,hypoSpO2,0−SpO2,hypo, 0, 1) φCR,CO2=φCR,O2⋅RER
  • φCR,O2 [mmol/s]: O2 consumption rate.
  • φCR,O20, φCR,O2hypo [mmol/s]: Normal and hypoxic consumption rates (m_fDefaultOxygenConsumptionMMOLPS and m_fHypoxicOxygenConsumptionMMOLPS).
  • RER, RER0, RERhypo [⋅]: Current, normal, and hypoxic respiratory exchange ratios (m_fDefaultRER and m_fHypoxicRER).
  • SpO2 [%]: Peripheral blood O2 saturation.
  • SpO2,0, SpO2,hypo [%]: Normal and hypoxic saturation levels (m_fDefaultSpO2 and m_fHypoxicMetabolismSpO2).
  • λ [⋅]: Interpolation fraction.
  • φCR,CO2 [mmol/s]: CO2 production rate.

Note that both consumption and production rates are defined as positive values. The sign convention will be important later for the correct signs in the ODEs.

Reduced saturation lowers consumption, which simulates the body prioritizing vital organs.

Perfusion is driven by cardiac output and O2 binding at the alveolar pressure follows a Hill function:

Q=CO60 s/min⋅(1−ξPTX)2/3Salv=(pO2/KD)γ1+(pO2/KD)γ
  • Q [ml/s]: Lung perfusion.
  • CO [ml/min]: Cardiac output.
  • Salv∈[0,1]: Equilibrium O2 saturation at the alveolar O2 pressure.
  • KD=3.6 kPa: Hemoglobin O2 dissociation constant.
  • γ=2.7: Hill coefficient for hemoglobin.

The ξPTX-based term accounts for loss of surface area through pneumothorax. The exponent of 2/3 comes from converting a volume-based quantity to an area-based quantity.

O2 exchange tries to maintain a steady state by compensating for consumption and equilibrating alveolar and peripheral blood saturation:

φQ,O2=clamp⁡(rQ⋅1 mmol/s⋅(Salv−SpO2100%)+min⁡(rQ, 1)⋅φCR,O2, −φQ,O2max⁡, φQ,O2max⁡) φQ,O2max⁡=Q⋅cheme⋅Salv rQ=QQ0Q0=HR0⋅SV060 s/min
  • φQ,O2, φQ,O2max⁡ [mmol/s]: O2 transfer from alveoli to blood and its maximum value.
  • cheme=0.0098 mmol/ml: Heme concentration in blood.
  • rQ [⋅]: Relative perfusion to default.
  • Q0 [ml/s]: Default perfusion.
  • HR0 [min−1]: Default heart rate (m_fDefaultHeartRateBPM).
  • SV0 [ml]: Default stroke volume (m_fDefaultStrokeVolumeML).

CO2 exchange is driven by a deviation from Henry’s law equilibrium between venous concentration and alveolar partial pressure:

φQ,CO2=kC⋅(cv−KH⋅pCO2)
  • φQ,CO2 [mmol/s]: CO2 transfer rate from blood to alveoli.
  • cv [mmol/ml]: Venous blood CO2 concentration.
  • KH=0.000225 mmol/(ml⋅kPa): Henry constant for CO2 in blood.
  • kC [ml/s]: Equilibration rate to restore Henry’s law between blood and alveolar CO2.

Positive φQ,CO2 decreases venous CO2 concentration and increases alveolar CO2 partial pressure. Cellular production adds CO2 to blood, while ventilation removes it from the alveoli.

Net Evolution of Gas Pressures and Concentrations

Section titled “Net Evolution of Gas Pressures and Concentrations”

Ventilation, perfusion, and cellular respiration are combined in ODEs. For evolution of alveolar partial pressures:

dpO2dt=ΦV,O2−RTVC⋅φQ,O2 dpCO2dt=RTVC⋅φQ,CO2−ΦV,CO2

Peripheral blood O2 saturation:

dSpO2dt=100%Va⋅cheme⋅(φQ,O2−φCR,O2)

CO2 concentration in venous blood:

dcvdt=1Vv⋅(φCR,CO2−φQ,CO2)
  • t [s]: Simulation time.
  • T [K]: Body temperature.
  • R [kPa⋅ml/(mmol⋅K]): Universal gas constant.
  • Va, Vv [ml]: Arterial and venous blood volumes, taken as 30% and 70% of total blood volume.

Conversion between partial pressure p and amount of substance n is done through the ideal gas law:

p=nRTV

Tongue-based obstruction and vomit-based occlusion completely shut down any ventilation. Cardiac arrest additionally shuts down perfusion. Cellular respiration still keeps consuming O2 from stale blood, leading to SpO2 depletion and acidosis from CO2 accumulation. CPR can partially restore exchange with chest compression-induced blood flow and passive ventilation (m_fCPRPassiveVentilationRateBPM). An equipped O2 mask additionally increases ventilation as described in Ventilation.

An elevated respiratory rate raises the base heart rate target:

ΔHRbase=2⋅max⁡(RR−RR0, 0)
  • ΔHRbase [min−1]: Shift added to base heart rate target.