Sunteți pe pagina 1din 10

Solved with COMSOL Multiphysics 5.

Parameter Estimation for Nonideal


Re a c t o r M o de ls
Introduction
Real reactors can be modeled as combinations of ideal reactors. In this example two
ideal CSTRs with interchange are set up to model a real reactor with one highly
agitated region and another region with less agitation. Two parameters, relating the
volume and exchange rate of the two regions, are required for this. The parameters are
found by comparing the model results to experimental tracer data. Applying the
Parameter Estimation feature in the Reaction Engineering interface makes this an easy
task.
A problem description similar to the model presented here is given in Ref. 1.

Note: This application requires the Optimization Module and the Chemical
Engineering Module.

Model Definition
Two ideal CSTRs with interchange capture the essential behavior of a real reactor
system.

v0
cT0

v1

V1

V2
cT2

v1

cT1

v0

Figure 1: A real reactor can be modeled by two ideal CSTRs with interchange.

1 |

PARAMETER ESTIMATION FOR NONIDEAL REACTOR MODELS

Solved with COMSOL Multiphysics 5.1

The highly agitated volume is represented by V1 and the less agitated region by V2.
The total reactor volume is defined as:
V = V1 + V2

(1)

and the parameter gives the fraction of the total volume that belongs to V1:
V 1 = V
Fluid is exchanged between volumes at a rate of v1 (SI unit: m3/s), and the parameter
relates this rate to the inlet flow rate:
v 1 = v 0
Assuming that the reactor volume is constant, then the space time, (SI unit: s), is:
V
= ----v0

(2)

MOLE BALANCES

To evaluate the parameters and , a tracer compound is added through the reactor
inlet stream, after which a response curve is measured at the outlet. Mole balances over
the two CSTRs provide an equation model to which the experimental data can be
compared. The mole balances are:
dcT1
V 1 ------------ = v 0 c T0 + v 1 c T2 v 0 c T1 v 1 c T1
dt
dcT2
V 2 ------------ = v 1 c T1 v 1 c T2
dt
where cT1 is the tracer concentration (SI unit: mol /m3) in the region given by V1,
and cT2 is the tracer concentration in V2. cT0 is the tracer amount into the real reactor.
Using Equation 1 through Equation 2 the equations can be rewritten as:

2 |

dc T1
1
----------- = ------ ( c T0 c T1 + ( c T2 c T1 ) )

dt

(3)

dcT2

----------- = -------------------- ( c T1 c T2 )
(1 )
dt

(4)

PARAMETER ESTIMATION FOR NONIDEAL REACTOR MODELS

Solved with COMSOL Multiphysics 5.1

This coupled set of ODEs can easily be set up and solved in the Reaction Engineering
interface with the CSTR, constant volume, reactor type. Species nodes for T1 and T2,
are added, and the additional source feature is utilized. The additional source feature
can account for all terms on the right-hand side of Equation 3 and Equation 4.
EXPERIMENTAL DATA

An experiment is performed where a 1000 mol/m3 tracer solution is added in the


reactor feed inlet stream. The tracer concentration in the reactor outlet stream is then
recorded as a function of time. The data is presented in Table 1 below.
TABLE 1: EXPERIMENTAL DATA.
TIME (S)

CONCENTRATION
(MOL/M3)

600

242

1200

446

1800

585

2400

668

3600

795

6000

909

9000

953

18000

991

24000

994

The Parameter Estimation feature accepts comma-separated value files (csv-files) for
import of experimental data into the software. After import, the columns of the data
file are shown and are mapped to the model variables.

3 |

PARAMETER ESTIMATION FOR NONIDEAL REACTOR MODELS

Solved with COMSOL Multiphysics 5.1

Results and Discussion


Figure 2 shows the model results and the experimental data and in the same plot. The
simulated tracer concentration in the outlet, cT1, coincides well with the experimental
data

Figure 2: Model results and experimental data of the tracer concentration in the reactor
outlet.
The estimated values of and are 0.83 and 0.11, respectively.

Reference
1. H.S. Fogler, Elements in Chemical Reaction Engineering, 4th ed., Prentice Hall,
pp. 985987, 2005.

Application Library path: Chemical_Reaction_Engineering_Module/


Tutorials/nonideal_cstr

Modeling Instructions
From the File menu, choose New.

4 |

PARAMETER ESTIMATION FOR NONIDEAL REACTOR MODELS

Solved with COMSOL Multiphysics 5.1

NEW

1 In the New window, click Model Wizard.


MODEL WIZARD

1 In the Model Wizard window, click 0D.


2 In the Select physics tree, select Chemical Species Transport>Reaction Engineering (re).
3 Click Add.
4 Click Study.
5 In the Select study tree, select Preset Studies>Time Dependent.
6 Click Done.
GLOBAL DEFINITIONS

Add a set of model parameters by importing their definitions from a data text file
provided with the Applications Library.

Parameters
1 On the Home toolbar, click Parameters.
2 In the Settings window for Parameters, locate the Parameters section.
3 Click Load from File.
4 Browse to the applications Application Library folder and double-click the file
nonideal_cstr_parameters.txt.

Start by defining the reactor model. First add two species nodes T1 and T2 for the
tracer concentrations in the volumes V1 and V2, respectively.
REACTION ENGINEERING (RE)

1 In the Model Builder window, under Component 1 (comp1) click Reaction Engineering
(re).
2 In the Settings window for Reaction Engineering, locate the Reactor Type section.
3 From the Reactor type list, choose CSTR, constant volume.
4 Click to expand the Mixture section. From the Mixture list, choose Liquid.
5 Locate the Mass Balance section. From the Volumetric rate list, choose User Defined.
6 In the vp text field, type 0.

