You are on page 1of 9

1 Tutorial 2 Zumar Ahmad, Hammad Butt, Fahad Aman, Esha Qaiser

Question no: 1
Find the molar volume of ammonia gas at 56 atm and 450 K using the RK equation of state.
Tc=405.5 K, Pc=111.3 atm, a=4.2527, b=0.02590; units of a and b corresponds to Ѵ in L/g mol.
a) Use Excel

Steps involved in calculating v in excel are


 First of all, we have inserted the values of the all variables given as p, t , tc, pc, a, b and
R.
 Then we have written the formula of v in th form of f(v)=0
 And gave the random value of v in C15 and function in C13 and then uses the goal seek
method to find the value of v to the zero.
 For goal seek method, we go to the data and selected the what if analysis from the tools
and entered our desired random value in it which has given us our required value of
molar volume.
b) Use MATLAB,
Steps:
 First of all, we have written function as y= specvolume(v) in the m file we have created
with the name q1_assign2.
 Then, we have inserted the values of the all variables given as p, t , tc, pc, a, b and R in m
file.
 And then we have written the function of v in the form f(v)=0
Department of Polymer and Process Engineering
University of Engineering and Technology, Lahore
2 Tutorial 2 Zumar Ahmad, Hammad Butt, Fahad Aman, Esha Qaiser

 And then ended the function


 In order to find answer which is equal to the 0, we used fzero command to find our
required value of v and run the m file. And thus MATLAB coding is as follows

MATLAB coding:
function y=specvolume(v)
tc=405.5;
pc=111.3;
t=450;
p=56;
r=0.08206;
a=4.2527;
b=0.02590;
y=p*v^3-r*t*v^2+(a-r*t*b-p*b^2)*v-a*b;
end
y=fzero(@q1_assign2,1)
and the value of molar volume is as follows,

QUESTION NO. 02

A stream of Propane at temperature T=423 K and pressure P( atm ) flows at rate of 100 K
mol/hr. Use the SRK equation of state to estimate the volumetric flow rate of the stream for
P=0.7,7and 70 atm. In each case calculate the difference between the predictions of SRK
equation and the ideal gas equation of states.

Department of Polymer and Process Engineering


University of Engineering and Technology, Lahore
3 Tutorial 2 Zumar Ahmad, Hammad Butt, Fahad Aman, Esha Qaiser

Solution:

Given Data:
T=423 K
Flow rate=100
Kmol/hr P= 0.7,7
and 70 atm
Equation used:

In order to solve this problem we can use MATLAB.

Rearrange the equation and make it equal to zero. Give an initial guess by using equation of
ideal gas. MATLAB will calculate the value of molar volume where value of function
approaches to zero.

Coding:

% T=423;
Tc=369.8; R=0.08206;
Pc=42.48*0.986923; %From Bar to atm w=0.152;
Tr=T/Tc;
m_f=100; %Molar flow rate from kmol/hr to mol/hr to make Vo in m3/hr m=0.4850+1.574*w-
0.176*w^2; % M value used in SRK euation calculations alpha=(1+m*(1-Tr^0.5))^2; % Alpha
value in SRK equation a=0.42748*((R^2*Tc^2)/Pc)*alpha; %a constant of SRK equation
b=0.08664*(R*Tc/Pc); %b constant of SRK equation
P=[0.7 7 70]; %Pressure values in atm
disp('Molar volumes(v) in L/gmole with their corresponding volumetric flow rates in L/hr')

for k=1:length(P)
v_ml(k)=fzero(@(v) P(k).*v.^3-R*T.*v.^2+(a-P(k)*b^2-R*T*b).*v-a*b,2);%Converging
towards zero

Y=feval(@(v) P(k).*v.^3-R*T.*v.^2+(a-P(k)*b^2-R*T*b).*v-a*b,v_ml); %Checking for


function value at calculated molar volumes
end
disp('Molar flow rates from SRK Equation:')
fprintf('\n \n v_ml1=%4.5f L/gmole v_ml2=%4.5f L/gmole v_ml3=%4.5f L/gmole \n \n',v_ml)
Vo=m_f.*v_ml; % Volumetric flow rate in m3/hr (By multiplying Molar volumes with Molar
flow rates)
Department of Polymer and Process Engineering
University of Engineering and Technology, Lahore
4 Tutorial 2 Zumar Ahmad, Hammad Butt, Fahad Aman, Esha Qaiser

