Lecture 2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 30

Modeling, Simulation and Optimization

for Chemical Engineering


for

CH3133- CC01 and CC02


Ho Chi Minh City University of Technology
TABLE OF CONTENTS
Types of modeling equations

Examples of solving ODE

Conservation principles

Types of Modelling Equations


Assumptions

Course: Modeling, Simulation and Optimization for Chemical Engineering


Types of modeling equations

algebric equation with one ore more variables


Algebraic
equations (AEs)

Modelling Ordinary Differential equation with only one independent variable


differential
Equations equations (ODEs)

Partial differential equation which imposes relations between the various


partial derivatives of a multivariable function
equations (PDEs)

Course: Modeling, Simulation and Optimization for Chemical Engineering


Solution of ODE(Mixing Salt and Water without Changing Volume)
A tank which is initially filled with 15kg of salt dissolved in 3000L of water. Brine, at a
concentration of 20 grams per litre (0.02kg/L), is flowing into the tank at a rate of 10 litres per
minute. It is thoroughly mixed with the solution that's already in the tank. At the bottom of the
tank, there is a pipe which is draining the mixed solution at the same flow rate as the brine
flowing in. How much salt is in the tank after 1 hour?

10 L/min

0.02 Kg/L

3000 L

y0=15 Kg 10 L/min
Rate out=?

Course: Modeling, Simulation and Optimization for Chemical Engineering


Solution of ODE(Mixing Salt and Water with Changing Volume)
A tank which is initially filled with 15kg of salt dissolved in 3000L of water. Brine, at a
concentration of 20 grams per litre (0.02kg/L), is flowing into the tank at a rate of 5 litres per
minute. It is thoroughly mixed with the solution that's already in the tank. At the bottom of the
tank, there is a pipe which is draining the mixed solution at the same flow rate as the brine
flowing in. How much salt is in the tank after 1 hour?

10 L/min

0.02 Kg/L

3000 L

y0=15 Kg 5 L/min
Rate out=?

Course: Modeling, Simulation and Optimization for Chemical Engineering


Solution of ODE(Mixing Salt and Water with Changing Volume)
let y(t) be the amount of salt in the tank at any given time, t. At any time, the rate of change of salt dy/dt is
the difference between the rate salt coming into the tank to the rate of salt leaving the tank.

Now the rate of salt coming into the tank is simply the concentration of the brine by the flow rate of the
solution

The rate of salt leaving the tank, after being thoroughly mixed is similarly, the concentration of the
solution by its flow rate

Course: Modeling, Simulation and Optimization for Chemical Engineering


Solution of ODE(Mixing Salt and Water with Changing Volume)
we have a differential equation depicting the rate of change of salt in our tank

Course: Modeling, Simulation and Optimization for Chemical Engineering


Solution of ODE(Mixing Salt and Water with Changing Volume)

Course: Modeling, Simulation and Optimization for Chemical Engineering


Solution of ODE(Mixing Salt and Water with Changing Volume)

Course: Modeling, Simulation and Optimization for Chemical Engineering


Solution of ODE(Mixing Salt and Water with Changing Volume)

Course: Modeling, Simulation and Optimization for Chemical Engineering


Solution of ODE(Mixing Salt and Water with Changing Volume)
Now that we have the general solution, let's apply the initial condition where we start
with 15 kg in the 3000 L tank. So, at time 0
Solution of ODE(Mixing Salt and Water with Changing Volume)

60 120𝑡 + 0.1𝑡 + 9000


𝑦 𝑡 =
Amount of salt (kg)

50 600 + 𝑡

40

30

20

10

0
0 50 100 150 200 250 300 350
Time (t)

Course: Modeling, Simulation and Optimization for Chemical Engineering


Modeling Conservation Equations
The Conservation principle
Fundamental relations: mass, molecules, energy and momentum.
Describes rate of change of the properties in the system.

𝑔𝑒𝑛 𝑜𝑢𝑡
𝑖
(or 𝑐 𝑜𝑛 𝑠 )

𝑖𝑛 = rate of an entity (mass or energy) entering the system


𝑜𝑢𝑡 = rate of an entity leaving the system
𝑔𝑒𝑛 = rate of an entity generated (or 𝑐𝑜𝑛𝑠 consumed) inside the system (reaction)
= amount of an entity change within the system at any point in time (accumulation)
Course: Modeling, Simulation and Optimization for Chemical Engineering
Modeling Conservation Equations

General conservation principle equation

In terms of unit time

Course: Modeling, Simulation and Optimization for Chemical Engineering


Modeling Conservation Equations

