Section 4.4.10: Towards Process Simulation

Build a material and energy balance model for a tank with water flows in and out.

Tank is assumed to have non-constant cross section: sloping sides.

Gravity outflow model should be modified, and expressed in terms of level instead of holdup. Therefore we need tank geometry equations.

Energy balance introduces energy and enthalpy. Temperature is a more convenient quantity to specify, and to express thermal equilibrium. Hence thermodynamic and physical property equations are needed.

See section 4.4.10.1, `Material and energy balance for a tank'.

Modelling strategy

Write equations which describe the process. Aim for a logical grouping of equations:


Choosing specifications

Also tracking whether we have suitable modelling equations.

For each equation

Choose something sensible. If there are no suitable `unsolved' candidates, go back to where there was a choice, make a different choice and repeat from there. If making a different choice further back is not possible, consider whether the new equation repeats earlier information.

When all modelling equations have been written there will generally be some `unsolved' variables left. This is because there are usually more variables than equations in the basic model of a unit. The remaining degrees of freedom in the model can be satisfied by specifying the variables which are left on the `unsolved' list.

Dynamic DAE models

For a dynamic model you get a DAE system.

In counting equations and variables exclude the independent variable (time).

Apply the following `ticking off' rule for the ODEs in a DAE system:

For an ODE $\frac{dx_i}{dt} = f({\bf x,y},t)$
always tick off the differential variable xi.

This ensures that the specifications obtained from the final unsolved variable list do not cause a difficult (high index) DAE system.

Initial conditions

The ticking-off rule for ODEs also means that if we replace the ODEs with `standard' initial conditions at t0, the AEs can still be ticked off in exactly the same way, because if we replace

\begin{displaymath}\frac{d{\bf x}}{dt} = {\bf f}({\bf x,y},t) \end{displaymath}

with
\begin{displaymath}{\bf x} - {\bf x}(0) = 0 \end{displaymath}

then the latter standard ICs must be ticked off for the differential variables x.

It is always safe to use standard ICs for a well-behaved DAE, but not always convenient.

E.g. do we really know the initial holdup and internal energy in the tank? Liquid level and temperature might be preferable for ICs.

Alternative ICs

In a DAE system it may be acceptable to give ICs for some of the algebraic variables instead of differential variables, as long as

Two checks

Having constructed a model, including proposed specifications and initial conditions, you should perform two checks.

Check 1 verifies that the DAE system with standard ICs is well-behaved (not high index).
Check 2 verifies that the proposed ICs are in some sense equivalent to the standard ICs for x.

In the event of a problem ..

If check 1 fails, the specifications and perhaps the modelling equations themselves need to be re-examined.
If check 1 succeeds but check 2 fails, you need different ICs.
The standard ICs can always be used.

An important distinction

It is important not to confuse specifications and initial conditions. Specifications are valid throughout the simulation: for example F1, T1, p. ICs are valid only at the starting point t0: for example L, T.

Never try to give ICs for the same variables as specifications.

Discussion

The tank with material and energy balances is perhaps the simplest non-trivial dynamic process model.

General modelling must also take account of composition dynamics, where there is more than one chemical component.
Thus we should also have equations for the individual component balances. The `well mixed' assumption requires extra equations equating concentrations in the outlet stream to those in the tank.

More complex models (e.g. for an enclosed vessel) should introduce the possibility of multiple phases (e.g. vapour + liquid), with some way of relating them (e.g. phase equilibrium or a mass transfer model).

Then there is an endless range of possible reactor models!

DAE formulation fits well with the `equation-based approach' to process simulation, which at steady state views the process model as a system of NLAEs:

\begin{displaymath}{\bf g}({\bf y}) = 0 \end{displaymath}

It is natural to extend such simulators to dynamics by adding discretisations of ODEs. These are often implicit, to cope with potentially stiff dynamic flowsheet simulation problems. Hence the DAE approach.

Conclusion

`Sequential modular simulators' view the process as a collection of unit operations. Each unit is solved independently in sequence (or nowadays sometimes in parallel). This approach may lend itself more to the ODE formulation for some (simple) units, and a DAE approach in others.

The nested iterations of the ODE method may be slower, but also tend to converge more reliably, than the simultaneous solution of the DAE method.

Summary




Return to Section 4.4 Index
Return to Section 4 Index

Course Organiser
Last modified: Thu Aug 6 10:34:43 BST