**[»] Engineering**and

**[»] Chemistry**.

If you have read most of my previous posts, you probably already know that I originally graduated in chemical engineering before moving to other scientific fields. Chemical Engineering is the study on how to adapt processes to automate them or scale them up. A great deal of it consists of studying chemical reactors where compounds called reactants are transformed into new compounds called products. Please note that not all the chemical processes are reactions, for example a distillation or a filtering process does not involve change in the compounds involved.

Chemical reactor is just a fancy name for “big reaction vessel(s)”. A simple pot with an inlet and outlet tubing can already be a chemical reactor. Obviously, not all reactors will be that simple and some will be much more complex with different vessels connected with many tubing, exhausts, flow breaking structures and so on.

Chemical Engineering consists of two tasks: (1) estimate the efficiency of a given process design, (2) propose modifications of the design to increase its efficiency. Here, I will stick to the first task.

One nice way to estimate the efficiency of a given reactor design is to derive its *residence time distribution* (RTD) pattern. To understand the usefulness of the RTD concept, just imagine that when chemicals are introduced into the reactor they will be divided in a series of individual microscopic lumps that will carry on their conversion process from reactants to products independently of the other lumps. Conversion of reactants to products is described by a set of differential equations translating the kinetics of the reaction, just like in regular chemistry. Because the lumps are considered independents of each others, the conversion efficiency to desired products will only be a function of the input concentrations and the reaction time. However, not all lumps will take the same path through the reactor vessels: some will be caught in back-mixing eddies, other will take shortcuts… The situation is represented on Figure 1.

The RTD gives, as its name suggests, the mathematical distribution of residence time of all these lumps inside the reactor vessel. It tells how many percent of the fluid will stay for how long. An example of RTD curve is given on Figure 2.

Once you know the RTD distribution and the kinetic equations describing the reaction inside the vessel, you can simply integrate the RTD curve product with the conversion efficiency equation to know the overall efficiency of the reactor design.

This way of dealing with chemical reactors is quite straightforward but it does, unfortunately, not cover all the practical applications. For example, we have to consider that the lumps stay independent of each other which is not always the case. Imagine that you put your reactants inside a vessel with extremely vigorous mixing. They will instantaneously be mixed and averaged out inside the vessel whereas our model requires that we have a lot of microscopic lumps mixing independently of each others in the reactor. The difference may seem very small at first, but for some reaction kinetics it can lead to substantial divergence in the computed conversion efficiency. As a rule of thumb, our model will be valid for models where the reaction speed is faster than the mixing time constants. For example, medium and fast kinetics inside a slow mixing reactor. It will not work with slow kinetic reaction inside a vigorously mixed reactor. Please note that mixing time constants will depend on the viscosity of the reactants and so syrups will have larger mixing time than water-like mixtures.

But how does one compute the RTD curve for a given reactor vessel? Solving the fluidic equations, even using computer software, would be too tedious due to the high complexity of the flow patterns. One of the best way used by chemical engineers is to simply try on a physical model of the vessel! If we insert a pulse of non-reactive tracer at the entrance of the reactor and measure the tracer concentration at the output, we will get a broadened curve which is exactly the RTD of the reactor. This is represented on Figure 3.

The tracer pulse can be seen as a large number of microscopic lumps of tracer which will take different path through the reactor vessels. By measuring the concentration of tracer at the exit, we directly have a signal that is proportional to the percentage of lumps that stayed for that much time inside the reactor. Normalizing the curve such that its area will give a 100% distribution is then simply the residence time distribution curve.

Mathematically speaking, we have

where δ(t) is the Dirac pulse and e(t) the residence time distribution. As a consequence,

or assuming that each lump goes through the sensor only once

which is the normalized tracer signal at exit.

This is fine for a mind experiment but in practice generating a true Dirac pulse is impossible: we would have to produce an infinitely high concentration peak for an infinitely small period of time. In practice, the peaks are much broader and so is the tracer output at exit. To find the true RTD curve, we have to unconvoluate the tracer signal at input and output.

There are several simplified models available for the chemical engineer that estimates an RTD curve based on simple geometrical properties of the tracer readings. One of them is the *Tanks-in-Series* model developed by MacMullin and Weber in 1935. It has many advantages that I will describe in the rest of this post and only requires you to know the geometrical mean and variance of the tracer curves at input and output. If ∆µ is the difference of the geometrical means of the tracer curves at input and output and ∆σ² the difference of the geometrical variances of tracer curves at input and output, MacMullin and Weber say that that the reactor vessel can be approximated by N consecutives perfectly stirred tanks reactors where

and for which the RTD curve is

recalling that the geometrical mean and variance of a signal y(t) can be obtained using

I will describe more friendly looking functions later because these ones look pretty scary in a first place. However, remember that all you have to do is to compute the value for each time t based on the geometrical means difference ∆µ and equivalent number of tanks N computed from the geometrical variances and means. To help you with that you can use any software you like, including Microsoft Excel.

Once you have an estimated RTD curve, you can convolute it with your tracer signal at input to compare the output predicted by the model and the actual output observed. I have plotted my results on Figure 4 so that you can see how well the Tanks-in-Series model performs.