The Conservation principle


The liquid tank system:
• The liquid tank system consists of a single tank with
liquid inlet and outlet and a liquid level that may be
desired to be specified.
• A system of two or more liquid tanks can be arranged
such that they are interacting with one another.
• The flow rate entering and leaving the tank is usually defined as volume flow rate.
• Liquid tank system are usually non-reactive.
• Liquid tank system may be equipped with heating or cooling mechanism.

Course: Modeling, Simulation and Optimization for Chemical Engineering


Modeling Conservation Equations

The Conservation principle


Mass Balance of non-reactive system: 𝑚
𝑚 𝑖𝑛 𝑔𝑒𝑛 𝑚 𝑜𝑢𝑡
(or 𝑐𝑜𝑛𝑠)

Mass is neither generated nor destroyed

𝑑𝑚
= 𝑚 , + 𝑚 , − 𝑚 , − 𝑚 ,
𝑑𝑡

𝑑𝑚
= 𝑚 , − 𝑚 ,
𝑑𝑡

Course: Modeling, Simulation and Optimization for Chemical Engineering


Modeling Conservation Equations

• The Conservation principle F0


ρo
• Mass Balance of non-reactive system:
ρ V
• Example 1:
Consider a tank of perfectly mixed liquid. A liquid stream F
with density of ρo feeds the tank at a volumetric rate of Fo. ρ
The liquid volume holdup of liquid in the tank is V, and its
density is ρ.The volumetric flow rate outflow from the tank
is F. Because the liquid inside the tank is perfectly mixed,
with liquid density of the outflow from the tank is similar as
the density of liquid holdup inside the tank.
Course: Modeling, Simulation and Optimization for Chemical Engineering
Modeling Conservation Equations

• The Conservation principle


• Mass Balance of non-reactive system: Example 1: Solutions

𝑜 𝑜

If constant,
𝑜
Approx. 25% of
the tank volume
Simulation: Tank H = 1 m and D = 0.4 m,
Fo = 500 mL/min and F = 0.02V.
Then over time (say 60 minutes) the
volume of liquid inside the tank is going to
reach a steady state volume of 0.031 m3.
Course: Modeling, Simulation and Optimization for Chemical Engineering
Modeling Conservation Equations

The Conservation principle


Mass Balance of non-reactive system:
In the previous example, what happens if there is
no outlet flow?

𝑑𝑚 Simulation:
= 𝑚 , Tank H = 1 m and D = 0.4 m,
𝑑𝑡 Fo = 500 mL/min.
Time to tank overflow = 250 minutes.
Assuming 𝑜 , then 𝑜

Course: Modeling, Simulation and Optimization for Chemical Engineering


Modeling Conservation Equations
The Conservation principle
Mass Balance of non-reactive system:
What happens if there is only outlet but no inlet flow?

𝑑𝑚
=− 𝑚 ,
𝑑𝑡

Assuming 𝑜 , then

How long will the tank completely dries up?


Course: Modeling, Simulation and Optimization for Chemical Engineering
Modeling Conservation Equations
F0

The Conservation principle ρo

𝑐
ρ V
𝐷2
where 𝑐 4
the cross sectional area of the tank.
Then,
F
𝑜
or, ρ
𝑑ℎ 4
𝑑 𝜋𝐷 2 𝑜

The model above describes variation of liquid height inside the tank over
time. Another way of saying this is the model describes the rate of change of
liquid height inside the tank. Model is more useful for process control of
liquid inside tank.

Course: Modeling, Simulation and Optimization for Chemical Engineering


Modeling Conservation Equations

The Conservation principle


Mole Balance of non-reactive system:

𝑁𝐴,1
𝑁𝐴,3
𝑁
𝑁𝐴,2 𝑁𝐵,3
𝑁𝐵,2

𝑑𝑁
= 𝑁 , + 𝑁 , − 𝑁 , − 𝑁 ,
𝑑𝑡

𝑑𝑁𝐴
= 𝑁𝐴,1 + 𝑁𝐴,2 − 𝑁𝐴,3
𝑑𝑡
Course: Modeling, Simulation and Optimization for Chemical Engineering
Modeling Conservation Equations

The Conservation principle


Mole Balance of non-reactive system:
Example 2:
Consider a tank of perfectly mixed liquid. A liquid feed stream with volumetric flowrate
F1 containing concentration of ethylene glycol (A) in water (B) is fed into a mixing tank
together with a liquid stream F2 containing a different concentration of EG in water.
The liquid volume holdup of liquid in the tank is V, and its concentration is Ci, where i =
(A,B). The volumetric flow rate outflow from the tank is F. Because the liquid inside the
tank is perfectly mixed, with liquid concentration of the outflow from the tank is similar
as the concentration of liquid holdup inside the tank.
Develop a model to describe the rate of change of ethylene glycol concentration.

