// MODEL NUMBER: 0064
// MODEL NAME: OneCompLungTissue
// SHORT DESCRIPTION:
//This is a one compartment lung mechanic model with O2CO2 exchange.
//
import nsrunit; unit conversion on;
math OneCompLungO2CO2 { realDomain t sec; t.min=0; t.max=100.0; t.delta=0.1;
// PARAMETERS:
real
Pzero = 0 cmH2O, // Background atmospheric pressure
Pamp = 10 cmH2O, // Amplitude of respiratory pump pressure
R12 = 0.005 cmH2O*sec/ml, // Resistance between comp. 1 and air
Com1 = 50 ml/cmH2O, // Compliance of comp. 1 (alveolus)
Vr1 = 3000 ml, // Rest volume of compartment 1 (P1=0)
Bgas = 0.132 1/mmHg, // Solubility in any gas in air
BbO2 = 0.003 1/mmHg, // Solubility of O2 in blood
BbCO2 = 0.779 1/mmHg, // Solubility of CO2 in blood
O2DAx12= 20 ml/s, // Diffusion coeff*Area/distance for O2
CO2DAx12= 20 ml/s, // Diffusion coeff*Area/distance for CO2
O2PScap = 3000 ml/min, // permeabilitysurface area product for O2 tissue to V1
CO2PScap = 1200 ml/min, // permeabilitysurface area product for CO2 tissue to V1
O2Pair = 150 mmHg, // Partial pressure of O2 in inhaled air
CO2Pair = 0 mmHg, // Partial pressure of CO2 in inhaled air
O2Pt = 40 mmHg, // Partial pressure of O2 in tissue
CO2Pt = 40 mmHg, // Partial pressure of CO2 in tissue
P10 = 0 mmHg, // Initial condition for P1
O2P10 = 0 mmHg, // Initial condition for O2P1
CO2P10 = 0 mmHg; // Initial condition for CO2P1
// VARIABLES:
extern real Psource(t) dimensionless; // Positive pressure at mouth (respirator)
real
P1(t) mmHg, // Transmural pressure in comp. 1 (alveolus)
Pair(t) mmHg, // pressure in external air
V1(t) ml, // Volume of comp. 1 = alveolus
F1(t) ml/sec, // Flow from comp. 2 to comp. 1 (+ on insp.)
x21(t), //switches for F1: 1 = F 2>1, or 0 for F1 1>2
O2P1(t) mmHg, // O2 Part. Press. in Compartment 1
CO2P1(t) mmHg; // CO2 Part. Press. in Compartment 1
// INITIAL CONDITION
when (t=t.min) {
P1 = P10;
O2P1 = O2P10;
CO2P1 = CO2P10;
}
// ALGEBRAIC AND ODE EQUATIONS
x21 = if (F1 > 0) 1 else 0; // Flow direction changes this value
Pair = Pzero + Pamp*Psource; // Resp. pressure using fn generator Psource
F1 = (PairP1)/R12; // Flow into/from comp. 1
V1=P1*Com1+Vr1; // Volume of comp. 1
P1:t = F1/Com1; // BULK FLOW BETWEEN COMPARTMENTS AND COMPARTMENTAL VOLUME
// O2 transport between air, compartment 1 and boundary region
O2P1:t = (F1*(O2PairO2P1)*x21
+ O2DAx12*(O2Pair  O2P1)
+ O2PScap*(O2Pt*BbO2/Bgas  O2P1))/V1;
// CO2 transport between air, compartment 1 and boundary region
CO2P1:t = (F1*(CO2PairCO2P1)*x21
+ CO2DAx12*(CO2Pair  CO2P1)
+ CO2PScap*(CO2Pt*BbCO2/Bgas  CO2P1))/V1;
} // END OF MML CODE
/*
FIGURE:
 /
>F1 P1  /
Air ^^^^^o Alveolus V1  /slope =
R1   / compliance
____ Vr1 /
Com1 _____ 
 
 P1
Ground 

DETAILED DESCRIPTION:
ONE COMPARTMENT LUNG MODEL  MECHANICS & O2CO2 EXCHANGE
A model of a single compartment compliant lung. Ventilation is driven by
positive pressure oscillatory pressure source (Psource) that produces
bidirectional airflow.
Oxygen (O2) and CO2 exchange with an infinite sink (source) of these gases
which is assumed to be located within the tissue.
Mathematically, this mechanics model analogous to a single open loop
resistorcapacitor electric circuit.
KEY WORDS:
One compartment, Compliant lung, Positive pressure, bidirectional ventilation,
gas exchange
REFERENCES:
M.G. Levitzky, Lange Physiology Series: Pulmonary Physiology, 6th edition. McGraw Hill, 2003.
REVISION HISTORY:
Original Author: Joseph C. Anderson Date: 06/17/08
Revised by Feng Gao Date: 06/26/09
Revision: 1) Using model template
JSim SOFTWARE COPYRIGHT AND REQUEST FOR ACKNOWLEDGMENT OF USE:
JSim software was developed with support from NIH grants HL088516,
and HL073598. Please cite these grants in any publication for which
this software is used and send one reprint of published abstracts or
articles to the address given below. Academic use is unrestricted.
Software may be copied so long as this copyright notice is included.
Copyright (C) 19992008 University of Washington.
Contact Information:
The National Simulation Resource,
Director J. B. Bassingthwaighte,
Department of Bioengineering,
University of Washington, Seattle, WA
981955061
*/