Here is convenient CSTR model that is solved by Mathematica.
We have a CSTR (Continuous flow Stirred Tank Reactor) in which the reaction, A + B --> 2 D is carried out. Second order reaction kinetics are assumed given by
. The procedure for solving these kinds of problems is given in the references Russell and Denn or Felder and Rouseau. It involves writing mass balances around the reactor for the chemical species and the total mass. It is critical to realize that it is mass that is conserved. However, for the examples shown here, there are no volume changes associated with reaction. Thus we will write equations that appear to conserve volume. Note that this is not a general way of solving CSTR problems and you will have errors if you use it for gas phase reactions or liquid reactions with significant volume changes.
![[Graphics:../Images/reactor_gr_9.gif]](../Images/reactor_gr_9.gif)
Consider a tank reactor that has inflows, qa and qb and outflow, q. The overall mass (actually volume) balance is the differential equation:
![[Graphics:../Images/reactor_gr_10.gif]](../Images/reactor_gr_10.gif)
The change in volume per time is v'[t] and is nonzero if q does not equal qa + qb.
We can do a component balance for "ca". The inflow is: (qa caf), the outflow is: q ca[t] and second order reaction that removes "a" is: k ca[t] cb[t] v[t].
![[Graphics:../Images/reactor_gr_12.gif]](../Images/reactor_gr_12.gif)
We also need a similar component balance for "cb" with inflow, (qb cbf), outflow (q cb[t]) and second order reaction k ca[t] cb[t] v[t], terms.
![[Graphics:../Images/reactor_gr_14.gif]](../Images/reactor_gr_14.gif)
We can do a component balance for "cd". There is no inflow, but it does have outflow (q cd[t]) and second order reaction 2 k ca[t] cb[t] v[t], terms.
![[Graphics:../Images/reactor_gr_16.gif]](../Images/reactor_gr_16.gif)
To recap and make a Mathematica list the equations are:
![[Graphics:../Images/reactor_gr_18.gif]](../Images/reactor_gr_18.gif)
Note that we have include some initial conditions in the reactor, v=100 and the concentrations are initially 0.