Parameter Estimation for a Chemical Reaction - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Applications and Example Worksheets : Science and Engineering : Parameter Estimation for a Chemical Reaction

Parameter Estimation for a Chemical Reaction

Introduction

This application estimates the rate parameters for a reversible reaction with dimerization of an intermediate.

 

A+B k__2k__1 C

C+Ck__4k__3D

It does this by doing the following:

 

• 

Parameterizing (with respect to k__1,k__2,k__3 and k__4) the numerical solution of the different equations that describe the reaction kinetics

• 

Calculating the sum of the square of the errors between the model predictions and experimental data

• 

Minimizing the sum of the square of the errors to find the best fit values of k__1,k__2,k__3 and k__4

 

restart:withplots:withOptimization:

Parameters and Experimental Data

A__02.1: B__03.1:

Concentrations of C and D over time

times07142128354249566370:

C_exp01.0651.3830.97931.1070.72890.72360.46740.60310.61490.3369:

D_exp00.00580.22030.40190.36380.4560.50140.7150.47230.72190.7294:

Reaction Kinetics

de1ⅆⅆtC__Ct=k__1A__0C__Ct2 C__DtB__0C__Ct2C__Dtk__2C__Ct2k__3C__Ct2+2k__4C__Dt:

de2ⅆⅆtC__Dt=k__3C__Ct2k__4C__Dt:

icC__C0=0,C__D0=0:

Sum of Square of Errors

resdsolvede1,de2,ic,parameters=k__1,k__2,k__3,k__4,numeric:

sseprock__1,k__2,k__3,k__4 local i;  resparameters=k__1,k__2,k__3,k__4:  addC_expirhsselecthas,restimesi,C__C2+D_expirhsselecthas,restimesi,C__D2,  i=1 .. numelemstimes  end proc:

sse0.01,0.002,0.02,0.002

2.00578059621453

(4.1)

Minimize the Sum of the Square of the Errors

optParsMinimize'sse'k__1,k__2,k__3,k__4,initialpoint=k__1=0.011 ,k__2=0.002,k__3=0.02,k__4=0.002,assume=nonnegative,optimalitytolerance=0.00001

optPars0.231411169620961532,k__1=0.0632294154111440,k__2=0.0186953983808340,k__3=0.0144413290425876,k__4=0.

(5.1)

Compare Experimental Results to Model

resdsolvede1,de2,ic,parameters=k__1,k__2,k__3,k__4,numeric:

resparameters=optPars2:

p_Codeplotres,t,C__Ct,t=0..70,color=ColorTools:-Color149255,165255,166255,legend=C,filled=true:

p_C_expplottimes,C_exp,style=point,symbol=solidcircle,symbolsize=20,color=ColorTools:-Color149255,165255,166255:

p_Dodeplotres,t,C__Dt,t=0..70,color=ColorTools:-Color58255,83255,155255,legend=D:

p_D_expplottimes,D_exp,style=point,symbol=solidcircle,symbolsize=20,color=ColorTools:-Color58255,83255,155255:

displayp_C,p_C_exp,p_D,p_D_exp,symbol=solidcircle,size=800,400,axesfont=Calibri,legendstyle=font=Calibri,labels=Time,Concentration,labelfont=Calibri,labeldirections=horizontal,vertical,gridlines