Modelling Reactors Kinetics

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 65

MODELING OF REACTION

KINETICS AND CHEMICAL


REACTORS IN
TRANSFORMATION OF
BIOMASS
Johan Wärnå, Åbo Akademi
Laboratory of Industrial Chemistry and
Reaction Engineering, Åbo Akademi

Kinetics

Reactor
Catalysis
modelling
Aim with reactor and reaction kinetics
modeling
 Often the reaction routes,
reaction kinetics and kinetic
parameters are unknown
 Combining
 Experimental work in
laboratory Lab
Model
 Mathematical modeling in
order to obtain a simulation
tool for the design of
reactors for the desired
reaction
 Scale up
Plant
Why do we need to know reaction
kinetic parameters
 Design of reactors
 Reaction rates determine the size or residence times
of the reactants
 Slow reaction  longer residence time , larger
reactor
Biomaterial: Modelling works as before
but what is new ?
 Biomaterial
 More complex molecules from nature
 Mixture of molecules

 Often large molecules

 Diffusion influence makes a larger role (catalytic


reactions)
 A lot of properties have to be estimated or measured ?
Model building
 Start with
 Literature studies
 Physical properties

 Derive some possible kinetic models and reaction paths


for your reaction A+B  C+D 2X+Y Z
 Set up reactor model dc/dt=r
 Make experimental plan
Principles of reactor modelling

Mass and heat-


Kinetics and
thermodynamics
transfer Flow

Physical
properties

REACTOR MODEL
Steps in reactor modelling

Experimental
Tid
data
Volym ml C_syra mol/l More
0 427 7.5
5
10
426
425
7.34
7.2
experiments
15 424 6.78
30 423 6.33
45 422 5.82
60 421 5.7
120 420 4.74 70

180 419 4.034


300 417 3.53
60

360 416 3.38 50

420 415 3.126 40


A

1380 414 2.9


30
F
E
20

10
J
I
0
0 20 40 60 80 100 120

Reactor model
Software
dc Model solver
= ρB ⋅ r
dt Parameter estimation
Reaction kinetics Minimize object function
model
Q = ∑ ( yi ,exp − yi ,est ) wij
k 'j K A K H 2 c j cH 2 2 Fit of model to
rj =
(1 + ∑ K c )(1 + K
i i H2 H2c ) experimental data
Improve model
Reactor models
 Homogeneous models
 One phase
 Gas or liquid

 Homogeneous catalyst

 Heterogeneous
 Two or three phases Three phase laboratory reactors
 Gas, liquid and solid catalyst
Basic Reactor Models

dci
= ri
Batch reactor dt Batch

CSTR
Continuos Stirred Tank Reactor
c0i − ci
= ri CSTR

PFR τ
Plug Flow Reactor

dci
n0 A n1A = ri
PFR
dt
More complex reactor models
What to include

Reaction ?

Gas-liquid solubility
Masstransfer
Reaction ?
Reaction and
diffusion
Porous catalyst
Diffusion
Three phase reactor model

d n Li
= N Lib av + N Lis a p Liquid phase
dVR ODE + PDE system

d n Gi Gas phase
= ± N Lib av
dVR
b b
c − K c
N Lib = Gi i Li Gas-Liquid masstransfer
Ki 1
+
k Li kGi
dci Dei  d 2 ci s dci  Reaction and diffusion in
=  2 +  + ρ p ri
dt ε p  dr r dr  catalyst particle
Experimental data
What to collect ?

Collect all possible data from your experiments


It can be used in the model
Time Pressure Temp A B C D E pH
0 43.3 91 29.648 0.097 0.11 0.188 0 7.21
5 48.7 94 27.987 1.733 1.914 0.143 0 7.32
20 48.6 92 22.583 5.353 2.628 0.167 0 7.08
40 49.0 90 19.559 7.969 3.963 0.291 0 6.93
60 50.0 90 17.847 9.762 3.772 0.066 0 6.79
120 48.9 90 15.081 11.038 5.881 0.246 0 6.79
180 52.5 90 12.284 12.956 6.31 0.321 0 6.73
240 47.6 90 10.696 14.781 7.032 0.253 0 6.7
300 48.9 90 8.334 15.558 7.412 0.327 0 6.54
Software for estimation of reaction kinetic
parameters and reactor modelling

 Parameter estimation Modest


 Simulation
 Sensitivity
 Optimization

