Plot 1: Pressures, Volume, Flow vs Time (Default): P_V_F_vs_t
Four variables are plotted as functions of time. The pressure at
the mouth, Pmouth, is given by a Square Wave Train (black
line). The pressure is 10 mmHg for 2 seconds, then 0 mmHg for 4
seconds. The pressure signal repeats every 6 seconds. The pressure
in the lungs, Plung, (thick red dashed line) is overlain by the
scaled lung volume, Vlung, which is plotted as (VlungVFRC)/50 (blue
circles). The air flow, Fair, (thick green dashed line) illustrate
that the waveforms for inhalation and exhalation show the same
absolute magnitude and the same rate of exponential decay.
NOTE: For display, Fair(t) divided by 100, volume by 50.
The compliance, Com, is a constant. therefore the volume changes,
(VlungFRC) are exactly proportional to Plung, and Com is the
proportionality constant.
All output variables show the characteristic exponential decay to
new values with time constant tau = R * Com.
Note the verification test provided by curve 5 in this plot: the
flow curve is fitted exactly by the equation:
(Pmouth/R)*exp(t/(tau)) for the first inhalation and is plotted
as curve 5 (thin black line).
To check the numeric values, click on the "Text" tab on
the bottom of the plot page. Compare the values for the first
two seconds for Flow and Curve 5. In one time constant (tau =
0.5 sec) the flow falls from its initial value, Pmouth/R, to 1/e
times that value. Check this number: 1/e = 0.36787944. So with
Com =50 ml/mmHg and R = 0.01 mmHg*sec/ml, the time constant,
tau= R*Com = 0.5 sec.This test is only good for the response to a
square wave input.
Plot 2: Vol.Press. Lung Volume vs Pmouth  Plung.
With the two second pulse of 10 mmHg pressure at the mouth, the flow
jumps to an immediate maximum, and then decays exponentially until
the pressure difference is dissipated as the lung fills. On this
Vol.Press plot the red curve jumps to 10 mmHg (as Flow jumps to its peak
on Plot 1) and the volume then rises to nearly 500 ml above VFRC, not
quite reaching 500 ml as the pulse needed to be longer. When the pulse
turns back to zero, Plung is almost 10 mmHg higher than Pmouth, providing a
pressure gradient for exhalation until the volume returns to VFRC.
// MODEL NUMBER: 0001
// MODEL NAME: OneAlvLung.Assist
// SHORT DESCRIPTION: A compliant 1 compartment lung with resistance to air flow,
// driven by external positive pressure ventilator.
import nsrunit; unit conversion on;
math OneAlvLung.Assist
{ realDomain t sec; t.min=0; t.max=9; t.delta= 0.1;
// PARAMETERS: (Values chosen to approximate an adult human)
real
Com = 50 ml/mmHg, // Compliance of the lung
Res = 0.01 mmHg*sec/ml, // Resistance of airway, a constant
Patmos = 0 mmHg, // Reference Pressure external to body and ventilator
ScalPvent = 10 dimensionless, // Scalar of amplitude of Pvent (Ventilator pressure)
VFRC = 3000 ml; // Volume at rest, Functional Residual Capacity
// VARIABLES
extern real Pvent(t) mmHg; // Driving Pressure from Ventilator
real
Fair(t) ml/sec, // Flow at mouth
Pmouth(t) mmHg, // Pressure at the mouth
Plung(t) mmHg, // Pressure in the lung
Vlung(t) ml; // Volume of air in lung, total
// INITIAL CONDITION
when(t=t.min) Vlung = VFRC; // FRC is lung volume at rest (open glottis)
// ALGEBRAIC AND ODE EQUATIONS
Pmouth = Patmos + ScalPvent * Pvent; // Pressure at the mouth
Fair = (Pmouth  Plung)/Res; // Ohm's Law: current = driving force / resistance
Vlung:t = Fair; // Assumes incompressible air
Plung = Patmos + (VlungVFRC)/Com; // Linear Pressure/Volume relation around VFRC
// VERIFICATION TEST:
//
real tau = Res*Com; // Time constant, sec, = resistance * compliance
real TestF(t) ml/sec; // Test of FlowAir; FlowAir = TestF when ScalPvent * Pvent = 10 mmHg at t = 0
// until the value of ScalPvent * Pvent changes
TestF = ((10 mmHg)/Res)*exp((t0.0)/tau);
} // END OF MML CODE
/*
FIGURE:

Pmouth R Plung  
o/\/\/\/\o Pref
Flow > +  
Com 
Vlung
DETAILED DESCRIPTION:
The equations governing airflow in and out of a one compartment lung are
given by the following analogy to electrical circuits:
Airway pressure is analogous to voltage.
Air flow is analogous to current flow.
Volume is analogous to charge.
Resistance to air flow is analogous to electrical resistance.
Compliance, the relationship between pressure and volume, is
analogous to capacitance, the relationship between charge
and voltage.
The model shows that various quantities are governed by exponential decay
with time constant tau=R*Com.
The main assumption is that the human lungs can be approximated as a single
compartment modeled by an RC circuit where the quantities of interest, air
flow, volume of air, pressure, compliance, and resistance are analogous to
current, charge, voltage, capacitance, and resistance respectively.
GENERAL RESULTS: The ventilator, using a driving pressure of 10 mmHg gives
an approximately normal tidal volume of 500 ml. Normally of course, the force
is provided by expansion of the chest, creating a negative pressure in the
intrapleural space, just the oppposite of this positive pressure ventilator.
SHORTCOMINGS:
1. Air is assumed incompressible. The maximum error with a 10 mmHg
driving force is only 10/760 or 1.3%.
2. There is no deadspace volume, so if there were to be gas exchange,
this model would assume that all of the volume is available for exchange.
3. The shape of the volume/pressure plot is dependent on the time step length
KEY WORDS:
lung compliance, resistance, RC circuit, lung mechanics, airflow in trachea,
tidal volume, positive pressure ventilation, reference, tutorial
REFERENCES:
M.G. Levitsky, Pulmonary Physiology, Sixth Edition, McGraw Hill, 2003.
REVISION HISTORY:
Original Author: GR Date: 09/22/08
Revised: JBB 03 Jan 2014 to use Pref for both inhalation and exhalation.
BEJ:14jun23: updated keywords
COPYRIGHT AND REQUEST FOR ACKNOWLEDGMENT OF USE:
Copyright (C) 19992014 University of Washington. From the National Simulation Resource,
Director J. B. Bassingthwaighte, Department of Bioengineering, University of Washington, Seattle WA 981955061.
Academic use is unrestricted. Software may be copied so long as this copyright notice is included.
This software was developed with support from NIH grants HL088516 and HL073598, NIBIB grant BE08417
and the Virtual Physiological Rat program GM094503 (PI: D.A.Beard). Please cite this grant in any
publication for which this software is used and send an email with the citation and, if possible,
a PDF file of the paper to: staff@physiome.org.
*/