CSTR Online simulation - Continuous Stirred Tank Reactor


$$a_1A_1+a_2A_2+...+a_{N_{A}}A_{N_A}\to b_1B_1+b_2B_2+...+b_{N_{B}}B_{N_B}$$

where:
ai - stoichiometric coefficient for substrate Ai
bi - stoichiometric coefficient for product Bi

Loading...


Continuous Stirred Tank Reactor (CSTR)

Table of Contents

Introduction

CSTR (Continuous Stirred-Tank Reactor) is a type of chemical reactor used in the industry for various chemical and biochemical processes. In a CSTR, reactants are continuously fed into a tank, and the reacting mixture is continuously withdrawn from the reactor. The content of the tank is well mixed to ensure a uniform composition.

CSTR scheme

Fig. 1. Scheme of a CSTR

Mathematical model of CSTR

Model of isothermal CSTR is based on mass balance of reagents. Number of equations depends on the complexity of the chemical reaction or system of reactions. When we deal with simple irreversible reaction A→B then there will be one equation describing mass balance of substrate A, as below.

VdCAdt=FVCAfFVCAVr(CA)(1)V\frac{dC_A}{dt}=F_VC_{Af}-F_VC_{A}-V\cdot r(C_A) \tag{1}

where:

CAC_A - concentration of substrate A inside the reactor, mol A/smol\text{ }A/s

CAfC_{Af} - concentration of substrate A in the inflow stream, mol A/smol\text{ }A/s

FVF_V - volumetric flow rate, m3/sm^3/s

rr - reaction rate, mol A/(m3s)mol\text{ }A/(m^3s)

tt - time, s

VV - volume, m3m^3

The interpretation of the equation (1) is following: Each term in the equation is expressed in units of [mol A/s]. Terms on the right sum together to the term on the left-hand-side, which is the accumulation rate of substrate A in the volume V of the reactor. The first term on the right-hand-side of the equation is the substrate A inflow rate. The second term is the outflow rate of A. We can see that the concentration in this stream is the same as inside the reactor. It's because the ideal CSTR is assumed to be perfectly mixed, so the concentration of A is the same inside the entire reactor. The last term is the substrate uptake due to chemical reaction. The expression rr depends on the type of the reaction. For example, if we deal with A→B reaction, then we have:

r(CA)=kCA(2)r(C_A) = k\cdot C_A \tag{2}

After introducing Eq. (2) to Eq. (1) and simplifying, we get:

dCAdt=FVVCAfFVVCAkCA(3a)\frac{dC_A}{dt}=\frac{F_V}{V}C_{Af}-\frac{F_V}{V}C_{A}-kC_A \tag{3a}

or

dCAdt=1τ(CAfCA)kCA(3b)\frac{dC_A}{dt}=\frac{1}{\tau}(C_{Af}-C_{A})-kC_A \tag{3b}

Coefficient τ\tau in the above equation is called a mean residence time, and is calculated as a ratio of volume to volumetric flow rate τ=VFV\tau = \frac{V}{F_V}.

To solve the the differential equation we need to know initial condition. In this case, it is the initial concentration CA(0)C_A(0):

CA(0)=CA0(4)C_A(0)=C_{A0} \tag{4}

The above problem is called an initial value problem or Cauchy problem. You can read how to solve it in Python language on our blog (solving differential equations in Python).

The Eq. (3) is a dynamic model of CSTR, so it describes its operation before reaching the steady state. However, more common situation concerns steady-state operation. From modeling point of view, reaching a steady state means dCAdt=0\frac{dC_A}{dt}=0. So, the differential equation will reduce to algebraic equation:

0=1τ(CAfCA)kCA(5)0=\frac{1}{\tau}(C_{Af}-C_{A})-kC_A \tag{5}

Design of CSTR

Let's consider the following example, in which we want to achieve given concentration of substrate A in the outlet stream. As CSTR is operated in steady state, we will use Eq. (5). Simple transformation results in expression for calculating τ\tau:

τ=(CAfCA)kCA(6)\tau =\frac{(C_{Af}-C_{A})}{kC_A } \tag{6}

The calculated mean residence time ensures reaching assumed CAC_A. In turn, the value τ\tau can be obtained by changing volume or volumetric flow rate, depending on process requirements. For example, if we know the volumetric flow rate, we can calculate reactor volume according to the relationship:

V=τFV(7)V = \tau F_V \tag{7}

Analogously, we can use Eq. (5) to calculate concentration A for a given volume and volumetric flow rate:

CA=CAf(1+τk)(8)C_{A}=\frac{C_{Af}}{(1+\tau k)} \tag{8}

How to use the CSTR Online Simulation Tool

The CSTR simulation is very simple. Just type the parameters into the table, ane the results will be calculated automatically. A convenient way to introduce the parameters is to read a file. The parameters should be specified as below:

{
	"kinetic_constant": 0.114,
	"time": 100,
	"volume": 24,
	"volumetric-flow-rate": 0.61,
	"N_A": 1,
	"N_B": 1,
	"initial-concentrations": [2.5],
	"inlet-concentrations": [1.5],
	"table-ni-a": [3],
	"table-ni-b": [2],
	"table-orders-a": [0.5]
}

Short tutorial how to import parameters from a file is presented in the video: https://youtu.be/KuX_OWMH9DE

The full tutoral how to use the CSTR simulator: https://youtu.be/UiB6bwUXHp8

The interface of the application looks like this:

CSTR Online Simulation GUI

Fig. 2. CSTR Online Simulation Tool interface