Figure 1: Concentrations: Default parameter set
A lagged normal input curve is used as the inflow
concentration, Ain. The concentration of Ap (A in the plasma,
red), Bp (B in the plasma, dark green), Aisf (A in the isf,
orange), and Bisf (B in the isf, light green) are plotted as
functions of time.
Figure 2: Outflow-RUN LOOPS : Default parameter set
The plasma compartment concentration outflow of A (red) and B
(dark green) and their sum (Aout+Bout) are plotted as a
function of time.
What happens to the sum of the outflows if the conversion rate of A to b, Ga2b, is increased by a factor of 100. Go to the
loops page and run to find out. What happens if the reverse
reaction is turned on?
Even though the conversion of A to B has been increased from
10 ml/(g*min) t0 1000 ml/(g*min), the sum of the outflow
concentrations did not change. This is because PSa=PSb. You
can demonstrate this by setting PSb to 0.1 and running loops
again.
What happens if the reverse reaction is turned on? Turn
the outer Loop Configurator to auto and run again. If
PSa equals PSb, you should see no change in the sum of
Aout+Bout.
Figure 3: Quantity: Default parameter set
The total amount of material in the system is
calculated in two different ways:
Qtotal(t) = Vp*(Ap(t)+Bp(t)) + Visf*(Aisf(t)+Bisf(t))
(red line)
and
/t
Qintegral(t)= | Fp*(Ain(t')-Aout(t')-Bout(t') dt'
/0
(dashed green line).
Because the answers are the same, in the plot they appear
as a single dashed red and green line.
Run loops to see that the rate constants for A becoming B
and B becoming A have no effect on the total amount of
the combined material in the system.
Figure 4: Steady State Concentrations: Fig_4 parameter set
The model is given a constant input, Ain = 1, and run to a steady state. The steady state concentrations are also calculated from a set of implicit equations which come from the ordinary differential equations.
If the set of ordinary equations is given by
_ _ _
d(X)/dt = F(X), where X is a vector, then
_ _
0=F(X) is a system of implicit equations which can be solved
_
for X.
The implicit variables for Ap, Bp, Aisf, and Bisf have
been named ssAp, ssBp, ssAisf, and ssBisf.
/* MODEL NUMBER: 0248
MODEL NAME: Comp2FlowExchangeReaction
SHORT DESCRIPTION: Model with two species A and B, with flow in
a plasma compartment and exchange with an interstitial fluid
compartment with A converting to B reversibly.
*/
import nsrunit; unit conversion on;
math Comp2FlowExchangeReaction {
// INDEPENDENT VARIABLE
realDomain t sec; t.min=0.0; t.max=60; t.delta = 0.1;
// PARAMETERS
real Fp = 1 ml/(g*min), // Plasma flow per gram of tissue
Vp = 0.05 ml/g, // Volume of plasma compartment
Visf = 0.15 ml/g, // Volume of compartment 2
PSa = 3.0 ml/(g*min), // Permeability Surface area product
// for exchange of A between plasma and isf
PSb = 3.0 ml/(g*min), // Permeability Surface area product
// for exchange of A between plasma and isf
Ga2b = 1.0 ml/(g*min), // Conversion rate of A to B in isf compartment
Gb2a = 0.0 ml/(g*min), // Conversion rate of A to B in isf compartment
Ap0 = 0 mM, // Initial concentration of A in plasma compartment
Aisf0 = 0 mM, // Initial concentration of A in isf compartment
Bp0 = 0 mM, // Initial concentration of B in plasma compartment
Bisf0 = 0 mM; // Initial concentration of B in isf compartment
extern real Ain(t) mM; // Inflow Concentration
// VARIABLES
real Ap(t) mM, // Concentration of A in plasma compartment
Aisf(t) mM, // concentration of A in isf compartment
Aout(t) = Ap, // Plasma outflow concentration of A
Bp(t) mM, // Concentration of B in plasma compartment
Bisf(t) mM, // Concentration of B in isf compartment
Bout(t) = Bp; // Plasma outflow concentration of B
// INITIAL CONDITIONS
when (t=t.min) {Ap = Ap0; Aisf = Aisf0; Bp = Bp0; Bisf = Bisf0; }
//ORDINARY DIFFERENTIAL EQUATIONS
Ap:t = (Fp/Vp)*(Ain-Ap)+(PSa/Vp)*(Aisf-Ap);
Bp:t = (Fp/Vp)*( -Bp)+(PSb/Vp)*(Bisf-Bp);
Aisf:t = (PSa/Visf)*(Ap-Aisf)-(Ga2b/Visf)*Aisf+(Gb2a/Visf)*Bisf;
Bisf:t = (PSb/Visf)*(Bp-Bisf)+(Ga2b/Visf)*Aisf-(Gb2a/Visf)*Bisf;
// ADDITIONAL CALCULATIONS
// QUANTITIES OF MATERIAL IN SYSTEM in nanomoles/gram of tissue
real Qa(t) nmol/g, // Amount of A in system by direct calculation
Qb(t) nmol/g, // Amount of B in system by direct calculation
Qtotal(t) nmol/g, // Amount of A and B in system by direction
Qintegral(t) nmol/g; // Amount of A and B in system by integration
when(t=t.min) {Qintegral=Vp*(Ap0+Bp0) + Visf*(Aisf0+Bisf0);}
Qa = Vp*Ap+Visf*Aisf;
Qb = Vp*Bp+Visf*Bisf;
Qtotal = Vp*(Ap+Bp)+Visf*(Aisf+Bisf);
Qintegral:t = Fp*(Ain-Aout-Bout);
// AREA AND TRANSIT TIME OF INFLOW AND OUTFLOW CONCENTRATIONS
private real S2_in(t) mM*sec^2, S2_out(t) mM*sec^2; // First moments
real Area_in(t) mM*sec, Area_out(t) mM*sec, // Areas
Tbar_in(t) sec, Tbar_out(t) sec, Tbar_sys(t) sec; // Transit times
when(t=t.min) {Area_in = 0; S2_in = 0;
Area_out = 0; S2_out = 0; }
Area_in:t = Ain;
Area_out:t = Aout+Bout;
S2_in:t = Ain*t;
S2_out:t = (Aout+Bout)*t;
Tbar_in = if(Area_in>0) S2_in /Area_in else 0;
Tbar_out = if(Area_out>0) S2_out/Area_out else 0;
Tbar_sys = Tbar_out-Tbar_in;
// SOLVE FOR STEADY STATE CONCENTRATIONS GIVEN IMPLICIT EQUATIONS
// (See Notes for Figure 4.)
real ssAp mM, ssBp mM, ssAisf mM, ssBisf mM;
0 = (Fp/Vp)*(Ain(t.max)-ssAp)+(PSa/Vp)*(ssAisf-ssAp);
0 = (Fp/Vp)*( -ssBp)+(PSb/Vp)*(ssBisf-ssBp);
0 = (PSa/Visf)*(ssAp-ssAisf)-(Ga2b/Visf)*ssAisf+(Gb2a/Visf)*ssBisf;
0 = (PSb/Visf)*(ssBp-ssBisf)+(Ga2b/Visf)*ssAisf-(Gb2a/Visf)*ssBisf;
} // END OF MODEL
/*
DIAGRAM:
+-----------------+
Fp*Ain ---> ---> Fp*Aout, Aout=Ap
| ---> Fp*Bout, Bout=Bp
| |
| A1 B1 |
| ^ ^ Vp |
+---|--------|----+
| PSa |PSb
+---|--------|----+
| v v |
| A2<----->B2 |
| Ga2b-> |
| <-Gb2a |
| Visf |
+-----------------+
DETAILED DESCRIPTION:
This is a two compartment model (plasma and isf) exchange
model with flow in the plasma compartment. Both spaces are
instantaneously well mixed. A and B reversibly convert to
each other in the isf space. The isf space can also be used
as a cell space. Flow, Fp, and exchange rates, PSa and PSb,
have the same units, ml/(g*min) (milliliters per minute per
gram of tissue). These units are used in the physiological
terminology to relate them to fluxes per gram of tissue.
The conversion rates have the same units, ml/(g*min).
Ga2b is the conversion rate of A going to B, and Gb2a is the
conversion rate of B becoming A.
The steady state solutions for constant inflow of A are
solved implicitly, using the final value of the input concentration
(assumed to have been constant).
KEY WORDS:
Course, compartment, compartmental, tutorial, exchange,
multiple compartments, flux, steady state, reaction,
conversion, flow, implicit equations
REFERENCES: None.
REVISION HISTORY:
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
*/