fprintf('\n \n Volumetric flow rates \n Vo1=%4.5f m3/hr Vo2=%4.5f m3/hr Vo3=%4.5f m3/hr \n
\n',Vo)
disp('Molar volumes calculated using Ideal gas law')
for j=1:length(P) v_id(j)=R*T./P(j);% Ideal gas law
end

fprintf('\n \n vi_d1=%4.5f L/gmole vi_d2=%4.5f L/gmole vi_d3=%4.5f L/gmole \n ',v_id)


Vi=m_f.*v_id;

fprintf('\n \n Volumetric flow rates from Ideal gas law: \n Vi1=%4.5f m3/hr Vi2=%4.5f m3/hr
Vi3=%4.5f m3/hr \n \n',Vi)
%Difference
df=v_id-v_ml; % Molar volume difference
fprintf('\n \n Difference of Molar volumes from Ideal gas law and SRK: \n df1=%4.5f df2=%4.5f
df3=%4.5f \n \n',df)
DF=Vi-Vo; %Volumetric flow rate difference
fprintf('\n \n Difference of volumetric flow rate from Ideal gas law and SRK: \n DF1=%4.5f
DF2=%4.5f DF3=%4.5f \n \n',DF)

Output Values:

Molar volumes(v) in L/gmole with their corresponding volumetric flow rates in L/hr Molar flow
rates from SRK Equation:
v_ml1=49.40602 L/gmole v_ml2=4.77454 L/gmole v_ml3=0.28924 L/gmole Volumetric flow
rates
Vo1=4940.60241 m3/hr Vo2=477.45379 m3/hr Vo3=28.92371 m3/hr

Molar volumes calculated using Ideal gas law


vi_d1=49.58769 L/gmole vi_d2=4.95877 L/gmole vi_d3=0.49588 L/gmole Volumetric flow
rates from Ideal gas law:
Vi1=4958.76857 m3/hr Vi2=495.87686 m3/hr Vi3=49.58769 m3/hr

Difference of Molar volumes from Ideal gas law and SRK: df1=0.18166 df2=0.18423
df3=0.20664

Difference of volumetric flow rate from Ideal gas law and SRK: DF1=18.16616 DF2=18.42306
DF3=20.66398

QUESTION NO: 03
Calculate the molar volume of carbon dioxide at 400 K and 50 bar using Peng-Robinson
equation of state.
Steps:

Department of Polymer and Process Engineering


University of Engineering and Technology, Lahore
5 Tutorial 2 Zumar Ahmad, Hammad Butt, Fahad Aman, Esha Qaiser

 First of all, we have written function as y= specvolume(v) in the m file we have created
with the name q3_assign2.
 Then, we have inserted the values of the all variables given as p, t , tc, pc, a, b and R in m
file.
 And then we have written the function of v in the form f(v)=0
 And then ended the function
 In order to find answer which is equal to the 0, we used fzero command to find our
required value of v and run the m file. And thus MATLAB coding is as follows

MATLAB coding:
function y=specvolume(v)
t=400; %temp is in kelvin
p=50; %pressure is in bar
R=0.08314; %R is in L.bar/K.mol
tc=304.1; %temp is in kelvin
pc=73.9; %pressure is in bar
w=0.239;
m=0.7278;%m from the given formula (m=0.37464+1.54226*w-0.26992*w^2)
tr=t/tc;
alpha=(1+m*(1-tr^0.5))^2;
a=0.45724*(R^2*tc^2/pc)*alpha;
b=0.07780*(R*tc/pc);
y=v^3*p+v^2*(b*p-R*t)+v*(a-3*p*b^2-2*R*t*b)+(p*b^3+R*t*b^2-a*b);
end
y=fzero(@q3_assign2,1)

the value of v is as follows,


s

QUESTION NO:4
A brick wall of 0.2 m thick (L) separates a hot combustion gas of a furnace from the ambient air
and its surroundings. Under steady-state condition, the temperature of the inner surface of the
Department of Polymer and Process Engineering
University of Engineering and Technology, Lahore
6 Tutorial 2 Zumar Ahmad, Hammad Butt, Fahad Aman, Esha Qaiser

brick wall (Ti) is 623.15 K and of the ambient air (T a) is 293.15 K. Free convection heat transfer
to the air is characterized by a convection coefficient (h) of 15 W/m2.K. Thermal conductivity of
the brick wall (k) is 1.2 W/m.K and its surface emissivity (ϵ) of 0.7. The temperature of the
surrounding (Ts) can also be assumed 293.15 K.
a. What is the brick outer surface temperature (T o)?

SOLUTION:

Steps:
 First of all variables were store according to MATLAB expression in an m-file.
 Equation to find out To were given to m-file.
 Function was written and feval and fzero command was given in another m-file and was
run.
 Answer was obtained in the command window.

Department of Polymer and Process Engineering


University of Engineering and Technology, Lahore
7 Tutorial 2 Zumar Ahmad, Hammad Butt, Fahad Aman, Esha Qaiser

Coding:
function y=outertemp(To);
L=0.2; %unit=m;
Ti=623.15; %unit=K;
Ta=293.15;
h=15; %unit=w/m2.k;
E=0.7;
Ts=293.15; %unt=K;
k=1.2; % unit=w/m.k;
s=5.67*10^-8; %unit=w/m2.k4;
y=((h*To)+(k*To)+(E*s*(To)^4))-(((k*Ti)/L)+(h*Ta)+(E*s*(Ts)^4))
m-file 2:
x=feval(@outertemp,2)
m-file 3:
fzero(@outertemp,100)

b. Plot the brick outer surface temperature (To) as a function of the brick inner surface
temperature (Ti) assuming all of the other parameters constant.
From energy balance:
Energy transferred to the outer surface = Energy transferred from the outer surface

SOLUTION:

Steps:
 Values of all constants were stored in the m-file.
Department of Polymer and Process Engineering
University of Engineering and Technology, Lahore
8 Tutorial 2 Zumar Ahmad, Hammad Butt, Fahad Aman, Esha Qaiser

 Range of To was stored using linspace method.


 Equation (after arrangement) was stored in the m-file.
 Graph was ploted according to plot command and title was labeled.

Coding:
%graph of Ti as a function of To;
L=0.2; %unit=m
Ta=293.15;%unit=k
h=15; %unit=w/m2.k;
E=0.7;
Ts=293.15; %unt=K;
k=1.2; % unit=w/m.k;
s=5.67*10^-8; %unit=w/m2.k4;
To=linspace(300,500,21);
Ti=L/k*((E*s*(To).^4)+(h*To)+(k*To./L)-(h*Ta+E*s*(Ts^4)));
plot(Ti,To)
xlabel('Ti')
ylabel('To')
title('To vs Ti')
Question No:5
The reduction of iron ore (Fe304, molecular weight More = 232 g/mole) of density Pore = 4.6
g/cm3 and size R = 5 mm by hydrogen (A) can be approximated by the unreacted core model.
The reaction is:
The hydrogen gas then must diffuse through the inert solid product and react when it reaches
the unreacted core surface. The effective diffusivity of hydrogen through the product layer (D e)
= 0.03 cm2/s and the concentration of hydrogen at the outer surface of the particle (CA1) = 1.16
x 10-5 mole/cm3. At the conditions of interest, it is known that mass diffusion controls the
process, not the reaction kinetics. It means that the reaction is fast and the concentration of
hydrogen at the surface of the unreacted core (CA2) can be assumed zero.
If the average time that the particle spends in the reduction zone (t) is 40 min. What is the
average size of the unreacted particle core (rc) exiting the zone?

Given:
Molecular weight More = 232 g/mole
Size R = 5 mm = 0.5cm
Density Pore = 4.6 g/cm3
Department of Polymer and Process Engineering
University of Engineering and Technology, Lahore
9 Tutorial 2 Zumar Ahmad, Hammad Butt, Fahad Aman, Esha Qaiser

Effective diffusivity of hydrogen De= 0.03 cm2/s


Concentration at outer surface CA1= 1.16 x 10-5 mole/cm3
Concentration at unreacted surface CA2= 0 mole/cm3
Reduction zone t= 40 min

To Find:
Average size of the unreacted particle rc =?

Solution:
 Create an M file of name ‘Averagesize’.
 Write the function y=Averagesize(rc)
 Input all the given values of the statement.
 Write the given mass balance equation on the m file.
 Write the command of fzero(@Averagesize,0) at command window.
 The function name is written in it and intial guess of 0 is given to it which will continue
to proceed until the function approaches to zero.
 When the intial guess of 0 is given we get a negative answer.
 The intial guess is changed and given of 0.4 or another we get a positive answer.

 The matlab will give value of variable rC at initial guess of 0.4.


 Then answer can be check by inserting the command feval(@Averagesize, ans).

Matlab Coding:
R=0.5; %Radius in centimeter(cm)
More= 232; %Molecular weight in g//mole
Pore=4.6; %Density and units in g/cm3
De=0.03; %Effective Diffusivity in cm2/s
CA1=0.0000116; %Concentration of Outer surface of Particle
CA2=0;%Concentration in inner surface of paticle
t=40;%Time in minutes
y=((2*Pore*R^2)/(3*More*De*(CA1-CA2)))*(1-3*(rc/R)^2+2*(rc/R)^3)-t;

Department of Polymer and Process Engineering


University of Engineering and Technology, Lahore

You might also like