Skip to content

Medical Circulation

This page summarizes the mathematical models used by ACE Medical Circulation.

For the numerical methods used to apply the differential equations, see General Considerations.

The equation for cardiac output CO is given below, where stroke volume scales linearly with blood volume:

CO=HR⋅SVSV=SV0⋅(2⋅BVBV0−1)
  • CO [ml/min]: Cardiac output.
  • HR [min−1]: Heart rate in beats per minute.
  • SV [ml]: Stroke volume.
  • SV0 [ml]: Default stroke volume (m_fDefaultStrokeVolumeML).
  • BV, BV0 [ml]: Current and maximum blood volumes.

The ordinary differential equation (ODE) for heart rate HR is given below:

dHRdt=0.5 s−1⋅(HRtgt−HR) HRtgt=max⁡(0, max⁡(HRbase, HR0+50 min−1⋅p)+ΔHRmed)
  • HR0 [min−1]: Default heart rate (m_fDefaultHeartRateBPM).
  • HRtgt, HRbase [min−1]: Target and state-dependent base target heart rates.
  • p∈[0,1]: Pain intensity.
  • ΔHRmed [min−1]: Medication-based adjustment.

HRbase=HR0, unless the character has class III hemorrhage, in which case tachycardia induced by hypovolemic shock is simulated as below:

HRbase(t+Δt)=HR(t)⋅14.3 kPa⋅BVmax⁡(6 kPa, MAP)
  • MAP [kPa]: Mean arterial pressure.

Systemic vascular resistance SVR is kept constant, unless adjusted by medication:

SVR=SVR0+ΔSVRmedSVR0=MAP0HR0⋅SV0
  • SVR, SVR0 [kPa⋅min/ml]: Current and default systemic vascular resistance.
  • ΔSVRmed [kPa⋅min/ml]: Medication-based adjustment.
  • MAP0 [kPa]: Default mean arterial pressure (m_fDefaultMeanArterialPressureKPA).

Mean arterial pressure MAP is calculated from cardiac output and systemic vascular resistance:

MAP=CO⋅SVR
  • MAP [kPa]: Mean arterial pressure.

The pulse pressure PP is currently kept proportional to MAP:

PP=MAP⋅PP0MAP0
  • PP [kPa]: Pulse pressure.
  • PP0 [kPa]: Default pulse pressure (m_fDefaultPulsePressureKPA).

The systolic and diastolic pressures can be derived as follows:

SP=MAP+23PPDP=MAP−13PP
  • SP [kPa]: Systolic pressure.
  • DP [kPa]: Diastolic pressure.

The total wound bleeding rate Rwounds is capped by CO and gravity-induced maximum rate Rg:

Reff=−fmed⋅min⁡(Rwounds, max⁡(CO60 s/min, Rg))
  • Reff, Rwounds [ml/s]: Effective bleeding rate and total bleeding rate from wounds.

  • fflow∈[0,1]: Medication-based blood flow scale (1 if no drug effect is present).

  • Rg [ml/s]: Maximal gravity-induced bleeding rate (m_fCardiacArrestMaxTotalBleedingRate). Ensures a residual bleeding rate when in cardiac arrest.

During cardiac arrest, HR is set to zero and during CPR it is randomized with the relation below:

HRCPR=100 min−1+min⁡(|X|, 20 min−1)X∼𝒩(0, (20/3 min−1)2)
  • HRCPR [min−1]: Simulated compression rate, sampled on each vital update.
  • X [min−1]: Gaussian-randomized shift with mean of 0 bpm and standard deviation of 20/3 bpm.

The stroke volume SV gets scaled by ηCPR∈[0,1] (m_fCPRStrokeVolumeScale) to account for the lower effectiveness of chest compressions compared with heartbeats:

SVCPR=ηCPR⋅SV

The probability previve for successful revival during CPR is linearly interpolated between class IV and class II hemorrhage:

previve=lerp(pmin⁡, pmax⁡, λ)withλ=clamp⁡(BV−BVIVBVII−BVIV, 0, 1)
  • pmin⁡, pmax⁡ [⋅]: Probability limits (m_fCPRSuccessChanceMin and m_fCPRSuccessChanceMax).
  • BVIV, BVII [ml]: Blood volume thresholds for class IV and class II hemorrhage.

Checks occur every m_fCPRSuccessCheckTimeoutS seconds. Medication can reduce this timeout.

Drug configurations are provided through m_aPharmacokineticsConfigs and m_aPharmacodynamicsConfigs. This section covers the models and parameters in the configs. Simulation is done in two parts: Evolution of drug concentrations (pharmacokinetics) and how they contribute to effects (pharmacodynamics).

For the evolution of concentration of a drug over time, we consider the following model of two consecutive first-order chemical reactions:

P→kaA→kd⊗

where ka and kd are the activation and deactivation rate constants, P is a precursor state and A is the active state that causes effects. The corresponding coupled system of ODEs is given below:

ddt([P][A])=(−ka0ka−kd)⋅([P][A])

This system has an analytical solution:

([P][A])(t)=(exp⁡(−kat)kaka−kd⋅(exp⁡(−kdt)−exp⁡(−kat)))⋅[P]0
  • t [s]: Elapsed time since administration.
  • [A] [nM]: Active drug concentration.
  • [P]0 [nM]: Administered precursor concentration (i.e. dose).
  • ka, kd [s−1]: Activation and deactivation rate constants (m_fActivationRateConstant and m_fDeactivationRateConstant).

When multiple doses are active, each dose is simulated individually and the effective active concentration of A is just the sum.

Each configured contribution to a specific effect by drug i is calculated from concentration of its active state [A]i and optional synergistic and antagonistic contributions from other drugs. Synergistic contributions will enhance a drug’s effect in the presence of another, while antagonistic contributions will competitively inhibit it. The equation for the contribution factor χi of drug i to an effect is given below:

χi=([A]iKi⋅Ji+Ji−)γi Ji±=1+∑j[A]jKij±
  • [A]i [nM]: Total active concentration of drug i.
  • Ki [nM]: Concentration scale (m_fEC50). The smaller, the stronger the effect. In case of a Hill function (see below), this is the EC50 value, which is the concentration at which half of the maximum effect is observed.
  • γi [⋅]: Hill coefficient (m_fGamma).
  • χi [⋅]: Drug contribution to an effect.
  • Ji+: Synergistic interactions (m_aSynergistConfigs).
  • Ji−: Antagonistic interactions (m_aAntagonistConfigs).
  • Kij± [nM]: Concentration scale for synergistic or antagonistic contribution of drug j to drug i. It is the concentration at which drug j halves the effect of drug i (if antagonistic) or doubles (if synergistic).

The effect E is then either directly obtained from the sum over all χi or a Hill function is applied to the sum:

Elinear=∑iχiEHill=Emax⁡⋅∑iχi1+∑iχi
  • Elinear: Linear drug effect (e.g. for adjustments to vitals like HR)
  • EHill: Sigmoidal drug effect (e.g. for pain suppression) with saturation limit towards a maximum effect Emax⁡ (m_fMaxEffect).