You are on page 1of 9

Homework: Designing an ON/OFF Controller for PSV installation on a

cryogenic storage tank


Instructor: Muhammad Mufti Azis, Ph.D

Liquid propane (C3H8) is stored in a cryogenic spherical tank. In this task, you supposed to design an
ON/OFF controller for a Pressure Safety Valve (PSV). Plot the pressure of the system as a function of
time. Calculate the total amount of propane that is released for 24 h.
Mechanism: the PSV opens up to vent the propane vapor when the pressure reaches 8 Bar. When the
pressure decreases to 5 Bar then the PSV is automatically closed again. The liquid propane occupies
80% of tank volume.
Following data are available:
Tank diameter: 10 m
T ambient: 40 oC
P ambient: 1 Bar
T tank is supposed to be at 0 oC
The initial gas pressure, P0, is 5 Bar
The latent heat of evaporation is 397.746 kJ/kg.
MW = 44.1 g/mol

The tank receives heat from the environment through convection.


h = 20 W/m2/K
Qin=h*Atank* (T ambient-T tank)
The heat removed through coil is assumed to be 50% of Qin

The outlet flow from the PSV follows chocked flow equation as follow:
R = 0.0082 L.atm/mol/K
Cv = 2
Sg = 0.55
T_R = (9/5*T+32)+460;
Volumetric_flow = 13.63*Cv*(P1*14.7)*(1/T_R/Sg)^0.5; % SCFM (Standard Cubic Feet per Minute)
Q = 0.471947*Volumetric_flow; % to convert it to L/s
F_out = Q/(R*273); % flow mol, mol/s
import numpy as np

import matplotlib.pyplot as plt

from scipy.integrate import solve_ivp

#%%DATA

D = 10 #m

T_amb = 40 + 273.15 #K

T_tank = 0 + 273.15 #K

P_amb = 1 #bar

P_init = 5 #bar

latent = 397746 #J/kg

Mw = 44.1 #kg/kmol

h = 20 #W/m2/K

R = 0.0082 #L.atm/mol/K

Cv =2

Sg = 0.55

T_R = (9/5 * (T_tank - 273) + 32) + 460

t_span = [0, 3600 * 24]

rho_w = 1000 #kg/m3

rho = Sg * rho_w #kg/m3

A_tank = 4 * np.pi * (D/2)**2

V_tank = 4/3 * np.pi * (D/2)**3

V_cair = 0.8 * V_tank

Qin = h * A_tank * (T_amb - T_tank)

#%%SUBROUTINE FUNCTION

marker = 1 #Marking which function the solver will use

def fun(t,f):

Vc = f[0]

Ptank = f[1]

dVcdt = - Qin/(2 * latent * rho)

global marker

if marker == 1:#CLOSE PSV


dPdt = 1/(V_tank - Vc) * (Qin * R * T_tank/(2 * latent * Mw) + Ptank * dVcdt)

if Ptank>=8:#If the pressure reach 8 bar, the func will change to marker=0

marker=0

else:

marker=1#If it's not, it will use the same func, which is marker=1

elif marker == 0:#OPEN PSV

Vflow = 13.63 * Cv * Ptank * 14.7 * (1/(T_R * Sg))**0.5 #ft3/menit

Q = 0.471947 * Vflow #L/s

Fout = Q/(R * 273 * 1000) #kmol/s

dPdt = 1/(V_tank - Vc) * (R * T_tank * (Qin/(2 * latent * Mw) - Fout) + Ptank * dVcdt)

if Ptank>5:#As long as the pressure more than 5 bar, the func will use the marker=0

marker=0

else:

marker=1#Once the pressure reach 5 bar, it will change again to marker 1

return np.array([dVcdt, dPdt])

#%%SOLVING THE PROBLEM

IC = np.array([V_cair, P_init])

sol = solve_ivp(fun, t_span, IC, method='RK23',max_step=100)

Vc_sol,P_sol = sol.y[0], sol.y[1]

t = sol.t

#%%PLOTTING GRAPHIC FOR GASS PRESSURE VS TIME

plt.figure(0)

plt.plot(t/3600, P_sol,'-m')

plt.title('Profil Tekanan Tank vs. Waktu')

plt.xlabel('Waktu, jam')

plt.ylabel('Tekanan, bar')

plt.grid()

#%%PLOTTING GRAPHIC FOR LIQUID VOLUME VS TIME

plt.figure(1)

plt.plot(t/3600, Vc_sol,'-r')

plt.title('Profil Volume Cairan Tank vs. Waktu')


plt.xlabel('Waktu, jam')

plt.ylabel('Volume cairan, m3')

plt.grid()

#%%TOTAL AMOUNT OF PROPANE RELEASE IN 24 HOURS

propane_out = (sol.y[0][0]-sol.y[0][-1])*rho/Mw #kmol

print('Total amount of propane that is released for 24h = {:^.4f} kmol'.format(propane_out))


INTERPRETASI HASIL
Sistem kontrol on/off bekerja dengan prinsip yang sederhana namun efektif. Dalam kasus
ini, sistem menggunakan Pressure Safety Valve (PSV) untuk menjaga tekanan dalam sistem
tetap dalam batas yang aman. Ketika tekanan dalam sistem mencapai 8 Bar, PSV akan terbuka
secara otomatis. Hal ini memungkinkan uap propana yang mungkin telah terakumulasi untuk
dilepaskan, sehingga mencegah tekanan berlebihan dalam sistem.

Namun, ketika tekanan turun menjadi 5 Bar, PSV akan kembali ditutup secara otomatis.
Ini adalah mekanisme yang tepat karena tekanan yang terlalu rendah juga bisa menjadi
masalah. Dengan demikian, sistem secara efisien menjaga tekanan dalam batas yang aman,
menghindari tekanan berlebihan dan terlalu rendah.

Grafik yang dihasilkan dari sistem ini mencerminkan mekanisme yang tepat. Ketika
cairan dalam tangki menguap, tekanan meningkat hingga mencapai 8 Bar, dan kemudian turun
secara signifikan saat PSV terbuka untuk melepaskan gas. Kenaikan tekanan dapat menjadi
lebih lambat jika cairan dalam tangki semakin berkurang. Selain itu, digambarkan dalam profil
volume cairan terhadap waktu yang menunjukkan tren penurunan secara linear. Dengan
demikian, sistem on/off control ini adalah alat yang efisien untuk menjaga tekanan dalam
sistem gas propana dalam batas yang aman.

You might also like