Athena Visual Studio


Software
 Modest  Athena Visual Studio
 Windows or Linux  Windows
 Fortran compiler  Fortran compiler
 Intel Visual Fortran  Intel Visual Fortran
 Gfortran  G95
 2 versions
 Windows user interface
 Text input file (Linux and
Windows) Other options
 MCMC
 Additional graphics with Matlab
Matlab Octave (open source)
Process simulator
The models are not in the programs
Aspen
The user has to write the program code for the models
Basic programming skills needed ! Pro II
Mathematical methods
Numerical solvers in the software

 Algebraic model
 Non linear equation model (NLE)
 NLE (Non Linear Equation Systems) Newton-Raphson method
 Ordinary differential equation model (ODE) Backward
difference method
 PDE solver

 Optimization and parameter estimation


 Simflex and/or Levenberg-Marquardt methods
 Estimation of parameters and their distributions in models
 Markow Chain MonteCarlo MCMC
Examples
Esterification results

Acid + Alcohol -> Ester + Water


8
Two experiments at
60 ºC and 70 ºC
7

Batch reactor
c
6 dc/dt=mcat*rate

5
− EA  1 1 
 −   1 
60 C ri = k e R  T Tmedel 
 c A c B − cc c D 
Keq
4

70 C
 
3
Estimation results
k=0.042745285
2
0 500 1000 1500 K=3.020598
Time Ea=58593.68
Results, statistics
Total SS (corrected for means) 0.8183E+02
Residual SS 0.8513E+00
Std. Error of estimate 0.1631E+00
Explained (%): 98.96

The Hessian:

0.167E+05 0.312E+02 0.189E-03


0.312E+02 0.619E+00 -0.274E-07
0.189E-03 -0.274E-07 0.138E-08

Estimated Estimated Est. Relative Parameter/


Parameters Std Error Std Error (%) Std. Error

0.453E-01 0.133E-02 2.9 34.1


0.306E+01 0.218E+00 7.1 14.0
0.708E+05 0.440E+04 6.2 16.1

The covariances of the parameters:

0.176E-05
-0.891E-04 0.475E-01
-0.243E+00 0.131E+02 0.193E+08

The correlation matrix of the parameters:

1.000
-0.308 1.000
-0.042 0.014 1.000
Sensitivity analysis: Did we find the best
values for the estimated parameters

Vary one parameter


And keep the other
Parameters at fixed values

Calculate Sum of square error


Esterification example: Modest MCMC
(Markow Chain Monte Carlo)
k Keq

Rate equation Optimal values for


EA
  parameters are
c c
0 0.5 1 1.5 2 2 3 4 5

− 10
x 10

ri ke RT
 c AcB − C D  not well identified Ea

 K eq 
6.5 7 7.5 8
4
x 10

4.5
data set 1 data set 2
8 8
4

6 6 3.5

Keq
3
4 4

2.5

2 2
0 500 1000 1500 0 500 1000 1500

8
data set 3
Correlation between x 10
4
Keq

6 EA and k 7.6

7.4

4 Ea
7.2

7
2
0 500 1000 1500
6.8

Fit of model to experimental 6.6

0 5 10 15 20 2.5 3 3.5 4 4.5

data looks good


9
x 10
Esterification example
Modest MCMC
Modified rate equation with
mean temperature of experiments Data set 3, yest[1]

MCMC 8

E 1 1
 
7

Randomly vary all


− A −  cC cD 6

ri ke R T T 
 c AcB −  Parameters for the
K eq
5

  Sensitivity analysis 4

2
0 500 1000 1500

k
Optimal parameter values Data set 2, yest[1]

