Professional Documents
Culture Documents
Given Data: Q: 1. Figure 1 Depicts A Stainless Steel Pipe Whose Inner and Outer Diameters Are 20 MM and
Given Data: Q: 1. Figure 1 Depicts A Stainless Steel Pipe Whose Inner and Outer Diameters Are 20 MM and
Figure 1 depicts a stainless steel pipe whose inner and outer diameters are 20 mm and
25 mm, respectively; i.e., D1 = 20 mm and D2 = 25 mm. This pipe is covered with an insulation
material whose thickness is 35 mm. The temperature of the saturated vapor (steam) flowing
through the pipeline is Ts = 150°C, and the external and internal convective heat transfer
coefficients are, respectively, measured to be hi = 1,500 W/m2⋅K and h0 = 5 W/m2⋅K. Besides,
the thermal conductivity of the stainless steel and the insulation material are ks = 45 W/m⋅K and
ki = 0.065, respectively. If the ambient temperature is Ta = 25°C, 35 oC, 40 oC and45 oC,
determine the internal and external wall temperatures of the stainless steel pipe, T1 and T2 ,
and the exterior wall temperature of the insulation material, using MATLAB for the given
ambient
temperatures. Also plot the given ambient temperatures against the calculated T1, T2 and T3
values.
GIVEN DATA
D1=20/1000; Inner Diameter of stainless steel pipe from mm to meters
D2=25/1000; Outer Diameter of stainless steel pipe from mm to meters
Thi=35/1000; Thickness of insulation material from mm to meters
Ts=150+273; Temperature of steam from °C to Kelvin
hi=1500; Internal Heat transfer coefficient in W/m2.K
h0=5; outer heat transfer coefficients in W/m2.K
ks=45; Thermal conductivity of stainless steel in W/m.K
ki=0.065; Thermal conductivity of insulation material in W/m.k
Ta1=25+273;Given 1st Ambient temperatures from °C to Kelvin
Ta2=35+273;Given 2nd Ambient temperatures from °C to Kelvin
Ta3=40+273;Given 3rd Ambient temperatures from °C to Kelvin
Ta4=45+273; Given 4rth Ambient temperatures from °C to Kelvin
Ta=Ta1, Ta2, All Ambient Temperatures
D3=D2+2*Thi; Total diameter of pipe insulating material
REQUIRED
We have to find the exterior wall temperature of insulation T1,T2 and T3.
Plot graph between ambient temperature values and T1,T2, and T3 values.
GIVEN FORMULAS
Heat transfer from steam to pipe
(𝑇1 − 𝑇2 )
ℎ𝑖 π𝐷1 (𝑇𝑠 − 𝑇1 ) =
ln(𝐷2 /𝐷1 )/2π𝑘𝑠
Heat transfer from pipe to insulation
(𝑇1 − 𝑇2 ) (𝑇2 − 𝑇3 )
=
ln(𝐷2 /𝐷1 )/2π𝑘𝑠 ln(𝐷3 /𝐷2 )/2π𝑘𝑖
Heat transfer from insulation to surrounding
(𝑇2 − 𝑇3 )
= ℎ𝑜 π𝐷3 (𝑇3 − 𝑇𝑎 )
ln(𝐷3 /𝐷2 )/2π𝑘𝑖
And using the above balances we prepared a matrix of A and B
Equation from first balance
2π𝑘𝑖 2π𝑘𝑖
ℎ𝑖 πD1 𝑇𝑠 = 𝑇1 ( + ℎ1 πD1 ) − 𝑇1 ( ) + 𝑇3 (0)
ln(𝐷2 /𝐷1 ) ln(𝐷2 /𝐷1 )
Equation from second Balance
𝑘𝑠 𝑘𝑠 𝑘𝑖 𝑘𝑖
T1( ) − T2( + ) + T3( )=0
ln(𝐷2 /𝐷1 ) ln(𝐷2 /𝐷1 ) ln(𝐷3 /𝐷2 ) ln(𝐷3 /𝐷2 )
Equation from third balance
2𝑘𝑖 2𝑘𝑖
ℎ𝑜 D3 𝑇𝑎 = 𝑇1 (0) − 𝑇2 ( ) + 𝑇3 ( + ℎ𝑜 D3 )
ln(𝐷3 /𝐷2 ) ln(𝐷3 /𝐷2 )
STEP=1
First we make the matrices from formulas giving names A, T AND B.
A=[(2ks/log(D2/D1))+hi*D1 -(2*ks/log(D2/D1)) 0;
ks/log(D2/D1) -((ks/log(D2/D1))+(ki/log(D3/D2))) ki/log(D3/D2);
0 -2*ki/log(D3/D2) (2*ki/log(D3/D2))+h0*D3 ]
𝐵1= [ℎ𝑖 D1 𝑇𝑠 0 ℎ𝑜 D3 𝑇𝑎1]'
B1=[hi*D1*Ts 0 h0*D3*Ta1]
B2=[hi*D1*Ts 0 h0*D3*Ta2]
B3=[hi*D1*Ts 0 h0*D3*Ta3]
B4=[hi*D1*Ts 0 h0*D3*Ta4]
A*T=B
T =B/A
A-1= Adj[A]/det[A]
as det should not be zero.
STEP=2
finding the temperatures by using the following equations.
T1=A\B1
T2=A\B2
T3=A\B3
T4=A\B4
STEP=3
WE PLOT the graph between ambient temperatures and calculated temperatures.
RESULTS
STEP=4
%%Assignment 1
%
%MATLAB solution Written by:
%Group 10
%
%
%
%
%
%Given Parameters
%
D1=20/1000; %Inner Diameter of stainless steel pipe from mm to meters
D2=25/1000; %Outer Diameter of stainless steel pipe from mm to meters
Thi=35/1000; %Thickness of insulation material from mm to meters
Ts=150+273; %Temperature of steam from °C to Kelvin
hi=1500; %Internal Heat transfer coefficient in W/m2.K
h0=5; %outer heat transfer coefficients in W/m2.K
ks=45; %Thermal conductivity of stainless steel in W/m.K
ki=0.065; %Thermal conductivity of insulation material in W/m.k
Ta1=25+273;%Given 1st Ambient temperatures from °C to Kelvin
Ta2=35+273;%Given 2nd Ambient temperatures from °C to Kelvin
Ta3=40+273;%Given 3rd Ambient temperatures from °C to Kelvin
Ta4=45+273; %Given 4rth Ambient temperatures from °C to Kelvin
Ta=[Ta1 Ta2 Ta3 ]; %Array of all Ambient Temperatures
D3=D2+2*Thi; %Total diameter of pipe+insulating material
%
%
%To be required
% T1, T2, T3 values in kelvin
%Plot graph between ambient temperature values and T1,T2, and T3 values
%
%Matric A
A=[(2*ks/log(D2/D1))+hi*D1 -(2*ks/log(D2/D1)) 0;
ks/log(D2/D1) -((ks/log(D2/D1))+(ki/log(D3/D2))) ki/log(D3/D2);
0 -2*ki/log(D3/D2) (2*ki/log(D3/D2))+h0*D3 ];
%
%Vector B
B1=[hi*D1*Ts 0 h0*D3*Ta1]';
B2=[hi*D1*Ts 0 h0*D3*Ta2]';
B3=[hi*D1*Ts 0 h0*D3*Ta3]';
B4=[hi*D1*Ts 0 h0*D3*Ta4]';
%
%Check whether Matrix A is singlar or not, if A is dsingular(det(A)=0)
%solution will not exist
if det(A)==0
fprintf('\n Rank of A=%i', rank(A))
error('Matrix A have determinant 0 so solution doesnt exist. ') %%If the determinant will be
zero than exit without solving
end
%
%
%if det(A)~=0 then unique solution will exist
%
T1=A\B1;%finding solutions
T2=A\B2;
T3=A\B3;
T4=A\B4;
%
%displaying results
%
fprintf('\n For Ambient Temperature Ta1=298 K:\n \n T11=%2.4f K, T12=%2.4f K, T13=%2.4f
K',T1)%% Displaying Ambient Temperatures sepearately
fprintf('\n \n For Ambient Temperature Ta2=308 K:\n \n T21=%2.4f K, T22=%2.4f K,
T23=%2.4f K', T2)
fprintf('\n \n For Ambient Temperature Ta3=313 K:\n \n T31=%2.4f K, T32=%2.4f K,
T33=%2.4f K', T3)
fprintf('\n \n For Ambient Temperature Ta4=318 K:\n \n T44=%2.4f K, T42=%2.4f K,
T43=%2.4f K', T4)
plot(Ta,T1,'s:',Ta,T2,'o--',Ta,T3,'d-.',Ta,T4,'x--')
legend('For 298 K Ambient Temperature','For 308 K Ambient Temperature','For 313 K Ambient
Temperature','For 318 K Ambient Temperature')
xlabel('Ambient Temperatures (Kelvin)')
ylabel('Calculated Temperatures (Kelvin)')
title('Ambient VS Calculated Temperatures')
M=292.8225 g/gmole
STEP=4
%%Assignment 1
%
%MATLAB solution Written by:
%Group 10
%
%
%
%Part(a) Solution
%
%Given Data
%
TB=344.7+273; %Boiling Temperature values from °C to kelvin
API=50; %Given API value of oil
%
%To be required
%Molecular weight of an oil fraction(M)
%
%Given formula
SG=141.5/(API+131.5); %Specific gravity relation with API
%
fprintf('\n Part (a) Molecular Weight of Oil fraction: \n')
M=42.965*exp(2.097e-4*(TB)-(7.78712*SG)+(2.08476e-
3*(TB)*SG))*(TB^1.26007)*(SG^4.98308); % Molecular weight relation
fprintf('\n M=%3.4f g/gmole ',M )
%
%Part (b)
Tb=400:600; %Boiling Temperature range in kelvin
APIo=20:20:60; % Given API values
SGo=141.5./(APIo+131.5); %SG values for given APIo values
%
%Molecular Weight Calculations
%
M1=42.965*exp(2.097e-4.*(Tb)-7.78712*SGo(1)+2.08476e-
3.*(Tb*SGo(1))).*Tb.^1.26007*SGo(1)^4.98308; %Molecular Weight for SGo(1)in g/gmole
M2=42.965*exp(2.097e-4.*(Tb)-7.78712*SGo(2)+2.08476e-
3.*(Tb*SGo(2))).*Tb.^1.26007*SGo(2)^4.98308; %Molecular Weight for SGo(2)in g/gmole
M3=42.965*exp(2.097e-4.*(Tb)-7.78712*SGo(3)+2.08476e-
3.*(Tb*SGo(3))).*Tb.^1.26007*SGo(3)^4.98308; %Molecular Weight for SGo(3)in g/gmole
plot(M1,Tb,'x--',M2,Tb,'o--',M3,Tb,'s:')
title('Molecular weight VS Boiling Temperatures')
xlabel('Molecular Weight (g/gmole)')
ylabel('Boiling Temperatures (Kelvin)')
legend('APIo=20','APIo=40','APIo=60')
Q: 3. In chemical industry, the cost of piping system (pipes and fittings) and pumping are
important costs that should be considered. The annual cost of a pipeline with a standard
carbon steel pipe and a motor-driven centrifugal pump is given by:
where L is the length of the pipeline in ft, D is the pipe diameter in inch, and P is the power of
the pump in ph which can be calculated from:
In the
above equation, Q is the volumetric flow rate of the fluid in gpm.
(a) Plot the annual cost as a function of pipe diameter, say from 0.25 to 6 in, for 1000 ft
pipeline with a fluid rate of 20 gpm.
(b) What is the annual cost needed if a pipe with a diameter of 1 in is used? Is there an
optimum diameter for this pipeline? Explain why it is expensive when a very small pipe
diameter is used.
GIVEN DATA
D1=0.25:6 Diameter of pipe in inches
L=1000 Length of Pipe in feets
Q=20 Volumetric Flow rate in gpm units
REQUIRED
We have to find the annual cost (C) of pipe and plot the graph of annual cost and given
diameters.
GIVEN FORMULAS
where L is the length of the pipeline in ft, D is the pipe diameter in inch, and P is the power of
the pump in hp, which can be calculated from
SOLUTION
STEP=1
Calculation of power (p)
First we calculate the value of power P by putting the values of diameter (D), length (L) and
volumetric flow rate (Q)
P=((4.4e-8)*(L*Q^3)./D.^5)+((1.92e-9)*(L*Q^2.8)./D.^4.686)
STEP=2
Calculation of annual cost of pipe (C)
By putting the values of power in the following formula we calculated the annual cost of pipe.
C=0.45*L+(0.245*L.*D.^1.5)+(325.*sqrt(P))+(61.6.*P.^0.925)+102
STEP=3
In the last we plotted graph between diameters of pipe(in inches) and annual cost of pipe (in
PKR).
RESULTS
STEP=4
%%Assignment 1
%
%MATLAB solution Written by:
%Group 10
%
%
%
%
%
%Part(a) Solution:
%
%Given data
%
D=0.25:6; %Diameter of pipe in inches
L=1000; %Length of Pipe in feets
Q=20; %Volumetric Flow rate in gpm units
%
%To be required
%
%1-find annual cost by first finding power
%2-Plot annual cost values VS Diameter of pipe
%
%
disp('Calculated Power Values are: ')
%
%
P=((4.4e-8)*(L*Q^3)./D.^5)+((1.92e-9)*(L*Q^2.8)./D.^4.686); % Formula for Power
calculations in hp unit
%
%
fprintf('\n P1= %1.5f hp \n P2=%1.5f hp \n P3=%1.5f hp \n P4=%1.5f hp \n P5=%1.5f hp \n
P6=%1.5f hp', P)
%
%
fprintf('\n \n Calculated Annual cost values \n')
%
C=0.45*L+(0.245*L.*D.^1.5)+(325.*sqrt(P))+(61.6.*P.^0.925)+102; % Formula for the
calculation of annual cost from Power
%
fprintf('\n C1=%3.3f PKR \n C2=%3.3f PKR \n C3=%3.3f PKR \n C4=%3.3f PKR \n C5=%3.3f
PKR \n C6=%3.3f PKR \n', C)
plot(D,C,'x--')
title('Plot of Diamter of Pipe VS Annual cost')
xlabel('Diameter of Pipe (Inches)'), ylabel('Annual cost (PKR)')
%
%
%Part(b)
%Finding Annual cost
Dp=1; %if Diameter of pipe is 1 inch
%
%To find
%Annual cost at 1 Diameter
Pb=((4.4e-8)*(L*Q^3)/Dp^5)+((1.92e-9)*(L*Q^2.8)/Dp^4.686); % Formula for Power
calculations of (b) part in hp unit
%
fprintf('\n Power calculation for pipe of 1 inch diameter =Pb= %3.4f hp', Pb)
%
%
Cb=0.45*L+(0.245*L*Dp^1.5)+(325*sqrt(Pb))+(61.6*Pb^0.925)+102; % Formula for the
calculation of annual cost from Power for 1 inch pipe dia
%
%
fprintf('\n Annual cost for pipe of 1 inch diameter =Cb= %3.2f PKR',Cb)
Q: 4. A first order reaction is carried out in a series of N equal-size mixed flow reactors. The
total conversion (X) achieved for this system is given by reaction constant (= 0.075 hr-1)
and τ is the mean residence time in a single mixed reactor.
1. Plot the total conversion of this reaction as a function of τ (0 < τ < 40 hrs) for N = 4.
2. Plot on the same graph the total conversion as a function of τ for N= 2.
3. Calculate the total conversion if the number of equal-size mixed reactors is 6 and the
residence time of the fluid in a single reactor is 5 hrs.
4. Suppose we allocate a total of 10 hrs for this reaction ( =10 hrs, the summation is
over all reactors) and a large conversion is desired, would you suggest having a lot of
small mixed reactors or a few large mixed reactors? Explain your reasoning using some
calculations. Hint: a larger reactor has a larger fluid residence time.
Determination of residence time with different number of reactors.
K=0.0751/hr
T=1/K =13.33hr
Formula:
X=1-1/(1 + 𝑇𝑖 + 𝐾)𝑛
MATLAB SUCRIPT:
%Question #4 first order reaction in a mixed flow reactor
%PART (a)
%K=reaction constant (1/hr)
%T=mean resisdence time(hr)
K=0.075;'1/hr';
T=1/K; 'hr';
%Given range of residence time
Ti=[13.33:5:40];'hr';
%N=Number of reactors
N=4;
%X=Total conversion
Xa=(1-(1./((1+Ti*K).^N)))
%PART(b)
N=2;
Xb=(1-(1./((1+Ti*K).^N)))
%PART (c)
N=6;T=5;'hr';
Xc=(1-(1./((1+Ti*K).^N)))
%
%Graph plotting
plot(Ti,Xa, 'x--', Ti, Xb,'x--',Ti,Xc,'x--')
xlabel('conversion');
ylabel('resisdence time hr');
%PART (d)
%Conversion in system 1
K=0.075;'1/hr';
T=10;'hr'; Na=4;
Xa1=(1-(1./((1+T*K).^Na)));
%Conversion in system 2
Nb=2;
Xb2=(1-(1./((1+T*K).^Nb)));
%conversion in system 3
Nc=6;
Xc3=(1-(1./((1+T*K).^Nc)));
%conversion in system 4
Ns=1;
Xs4=(1-(1./((1+T*K).^Ns)));
% Large reactors conversion will be large but residence time will high.
Results:
Q: 5. A mixture containing 50 wt% toluene (T), 35 wt% benzene (B), and 15 wt% xylene (X) is
fed to a distillation column. The top product from the column contains 6.3 wt% toluene, 91.4 wt%
benzene, and 2.3 wt% xylene. The bottom product is fed to a second column. The top product from
the second column contains 91.6 wt% toluene, 4.25 wt% benzene, and 4.15 wt% xylene. 10 wt%
of the toluene fed to the process is recovered in the bottom product from the second column, and
83.3 wt% of the xylene fed to the process is recovered in the same stream. Determine the
compositions and flow rates of all streams if the feed flow rate is 100 kg/minute.
Determination of compositions and flow rates of all streams of toluene benzene and xylene
Given Data
F=100(Kg/min)
Feed
Wtf=0.5 wbf=0.35 wxf=0.15
Stream 1
Wt1=0.063 wb1=0.914 wx1=0.023
Stream 2
Nt2 =? Nb2=? Nx2=?
Stream 3
Wt3=0.916 wb3=0.0425 wx3=0.0415
Stream 4
Nt4=0.1*0.5=0.05 Nb4= ? Nx4=0.833*0.15=0.12
Nb4=1-Nt4+Nx4=1-0.12+0.05=0.82
Overall mass balance
Results:
Q: 6. (a) Determine the bubble temperature (t) of a liquid binary mixture containing 20 mol%
acetone (xi) and 80 mol% methanol at 1 atm (P). Also calculate the mol fraction of acetone in
vapor phase (yi) at that bubble temperature. From thermodynamics, the following equations can
be set up:
(a) Plot the bubble point temperature as a function of the mol fraction of component 1
in the liquid phase (x1). Note: y-axis: t, x-axis: x1
Solution: Determination of bubble Temperature
x1=0.2 x2=0.8 P=101.3KPa
A1=14.3916 B1=2795.82 C1=230
A2=16.59138 B2=3644.30 C2=239.79
Find Gamma 1 Gamma2 with given values of x1
Find assume temperatures with given value of Pressure from
𝑩𝒊
antoion equation T=𝑨𝒊−𝐥𝐧(𝑷) + 𝑪𝒊
Results:
Q: 7. The mean molar heat capacity of nitrogen between 298 K and T at 1 atm has been
tabulated as follow:
Determine the vapor pressure of water and the specific volume (v) of saturated water vapor
at: a. 1°C
b. 10°C
c. 14°C
Interpolation of vapor pressure at specific volume and temperature
yi = interp1(x, y, xi, method)
MATLAB SCRIPT
%The vapor pressure (P) of water and the specific volume (v) of saturated water vapor in a steam
table