A complete discussion of *how to develop chemical engineering models*
is really an complete course in chemical engineering, with practical
experience besides! The objective of this section is thus only to
show that there is a *good*, as opposed to a bad, way of constructing
models. If this approach, which is systematic, is followed, then,
assuming that the model builder's chemistry, physics and chemical engineering
understanding of the process being modelled is correct, then there is a
better chance than otherwise that the final model will be correct.

The basis of this approach to model building is that the equations which constitute a model are not arbitrary mathematical entities, but have a consistent physical basis. There are certain types of equation which describe different aspects of a model. A knowledge of this helps to ensure that all equations are written down.

Another point is that the set of model equations should be written
without regard to how they might be solved. A confusing feature of
some of the classical textbooks in chemical engineering is that the
author, who knows the answer he wants to reach, slips steps in the
solution process in amongst the construction of the model. The way
to avoid confusion is to write all the equations down
** without attempting
to perform any algebraic manipulation or simplification.**

This section might therefore be subtitled: *How to avoid algebra*.
The final models may be less elegant than those in some text books,
but the computer will have no difficulty in solving them.

This is the first thing to do in attempting to model any system. Write
down, conveniently on the diagram, but also separately with definitions,
units etc., all the quantities which you can identify, assigning each an
appropriate symbol. This helps to ensure that you identify and understand
all the **variables** in the problem. Also identify any quantities
which you expect to know or be able to choose, such as dimensions, physical
properties or known feeds.

The figure below shows a tank whose outflow, through a pipe in the base of the tank, depends on the level in the tank. Two feeds are shown, but these are assumed to be of the same material.

Known quantities:

- known mass flow rates (e.g.*F1, F2*) into the tank*kg/s*- tank cross section area,*A**m2*- - fluid density,
*kg/m3*

Unknowns:

- mass holdup (e.g.*M*) in the tank at any instant in time*kg*- mass flowrate out of the tank*L*- level (e.g.*h*) in the tank*m*

Other variables will be found to be necessary as we proceed with building the model. These can just be added to the list.

**Balance equations** are the most fundamental type of equation, and have
the advantage that we know exactly how many there must be in any problem.
About every element which we model, there will be
one material balance for each chemical species of interest present, and,
if temperature
effects are being modelled, one energy balance.

In this case we have one species and no temperature effects. We are modelling a single element, namely a tank, and so there is one balance equation.

- This is an unsteady state or dynamic (i.e. time varying) system, so the balance equations are ordinary differential equations.
- These must have the form:
- In this equation
*quantity***must**be an extensive quantity, e.g.etc.*kg, moles, Joules***Do not try to write so-called material balance equations involving temperatures or concentrations.** - Flowrates must similarly be
, etc.*kg/s, kmol/hr, Watts*

The flowrates on the r.h.s. of the material balances are typically determined
by rate equations which relate them to some **driving force**
or potential variables. Here for example:

There must be a rate equation for **every** unknown material or energy
flowrate which appears in a balance equation.

In the above equation there are some new variables to add to the list.
** Cd** and

The general form of a rate equation is usually:

In this context we give this name to the class of equations which relate intensive thermodynamic quantities to each other and to extensive quantities. A classic equation of state (e.o.s.) is the ideal gas equation, which does not however apply here. It relates intensive temperature and pressure and extensive molar amount.

We look here for an e.o.s. which relates the intensive potential
variable ** P** introduced above to an extensive holdup variable, or
more generally, a relationship amongst several such variables.

Note first that:

And also that:

Equations of state are sometimes not entirely obvious to identify, and they sometimes, as here, introduce further variables. Their general form is:

If the model has been correctly formulated then there will be the same number of equations and unknowns.

There are 4 equations above. The unknowns in summary are ** M, h, L,
P**.
Hence the model appears to be correct.

Notice that there are three categories of equation:

- Balance
- Rate
- EOS

There are also three kinds of variable:

- Extensive holdups
- Extensive rates
- Intensive potentials

The balance equations involve holdups and rates, the rate equations rates and potentials, and the e.o.s. potentials and holdups. This establishes a circular relationship as shown in the figure.

*R = k CA CB V*

Since the feed rate of ** A** is not an unknown there is only
one rate equation.

There are thus, so far, 4 equations in 7 unknowns:
*mA, mB, mC, R, CA, CB and V*

As before the first thing to do is to draw a diagram of the process as shown below.

Unknown Quantities : *C, H, T, qc, qs, qw*

The objective of the exercise is to obtain equations so that **all**
the above
quantities can be calculated.

*C = W - S*

There is a single energy balance differential equation:

In the 5 equations above the 6 unknowns are : *C, H, qc, qs, qw,
T*

One further equation is needed.

The temperature in the tank, ** T**,
is related to the total enthalphy by the equation of state:

*H = M Cp T*

Next - Section 4.3: Differential Algebraic
Equation Systems

Return to Section 4 Index