Algorithm: 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
Algorithm: 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
Algorithm: 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
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 two assumptions for Cl_out keeping in mind the root bracketing condition
for Regula Falsi
1
0
GRAPHICAL REPRESENTATION
Concentration of solute
Concentration
in gas phase
of solute in liquid phase
z (x/L) (non-dimensional)
Gas Conc
INFERENCE
Liquid conc