Species 1
1 On the Reaction Engineering toolbar, click Species.
2 In the Settings window for Species, locate the Species Name section.

5 |

PARAMETER ESTIMATION FOR NONIDEAL REACTOR MODELS

Solved with COMSOL Multiphysics 5.1

3 In the Species name text field, type T1.


4 On the Reaction Engineering toolbar, click Species.
5 In the Settings window for Species, locate the Species Name section.
6 In the Species name text field, type T2.

In each species node, enter physical properties that can be accessed, if necessary, for
computing additional mixture properties.

Species: T1
1 In the Model Builder window, under Component 1 (comp1)>Reaction Engineering (re)

click Species: T1.


2 In the Settings window for Species, locate the General Parameters section.
3 In the M text field, type Mn_T.
4 In the text field, type rho_T.

Species: T2
1 In the Model Builder window, under Component 1 (comp1)>Reaction Engineering (re)

click Species: T2.


2 In the Settings window for Species, locate the General Parameters section.
3 In the M text field, type Mn_T.
4 In the text field, type rho_T.

[[Add additional sources for the rates of species T1 and T2, i.e. the right hand sides
of the ODEs.]]

Additional Source 1
1 On the Reaction Engineering toolbar, click Additional Source.
2 In the Settings window for Additional Source, locate the Additional Rate Expression

section.
3 In the Volumetric species table, enter the following settings:
Species

Additional rate expression (mol/(m^3*s))

T1

(c_T0-re.c_T1+beta*(re.c_T2-re.c_T1))/tau/alpha

T2

beta*(re.c_T1-re.c_T2)/tau/(1-alpha)

Note that alpha and beta will be defined in the Parameter Estimation feature.
Now add a Parameter Estimation feature and set up the optimization calculation.

6 |

PARAMETER ESTIMATION FOR NONIDEAL REACTOR MODELS

Solved with COMSOL Multiphysics 5.1

Parameter Estimation 1
1 On the Reaction Engineering toolbar, click Parameter Estimation.
2 In the Settings window for Parameter Estimation, locate the Control Variables

section.
3 In the Control variables table, enter the following settings:
Variable

Initial value

alpha

0.5

beta

0.5

Lower bound

Upper bound

Experiment 1
1 On the Reaction Engineering toolbar, click Attributes and choose Experiment.

Read in the csv-file with the experimental data and map the data columns with the
model variables.
2 In the Settings window for Experiment, locate the Experimental Data section.
3 Click Browse.
4 Browse to the applications Application Library folder and double-click the file
nonideal_cstr_data.csv.

5 Click Import.
6 In the table, enter the following settings:
Data column

Use

Model variables

Tracer (mol/m3)

c_T1

STUDY 1

Step 1: Time Dependent


1 In the Model Builder window, under Study 1 click Step 1: Time Dependent.
2 In the Settings window for Time Dependent, locate the Study Settings section.
3 From the Time unit list, choose s.
4 In the Times text field, type 24000.

Add an Optimization study node to perform the optimization calculations. Select


optimization method.

Optimization
1 On the Study toolbar, click Optimization.
2 In the Settings window for Optimization, locate the Optimization Solver section.

7 |

PARAMETER ESTIMATION FOR NONIDEAL REACTOR MODELS

Solved with COMSOL Multiphysics 5.1

3 From the Method list, choose Levenberg-Marquardt.


4 In the Optimality tolerance text field, type 2E-3.

Solution 1
1 On the Study toolbar, click Show Default Solver.
2 In the Model Builder window, expand the Solution 1 node.
3 In the Model Builder window, expand the Study 1>Solver Configurations>Solution
1>Optimization Solver 1 node, then click Time-Dependent Solver 1.
4 In the Settings window for Time-Dependent Solver, click to expand the Absolute
tolerance section.
5 Locate the Absolute Tolerance section. In the Tolerance text field, type 1.0E-5.
6 On the Study toolbar, click Compute.

The following instructions generate Figure 2.


RESULTS

Experiment 1 Group
1 In the Model Builder window, under Results click Experiment 1 Group.
2 In the Settings window for 1D Plot Group, click to expand the Title section.
3 From the Title type list, choose None.
4 Locate the Plot Settings section. Select the x-axis label check box.
5 In the associated text field, type Time(s).
6 Select the y-axis label check box.
7 In the associated text field, type Tracer concentration (mol/m<sup>3</sup>).
8 In the Model Builder window, expand the Experiment 1 Group node, then click
Experiment 1 Data.
9 In the Settings window for Table Graph, click to expand the Legends section.
10 From the Legends list, choose Manual.
11 In the table, enter the following settings:
Legends
Experiment

12 In the Model Builder window, under Results>Experiment 1 Group click Global 1.

8 |

PARAMETER ESTIMATION FOR NONIDEAL REACTOR MODELS

Solved with COMSOL Multiphysics 5.1

13 In the Settings window for Global, click Replace Expression in the upper-right corner

of the y-axis data section. From the menu, choose Component 1>Reaction
Engineering>comp1.re.c_T1 - Concentration.
14 Click to expand the Legends section. Select the Show legends check box.
15 From the Legends list, choose Manual.
16 In the table, enter the following settings:
Legends
Model

17 On the Experiment 1 Group toolbar, click Plot.

9 |

PARAMETER ESTIMATION FOR NONIDEAL REACTOR MODELS

Solved with COMSOL Multiphysics 5.1

10 |

PARAMETER ESTIMATION FOR NONIDEAL REACTOR MODELS

S-ar putea să vă placă și