are now well identified


8

4.5
7

4
No correlation 6
Keq

3.5
k Keq 5
3

4
2.5

2
0 500 1000 1500

4 Data set 1, yest[1]


x 10 Keq 8

9 0.04 0.05 0.06 0.07 2 3 4 5


7
8.5
Ea
8
6
7.5
Ea

7 5
6.5

6 4

5.5
3
5
0.045 0.05 0.055 0.06 2.5 3 3.5 4 4.5
4 6 8 10 2
0 200 400 600 800 1000 1200 1400
4
x 10
Modeling and Scale-up of Sitosterol Hydrogenation
Process: from laboratory slurry reactor to plant scale
Sitosterol hydrogenation reactions

Stigma 4 H2 Sitostanol Brassica 12 H2 Campestanol


sterol
1 sterol
H2 8 9
6 H2 H2 16
14 H2
H2 5
Sitosterol
7 H2 Sitosterol 15 H 2 Campesterol H 2 13
isomer Campesterol
2 10 isomer
3 11
Campestanone
Sitostanone
H2 H2
Sitostane Campestane

Bold raw material


Blue Main product
Red By product
Model for Sitosterol hydrogenation
Idea
 Feedstock from natural sources (always different
composition)
 Set up reaction kinetics model
 Reactor model for laboratory reactor

 Reactor model for plant reactor (10 m3)

 For every new feedstock make laboratory experiments


and estimate reaction kinetic parameters
 Simulate the plant reactor with the new parameters
Kinetic model and reactor model
k 'j K A K H 2 c j c H 2
rj = Liquid
(1 + ∑ K c )(1 + K i i H2 cH2 ) phase dci
= ρb ri
dt
dcH
= N H av + rH ρb
Based on this mechanistic hypothesis, the rates of the hydrogenation steps become:
dt
k1K A K H 2 c AcH k2 K A c A k3 K A K H2 c AcH
r1 = 2
r2 = r3 = 2

DH D D DH D
2 2
 P / RT 
k 4 K J K H 2 c J cH k5 K C K H 2 cC cH k 6 K J K H 2 c J cH N H a v = k l av  G − cH 
r4 = r5 = r6 =
 K 
2 2 2
DH D DH D DH D
2 2 2

k 7 K A K H 2 c A cH k8 K K K H 2 cK cH k9 K E K H 2 c E c H
r7 = 2
r8 = 2
r9 = 2
DH D DH D DH D
2 2 2

k10 K E cE k11K E K H 2 cE cH k12 K I K H 2 cI cH


r10 = r11 = r12 =
ρB catalyst bulk density =mcat/Vliq
2 2
D DH D DH D
2 2

r13 =
k13 K G K H 2 cG cH
DH D
2
r14 =
k14 K I K H 2 cI cH
DH D
2 NH flux of hydrogen from gas to liquid
K gas-liquid equilibrium constant
2 2

where D and DH2 are defined as

D = 1 + K A c A + K B c B + K C cC + K D c D + K E c E + K F c F + kl gas-liquid mass transfer coefficient


K G cG + K I c I + K J c J + K K c K

 DH = 1 + K H c H
r reaction rate
2 2 2
Experiments performed in laboratory
reactor

• Catalyst 1, Raw material 1


– Temperatures 70ºC, 95 ºC and 120 ºC
– Pressure 4, 7, 9.5 bar
– Catalyst amount 2.9 g
– 9 data sets

• Catalyst 2, Raw material 2


– Temperatures 70ºC, 95 ºC and 120 ºC
– Pressure 15, 30, 45 bar
– Catalyst amount 1.25 g
– 9 data sets
Experiment 1-9 Experiment 10-18
Catalyst 1 Catalyst 2
Explained 99.82 % Explained 99.06 %

Parameter value Std. Error(%) Parameter value Std. Error(%)

k1 (mol/ m3min) 274 13.9 548 34.1


