/* MODEL NUMBER: 0246
MODEL NAME: Comp2ExchangeReaction
SHORT DESCRIPTION: Two comparment model with two substances,
A and B, and where A may be irreversibly converted to B.
*/
import nsrunit; unit conversion on;
math Comp2ExchangeReaction {
// INDEPENDENT VARIABLE
realDomain t sec; t.min=0.0; t.max=60; t.delta = 0.1;
// PARAMETERS
real V1 = 0.07 ml/g, // volume of compartment 1
V2 = 0.15 ml/g, // volume of compartment 2
PSa = 1 ml/(g*min), // Permeability Surface area product
// for exchange of A between two compartments
PSb = 1 ml/(g*min), // Permeability Surface area product
// for exchange of A between two compartments
G1 = 0.0 ml/(g*min), // Conversion rate of A to B in compartment 1
G2 = 1.0 ml/(g*min), // Conversion rate of A to B in compartment 2
A10 = 1 mM, // initial concentration of A in compartment 1
A20 = 0 mM, // initial concentration of A in compartment 2
B10 = 0 mM, // initial concentration of B in compartment 1
B20 = 0 mM; // initial concentration of B in compartment 2
// VARIABLES
real A1(t) mM, // concentration of A in compartment 1
A2(t) mM, // concentration of A in compartment 2
B1(t) mM, // concentration of B in compartment 1
B2(t) mM, // concentration of B in compartment 2
Equilibrium(t) mM; // Equilibrium concentration for B if G>0
// else for A if G=0
// INITIAL CONDITIONS
when (t=t.min) {A1 = A10; A2 = A20; B1 = B10; B2 = B20; }
//ORDINARY DIFFERENTIAL EQUATIONS
A1:t = (PSa/V1)*(A2-A1)-(G1/V1)*A1;
B1:t = (PSb/V1)*(B2-B1)+(G1/V1)*A1;
A2:t = (PSa/V2)*(A1-A2)-(G2/V2)*A2;
B2:t = (PSb/V2)*(B1-B2)+(G2/V2)*A2;
Equilibrium = (V1*(A10+B10)+V2*(A20+B20) )/(V1+V2); //Mass balance check
} // END OF MODEL
/*
FIGURE:
+-----------+ +-----------+
| G1 | PSa | G2 |
| A1---->B1 |<-------->| A2---->B2 |
| V1 | PSb | V2 |
+-----------+ +-----------+
DETAILED DESCRIPTION:
This is a two compartment model for two substances, A
and B. Both substances can passively move from one
compartment to the other. A is irreversibly converted to
B in either or both compartments.
KEY WORDS:
Course, compartment, compartmental, tutorial, exchange,
multiple compartments, flux, steady state, reaction,
conversion
REFERENCES: None.
REVISION HISTORY:
JBB: Equilibrium(t) changed to a function of time. 6apr2012
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-2012 University of Washington.
Contact Information:
The National Simulation Resource,
Director J. B. Bassingthwaighte,
Department of Bioengineering,
University of Washington, Seattle, WA
98195-5061
*/