// MODEL NUMBER: 0002
// MODEL NAME: OneAlvLung.Chest
// SHORT DESCRIPTION: A compliant 1 compartment lung with resistance to air flow,
// driven by intrapleural negative pressure (chest or diaphragmatic
// breathing) or by a positive pressure ventilator or both together, even competing, interfering..
import nsrunit; unit conversion on;
math OneAlvLung.pleural { realDomain t sec; t.min=0; t.max=9; t.delta= 0.1;
// DEFINING PARAMETERS: (Values chosen to approximate an adult human)
real
ComLung = 100 ml/mmHg, // Linear Compliance of the lung
ComChest = 100 ml/mmHg, // Linear Compliance of the chest
Res = 0.01 mmHg*sec/ml, // Resistance of airway
Patmos = 760 mmHg, // Reference Pressure external to body (for Boyle's Law calculation)
ScalPvent = 0 dimensionless, // Scalar of amplitude of Pvent (Ventilator) :: for convenience
ScalPchest = 20 dimensionless, // Scalar of amplitude of Pchest ( +ve to expand Chest) :: for convenience
VFRC = 3000 ml, // Functional Residual Capacity = Lung Vol at rest (at 760 mmHg)
Vintrapl0 = 100 ml, // Arbitrary amount air in pleura to allow Vintrapl changes
Vchest0 = 4000 ml, // Chest volume at FRC (incl heart,etc. of about 1000 ml)
Pintrapl0 = -15 mmHg; // Intrapleural press < 0: lung is stretched; chest wall pulled inward
//VARIABLES
extern real Pvent(t) mmHg; // External ventilator at mouth creates positive inhalation pressure
extern real Pchest(t) mmHg; // Chest Expansion (positive to inhale by creating negative Pintrapl)
real
Fair(t) ml/sec, // Flow at mouth
Pmouth(t) mmHg, // Pressure at the mouth
Pintrapl(t) mmHg, // Pressure in intrapleural space (Neg to inhale)
Plung(t) mmHg, // Pressure in the lung
Vlung(t) ml, // Volume of air in lung
Vintrapl(t) ml, // Volume of air in intrapleural space (regarded as compressible)
Vchest(t) ml; // Chest volume at FRC = approx FRC (or TLC-heart and lung tissue)
// INITIAL CONDITION
when(t=t.min) {Vlung = VFRC-Vintrapl0;}
//Air in intrapleural space reduces Vlung below VFRC by Vintrapl0
// ALGEBRAIC AND ODE EQUATIONS
Pmouth = ScalPvent*Pvent + Patmos; // = Ventil Pr at mouth. (Set PscalVentil = 0 for Chest breathing.)
Vchest = Vchest0 + ScalPchest*Pchest*ComChest; // Chest expansion defined by fn generator Pmusc(t)
Pintrapl = Pintrapl0 + (Vlung + Vintrapl0 - VFRC)/ComLung - (Vchest-Vchest0)/ComChest; // Pintrapleural diminishes with chest expansion countered by lung compliane
Fair = ((Pmouth - Plung)/Res); // Ohm's Law, flux = driving force / resistance
Vlung:t = Fair; // Assumes incompressible air
Plung = Patmos + (Vlung - VFRC + Vintrapl)/ComLung + (Pintrapl - Pintrapl0); // Assumes constant compliance
Vintrapl = Vintrapl0* (Pintrapl0 + Patmos)/(Pintrapl + Patmos); // Assumes compressible intrapleural air
// VERIFICATION TEST with respect to Flow(t):
real Com = (1/ComLung + 1/ComChest)^(-1);
real tau = Res*Com; // Time constant of system, resistance* compliance, sec
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, and if ComSlope = 0
TestF = ((10 mmHg) / Res)*exp(-(t-0.0)/tau);
} // END OF MML CODE
/*
FIGURE:
(for ventilator)
Pmouth R Plung Pintrapl || \\
o------------/\/\/\/\----o ---O-----||---|| for chest breathing
__|__ || //
----- Com ComAir = Boyle's Law
| Vlung Vintrapleural
__|__
___
.
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 response to a negative step input in Pintrapl is an exponentially decaying
flow 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: Normally breathing is simulated when the driving force
is provided by expansion of the chest, creating a negative pressure in the
intrapleural space, just the oppposite of a positive pressure ventilator.
Using Pmusc = 2-second pulse of negative driving pressure of -10 mmHg pressure
intrapleural gives an approximately normal tidal volume.
Both sources of driving the system can be used at once, mimicking the patient
struggling to breath on his own when still being ventilated by a purely periodic
ventilatory cycle. (The ventilator should be replaced with a "ventilatory assist"
device, i.e. one that is triggered to provide at assisting positive pressure
ventilation to augment flow when the patient initiates inflow by chest
or diaphragmatic breathing.
Aplying the Ideal Gas Law to Vintrapl shows that the error in assuming air to be
incompressible air is small:
Boyle's Law for Ideal gas in intrapleural space
***********************************************************************************
* Boyle's Law: P*V = n*R*T STP =standard temp pressure is 0 deg C, 1 atm *
* with P mmHg, V ml, n moles of gas where 1 mole at STP occupies 22,414 ml *
* R = Boltzmann const or Gas Const = 0.082 l * atm * mol^(-1) * K^(-1) *
* T = deg K = 273.16 + deg C *
* so that nRT at 37C and 760 mmHg (1 atmos) *
* (volume of gas in ml)* 0.082 l * atm * mol^(-1) *K^(-1) * 310 K *
* P*V = --------------------------------------------------------------- *
* (volume of 1 mole of gas, 22.4 * 310/273 l) *
* *
* PV(for 100 ml)= (100/(22400*310/273))moles * 0.082 mole^(-1) * 760mmHg * 310 *
* *
* = 0.082 * 760 * 273 / 224 = 75.95 mmHg *100ml = 0.7595 mmHg * ml *
* *
* Using P*V= Const, then with a const amount of gas in intrapleural space there is*
* a small volume change with each breath, the direction depending on the driver. *
* V2 = V1 * P1/P2 See Eqn for Plung *
***********************************************************************************
SHORTCOMINGS:
1. Air breathed is assumed incompressible. The maximum error with a 20 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 effects of chest compression or exhalation against a closed or
partially closed glottis need accounting.
4. The effects of high Mouth pressure on effective intrapleural pressure need Rx.
To do this, the chest compliance should be separated from lung compliance.
5. Setting Vintrapl has no effect on S.S.Volumes.
6. The shape of the volume/pressure plot is dependent on the time step length
7. The compliance of the chest and lung are lumped
KEY WORDS:
lung compliance, resistance, RC circuit, lung mechanics, airflow in trachea,
tidal volume, positive pressure ventilation, chest or diaphragmatic breathing, tutorial
REFERENCES:
M.G. Levitsky, Pulmonary Physiology, Sixth Edition, McGraw Hill, 2003.
REVISION HISTORY:
Original Author: JBB Date: 13.12.17 (Yr.Mo.Day notation)
Revised by: BEJ Date:14.6.23 : Update Comments
Revised by: BEJ Date:15.6.01 : Separate compliance for lung and chest, Add param set, Notes
COPYRIGHT AND REQUEST FOR ACKNOWLEDGMENT OF USE:
Copyright (C) 1999-2015 University of Washington. From the National Simulation Resource,
Director J. B. Bassingthwaighte, Department of Bioengineering, University of Washington, Seattle WA 98195-5061.
Academic use is unrestricted. Software may be copied so long as this copyright notice is included.
When citing JSim please use this reference: Butterworth E, Jardine BE, Raymond GM, Neal ML, Bassingthwaighte JB.
JSim, an open-source modeling system for data analysis [v3; ref status: indexed, http://f1000r.es/3n0]
F1000Research 2014, 2:288 (doi: 10.12688/f1000research.2-288.v3)
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.
*/