/* MODEL NUBER: 0272
MODEL NAME: CTEX10
SHORT DESCRIPTION: Models a capillary consisting of N compartments. Explores sensitivity analysis
and optimization and details the Monte-Carlo GUI for robust estimates of parameters, confidence limits and covariance.
*/
import nsrunit; unit conversion on;
math CTEX10 {
// INDEPENDENT VARIABLES
realDomain t sec ; t.min=0; t.max=30; t.delta=0.1;
realDomain N; N.min=1; N.delta=1; //private N.min, N.delta, N.ct;
int Ntank = 14;
N.max = if(Ntank=1) 2 else Ntank;
// PARAMETERS
real Fp = 1 ml/(g*min), // Plasma flow
Vp = 0.05 ml/g, // Volume
Gp = 0.2 ml/(g*min); // G is the consumption rate
// coefficient in each compartment (Gulosity)
// The hVolume protects against zero divides
private real hVp =if(Vp>0) Vp/Ntank else (1e-6 ml/g);
private real hGp = Gp/Ntank;
// INFLOWING CONCENTRATION
extern real Cin(t) mM;
real Cinn(t,N) mM;
// CONCENTRATION VARIABLES
real Cp(t,N) mM, // Concentration in each tank
Cout(t) mM; // Outflow Concentration last tank
// INITIAL CONDITIONS
when (t=t.min) { Cp = 0; }
Cinn=if(N=1) Cin else Cp(t,N-1);
// ORDINARY DIFFERENTIAL EQUATIONs (Applies to all tanks.)
hVp*Cp:t=Fp*(Cinn-Cp)-hGp*Cp;
Cout = Cp(t,Ntank);
}
/*
FIGURE:
Tank 1 Tank 2 Tank N
+---------+ +---------+ +---------+
Fp*Cin -> ->Fp*CP(1)-> -> .....->Fp*Cp(N-1)-> ->Fp*Cp(N)
| Cp(1) | | Cp(2) | | Cp(N) | =
| Vp/N | | Vp/N | | Vp/N | Fp*Cout
| Vp/N | | Vp/N | | Vp/N | Fp*Cout
+---------+ +---------+ +---------+
DETAILED DESCRIPTION:
N compartments in series simulate a partial differential equation with convection
and diffusion. The relative dispersion of N compartments in series is 1/sqrt(N). There
is not an exact relationship between the diffusion coefficient and the relative
dispersion in the partial differential equation for diffusion and convection in
a bounded domain with inflow and outflow at the ends.
This model explores sensitivity analysis and optimization in a guided
exercise. Details for using the Monte-Carlo graphical user interface are included
both from the main TABS, Top Left. The information is also repeated in the
Notes (Run Time GUI, Bottom, Notes TAB).
KEY WORDS:
CTEX, CTEX10, convection, diffusion, capillary, compartment,
plasma, sensitivity, optimization, Tutorial, Monte-Carlo, Monte, Carlo, montecarlo, MonteCarlo, Montecarlo, Monte Carlo, monte carlo, monte-carlo
REFERENCES:
W.C. Sangren and C.W. Sheppard. A mathematical derivation of the
exchange of a labelled substance between a liquid flowing in a
vessel and an external compartment. Bull Math BioPhys, 15, 387-394,
1953.
C.A. Goresky, W.H. Ziegler, and G.G. Bach. Capillary exchange modeling:
Barrier-limited and flow-limited distribution. Circ Res 27: 739-764, 1970.
J.B. Bassingthwaighte. A concurrent flow model for extraction
during transcapillary passage. Circ Res 35:483-503, 1974.
B. Guller, T. Yipintsoi, A.L. Orvis, and J.B. Bassingthwaighte. 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.
C.P. Rose, C.A. Goresky, and G.G. Bach. The capillary and
sarcolemmal barriers in the heart--an exploration of labelled water
permeability. Circ Res 41: 515, 1977.
J.B. Bassingthwaighte, C.Y. Wang, and I.S. Chan. Blood-tissue
exchange via transport and transformation by endothelial cells.
Circ. Res. 65:997-1020, 1989.
Poulain CA, Finlayson BA, Bassingthwaighte JB.,Efficient numerical methods
for nonlinear-facilitated transport and exchange in a blood-tissue exchange
unit, Ann Biomed Eng. 1997 May-Jun;25(3):547-64.
REVISION HISTORY:
Revised by BEJ 04/14/09
Boundary Conditions
Revised by GR 09/22/09
Added Statistics and Reformatted.
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) 1999-2009 University of Washington.
Contact Information:
The National Simulation Resource,
Director J. B. Bassingthwaighte,
Department of Bioengineering,
University of Washington, Seattle, WA
98195-5061
*/