Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Problem 1 (Excel)

Drinking water is produced by partially freezing salt water to create salt-free ice and a brine solution. If
saltwater is 3.50%w salt, and the brine solution is 9%w salt, determine how many kg of saltwater must be
processed to produce 2.00 kg of ice.

Mass balance
Total balance
S=I+B
S=2+B
(1) S – B = 2
Salt balance
0.035S = 0.09B + I.0
0.035S – 0.09B = 0
(2) 0.035S – 0.09B = 0
Water balance
0.965S = 0.91B + I
0.965S = 0.91B + 2
(3) 0.965S – 0.91B = 2
Problem 2 (Excel and Matlab)

A liquid mixture containing 31%w benzene (B), 34%w toluene (T), and 35%w xylene (X) is fed to a
distillation column operating at steady state. Product streams emerge from the distillate, middle fraction,
and underflow of the column. The distillate contains 91%w X and 7%w T, middle fraction contains
88%w T, 8%w X, and the underflow contains 96w% B and 3%w T. The volumetric flow rate of the feed
is 2000 liters/h and the specific gravity of the feed mixture is 0.872.

(a) Determine the mass flow rate of the distillate in kg/h (b) mass flow rate of benzene, toluene, and
xylene in the underflow, middle fraction, and distillate (c) calculate the distillate flow rate (kg/h)
produced by 10,000 L/day of feed (d) the ratio (kg distillate/kg feed)

Mass flow rate


M = 2000 L/hr × 0.872 kg/L = 1744 kg/hr

Mass balance
Total balance
(1) D + M + U = 1744
Benzene balance
(2) 0.96U + 0.04M + 0.02D = 1744×0.31 = 540.64
Toluene balance
(3) 0.03U + 0.88M + 0.07D = 1744×0.34 = 592.96
Xylene balance
(4) 0.01U + 0.08M + 0.91D = 1744×0.35 = 610.40
Problem 3 (Excel)

A first order reaction is governed by A → B and has rate


dCA
=−k C A
dt
Where CA is the concentration (kmol/m3), t is time, and k is a rate constant. The initial concentration is
CA0 = 5 kmol/m3, and k = 1 s-1.

Solve for CA(t) two ways: (1) analytically by separating variables and integrating; (2) using the Explicit
Euler method. For the Euler method, evaluate the rate (RHS function) at time n, then solve the whole
equation for values at time n+1.
d C A C A −C A
≈ n+ 1
=f ( C A )C A =f ( C A ) ∆ t +C A =(−k C A ) ∆t +C A
n

dt t n+1−t n n n+ 1 n n n n

Plot the two versions of CA(t) on the same plot. Label and format the plot including axis labels, and
legends so that you can clearly communicate the solution. Use a time step size of ∆ t = 0.5 s and plot to tend
= 7 s (14 steps)

Problem 4(1-3) (Matlab)

1. A biomass growth of a certain bacterial species is governed by the reaction rate:


dX
=µX
dt
Where X is the biomass concentration (g/L), t is time, and µ is the specific reaction rate. The initial
concentration of the bacteria is X0 = 2 g/L, and k = 1 s-1.

Plot the X(t) versus t graph. Label and format the plot including axis labels, and legends so that you can
clearly communicate the solution.

2. Solve the differential equation:


dY 2
=Y
dt
Where initial condition: Y0 = 0.15
Plot the Y(t) versus t graph. Label and format the plot including axis labels, and legends so that you can
clearly communicate the solution.

3. Solve the differential equation:


dY 2
=Y +Yt
dt
Where initial condition: Y0 = 1.5×10-14
Plot the Y(t) versus t graph. Label and format the plot including axis labels, and legends so that you can
clearly communicate the solution.
Problem 5 (Matlab)

For consecutive reactions:


A K 1B K2C
→ →

Follows the rate equation given below:


d[A]
=−k 1 [ A]
dt
d [B]
=k 1 [ A ]−k 1 [B ]
dt
d [C ]
=k 2 [B]
dt

Where [A], [B], [C] is the concentration (kmol/m 3), t is time, k1 and k2 are the rate constants. The initial
concentrations are is [A0] = 5 kmol/m3, [B0] = 5 kmol/m3, [C0] = 0 kmol/m3, k1 = 0.5 s-1, and k1 = 0.3 s-1

Plot the [A], [B], [C] versus t graph. Label and format the plot including axis labels, and legends so that
you can clearly communicate the solution.

2D plotting
Problem 6

Damped oscillation equation: y=e−at sin(bt)


Where, a = 1, b = 1, t (initial: 0, final: 20, interval: 0.1)
Plot the y versus t graph. Label and format the plot including axis labels, and legends so that you can
clearly communicate the solution.

Problem 7

Plot the data included in the table:


a 1 2 3 4 5 6 7 8 9 10
b 1 4 5 7 8 9 2 4 5 6
c 1 2 7 5 6 4 2 3 4 7
Plot the b versus a graph overlapped with c versus a graph. Label and format the plot including axis
labels, tittle, and legends so that you can clearly communicate the solution.

3D plotting
3D Line plot:

Problem 8 (Matlab)

t (initial: 0, final: 10π, interval: π/50)


s(t) = sin(t)
c(t) = cos(t)
Problem 9 (Matlab)

t (initial: 0, final: 40π, interval: π/500)


x(t) = ¿
y(t) = sin ( √ 32t )
z(t) = ¿

3D plotting
3D surface plot:

Problem 10 (Matlab)

x (initial: -2, final: 2, interval: 0.25)


y=x
2 2
F = X e− x − y

Problem 11 (Matlab)

x(initial: 1, final: 10, interval: 0.5)


y(initial: 1, final: 20, interval: 1)

Z = sin(x) + cos(y)
C = xy

Problem 12 (Matlab)

{
xb ,∧x< 5
y=f ( x )= a √ x ,∧x=5
2

2c
,∧x >5
x
Where , a=7 , b=12,∧c=21

Solve the equation using conditional coding using Matlab. Use function that takes any independent
variable as an input and returns the output y or f(x) depending on the value of x as conditions given in the
equation.

Problem 13 (Matlab)

Write a Matlab code using for loop to calculate the summation of consecutive numbers from 1, 2, ….., 49,
50.

Problem 14 (Matlab)

Write a Matlab code to calculate 7! using for/while loop.

You might also like