A bucket contains
say V=10 liters of water. The volume is kept constant becaues the inflow F =2
liter/minute is adjusted is equal to the outflow F at the bottom. Thres moles
of a tracer Q(0)= 3 moles are injetct at t=0 and we assume it is instantly mixed
throughout the volume V.

It is empirically
found that from a total of N atoms, there is a decay , ∆N<0 , in an interval ∆t
such that

∆N =- λ
N ∆t , λ~ 1/time . The corresponding DE is

dN/dt = - λ
N(t) . Let the initial condition be N(t=0) = N0 , then

N = N0
exp( - λt)

Absorption of
X- rays

The intensity I ~
energy/(time-area) , of X-rays after penetrating a material slab of thickness
∆x is diminished acording to

∆I = - D I(x)
∆x , D ~ 1/length

this leads to the
DE dI/dx = - D I . Let the initital condition

be I(x=0) = I0
, then I (x) = Io exp(-Dx)

Sec 5. One
compartment with constant injection (see figure)

Assume the intial
concentration of substance Q is zero , C(0)=0.

A volume V~ liter
is kept fixed by a constant inflow flow and outflow of F ~

liters /time .
The quantity of Q(t) moles of a tracer suffers in an interval

a loss

∆Qloss
= - ∆t F Q/V ~ - ∆t ( volume/time) * (moles/volume).

At the same time
a quantity ∆t R ~ time *(moles/time) is injected instantly.

R is the rate of
injection in moles/time .

∆Qgain
= ∆t R . Adding the loss and gain parts of Q ,

∆Q = ∆t ( R -
F Q/V) = ∆t ( R - F C(t) ).

Dividing by ∆t V
and taking the limit ∆t→0 , results in the DE

d C /dt = ( R/V 
(F/V) C(t) ) , (5)

with initial
condition C(t=0) =0.

Remember R , V ,
F are parameters. They assume constant values in a given example. The
independent variable is time , the dependent variable is the concentration C(t)
~ moles/volume.

The DE equation
(5) is of a type called separable. One can separate the variables C and
t , in two different integrals.

∫ dC /(b -a C(t)
) = ∫ dt , where , b=R/V a= - F/V .

If you go to a
table of integrals you will find the indefinite integral in a form like this ;

∫ dx /(b+ax) =
(1/a) ln (b+ax) . Hence

∫ dC / { (R/V) 
(F/V) C(t) } =

-(1/(F/V) )
ln [ (R/V)  (F/V) C(t)] .

Equating this to
the right hand side integral gives

the indefinite
integral

-(1/(F/V) ) ln [
(R/V)  (F/V) C(t)] = t + A

A is the
integration constant that can be related to the initial condition as we shall
show.

It is convenient
to rewrite the integral as

ln [ (R/V) 
(F/V) C(t)] = - (F/V) t + A* where A* = (F/V) A is still a constant. To
simplify matters call A all constants that originate with the original A.

Then

(R/V) 
(F/V) C(t) = A exp(-(F/V)t ) , (another A)

and solving for
C(t)

C(t) = (V/F) {
(R/V) - A exp(-(F/V)t ) } (6).

Apply now the
initial condition to determine A

C(0)= 0 = (V/F) {
(R/V)  A } , thus A =R/V and finally

C(t) = (R/F) {
1- exp( -(F/V) t) }
(7)

which
dimensionally checks ,

moles/volume = (
moles/time)( time/volume) .

At t=
infinty C(∞) = R/F = constant .

The time scale of
the problem is T scale = V/F

Example : Plot of
eq (7) . Such plot is called an inverted exponential.

set % R=.1 mol
sec , F =2 liter/(60 sec) , V=10 liters

Matlab code

% One compartment
with constant injection

% R=.1 mol sec ,
F =2 liter/(60 sec) , V=10 liters

R=0.1 , F =2/60 ,
V=10 ,

tscale=V/F;
tfinal=3*tscale ;dt = tfinal/100;

t=[0:dt:tfinal];

c=(R/F)*(1-exp(-t/tscale));

plot(t,c) ,
xlabel('t(sec)') ,...

ylabel('C(t)~moles/liter ' )

The two
compartment series dilution

The one
compartment dilution problem have already been solved

and the solution
is C1(t)=C1(0) exp( -(F/V1) t) where the
subscript 1 refers to compartment #1. The initial condition was C1(0)=
Q0 /V1 i.e a total amount of tracer Q0 is
injected and mixed instantly at t=0.

Volumes V1
and V2 are kept constant by insuring that F = F1 = F2
.

The problem is to
set up a differential equation for C2(t) and to find its solution.
Remember C2(t) = Q2(t) /V2 and Q2 ~
moles in the second compartment. The initial condition is C2(t) =0.

The quantity ∆Q2
~ moles ,in compartment 2 within an interval ∆t is increased by the amount

Roughly speaking
without solving the DE we can anticipate the following

results. The 3
moles are emptied from compartment one in roughly 300 seconds ( tscale 1). If
there is no loss in compartment #2 the concentration would be 3 moles/5 liters =
0.6 moles/liter but in 300 sec there are two half lifes of tscale2 (tscale2=150
sec) . Thus the concentratio reduces to (1/2)2=1/4 . So at t=300 sec
the concentration at compartment # 2 ,is at a maximum and roughly equals
(1/4)(.6moles/liter) = 0.15 moles/liter .

