This website provides a suite of advanced medical simulation tools designed for healthcare professionals, researchers, and students. The site is intended
to support medical education and research by offering interactive and user-friendly simulations. The tools focus upon arterial blood gas (ABG) analysis and
ventilation/perfusion (V/Q) lung modeling to further the understanding of respiratory pathophysiology.
The tools are built on models and algorithms developed in silico. The tools have not been validated in vivo.
Key Features
- Abg simulator: Generate a multicompartmental mathematical lung model based on inputted parameters. Explore predictions regarding arterial
and mixed venous blood gases, alveolar gas phase pressures and common derived indices. As inputs the model requires values for the percentage of cardiac
output not participating in gas exchange (Shunt), the spread of V/Q ratios through the lung (LogSD) and the mean V/Q ratio (MeanV/Q).
- DL Two & One abg: Estimate difficult to measure key parameters of Shunt, LogSD and MeanV/Q from measureable inputs, then assess reliability by running
the V/Q lung model to compare predicted arterial blood gas results with inputted values. Subsequently, explore the wider set of predictions.
- Deep Learning (DL) Models:The multicompartmental lung model was used to generate a dataset containing 2 million samples. The inputs were randomly
drawn from physiological ranges of measureable values and the key parameters of Shunt, LogSD and MeanVQ. The dataset was used to train deep learning models to
estimate the Shunt, LogSD and MeanVQ from measureable data including cardiac output, oxygen consumption (VO2), respiratory quotient (R), FiO2, and abg data. However, extra input data was needed leading
to the development of two approaches:
- DL Two abg approach: Additional data inputs of PaO2, and SaO2 from a second abg at FiO2 + 0.1. A small increment
in FiO2 was used to create a difference in oxygenation while minimising effects of denitrogenation. Other parameters and ventilation were assumed unchanged.
- DL One abg approach: Additional data input of the mixed alveolar partial pressure of CO2 (mPACO2) as measured by
volume capnometry.
- DL Architecture: Each DL model has 10 or 11 input features, six densely connected layers each with 128
nodes and one ouput yielding approximately 84 000 trainable parameters.
- Abg advanced: Vary the multicompartental model setup.
- MeanV/Q LogSD:The default setup requires parameters including cardiac Output, Shunt, LogSD and
MeanV/Q values.
- Separate V and Q with logs:Setup requires cardiac output, Shunt, LogSD of the spread of Q values,
minute volume of alveolar ventilation and LogSD of the spread of V values. A similar outcome regarding spread of V/Q is achieved when the difference between
logSD of Q and logSD of V is comparable to the logSD of V/Q in the "MeanV/Q LogSD" approach.
- Bimodal MeanV/Q LogSD:Setup is similar to
the "MeanV/Q LogSD" approach but allows a second distribution with its own MeanV/Q and LogSD to enable bimodal modelling generating assymetric distributions.
A variable representing the fraction of nonshunted cardiac output going to the second distribution is required.
- Inspired versus expired V:In the default setup, expired volumes for the "V" in "V/Q" was assumed.
The "MeanV/Q LogSD" and "Bimodal MeanV/Q LogSD" approaches allow an option to model using inspired volumes.
This may result in low V/Q compartments having negative expired volumes. These negative values can be handled in one of three ways: leave negative, convert to shunt
("collapsed lung" or "V/Q=0") or have inspired gas redistributed to fill this negative space.
- Adjust PaCO2: Minute volume of ventilation can be increased by increasing MeanV/Q or inputted
"alveolar ventilation" depending on setup mode. Another option is to target a value for arterial PCO2 or arterial pH. This approach may take longer for the
simulator to calculate a result. An input regarding required accuracy for the target ("tolerance") is required.
- Haldane correction coefficient: Varying this value will affect venous blood gas results.
Default value = 0.22.
- PAC Calcs: An aid to quickly calculate VO2 if mixed and arterial blood gases are known. Venous admixture can also be calulated using the
classic Shunt equation. Unfortunately, VCO2 is highly sensitive to small variations in partial pressure of PCO2 rendering this less useful as a means
to calculate the respiratory quotient (R).
- DL Venous Admixture: Deep Learning estimate of Venous Admixture using inputs including VO2, Respiratory quotient, FiO2, cardiac output
and a single arterial blood gas.
- Publications: Access related research and resources to deepen your understanding.
Multicompartmental V/Q Lung Model: The default approach "MeanV/Q LogSD"
- A multicompartmental (n= 10-100) compartment model adapted from the West approach was developed in Python. A minimum of 20 compartments is recommended. Inputs required
are Shunt, LogSD, MeanVQ, FiO2, rate of oxygen consumption (VO2), respiratory quotient (R), haemoglobin concentration, base excess, partial pressure of oxygen when
Hb is 50% saturated (p50) and cardiac output. The nonshunted component of cardiac output is distributed to the compartments according to a log normal distribution with
frequency on the y axis and V/Q on the x axis scaled from 3.5 standard deviations below the mean to 5.5 standard deviations above the mean. V for each compartment is calculated
using the V/Q ratio of the compartment. Uptake of O2
and excretion of CO2 globally and for each compartment is iteratively
balanced. Summation enables derivation of arterial blood and mixed venous blood gas values, alveolar gas phase pressures and derived indices such as venous admixture
and alveolar dead space. For calculations of venous admixture and alveolar dead space, the ideal lung unit is defined as the one with a R value matching the global R value.
The “shunt” equation and “dead space” equations are utilised respectively.
Pure alveolar dead space
- The setup for the multicompartmental V/Q lung model assumes pure alveolar dead space is zero. Such dead space was described by John West as Zone 1. Thus, the
mixed alveolar PCO2 (mPACO2) value generated incorporates this assumption. Thus, when using the "DL One abg" estimator with mPACO2 as an
input, the assumption of Zone 1 dead space being zero applies. However, the "DL Two abg" estimator does not require mPACO2 as an input to estimate Shunt, LogSD and
MeanV/Q. Using these values, the model will forward calculate a value for mPACO2. If this value is compared with measured mPACO2, the difference will
be due to dilution by Zone 1 dead space. Thus, the "DL Two abg" estimator has an option to enter a value for mPACO2 to facilitate the computation of Zone 1 dead
space.
Contact Us
Have questions or feedback? Reach out at peterscottsim@gmail.com. Your input is valued and appreciated.