CSTR Online simulation - Continuous Stirred Tank Reactor
Table of Contents
Continuous Stirred Tank Reactor (CSTR)
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.
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.
where:
- concentration of substrate A inside the reactor,
- concentration of substrate A in the inflow stream,
- volumetric flow rate,
- reaction rate,
- time, s
- volume,
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 depends on the type of the reaction. For example, if we deal with A→B reaction, then we have:
After introducing Eq. (2) to Eq. (1) and simplifying, we get:
or
Coefficient in the above equation is called a mean residence time, and is calculated as a ratio of volume to volumetric flow rate .
To solve the the differential equation we need to know initial condition. In this case, it is the initial concentration :
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 . So, the differential equation will reduce to algebraic equation:
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 :
The calculated mean residence time ensures reaching assumed . In turn, the value 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:
Analogously, we can use Eq. (5) to calculate concentration A for a given volume and volumetric flow rate:
How to use the CSTR Online Simulation Tool
The usage of CSTR simulator is very simple. Just type the parameters into the table, ane the results will be calculated automatically. The full tutoral how to use the CSTR simulator: https://youtu.be/UiB6bwUXHp8
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 interface of the application looks like this:
Fig. 2. CSTR Online Simulation Tool interface