// MODEL NAME: Btex20_comp2
// MODEL NAME: Btex20_comp2
// SHORT DESCRIPTION: Axially distributed 2-region capillary-tissue exchange operator
// and analogous 2 compartment model.
JSim v1.1
import nsrunit; unit conversion on;
math btex20_comp2 {
// DOMAINS (time and space in thsi case)
realDomain t sec; t.min = 0; t.max = 30; t.delta = 0.05;
realDomain x cm; real L = 0.1 cm, Ngrid = 81; x.min = 0; x.max = L; x.ct = Ngrid;
private x.min, x.max, x.ct; //Ngrid must be odd number
// PARAMETERS:
real Fp = 1 ml/(g*min), // Plasma flow: Subscript p for plasma
Vp = 0.05 ml/g, // Plasma volume
Visf = 0.15 ml/g, // ISF volume of distribution (virtual relative to plasma)
PS = 1.0 ml/(g*min), // Permeability-surface area product between p and ISF
Gisf = 0.1 ml/(g*min), // ISF consumption rate for metabolite, first order
Dp = 1e-05 cm^2/sec, // Plasma axial diffusion coefficient
Disf = 1e-06 cm^2/sec; // ISF axial diffusion coefficient
private real hVp = if(Vp > 0) Vp else (1e-6 ml/g); //to prevent zero divides
private real hVisf = if(Visf > 0) Visf else (1e-6 ml/g);
// INPUT FUNCTIONS AND VARIABLES:
extern real Cin(t) mmol/ml; // Creates input functions (wave forms or pdfs)
real Cp(t,x) mmol/ml, Cisf(t,x) mmol/ml, Cout(t) mmol/ml, Cpzero(x) = 0 M, Cisfzero(x) = 0 M; //Concn p, isf, outflow
// BOUNDARY CONDITIONS for PDEs:
when (x=x.min) { (Fp*L/Vp)*(Cin - Cp) + Dp*Cp:x = 0; Cisf:x = 0;}
when (x=x.max) { Cp:x = 0; Cout = Cp; Cisf:x = 0;}
// INITIAL CONDITIONS for PDEs:.
when (t=t.min) { Cp = if (x=x.min) Cin else Cpzero; }
when (t=t.min) { Cisf = Cisfzero; }
// PARTIAL DIFFERNETIAL EQUATIONS, PDEs:
Cp:t = -Fp*L/hVp*Cp:x - PS/hVp*(Cp-Cisf) + Dp*Cp:x:x;
Cisf:t = PS/hVisf*(Cp-Cisf)- Gisf/hVisf*Cisf + Disf*Cisf:x:x;
//SECOND MODEL: TWO COMPARTMENT STIRRED TANK MODEL FOR COMPARISON: SAME PARAMETERS
real Tout(t) mmol/ml, Tisf(t) mmol/ml;
when (t=t.min) {Tout = 0; Tisf =0;}
Tout:t = (Fp/hVp)*(Cin-Tout) -(PS/hVp) * (Tout-Tisf);
Tisf:t = (PS/hVisf)*(Tout-Tisf) - Gisf/hVisf*Tisf;
} //End of program
/*
Fp ________________________________________
Cin(t) ---> |Vp Cp(t)|---> Cout(t)
| ^ |
|Dp | PLASMA|
___________PS__________________________|
|Visf | Cisf(t)|
|Gisf V INTERSTITIAL|
|Disf FLUID REGION|
________________________________________
|<----------------L------------------->|
|--> x
Fp : Plasma Flow Rate, (ml/g)/min
Vp : Plasma Volume, ml/g
Visf: Volumes of Distribution, ml/g
PS : Permeability-surface area product exchange coeff, (ml/g)/min
Gisf: Consumption rates for solute in ISF, (ml/g)/min
Dp, Disf: Axial Diffusion Rate, cm^2/sec
Cin: Plasma metabolite inflow, mmol/ml
Cout: Plasma metabolite outflow, mmol/ml
Cp, Cisf: metabolite concentration, mmol/ml
DETAILED DESCRIPTION:
One-dimensional convection-permeataion-diffusion-
reaction model consisting of two concentric cylinders separated by a
membrane. The advecting plasma region with volume Vp has flow Fp, no
consumption, and axial diffusion (disperion) Dp. Units are physiological
per gram of tissue so that a single unit can model a homogeeously perfused
organ. Radial diffusion is assumed instantaneous (short radial distances).
Exchange into a second surrounding non-flowing region is passive with
conductance, PS, the Permeability capillary Surface area product.
This interstitial fluid region, isf, of volume Visf, like the capillary,
is axially distributed, and the gradients axially are dissipated by
a concentration-independent axial diffusion or dispersion. Radial diffusion
within this space is considered instantaneous, and consumption, Gisf, is
first order. This model is used in multicapillary models as one of a set of
units in parallel.Sangren and Sheppard (1954) give the analytical solution
for D = 0.
VERIFICATION TEST: Change the input function from the LagNormal cuver to
a 1 second pulse input of 1 mM from 3 to 4 seconds. Then set Dp =0. Leave the
PSg unchanged, but increase Gisf to 1000 so that everything entering the ISF
is consumed and backflux from ISF to plasma goes to zero. These are the
condtions under which the Crone-Renkin expression for extraction becomes true:
PSg/Fp = 1 - ln (1 - E), where E is the fractional extraction between
entrance and exit, and represents a unidirectional flux. Or, restated:
E = 1 - exp(-Psg/Fp.
The spatial profile Cp(x) at the peak of the pulse has the envelope:
Cp(x) = exp((-PSg/Fp)*x/L)..
For a constant infusion input Cin, the profile is Cp(x) = Cin*exp((-PSg/Fp)*x/L).
Plot this. It should fit the peaks of the pulses. Check the Text output for the graph
to see how many digits accuracy are obtained. Test different solvers.
SHORTCOMINGS/GENERAL COMMENTS:
- Specific inadequacies or next level steps
KEY WORDS: 2-compartmental model, stirred tanks with exchange, passive permeation,
mixing chamber, entrance discontinuity, ODE, zero dimensional
axially distributed convection diffusion exchange model, one dimensional PDE
REFERENCES:
Sangren WC and Sheppard CW. A mathematical derivation of the
exchange of a labeled substance between a liquid flowing in a
vessel and an external compartment. Bull Math Biophys 15: 387-394, 1953
(This gives an analytic solution for the two-region DISTRIBUTED model.)
Goresky CA, Ziegler WH, and Bach GG. Capillary exchange modeling:
Barrier-limited and flow-limited distribution. Circ Res 27: 739-764, 1970.
(This gives another derivation of the analytical form, and uses the model in
both single and multicapillary models.)
Bassingthwaighte JB. A concurrent flow model for extraction
during transcapillary passage. Circ Res 35: 483-503, 1974.
(This gives numerical solutions, which are faster than the analytic solutions,
and imbeds the model in an organ with tissue volums conserved, and with arteries
and veins.)
Guller B, Yipintsoi T, Orvis AL, and Bassingthwaighte JB. Myocardial
sodium extraction at varied coronary flows in the dog: Estimation of capillary
permeability by residue and outflow detection. Circ Res 37: 359-378, 1975.
(Application to sodium exchange in the heart.)
REVISION HISTORY:
Original Author : JBB Date: 05/2/10
Revised by : BEJ Date: 05/3/10
Revision: 1) Update format of comments
Revised by : JBB Date: 05/18/10
Revision: 1) Add data set and ID curves plot page.
2) Simplify code
COPYRIGHT AND REQUEST FOR ACKNOWLEDGMENT OF USE:
Copyright (C) 1999-2010 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.
This software was developed with support from NIH grant HL073598.
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.
*/