I would now like to give more details on how this model can be derived. I originally tried to look for the original paper of MacMullin and Weber but failed to find it online and so I tried to dig up the maths a little bit on my own. As I am not a mathematician, I cannot guarantee that the following derivations are a 100% correct. However, they give the exact same results of the original conclusions of the Tanks-in-Series model and also give a justification of the additivity principle that makes this model really nice.

To understand how the Tanks-in-Series model does its job, let us first look at what is exactly a perfectly stirred tank reactor. Figure 5 gives the traditional schematic of a stirred tank reactor of volume V, flow rate Q and input/output concentration of C_{in} and C_{out} respectively.

In a perfectly stirred tank reactor, fluid of tracer concentration C_{in} is continuously pumped to the reactor with a flowrate Q. What makes it “perfect” is that we consider that the mixing is ideal and the inlet stream is immediately distributed in the whole reactor volume. Because the reactor operates at constant volume, the exit stream has the same flowrate Q and the output concentration of tracer is the concentration inside the reactor volume (due to the ideal mixing hypothesis).

Put into equations, we have

Defining T the time constant of the reactor as V/Q, we have,

which can be solved using a Laplace Transform,

and so the transfer function is

As a first conclusion, we can say that a perfectly stirred tank reactor can then be seen as a low pass filter of time constant T. Any tracer input of distribution C_{in} will be transformed into an output distribution C_{out} through the transfer function E which is nothing but the RTD of this reactor. Indeed,

which is the exact definition of the RTD that I gave earlier.

Working in the Laplace space has many advantages because putting N perfectly stirred tanks reactors in series consists of simply multiplying their transfer function E(p). N tanks in series will then have a transfer function E_{N}(p) of

This is represented on Figure 6 with five tanks in series and the RTD profile at each exit.

If you have Matlab/Simulink at home (there are hobby version licences of the professional product for just about 100 EUR), you can use this to simulate the mixing of your chemical reactor once you have identified a value of N. For example, the results of Figure 4 where obtained using a transfer function block applied to a “From File” source block that loaded the actual tracer input curve from a data file. Refer to Figure 7 for connecting the blocks.

Also, you don’t have to compute the expression for the transfer function yourself, just call the following function from Simulink:

**function** coeffs = get_tf_coeffs(T, N)
k = 1:N;
coeffs = fliplr([1 cumprod((N-k+1) ./ k) .* (T/N) .^ k]);

where T is the geometrical mean value obtained and N the number of tanks of the model.

Ok but let us go back to our business. How can we relate E_{N}(p) to the geometrical mean and variance of the signal? To do so, I will proceed in two steps. I will first demonstrate the relation from a Dirac pulse of tracer and then show that the model is additive.

If we apply the transfer function E_{N}(p) to a Dirac pulse at entrance, we know that the output tracer function will be the expression of the RTD curve e_{N}(t) and so the mean and variance will be

Because we have (from the integration property of the Laplace Transform and the final/initial value theorem)

where A(p) is the Laplace Transform of the signal a(t), we may write

By using the property

where A(p) is the Laplace Transform of the signal a(t), we may now write

Since our model has the form

we obtain

and

By replacing in the limit equation for the mean and variance we obtain

and so

From this we obtain two very important results. (1) The time constant T of each tank should be equal to the mean residence time µ divided by the number of tanks N and (2) the number of tanks can be obtained by dividing the square of the mean residence time µ by the variance of the E curve. These two results are exactly those obtained originally by MacMullin and Weber in 1935.

But this is only valid for a Dirac pulse input and not for an any-shape, real, tracer inlet. Let us now prove that the tanks in series model is additive. To understand this, consider a Dirac pulse entering a first reactor of N_{1} tanks and then a second reactor of N_{2} tanks. The situation is represented on Figure 8.

We know that

and

or, using the Laplace Transform,

for which

and so

where µ_{2} is the geometrical mean that would have been obtained from a Dirac pulse applied to the reactor with N_{2} tanks.

The same can be done for the variance,

with

Due to the symmetric aspect, let us focus on the first term

and

and so

where σ_{2} is the geometrical standard deviation that would have been measured by applying the Dirac pulse directly to the reactor of N_{2} tanks.

In our experience, N_{1} is due to the injection pattern and what we are interested in is N_{2} and so µ_{2} and σ_{2}. We can use the additivity on the mean and variance obtained previously to give

and so

which justifies the approaches of subtracting the mean and variance of tracer response at the inlet and outlet of the reactor.

And that is all!

Please note that the additivity principle can be used in much different cases such as in recirculation reactors or when combining two existing vessels.

I hope you now better understand the tanks in series model and how it can help you to characterize your chemical reactors. In forthcoming posts, I will come back on more experimental aspects by presenting different reactor designs and how they perform but I first wanted that the model I will use is fully described and understood. Also, I took great pleasure of digging the mathematical aspects of the theory and hope that you have enjoyed it as well.

[⇈] Top of Page**You may also like:**

[»] Solving Chemical Equilibria on the Computer

[»] In-line Absorption and Fluorescence Sensor