Professional Documents
Culture Documents
Mathematical modeling
3.1 Introduction
17
18
3. Use the Balance law for the physical balances in the system,
and define eventual additional conditions. The Balance law is
as follows:
The rate of change of “material” in the system is equal to net flow of
“material” into the system.
Here “material” is a general term which represent for example
energy, mass, momentum, or population. Net flow is the sum of
inflow minus the sum of outflow plus generated “material” within the
system (for example certain chemical reactions generate energy). The
Balance law is illustrated in Figure 3.1.
Accumulated Net
Net inflow "material" outflow
Generated
d(“material”)
= inflows − outflows + generated (3.1)
dt
The Balance law results in one ore more differential equations due to
the term d/dt.s
Additional conditions are in the form of requirements to values of
certain variables in the system, e.g. that the mass of liquid in a tank
can not be negative.
19
Inputs Output
u1
y
u2 System
The Balance law (3.1) applied to a mass system becomes a mass balance:
dm(t)
= Fi (t) (3.2)
dt
i
where m [kg] is the mass, and Fi [kg/s] is mass inflow (no. i). t [sec] is the
time argument.
Figure 3.3 shows a liquid tank with inflow and outflow. The density is the
qi [m3 /s]
h [m]
V [m3]
m [kg]
[kg/m3]
0
qu [m3 /s]
A [m2]
same all over, in the inlet, the outlet, and in the tank. We assume that the
tank has straight, vertical walls. The symbols in Figure 3.3 are as follows:
qi is volumetric inflow. qo is volumetric outflow. h is liquid level. A is cross
sectional area. V is liquid volume. m is mass. ρ is density. The flows qi
and qo and the mass m in the tank are variables. The parameters A and ρ
are assumed to be constant.
We insert this into the mass balance (3.3), which then becomes
dh(t) 1
= ḣ(t) = [qi (t) − qo (t)] (3.6)
dt A
with the condition hmin ≤ h ≤ hmax .
Figure 3.4 shows an overall block diagram for the model (3.6). qi and qo
are input variables, which generally are variables which drive the system
(we assume here that qo is independent of the level, as when it is
manipulated using a pump). h is an output variable, which generally is the
variable which expresses the response or a state of the system. Note that
qo is an input variable despite it represents a physical output (outflow)
from the tank!
qo hi nit
hmax
qi . h
×
D IV
h
÷
A hmin
Figure 3.5: Example 3.1: Block diagram for the model (3.6)
Figure 3.6: Example 3.1: Simulator of the level h(t) in a liquid tank
simulator (see the figure). The time response is as expected: The level is
steadily increasing when the inflow is larger than the outflow, it is constant
23
when the inflow and the outflow are equal, and the level is decreasing when
the inflow is smaller than the outflow.
Figure 3.7 shows a stirred blending tank where the material A is fed into a
tank for blending with a raw material.
Mixer
V [m3]
cA [mol/m3 ]
Product cA
q
The symbols in Figure 3.7 are as follows: V is the liquid volume in the
tank. q is the volumetric inflow of the raw material. q is also the
volumetric outflow. cA is the mole density or concentration of material A
in the tank. wA is the mole flow of material A.
d [V cA (t)]
= wA (t) − cA (t)q(t) (3.7)
dt
By taking V (which is constant) outside the differentiation and then
dividing by V on both sides of the equation, we get the following
differential equation for cA :
dcA (t) 1
= ċA (t) = [wA (t) − cA (t)q(t)] (3.8)
dt V
with the condition cA ≥ 0.
Figure 3.8 shows an overall block diagram of the model (3.8). wA and q
are input variables, and cA is the output variable.
wA
cA
Blending
tank
q
Figure 3.8: Example 3.2: Overall block diagram for stirred blending tank
cA 0
wA .
× cA cA
DIV
÷ cA,min
V
qcA
MULT
q
Figure 3.9: Example 3.2: Mathematical block diagram representing the model
(3.8)
where E [J] is the thermal energy, and Qi [J/s] is energy inflow no. i. t
[sec] is the time. The energy E is often assumed to be proportional to the
temperature and the mass (or volume):