You are on page 1of 5

ALGORITHM

STEPS:
1. Start
2. Input values for Q_g, Q_l, k_al, k_ag, A, c_eql, c_eqg, L, Cg_in, Cl_in
and n
3. Declare flag=0
4. h= (1-0)/n
5. Input c_l1, c_l2
6. Call function PC with values Q_g, Q_l, k_al, k_ag, A, c_eql, c_eqg, L,
Cg_in, Cl_in, h, flag and once with c_l1 and once again with c_l2 for err1
and err2 respectively
7. prod=err1*err2
8. If (prod>0) then print Wrong range of input. Enter again.
9. If (prod>0) then GOTO 5
10. cl= (c_l1*err2-c_l2*err1)/(err2-err1)
11. Call PC with cl value and store the value as err
12. prod= err*err1
13. If (prod<=0) then c_l2=cl
else c_l1=cl
14. If err>0.0000001 then GOTO 10
15. In the function PC declare i, cl1, cl2, err, cg1, cg2, cg0, z
of
type double
16. i=0
17. if flag=1 then print c_l and cg0
18. cl1= c_l + h*Fl(c_l);
19. cl2= c_l + (h/2)*(Fl(c_l)+Fl(cl1));
20. c_l=cl2;
21. cg1=cg0+ h*Fg(cg0);
22. cg2=cg0+ (h/2)*(Fg(cg0)+Fg(cg1));
23. cg0=cg2;
24. i=i+h
25. If i<=1 then GOTO 17
26. if flag=1 then print cg0
27. Return err
28. print cl
29. End program

SAMPLE OUTPUT
Q_g is the flow rate of the gas phase. Enter Q_g
1
Q_l is the flow rate of the liquid phase. Enter Q_l

1
k_al is the mass transfer coefficient for liquid phase diffusion of solute. Enter k_al
0.001
k_ag is the mass transfer coefficient for gas phase diffusion of solute. Enter k_al
0.001
A is the cross sectional area of the packed bed. Enter A
0.5
c_eql is the concentration of solute in the liquid phase at equilibrium. Enter c_eql
0.05
c_eqg is the concentration of solute in the liquid phase at equilibrium. Enter
c_eqg
0.05
L is the length of the column. Enter L
1
Cg_in is the gas phase concentration at z=0. Enter Cg_in.
0.1
Cl_in is the liquid phase concentration at z=L. Enter Cl_in.
0

We assume two values for Cl_out and then use a combination of PredictorCorrector method and Regula Falsi method to compute the exact value of Cl_out.

In this program the Predictor method is Explicit Euler's Method and the Corrector
method is Crank Nicholson Method

Enter number of steps for Predictor Corrector method


10

Enter two assumptions for Cl_out keeping in mind the root bracketing condition
for Regula Falsi
1
0

At z= 0 the liquid phase concentration is 2.74924e-005


At z= 0 the gas phase concentration is 0.1

At z= 0.1 the liquid phase concentration is 2.49938e-005


At z= 0.1 the gas phase concentration is 0.0999975

At z= 0.2 the liquid phase concentration is 2.24949e-005


At z= 0.2 the gas phase concentration is 0.099995

At z= 0.3 the liquid phase concentration is 1.9996e-005


At z= 0.3 the gas phase concentration is 0.0999925

At z= 0.4 the liquid phase concentration is 1.74969e-005


At z= 0.4 the gas phase concentration is 0.09999

At z= 0.5 the liquid phase concentration is 1.49978e-005


At z= 0.5 the gas phase concentration is 0.0999875

At z= 0.6 the liquid phase concentration is 1.24984e-005


At z= 0.6 the gas phase concentration is 0.099985

At z= 0.7 the liquid phase concentration is 9.999e-006


At z= 0.7 the gas phase concentration is 0.0999825

At z= 0.8 the liquid phase concentration is 7.49944e-006


At z= 0.8 the gas phase concentration is 0.09998

At z= 0.9 the liquid phase concentration is 4.99975e-006


At z= 0.9 the gas phase concentration is 0.0999775

At z= 1 the liquid phase concentration is 2.49994e-006

At z= 1 the gas phase concentration is 0.099975

Outlet gas phase concentration= 0.0999725

Outlet liquid phase concentration= 2.74924e-005

-------------------------------Process exited after 13.44 seconds with return value 0


Press any key to continue . . .

GRAPHICAL REPRESENTATION

Plot of concentration of solute in liquid and gas phase against z(position)

Concentration of solute
Concentration
in gas phase
of solute in liquid phase

z (x/L) (non-dimensional)
Gas Conc

INFERENCE

Liquid conc

The problem given was of a counter current solute stripping operation


from the gas to liquid phase. From the graph it can be observed that the
concentration of solute in the gas phase decreases from the inlet at z=0
to the outlet at z=1. The reverse is true for the liquid phase solute
concentration. The solute concentration in the liquid phase increases from
the inlet at z=1 to the outlet at z=0. This is in concurrence with our
desired results, that the solute is stripped from the gas phase and is
absorbed in the liquid phase. The nature of the graph is linear.

You might also like