A check of the
plot above bears out this estimate.

Numerical
integration of eq.(8).

We expand next on
the procedure already used ( in these notes) to integrate numerically a DE by
finite differences.

We will solve
numerically this system of three first order coupled DE.

Let tscale1=
10 minutes =1/K1 , tscale2=5minutes =1/K2 ,

Tscale3=
3minutes=1/K3 . A(0)=1.0 moles , B(0)=0
moles , C(0)=0 moles

The finite
difference solutions to eqs 26 a to 26 c are

A( tn
) =A(tn-1) + ∆t { K3 C (tn-1) - K1
A(tn-1 ) }

B( tn
) =B(tn-1) + ∆t { K1 A (tn-1) - K2
B(tn-1 ) }

C( tn
) =C(tn-1) + ∆t { K2 B (tn-1) - K3
C(tn-1 ) }

and ∆t has to be
small relative to the smallest of the Tscale. In the present

case ∆t <<
Tscale 3.

The next FORTRAN
code expands the mother daughter code to deal with the circular reaction. The
results are plotted next.

We see that in
about 10 minutes a steady state is reached with constant concentrations

A=.56 , B=
.28 , C= .16 .

Problem 3. A
substance Q~ moles , diffuses from the compartment of volume V at a rate
proportional to the product of the diffusion constant K ~ volume/time and the
difference in concentration with the environment (C- Cenvironment) ~
moles/volume. The initial condition is C(0)= Q0/V.

Also assume C > Cenvironment
hence there is a loss of Q in the compartment,

V is kept
constant , the mechanism is not shown in the drawing.

Then in an
interval ∆t , a loss occurs

∆Q = - ∆t K (C- Cenvironment)
~ time( volume/time)*(moles/volume)

Dividing by the
volume V and by ∆t we obtain the differential equation

dC/dt =
-(K/V) (C(t) - Cenvironment) .

Problem 4. Assume
that in the compartement of Prob. 3 a quantity ∆Qin

is pumped given
by flow rate R(moles/time) * ∆t .

The net ∆Q is now

∆Q = - ∆t K (C-
Cenvironment) + R ∆t and the DE is

dC/dt = -
(K/V)(C- CE ) + R/V

Example : Solve
the DEdC/dt = - (K/V)(C- CE ) + R/V
.

Let K=
F=2liter/minute , V=10 liter ,C(0)=0.3 moles/liter ,

Cenvironmnet=.05
moles/liter , R =.1mole/minute.

Tscale = 1/(F/V)
=10/2 = 5 minutes .

The finite
difference solution is

C ( tn)
= C(tn-1) + ∆t { - (K/V)(C(tn-1) - CE ) + R/V
}.

FORTRAN code

real k

data c0 ,
cE/.3, .10/

data k,v,
R/2.,10.,0.1/

c time scales are
in minutes

tscale=V/K

dt=
tscale/100.

nstep=int(6.5*tscale/dt)

kp=int(float(nstep)/70.)

kount=kp

print 100 ,
0. , c0

do 10
i=1,nstep

t=dt*float(i)

c1 = c0
+dt*( -(K/v)*(c0-ce) +R/V)

if(i.eq.kount)then

print 100
,t ,c1

kount=kount+kp

endif

c0=c1

10 continue

100
format(1x,'t(min),C~ moles/liter=',2(3x,e10.3))

stop

end

Problem 5 . In a
one compartment dilution the concentration falls with time according to the
data :

t(sec)

C
(moles/liter)

0

.024

1

.011

2

4.8E-3

3

2.4E-3

4

1.0E-3

If Q(0)=0.1 mole
, find F ~liters/sec and V ~liters

C(0) =.024 ≡
Q(0)/V , hence V= .1/.024 = 4.17 liters

If we assume a
perfect fit , which may not be the case ,

then C(t) = C(0)
exp(- (F/4.17) t) . Any value from the table will serve to solve for F. At t=1
sec

.011 = .024 exp(
-.240F) . Taking the natural log

ln(.011/.024) =
-.780 = -.240F

F = 3.25
liters/second

Problem 6.

In a radioactive
process half the atoms decayed in one day.What fraction existed at 10 hours. We
know that the half life (t1/2 ), is related to the rate λ by

λ = .693 / t1/2 = .693 /24 hours = 2.89E-2 hour-1
.

After 10 hours
the fraction of atoms left is

N/N0 =
exp( - λ t) = exp( -2.89E-2 (10) ) = .749 .

Problem 8.
Substance A is created at a rate R ~moles/sec and destroyed at the rate -
K(1/sec) * A(moles) ~ moles/sec. Let the initial condition be A(0) =0.

In an interval
∆t the net change in A is

∆A = R ∆t  K A
∆t

The corresponding
DE is

dA/dt = R  K A
.

A steady state is
reached when dA/dt =0 . This gives A(t=∞) = R/K.

Again the
solution is an inverted exponential as mentioned in a previous example of the
one compartment dilution with constant injection.