k2 (mol/ m3min) 7.51 14.2 25.2 28.7
k3 (mol/ m3min) 1.93 17.3 57.1 23.9
k6 (mol/ m3min) 15.5 5.8 421 21.2
k7 (mol/ m3min) 2.95 19 1470 30.6
k8 (mol/ m3min) 0.0109 53.1 5.37 19.2
k9 (mol/ m3min) 259 13.9 1660 18.9
k10 (mol/ m3min) 12.2 15.1 39.9 26.8
k11 (mol/ m3min) 0.761 27.7 0.0607 68.5
k14 (mol/ m3min) 44.4 24.8 2970 34.4
ΔEA1 (J/mol) 57000 2.8 74100 5.2
ΔEA2 (J/mol) 95300 3.4 55200 20.9
ΔEA3 (J/mol) 124000 3.8 98000 9.5
ΔEA6 (J/mol) 43700 4.8 80100 6.1
ΔEA7 (J/mol) 99900 10 84400 5.3
ΔEA8 (J/mol) 27500 36.3 41200 5.7
KA (m3/mol) 0.000776 19.6 0.00161 29
KB (m3/mol) 0.718 20.1 6.51 26.2
KJ (m3/mol) 0.0186 12.5 0.0147 26.1
KK (m3/mol) 0.0618 38.2 4.87 21
KH2 (m3/mol) 0.275 11.1 0.0562 15.1
ΔH2 (J/mol) 18600 25.2 3440 58.3
Fit of model to experiments

70 5

B 4.5
60
4

50 3.5
A
3
40
2.5
30 F 2
E
20 1.5

1
10 D C
0.5 K
J HG
I
0 0
0 20 40 60 80 100 120 0 20 40 60 80 100 120

Dataset 1, exp 5, 7 bar, 70°C

Sitosterol Sitostanone
50 5

45 4.5

40 4

35 3.5

30 3
Estimated

Estimated

25 2.5

20 2

15 1.5

10 1

5 0.5

0 0
0 5 10 15 20 25 30 35 40 45 50 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Experimental Experimental
Fit of model to experiments
70
5

60 4.5
B
4
50
3.5
A
40
3

2.5
30
F
E 2
K
20
1.5
C
10 1

J
I 0.5 G
0 D
0 20 40 60 80 100 120 H
0
0 20 40 60 80 100 120

Exp 22 30 bar, 95°C

Sitosterol
50
Sitostanone
2.5
45

40
2
35

30
Estimated

1.5
Estimated

25

20
1
15

10
0.5
5

0
0 5 10 15 20 25 30 35 40 45 50 0
0 0.5 1 1.5 2 2.5
Experimental Experimental
Sensitivity plots: Check that parameters
are well identified
4
x 10
3 2000

1500
2
1000
1
500

0 0
100 200 300 400 500 0 5 10 15 20
k1 4
k2
x 10
2000 2

1500 1.5

1000 1

500 0.5

0 0
0 2 4 6 0 10 20 30 40
k3 k6
Use of model for simulation of plant
reactor (10 m3)

16
70
14
60
12
50
10
40
8
30 6

20 4

10 2

0
0 0 100 200 300 400
0 100 200 300 400
time
time

Simulation of a plant reactor, 4 bar Simulation of plant reactor.


70 °C based on laboratory data. Concentration of hydrogen
Experimental points ‘o’ from plant (mol/m3) in the liquid phase as a
reactor and simulated lines. function of time (min)
Reaction and diffusion: Lactose
How are by products formed
 Lactose is inexpensive
 There is a lot of lactose (by-product of cheese manufacturing)
 Lactose intolerance is common
 Lactose can be isomerized
 Lactose can be oxidized
 Lactose can be hydrogenated
 Lactitol is a sweetening agent
 Lactulose is a laxative
 Lactobionic acid is an organ preserving liquid
Alternative Lactobionic
reaction acid
schemes

OH
OH OH OH
OH
OO
HO
OH

Lactulitol
Lactulose

Alternative 2

Lactitol

Alternative 1 +

Galactitol
Sorbitol
Experiments + linear plots

