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

PRACTICE N°2

PROCESS SIMULATION
Professor: M.Sc. Chem. Eng. José Luis Zamorano Escalante
Professor’s Assistant: Roberto Jaime Zubieta Orihuela
Digital publication date: October 18th 2022
Presentation date: 72 hours before the first examination
Submit method: Documents delivery to coordinate.
MATLAB files by subject’s CLASSROOM submission

EXERCISE #1
Solve the following problem over the interval from x = 0 to 1 using a step size of 0.25 where y(0) = 1.
Display all your results on the same graph using legend.
𝑑𝑦
= (1 + 2𝑥) 𝑦
𝑑𝑥
a) Analytically.
b) Using Euler’s method.
c) Using Heun’s method.
d) Using the fourth-order RK method.

EXERCISE #2
A spherical tank has a circular orifice in its bottom through which the liquid flows out (see figure). The
flow rate through the hole can be estimated as:

𝑄 = 𝐶𝐴 2𝑔ℎ
Where:
Qout = outflow (m3/s), C = an empirically derived coefficient, A = the area
of the orifice (m2), g = the gravitational constant (= 9.81 m/s2), and h = the
depth of liquid in the tank. Use one of the numerical methods described in
this chapter to determine how long it will take for the water to flow out of a
3-m diameter tank with an initial height of 2.75 m. Note that the orifice has a
diameter of 1 ¼ inches, use values of C from 0.45 to 0.75 (at least five).
At least 2 different methods must be used to solve this exercise, showing tables and a graph, define your
own step size value.
EXERCISE #3
Figure shows the kinetic interactions governing the
concentrations of a bacteria culture and their nutrition source
(substrate) in a continuously stirred flow-through bioreactor.
The mass balances for the bacteria biomass, X (gC∕m 3), and
the substrate concentration, S (gC/m 3), can be written as:
𝑑𝑋 𝑆 1
= 𝑘 , −𝑘 −𝑘 − 𝑋
𝑑𝑡 𝐾 +𝑆 𝜏
𝑑𝑆 1 𝑆 1
=− 𝑘 , 𝑋 + 𝑘 𝑋 − (𝑆 − 𝑆)
𝑑𝑡 𝑌 𝐾 +𝑆 𝜏

Where:
t = time (h), kg,max = maximum bacterial growth rate (/d), Ks = half-saturation constant (gC/m3), kd = death
rate (/d), kr = respiration rate (h), Q = flow rate (m3/h), V = reactor volume (m3), Y = yield coefficient
(gC-cell/gCsubstrate), and Sin=inflow substrate concentration (mgC/m 3).
Simulate how the substrate, bacteria, and total organic carbon (X + S) change over time in this reactor for
three residence times:
a) τw = 20 h,
b) τw = 10 h, and
c) τw = 5 h.
Employ the following parameters for the simulation: X(0) = 100 gC/m 3, S(0) = 0, kg,max = 0.2/hr, Ks = 150
gC/m3, kd = kr = 0.01/hr, Y = 0.5 gC-cell/gC-substrate, V = 0.01 m 3, and S in = 1000 gC/m3, and display
your results graphically.

EXERCISE #4
Verify that the function x(t) is the solution to the boundary value problem.

( ( ))
a) 𝑥 = − 𝑥 + 𝑥+ , over [1, 3] with x(1)=1 and x(3)=-1.
4.335950689 − 0.3359506908𝑡 − 3𝑡 cos(𝑙𝑛(𝑡)) + 𝑡 sin(𝑙𝑛(𝑡))
𝑥(𝑡) =
𝑡

b) 𝑥 = −2𝑥 − 2𝑥 + 𝑒 + sin(2𝑡), over [0, 4] with x(0)=0.6 and x(4)=-0.1.


1 1 2 1
𝑥(𝑡) = + 𝑒 − 𝑒 cos(𝑡) − cos (𝑡) + 3.670227413𝑒 sin(𝑡) − cos(𝑡) sin(𝑡)
5 5 5 5
c) 𝑥 = −4𝑥 − 4𝑥 + 5 cos(4𝑡) + sin(2𝑡), over [0, 2] with x(0)=0.75 and x(2)=0.25.
1 19 6 4 8
𝑥(𝑡) = − + 1.025𝑒 − 1.915729975𝑡𝑒 + cos (𝑡) − cos (𝑡) − cos(𝑡) sin(𝑡) + cos (𝑡) sin(𝑡)
40 20 5 5 5

EXERCISE #5
A steady-state heat balance for a rod can be represented as:
𝑑 𝑇
− 0.15𝑇 = 0
𝑑𝑥
Obtain a solution for a 10-m rod with T(0) = 240 and T (10) = 150
a) analytically and
b) with the shooting method.

EXERCISE #6
Compound A diffuses through a 4-cm-long tube and reacts as it diffuses. The equation governing
diffusion with reaction is:
𝑑 𝐴
𝐷 − 𝑘𝐴 = 0
𝑑𝑥
At one end of the tube (x = 0), there is a large source of A that results in a fixed concentration of 0.1 M.
At the other end of the tube there is a material that quickly absorbs any A, making the concentration 0
M. If D = 1.5×10−6 cm2/s and k = 5×10−6 s−1, what is the concentration of A as a function of distance in
the tube?

EXERCISE #7
Under a number of simplifying assumptions, the steady-state height of the water table in a one-
dimensional, unconfined groundwater aquifer can be modeled with the following second-order ODE:
𝑑 ℎ
𝐾ℎ +𝑁 =0
𝑑𝑥
A linearized groundwater model was used to simulate the height of the water table for an unconfined
aquifer. A more realistic result can be obtained by using the following nonlinear ODE:
𝑑 𝑑ℎ
𝐾ℎ +𝑁 =0
𝑑𝑥 𝑑𝑥
Where:
x = distance (m), K = hydraulic conductivity (m/d), h = height of the water table (m), and N =infiltration
rate (m/d). Solve for the height of the water table for x = 0 to 1000 m where h(0) = 10 m and h(1000) =
5 m. Use the following parameters for the calculation: K = 1 m/d and N = 0.0001 m/d. Set the average
height of the water table as the average of the boundary conditions.
Solve both ODEs with the shooting method and compare results.

EXERCISE #8 – OPTIONAL
Use the finite-difference approach to simulate the temperature of a heated rod subject to both convection
and radiation:
𝑑 𝑇
0= + ℎ (𝑇 − 𝑇) + 𝜎 (𝑇 − 𝑇 )
𝑑𝑥
Where: σ′ = 2.7 × 10−9 K−3m−2, L = 10 m, h′ = 0.05 m−2, T∞ = 200K, T (0) = 300 K, and T (10) = 400 K.
Use four interior nodes with a segment length of Δx = 2 m.

INSTRUCTIONS
How to submit your practice work:
 Mathematical models obtained in a document will be received at the campus, if possible include
the analytical resolution (it is valued with an additional score).
 MATLAB files must be named as follows: LastName_Names_p#.m (e.g.:
LAHOR_RUIZ_MARTIN_XAVIER_P1.M) also include your ID number as a comment.
 DO NOT USE special characters as ñ, ü, á, ó as files names.
 MATLAB files will be submitted by CLASSROOM platform, no exceptions.
 Every assumption you make MUST BE noted in your document.
 Try to use every method you’ve learned so far, shooting method will be performed with Secant
method by default but every other method will be rewarded with a higher score.
 Any questions will be answered by the assistant, do not hesitate to ask.

Roberto Jaime Zubieta Orihuela M.Sc. Chem. Eng. José Luis Zamorano Escalante
Process Simulation Professor’s Assistant Process Simulation Professor

You might also like