Compartmental Modeling

Total Page:16

File Type:pdf, Size:1020Kb

Compartmental Modeling

Compartmental Modeling Wynter Duncanson, Jenea McLaughlin, Amy Rosen

Abstract Compartmental modeling was used to model the concentration of a KCl solution as it moved from one compartment to another. The concentration was extracted from conductivity data. Three different concentrations were tested with each compartment having the same volume, and one trial was done with the compartments having different volumes. Two separate differential equations were derived for each compartment with equal compartment volumes. An additional equation was derived for the situation in which the compartment volumes were unequal. The correlation coefficients were determined for each trial and were used to compare the experimental to the predicted values.

Background Compartmental modeling is a method used to mathematically model the change in a variable such as concentration or conductance over time, as a substance moves from one area to another. Differences in the flow rates to and from different compartments must also be accounted for. In this experiment, the compartments were representative of divisions within the body, and the change in volume and conductance over time was studied. The body can be modeled as a series of different compartments, such as organs, on a larger scale and cells on the microscopic level. There are several types of modeling that can be utilized. First, a single compartment model can be used to illustrate the injection of a mass of some substance into a volume, where mixing will occur within the liquid. The concentration of the substance within the compartment can be observed over time. Next there is two- compartment modeling, which was used for the purposes of this experiment. In its simplest form, the human body can be treated as a plasma compartment and a tissue compartment.1 Compartmental modeling has several applications in modeling many human body functions and processes. For example, compartmental modeling has been used in previous experiments to model the interaction between two neurons in the cerebellar cortex- a Purkinje cell and an inferior olivary neuron in the brain. 2Compartmental modeling has also been used to model human lactation. For instance, if a nutrient is supplemented to a mother, and the appearance of the nutrient in the breast milk is measured, then an accurate prediction of infant breast milk intake would reveal the exposure of the infant to that nutrient.3 This form of modeling also has implications for drug delivery into the human body. A good example of this is the delivery of drugs to the brain. The brain's protective barrier is composed of tightly knit endothelial cells that create a barrier that blocks the entry of various substances, including many therapeutic agents. By temporarily shrinking these cells with a concentrated sugar solution, this barrier can be opened, allowing

1 http://www.crump.ucla.edu/lpp/tracermodeling/mathmod.html 2 http://www.evl.uic.edu/EVL/SHOWCASE/spiff/neurons.html 3 http://www.nal.usda.gov/ttic/tektran/data/000008/68/0000086836.html chemotherapy drugs to pass into the brain and reach a tumor.4 This flow can be modeled as several compartments including the flow of the drug in the blood stream, through the blood-brain barrier, into the brain, and finally to the tumor for treatment.

4 http://www.ohsu.edu/hosp-bbb/drneuwelt.html Design of the experimental apparatus Figure 1 shows the schematic diagram for the experimental setup. A stock solution of KCl was prepared at 1.5 M. Fixing the water volume of the compartment and adding a known amount of the KCl stock established the initial concentration in the first compartment. An Econo Pump was used to continually drive all fluid flow at a constant volumetric flow rate. Setting the digital readout and recording the time necessary to collect a discrete volume of waste fluid allowed for the calibration of the Econo Pump. As the fluid in Compartment 1 exited, the conductivity of the solution over time was recorded in LabView. This fluid then mixed with the fluid in Compartment 2 (initially pure deionized water). Another conductivity meter was positioned at the efflux of Compartment 2, to record the change in concentration of that compartment over time. Downstream from Compartment 2, fluid flowed into a waste beaker.

DI water Compartment 1 Compartment 2 waste

A B

Figure 1: Schematic design of experiment. Fresh deionized water was continually pumped into the first compartment. Conductivity measurements were recorded at location A and B for the two compartments, respectively. An external pump drove the flow of the entire system at the same rate and is not included in the diagram.

Methods This range of the conductivity meter was determined according to the range of concentrations established in the compartments over the course of the experimental trials. A range was chosen for each compartment. After these ranges were determined, the conductivity apparatus was calibrated. The equations for calibrating Compartment 1 and Compartment 2 respectively were, C1=134.5(x) +0.0419 and C2=134.32(x) +0.021, where x is the conductivity. The calibration curves can be found in Appendix A.

