상세 컨텐츠

본문 제목

Ideal Batch Reactor

Modeling/Mathematica

by synbio 2020. 12. 6. 00:29

본문

Multiple reactions in constant volume Batch Reactor

A + B ->  D       (1) desired reaction

2A ->  U           (2) byproduct

 

List of initial constants

k1 = 0.7;

k2 = 0.6;

CA0 = 5.0;

CB0 = 5.0;

 

Liston of functions

1) NDSolve the molar concentration of each species

sol = NDSolve[{CA'[t] == -k1 CA[t] - k2 CA[t]^2, CB'[t] == -k1 CA[t] , CD'[t]==k1 CA[t],

CU'[t]== (k2/2) CA[t]^2, CA[0] == CA0, CB[0] == CB0, CD[0]== CU[0] == 0},

{CA[t], CB[t], CD[t], CU[t]}, {t,0,3}]

CAi[t_] := Evaluate[CA[t] /. sol];

CBi[t_] := Evaluate[CB[t] /. sol];

CDi[t_] := Evaluate[CD[t] /. sol];

CUi[t_] := Evaluate[CU[t] /. sol];

Plot[{CAi[t], CBi[t], CDi[t], CUi[t]}, {t, 0, 3}, AxesLabel -> {"Time (min)", "Ci"}, PlotStyle -> {Red, Green, Blue, Orange}, PlotLegends -> LineLegend[{"A", "B", "D", "U"}]]

 

2) Obtain conversion and selectivity

x = (CA0 - CAi[2])/CA0;

Print["Conversion = ", x]

SDU = CDi[2] / CUi[2];

Print["Selectivity = ", SDU]

 

'Modeling > Mathematica' 카테고리의 다른 글

Molecular dynamics simulation of driven oscillators  (0) 2020.12.06
Monte Carlo simulation of Leonnard-Jones fluid  (0) 2020.12.06
Axial dispersion model  (0) 2020.12.06
Ideal PFR  (0) 2020.12.06
Ideal CSTR  (0) 2020.12.06

관련글 더보기

댓글 영역