Course: Modeling, Simulation and Optimization for Chemical Engineering


Modeling Conservation Equations

The Conservation principle F1 F2


CA1 CA2
Mole Balance of non-reactive system: CB1 CB2
Example 2: Solutions
C V

𝑑𝑁 F
= 𝑁, + 𝑁 , − 𝑁, − 𝑁 ,
𝑑𝑡 CA
CB
𝑑𝐶 𝑉
= 𝐹 𝐶 , + 𝐹 𝐶 , − 𝐹𝐶
𝑑𝑡 Assumptions made:
𝑑𝐶 Well mixed tank.
𝑉 = 𝐹 𝐶 , + 𝐹 𝐶 , − 𝐹𝐶 Constant liquid hold-up
𝑑𝑡

Course: Modeling, Simulation and Optimization for Chemical Engineering


Modeling Conservation Equations

The Conservation principle


Mole Balance of non-reactive system:
In Example 2, the assumption of constant hold-up of liquid inside tank makes the
mathematics easy to work with.
But what if the hold-up of liquid is not constant? It means what if V is a variable.
The LHS of the model is then a derivative of 2 variables, 𝑖 and .
Here you will apply the chain rule:

𝑑𝐶 𝑉
= 𝐹 𝐶 , + 𝐹 𝐶 , − 𝐹𝐶
𝑑𝑡

𝑑𝐶 𝑑𝑉
𝑉 +𝐶 = 𝐹 𝐶 , + 𝐹 𝐶 , − 𝐹𝐶
𝑑𝑡 𝑑𝑡

Course: Modeling, Simulation and Optimization for Chemical Engineering


Modeling Conservation Equations

The Conservation principle


Mole Balance of non-reactive system:
From mass balance, it is easy to show that
𝑑𝑉
= 𝐹1 + 𝐹2 − 𝐹
𝑑𝑡
Then replacing 𝑑𝑉 in the model gives
𝑑
𝑑𝐶
𝑉 + 𝐶 𝐹 + 𝐹 − 𝐹 = 𝐹 𝐶 , + 𝐹 𝐶 , − 𝐹𝐶
𝑑𝑡
𝑑𝐶
𝑉 + 𝐹 𝐶 , + 𝐹 𝐶 , − 𝐹𝐶 = 𝐹 𝐶 , + 𝐹 𝐶 , − 𝐹𝐶
𝑑𝑡
𝑑𝐶
𝑉 =𝐹 𝐶, −𝐶 +𝐹 𝐶, −𝐶
𝑑𝑡

Course: Modeling, Simulation and Optimization for Chemical Engineering


Modeling Conservation Equations

The Conservation principle


Mole Balance of non-reactive system:
∆𝑄 ∆𝑊

𝐸𝑖𝑛 𝐸 𝐸𝑜𝑢𝑡

𝑑𝐸
𝐸̇ , − 𝐸̇ ,
𝑑𝑡

The law of conservation of energy states that energy can neither be created nor
destroyed – only converted from one form of energy to another.
Can you recall which law of thermodynamics supports this statement?

Course: Modeling, Simulation and Optimization for Chemical Engineering


Modeling Conservation Equations

The Conservation principle


Energy Balance of non-reactive system:

Example 3:
Consider a tank of perfectly mixed liquid. Water flows with volumetric flowrate
F1 and temperature T1 into a tank. The liquid volume holdup of liquid in the tank
is V, and its density is r. The volumetric flow rate outflow from the tank is F and
temperature T. The liquid volume in the tank is heated with jacketed steam
supply at Tsteam = 130oC.
Develop a model to describe the rate of change of temperature inside the tank.

Course: Modeling, Simulation and Optimization for Chemical Engineering


Modeling Conservation Equations

The Conservation principle


Energy Balance of non-reactive system:
Example 3: Solutions

Assumptions:
Well mixed tank.
Constant liquid hold-
up cp is constant.

Course: Modeling, Simulation and Optimization for Chemical Engineering


Modeling Conservation Equations
The Conservation principle
Energy Balance of non-reactive system:
It is also easy to show by mass balance that for constant hold-
up of liquid inside tank, 1 .

Then,

For heat transfer between steam and liquid inside tank,

Therefore the final model for rate of change of temperature inside the tank,

Course: Modeling, Simulation and Optimization for Chemical Engineering

You might also like