Modeling a Four Tank Pressure System using Differential Algebraic Equations
Jacob Hunter
Objectives:
To develop a working model of a four tank pressure system using differential algebraic equations.
Background:
Chemical processes are often modeled with mathematical relationships. A sufficient model must be developed in order to control the process. Many times these chemical processes are modeled with systems of ordinary differential equations (ODEs) to account for dynamic changes in mass, momentum, and energy.
However, sometimes the ODEs fall short of adequately modeling the process. In many chemical engineering processes, there exists an independent algebraic constraint. These algebraic equations arise from physical correlations or constitutive relationships. One example of an algebraic constraint occurs in a CSTR with a very fast reaction rate so that the process reaches a quasi steady state (QSS) and a steady state assumption can be made. The steady state assumption is when accumulation is assumed to be zero. The use of the steady state assumption can lead to an independent algebraic constraint.
A system of differential algebraic equations (DAEs) are a system of ODEs with an independent algebraic constraint. DAEs are most easily solved numerically. DAEPACK is a computer solver that was developed to numerically solve systems of DAEs. In order to use the DAEPACK, the user would have to supply the equations and consistent initial conditions.
DAEs
![]()
Comparison of DAEPACK model to ODE system of equations:
A simple system of ordinary differential equations can be modeled by both the DAEPACK and the Differential Equation Editor in Matlab. Both systems should give the same results. The simple ordinary differential equations are:
|
|
|
|
Then by placing both equations into both solvers and solving up until t = 50.

It turns out that the two graphs are identical as expected and both the DAEPACK and DEE can adequately model the given system of equations.
Modeling the four tank pressure system:

Differential Equations
The differential equations arise from mass balances on each of the tanks in the system..
Algebraic Constraints
The algebraic constraints arise from mass balances on the tanks circled in red. Since the volume is small, the steady state assumption can be made so that there is no pressure accumulation. Therefore, the mass that flows in has to be the same as the mass that flows out.
Flows
The air flows are modeled as being proportional to the square root of the pressure difference
Results
Given various values for the proportionality of the flow rates and the tank constants, along with changes in the valve open percentage, it is possible to get the response of the system. These results show higher order dynamics such as inverse response and nonlinearity.

This graph shows an example of inverse response and nonlinearity when the valve open percentage steps in opposite directions and then steps back to its original response with different values for the unknown constants.
Links
University of South Carolina Homepage
Engineering at the University of South Carolina