Mathematical Theory Theoretical concentration profiles in a dual-compartmental model can be represented by differential equations. Using the conservation of mass (continuity) equation and making appropriate assumptions, the differential equations were derived. Using the initial conditions of each experiment (flow rate, initial concentration, volume) allowed for the determination of the constants of integration. In the two-compartmental model, the equation for the first compartment was a decaying exponential equation given by the formula, - Qt C =Ci e V For the second compartment, the equation was a more complex exponential equation given by, - Qt V Ci Qte 1 C2 t = HLV1 In deriving these equations it was necessary to assume that the fluid was incompressible, and that since the flow rate was constant, the volume in each compartment remained constant. A more general case for trials where the two compartment sizes are different gives a new differential equation, - Qt 1 1 V2 Q - t Ci e V V C2 t = e 2 1 +c V2 J N 1- V i y HLJ 1 Nk { A detailed derivation of the equations can be found in Appendix A.

Procedure Each of the compartments was filled with 300 mL of water and the pump flow rate was set to read 15 ml/min. The flow rate was later calibrated using a graduated cylinder and stopwatch to determine the actual flow rate of 17 mL/min. Fresh deionized water was pumped through the system until the conductivity meters read zero. For the first trial, the initial concentration in the first compartment was established at 0.015 M of KCl and D.I. Water was run through the system until all of the KCl was removed from the compartments (i.e. concentration= 0). Labview was used to collect the conductance vs. time data. The experiment was repeated for two additional trials (at 0.005M and 0.02M). Finally, the experiment was performed with the an initial concentration in Compartment 1 at 0.015 M, but with the volume in C1 of 300 mL and a volume in C2 of 200 mL.

Results Conductivity measurements over time were converted into concentrations using the calibration information. Figure 2 shows a sample graphical output for the two compartments in trial 3, with Ci=0.02 M. The red line represents the data in Compartment 1 and the green line represents the profile for Compartment 2. The remainder of the graphical outputs can be found in Appendix D. The theoretical concentration profiles in the two compartments were found using the differential model and considering the initial concentration in Compartment 1 (Ci), the flow rate (Q), and the volume of the compartments (V). Figure 3 contains the concentration profiles for the

Figure 3 two compartments in both the experimental and the theoretical model. A second set of experiments was performed using variable compartment sizes, which is depicted in Figure 4. The general form of the differential model was calculated. All data analysis was performed in MatLab (Mathworks) and Microsoft Excel. The algorithms used may be found in Appendix B and C.

Figure 2: Sample Graphical output for the dual-compartment

Figure 3: The concentration profiles for the two compartments in both the experimental and the theoretical model. Figure 4: The concentration profiles for the two compartments in both the experimental and the theoretical model with the unequal compartment volumes.

Analysis Experimental concentration profiles for Compartment 1 and Compartment 2 were compared with the theoretical model using the correlation coefficient. By this analysis, a perfect positive fit has a correlation coefficient, r=1, a perfect negative fit, r=-1 and absolutely no fit, r=0. Table 1 gives the correlation coefficients for Compartment 1 and 2 respectively, in trials 1 through 3, where the compartment sizes were equal, and in trial 4,with variable compartment sizes. In all trials, the correlation between the experimental and theoretical profiles decreased in compartment 2. It is most likely that this is due to the fact that the error in Compartment 2 is also dependant on the error in Compartment 1.

Correlation Coefficient, r Concentration (mM) Compartment 1 Compartment 2 5 0.9993 0.9560 15 0.9998 0.9989 20 0.9997 0.9703 Trial 4- V1=300 mL, V2=200 mL 15 0.9998 0.9980 Table 1: The correlation coefficients corresponding to the concentrations and respective compartments. Conclusion The derived differential equations can be applied over a range of concentrations between 5mM and 20mM for KCl solutions. The differential equations proved to be a good fit for the data with correlation coefficients close to one for each trial. Appendix A

Compartment 1 Compartment 2 Different Volumes ContinuityEquation ContinuityEquation ¶ ¶ 0 = V + v A 0 = r â V + r v â A ¶t râ r â ¶ t ¶ ¶ V ¶àr àචV àà àr àà àà 0 =V + + -1 v A + v A 1 1 1 2 2 0 =V +r + -1 r0 v0 A0 +r2 v2 A2 r r r 2 ¶ t ¶ t HL ¶ t ¶ t HL ¶r Q =v1 A1 =v2 A2 r =C*MW V =- 1 0 v0 A0 ¶ t r Q =v0 A0HL ¶C2 0 = V MW - C1 MW Q + C2 MW Q ¶r ¶ t V =- 1 r0 Q ¶ t ¶C2HLHQ LQ HLHLHLHLHLHL - C1 + C2 =0 ¶ C MWHL ¶ t V2 V2 V =- C MW Q ¶ t ¶C Q - Qt Q HHLHLL 2 V ¶C Q HLHLHL - Ci e 2 + C2 =0 =- ¶ t ¶ t V2 V2 C V Q First order Nonhomogenous DifferentialEquationSolution lnC =- t +Ao V y' +p t y =q t InitialConditions HL- p t H dtL y t =e ÙHL C 0 =Ci HL HLq t eÙp HtL dt dt +c Q IHL M lnC =- t +lnC V i Q Q Q Qt p t = p t dt = t = t - +ln Ci ® â C =e V V2 V2 V2 JQt N HL QtHL - à- à Q V ln Ci V C =e e q t = Ci e 2 V - Qt 2 C =Ci e V HL¶C y' = 2 ¶ t y HtL=C2 HtL - Qt - Qt Qt V Q V V y t =e 2 Ci e 1 e 2 â t +c HLiV2 {y à Qt Qt Qt + - kQCi - V2 y t = e V2 e V1 â t +c HL V2 iá {y - Qt V k1 1 Ci e 2 Q - t y t = e V2 V1 {+c V i y 1 - 2 ik y HLJ V1 N { Qt k - 1 1 V2 Q - t Ci e V V C2 t = e 2 1 {+c V i y 1 - 2 ik y HLJ V1 Nk { Same Volumes ContinuityEquation ¶ 0 = V + v A ¶ t râ r â ¶àr àචV àà 0 =V +r + -1 r1 v1 A1 +r2 v2 A2 ¶ t ¶ t HL Q =v1 A1 =v2 A2 r =C*MW

¶C2 0 = V MW - C1 MW Q + C2 MW Q ¶ t ¶C2HLHQ LQ HLHLHLHLHLHL - C1 + C2 =0 ¶ t V1 V1 - Qt ¶C2 Q V Q - Ci e 2 + C2 =0 ¶ t V1 V1 First order Nonhomogenous DifferentialEquationSolution y' +p t y =q t HL- p t H dtL y t =e ÙHL HILq HtL eÙp HtL dt dt +cM

Q Q Q p t = ® p t dt = â t = t V2 V1 V1 HL QtHL à- à Q V q t = Ci e 1 V1 HL¶C y' = 2 ¶ t y HtL=C2 HtL - Qt - Qt Qt V Q V V y t =e 1 Ci e 1 e 1 â t +c HLiV1 {y à Qt Qt Qt + - kQCi - V1 y t = e V1 e V1 â t +c HL V1 iá {y - Qt V k C Qte 1 y t = i HLV1 Calibration Data

Conductivity cell 1 vs. Concentration

0.8 y = 134.5x + 0.0419 0.7 R2 = 0.9941 0.6 y t i

v 0.5 i t c

u 0.4 d

n 0.3 o

C 0.2 0.1 0 0 0.001 0.002 0.003 0.004 0.005 0.006 Concentration(mM)

Conductivity cell 2 vs. Concentration

0.8 0.7 y = 134.32x + 0.021 R2 = 0.9989 0.6 y t i

v 0.5 i t c

u 0.4 d

n 0.3 o

C 0.2 0.1 0 0 0.001 0.002 0.003 0.004 0.005 0.006 Concentration(mM) Appendix B

%Duncanson, McLaughlin, Rosen 2001 %This MATLAB script will take as input the text files having conductivity data at discrete %points in time. These values are converted into concentration using an established %calibration scale. Concentration is modeled over time for a two-compartment system %and the fit to a theoretical model (based on differential laws) is established. % “compile.m” clear all fix(clock) %enter calibration data m1=0.007391; %slope for C1 calib b1=-0.0003; %intercept for C1 calib m2=0.007437; b2=-0.00015; rootname='SSNd2_'; %input root filename ext='.txt'; %extension of the files t_initial=1; ptsper=1000; %points per file incr=0.2; %sampling rate

%********************************************************************** *************** files = dir('*.txt'); %stores file info for txt's like name,date,size number = length(files); %counts how many txts there are in the directory ptstot=ptsper*number; M_conc=zeros(ptstot,2); cond1=zeros(ptsper,1); cond2=zeros(ptsper,1); j=t_initial; while j<=(number-1)

if j<=9 var=[rootname, int2str(0),int2str(j)]; else var=[rootname,int2str(j)]; end;

currfile=[var,ext]; data=load(currfile); i=1;

Mloc=(j-1)*ptsper; while i<=(ptsper-1) cond1(i,1)=data(i,3); %2nd column from output- conductivity C1 cond2(i,1)=data(i,4); %3d column from output- conductivity C2 M_conc((Mloc+i),1)=((m1*cond1(i,1))+b1); M_conc((Mloc+i),2)=((m2*cond2(i,1))+b2); i=i+1; end; j=j+1; %go to next file in directory end; time=transpose([0:incr:((ptstot-1)*incr)]); a=M_conc(:,1); b=M_conc(:,2); c=time; figure(2) plot(c,a,'r.'); hold on plot(c,b,'g.');

M_all=[a,b,c]; save M_all.txt M_all -ascii; Appendix C

%Duncanson, McLaughlin, Rosen 2001 %This MATLAB script graphs the concentration of a solute %in the two compartments of a two-compartment model. %This can be used to model invariant systems and systems where the volumes %of the two compartments are different. % “cmodel.m” t=transpose([0:.2:9000]); Q=15; %flow rate V1=300; %volume of compartment 1 V2=200; %volume of compartment 2 Ci=0.015; %initial concentration in compartment 1

%solve for the first compartment C1=Ci*(exp((-Q/V1).*(t./60)));

%this first one is the invariable compartments %C2=(exp((-Q/V1).*(t./60)))*((Q*Ci)/V1).*(t./60);

%lets see what happens when the compartments dont have to be the same size C2=(Ci/(1-(V2/V1)))*(exp(-(Q/V2).*(t./60))).*((exp(Q*((1/V2)-(1/V1)).*(t./60)))-1); figure(1) plot(t,C1,'r.'); hold on plot(t,C2,'g.'); Appendix D

Recommended publications