Effect of catalyst amount Effect of hydrogen pressure

Linear plots rate constant


How are By-products formed
 The behaviour of by-products is complicated
 It can be revealed with yield-conversion plots how
sorbitol and galactitol are formed ?
Preliminary data fit
45

40
0.5
70 bar
35

20 bar 0.4
30

25
w-%

0.3
w-%

20
0.2
15

10 20 bar 0.1
70 bar
5
0
0 50 100 150 200 250 300
0
0 50 100 150 200 250 300 time (min)
time (min)

Main products ok By products bad


Alternative reaction schemes in brief

Alternative 1

Lactose → lactitol → sorbitol+galactitol (1,5)


Lactose → lactulose → lactulitol (2,4)
Lactose ↔ lactobionic acid (3)

Alternative 2

Lactose → lactitol
Lactose → lactulose -> lactulitol
Lactose ↔ lactobionic acid
Lactose → sorbitol + galactitol
Mass balances, rate equations
and yield
dci k j c AcHnH2 2
dt
= ∑ ν ij r j ρ B Rj =
(1 + K nH 2
H 2 cH 2 )(1 + ∑ K c ) l l
R1 = k '1cA
R 2 = k '2cA
R 3 = k '3cA − k '−3cD
R 4 = k '4cC
R 5 = k '5cB
cA / c 0 A = exp(−(k '1 + k '2 + k '3) ρBt ))
cB / c 0 A = ( k '1 /( k '5 − k ' ' ))(exp(− k ' ' ρBt ) − exp(− k '5 ρBt ))
cC / c 0 A = ( k '2 /( k '4 − k ' ' ))(exp(− k ' ' ρBt ) − exp(− k '4 ρBt ))
cD / c 0 A = ( k '3 / k ' ' )(1 − exp(− k ' ' ρBt ))
cE / c 0 A = (k '1k '4) /(k '4 − k ' ' ))((1 / k ' ' )(1 − exp(− k ' ' ρBt ) − (1 / k '4)(1 − exp(− k '4 ρBt ))
cF / c 0 A = (k '1k '5) /(k '5 − k ' ' ))((1 / k ' ' )(1 − exp(− k ' ' ρBt ) − (1 / k '5)(1 − exp(− k '5 ρBt ))

cB / c 0 A = α 1 /(α 5 − 1)((1 − X ) − (1 − X ) * *α 5)
cC / c 0 A = α 2 /(α 4 − 1)((1 − X ) − (1 − X ) * *α 4)
cD / c 0 A = α 3 X
cE / c 0 A = α 2 /(α 4 − 1)(α 4 X + (1 − X ) * *α 4 − 1)
cF / c 0 A = α 1 /(α 5 − 1)(α 5 X + (1 − X ) * *α 5 − 1)
Improved data fitting results

40

35 Lactitol
30

W-%25
20

15

10
Lactose
5

0
0 50 100 150 200 250
Time (min)
Galactitol & Sorbitol
The truth is revealed

0.4 0.4

0.3 0.3

Yield w%0.2 0.2 Sorbitol & Galactitol is formed


0.1 0.1 from lactitol
0 0 (very good)
0 1 0 1

Lactose conversion
0.4 0.4

0.3 0.3

Yield w% 0.2 0.2


Sorbitol & Galactitol from lactose
(rather bad)
0.1 0.1

0 0
0 1 0 1
Lactose conversion
Particle model

Reaction, diffusion and catalyst


deactivation in porous particles

Particle model
dci 
= ε p−1  ri ρ p − r S
d(N i r S
)
dt dr 
 

Rates
ri = ∑ν ij R j a j
j
Lactose hydrogenation

-3
x 10
7
Concentration profiles
Inside catalyst particle 6 3.0 mm

With different particle sizes 1.0 mm


5

0.03 mm
4
c (mol/l)

Lactulose
3
Lactulitol 0.3 mm 0.3 mm

0.03 mm
2

1 1.0 mm
3.0 mm

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

Center x
Surface
Concentration profiles of lactose inside a catalyst
particle

1.4
1.4

1.2 1.2

1 1

0.8
0.8

0.6
0.6
0.4
0.4
0.2

0 0.2

1
600 0
x 0.5 400
1
center
200 600
0 x .5
0
200
400

No deactivation Deactivation
Production of DMC Dimethylcarbonate

•DMC
•Methylating and carbonylating
agent
•Biodegradable
•Gasoline additive – replacing
MTBE
•Electrolyte in lithium batteries
DMC model MeOH CO2

r1=k1*cA*cB
r2=k2*cC*cwater
r3=k3*cE*cWater
r4=k4*cC*cF
r5=k5*cG*cA
r6=k6*cB*cE
r7=k7*cE*cA
r8=k8*cH*cB
r9=k9*cH*cWater
! Batch reactor model
ds(1)=-2.0d0*r1-2.0d0*r5-r7+r2 DMC
+2.0d0*r4 ! metanol
ds(2)=-r3-r6-r7 ! butylenoxide
ds(3)= -r1+r2-r8 ! CO2
ds(4)= r5+r8-r5+r4 ! But carbonate
ds(5)= r1-r2+r5-r4 ! DMC
ds(6)= r7-r8-r9
Wood chip
 2D dynamic model
 Reaction
 Diffusion
 Structural changes during
reaction: porosity changes

 Most complex model we have


made !
Conclusions
 More and more complex molecules and
mixtures from the nature enter the arena
 Development of new catalyst and reactor
technologies is the key issue for better
processes and products
 Mathematical modelling should cover all
aspects: kinetics, mass transfer, flow modelling
to process modelling – in a balanced way
 But keep the models as simple as possible
Teknisk kemi och reaktionsteknik
Åbo Akademi
Complex model

 Reaction and diffusion in catalyst particle


 Catalyst mixture with different particle diameters
 Catalytic and noncatalytic reaction
 Hydrolysis of alkyl formates

HCOOR + H2O ⇄ HCOOH + ROH (where R = CH3 or C2H5)


Reactor and kinetic model
 Catalyst particle dC rρ D  d 2
Ci a-1 dCi 
i
= cat,i P + rnoncat,i + ei 2  + 
dtε R ε dX
P j  X2
dX 
 Reaction+diffusion
P
dC
= i a ∑ y N x2 + r
 Batch reactor dt p j ij j noncat
j
 Catalyst particles of
different sizes
18

16
14

12
10
%

8
6
4
2

 cC cD 
0
58.9-68.2
68.2-79.1
79.1-91.7
91.7-106
106-123
123-143
143-165
165-192
192-222
222-258
258-299
299-346
346-401
401-465
465-539
539-625
625-724
724-840
840-973
973-1128

Diameter range (µm)


=r k  c A cB − 
 K eq 
 Reaction kinetics
EA  1 1  ∆H  1 1 
−  −  −  − 
k = k0 e R T T 
K eq = k0,eq e
R  T Tref 

Mathematical model
 Ordinary differential model (ODE)
 Partial Differential Model (PDE)

 Backward difference
 Convert PDE to ODE:s by method of lines
Model code &
call rates(conc,ratehet,ratehom,xdata,gpar, ngpar,
lpar, nlpar,nx,nobs,iobs,iset)

xpos=dfloat(j-1)/dfloat(npcat-1)
! xpos=discr_points(j)

do i=1,ncom
! print *,i,j,conc(i),ratehet(i)

where (s < 0.0d0 ) s=1.0d-10


Complex model dpr2=diff(i)/poro/catrad(k)/catrad(k)

icat=ncom+j+(i-1)*npcat+idist
catrad=catrad/100 ! radius in dm

if (iobs.lt.nobs.and.t.gt.0.0d0) then
More time needed il=i ! bulk concentration

if (j.eq.npcat) then ! surface of catalyst


! ds(icat)=dc1(icat)+kla*catrad(k)/diff(i)*(s(il)-s(icat)) ! slurry reactor
t1=xdata(1,iobs) ! time
t2=xdata(1,iobs+1)
Te1=xdata(2,iobs)
To write model code ds(icat)=dc1(icat)+kla*(s(il)-s(icat)) ! slurry reactor
else if (j.eq.1) then ! center of catalyst particle
ds(icat)= 1.0d2*dc1(icat)
Te2=xdata(2,iobs+1)
else
Temp=Temp+(Te2-Te1)/(t2-t1)*(t-t1)
! ds(icat)=dpr2*dc2(icat)+dpr2*shape/xpos*
end if
! & dc1(icat)+rhop/poro*cratehet(i)
Volume=Volume-float(iobs-1)*5.0d0
ds(icat)=dpr2*dc2(icat)+dpr2*shape/xpos*
Temp=Temp+273.15d0
& dc1(icat)+rhop/poro*ratehet(i)+ratehom(i)
do k=1,ndist
idist=(k-1)*ncom*npcat
! print *,i,conc(i),ratehet(i),dpr2,diff(i)
end if
nmax=npcat+1
! call discr(npcat,2,4,nmax,discr_points,discr_int,ierr)
call diffusion(poro,tortu,temp,diff)
rate_het_particle(i,j,k)=ratehet(i)+ratehom(i)
ap=(shape+1.0d0)*mcat/volume/catrad(k)/rhop
end do
rhob=mcat/volume /1.0d-3
! pause
! calculate concentration profile inside catalyst particle
end do
nd=maxpts
end do ! k
do i=1,ncom
if (ierr.ne.0) then
ix=ncom+1+(i-1)*npcat +idist
write(*,*)'error from deriv ',ierr
stop
end if
ib1 = 2 ! center
ib2 = 1 ! surface

ind = 1 !3
dum(1)=0.0d0
index=0
avnlpi(1:ncom)=0.0d0
call deriv1(ind,ib1,ib2,nd,npcat,ndp2,nmax,index,h,
do i=1,ncom
& s(ix),dc1(ix),dum,ierr)
do k=1,ndist
do j=2,npcat
Concentration inside catalyst particle
for different particle sizes (mm)

8.2 0.15
0.32
0.37
8 0.44
0.5
0.58
7.8
0.68
c mol/dm3

0.79
7.6

0.9

Catalyst 7.4

particle 1.1
7.2

7
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
x
Fit of model to experimental data

1g 2.5g
1.5 1.5

1 1
mol

mol
0.5 0.5

0 0
0 50 100 150 0 50 100
time (min) time (min)
5g 10g
1.5 1.5

1 1
mol

mol

0.5 0.5

0 0
0 50 100 0 50 100
time (min) time (min)
Kinetic model
r1 = k1 K 9 pH 2 cHMR1θ z +1
r2 = k4 K 9 pH 2 cHMR2 θ z +1
r3 = k3 cHMR1
r4 = k4 cHMR2 Where the coverage is obtained from

r5 = k5 K 9 pH 2 cMAT θ z +1 f (θ ) = ( )
θ + k6 cHMR1 + k7 cHMR2 +8 cMAT θ z + K 9 pH 2 θ − 1
The coverage can be solved iteratively with the Newton-Raphson method
f (θ )
θi += θi +
f ' (θ )
1

The derivative is

f ' (θ ) = ( )
1 + k6 cHMR1 + k7 cHMR2 + k8 cMAT zθ z −1 + K 9 pH 2
Example
MCMC
 Reactions
 1 HMR_1 → MAT
 2 HMR_2 → MAT
 3 HMR_1 → prop_MAT_1
 4 HMR_2 → prop_MAT_2
 5 MAT → BP
Modest code

Find coverage
do i=1,1000 Kinetic and reactor model
fun=theta+kk*
1 theta**z+sqrt(K9*pH2)*theta-1.0d0 rhoB=mcat/vol/1.0d-3 ! gram/liter
funp=1.0d0+kk*z*theta**(z-1.0d0)+sqrt(K9*pH2)
r1=k1*sqrt(K9)*cHMR1*sqrt(pH2)*theta**(z+1.0d0)
theta1=theta-fun/funp
r2=k2*sqrt(K9)*cHMR2*sqrt(pH2)*theta**(z+1.0d0)
! print *,i,theta,theta1,fun,funp
r3=k3*cHMR1
r4=k4*cHMR2
if (abs(theta1-theta).lt.1.0d-5) then ! converged
r5=k5*sqrt(K9)*cMAT*sqrt(pH2)*theta**(z+1.0d0)
theta=theta1
goto 20
ds(1)=(-r1-r3)*rhoB ! cHMR1
end if
ds(2)=(-r2-r4)*rhoB ! cHMR2
theta=theta1
ds(3)=(r1+r2-r5)*rhoB ! cMAT
if (i.gt.999) then
ds(4)= r3*rhoB ! cP1
print *,'max iterations reached 1000 ',theta,theta1
ds(5)= r4*rhoB ! cP2
stop
ds(6)= r5*rhoB ! cB
end if
end do ! iterate again
Estimation results

Total SS (corrected for means) 0.1803E-03


Residual SS 0.5421E-05
The correlation matrix of the parameters:
Std. Error of estimate 0.1525E-03
1.000
Explained (%): 96.99
-0.013 1.000
-0.146 -0.262 1.000
Estimated Estimated Est. Relative Parameter/
0.935 -0.083 -0.216 1.000
Parameters Std Error Std Error (%) Std. Error
0.988 -0.012 -0.149 0.925 1.000
-0.996 0.012 0.149 -0.933 -0.995 1.000
K1 0.131E+04 0.697E+03 53.4 1.9
0.998 -0.013 -0.150 0.934 0.993 -0.999 1.000
K3 0.591E-03 0.461E-03 78.1 1.3
K4 0.686E-03 0.424E-03 61.9 1.6
K5 0.311E+02 0.180E+02 58.0 1.7
K8 0.971E+06 0.281E+06 28.9 3.5
K9 0.508E-01 0.289E-01 56.8 1.8
Z 0.135E+02 0.314E+01 23.2 4.3
MCMC, sensitivity analysis
-4
x 10 1
15

2 10

0
-4
x 10 2
10

5
3

60

40
4

20

5
x 10 4
10
5

5
0.1
0.08
0.06
6

0.04
0.02

20

15
7

10
500 1000150020002500 0 5 10 15 0 5 10 20 40 60 2 4 6 8 10 0.020.040.060.08 0.1
-4 -4 5
x 10 x 10 x 10
Did we find the optimal parameter
value ?
-4 Parameter 3: 3
x 10 Parameter 1: 1
8 Parameter 2: 2 3000
2500

7
2500
2000
6
2000
5 1500

4 1500
1000

3
1000

500
2
500
1
0
-2 0 2 4 6 8 10 12 14 16 18
-4 0
0 x 10 -2 0 2 4 6 8 10 12
0 500 1000 1500 2000 2500 3000 -4
x 10

Parameter 6: 6
Parameter 4: 4 -6
x 10 Parameter 5: 5 70
0.035 3

60
0.03
2.5

50
0.025
2
0.02 40

1.5
0.015 30

0.01 1 20

0.005 10
0.5

0 0
0 10 20 30 40 50 60 70 80 0 0.02 0.04 0.06 0.08 0.1 0.12
0
1 2 3 4 5 6 7 8 9 10 11
5
x 10
Fit of model to experimental data
-3
x 10 data set 5
-3 -3
x 10 data set 1 x 10 data set 2 3.5
4 4
3

3 3 2.5

2
2 2
1.5

1 1 1

0.5
0 0
0 20 40 60 0 20 40 60
0
0 5 10 15 20 25 30
-3 -3
x 10 data set 3 x 10 data set 4
4 4
-3
x 10 data set 6
3 3 4

3.5
2 2
3

1 1 2.5

2
0 0 1.5
0 100 200 300 0 100 200 300
1

0.5

0
0 20 40 60 80 100 120

You might also like