// 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.
*/