Chapter 13:One Dimensional Compressible Fluid Flow

example 13.1;pg no: 525

In [1]:
#cal of mach number,stagnation pressure,velocity
#intiation of all variables
# Chapter 13
import math
print"Example 13.1, Page:525  \n \n"
print("Engineering Thermodynamics by Onkar Singh Chapter 13 Example 1")
To=(27+273);#stagnation temperature in K
P=0.4*10**5;#static pressure in pa
m=3000/3600;#air flowing rate in kg/s
d=80*10**-3;#diameter of duct in m
R=287;#gas constant in J/kg K
y=1.4;#expansion constant
print("mass flow rate(m)=rho*A*C")
print("so rho*C=4*m/(%pi*d^2)")
4*m/(math.pi*d**2)
print("so rho=165.79/C")
print("now using perfect gas equation,p=rho*R*T")
print("T=P/(rho*R)=P/((165.79/C)*R)")
print("C/T=165.79*R/P")
165.79*R/P
print("so C=1.19*T")
print("we know,C^2=((2*y*R)/(y-1))*(To-T)")
print("C^2=(2*1.4*287)*(300-T)/(1.4-1)")
print("C^2=602.7*10^3-2009*T")
print("C^2+1688.23*C-602.7*10^3=0")
print("solving we get,C=302.72 m/s and T=254.39 K")
C=302.72;
T=254.39;
print("using stagnation property relation,")
print("To/T=1+(y-1)*M^2/2")
M=math.sqrt(((To/T)-1)/((y-1)/2))
print("so M="),round(M,3)
M=0.947;#approx.
Po=P*(1+(y-1)*M**2/2)/10**5
print("stagnation pressure,Po in bar="),round(Po,3)
print("so mach number=0.947,stagnation pressure=0.472 bar,velocity=302.72 m/s")
Example 13.1, Page:525  
 

Engineering Thermodynamics by Onkar Singh Chapter 13 Example 1
mass flow rate(m)=rho*A*C
so rho*C=4*m/(%pi*d^2)
so rho=165.79/C
now using perfect gas equation,p=rho*R*T
T=P/(rho*R)=P/((165.79/C)*R)
C/T=165.79*R/P
so C=1.19*T
we know,C^2=((2*y*R)/(y-1))*(To-T)
C^2=(2*1.4*287)*(300-T)/(1.4-1)
C^2=602.7*10^3-2009*T
C^2+1688.23*C-602.7*10^3=0
solving we get,C=302.72 m/s and T=254.39 K
using stagnation property relation,
To/T=1+(y-1)*M^2/2
so M= 0.947
stagnation pressure,Po in bar= 0.472
so mach number=0.947,stagnation pressure=0.472 bar,velocity=302.72 m/s

example 13.2;pg no: 525

In [2]:
#cal of ratio of kinetic energy
#intiation of all variables
# Chapter 13
import math
print"Example 13.2, Page:525  \n \n"
print("Engineering Thermodynamics by Onkar Singh Chapter 13 Example 2")
To=(273.+1100.);#stagnation temperature in K
a=45.;#mach angle over exit cross-section in degree
Po=1.01;#pressure at upstream side of nozzle in bar
P=0.25;#ststic pressure in bar
y=1.4;#expansion constant 
R=287.;#gas constant in J/kg K
print("mach number,M_a=(1/sin(a))=sqrt(2)")
M_a=math.sqrt(2)
M_a=1.414;#approx.
print("here,P/Po=0.25/1.01=0.2475.Corresponding to this P/Po ratio the mach number and T/To can be seen from air table as M=1.564 and T/To=0.6717")
M=1.564;
print("T=To*0.6717 in K")
T=To*0.6717
print("and C_max=M*sqrt(y*R*T) in m/s")
C_max=M*math.sqrt(y*R*T)
print("corresponding to mach number(M_a=1.414)as obtained from experimental observation,the T/To can be seen from air table and it comes out as (T/To)=0.7145")
print("so T=0.7145*To in K")
T=0.7145*To
print("and C_av=M_a*sqrt(y*R*T) in m/s")
C_av=M_a*math.sqrt(y*R*T)
print("ratio of kinetic energy="),round(((1./2.)*C_av**2)/((1./2.)*C_max**2),3)
print("so ratio of kinetic energy=0.869")
Example 13.2, Page:525  
 

Engineering Thermodynamics by Onkar Singh Chapter 13 Example 2
mach number,M_a=(1/sin(a))=sqrt(2)
here,P/Po=0.25/1.01=0.2475.Corresponding to this P/Po ratio the mach number and T/To can be seen from air table as M=1.564 and T/To=0.6717
T=To*0.6717 in K
and C_max=M*sqrt(y*R*T) in m/s
corresponding to mach number(M_a=1.414)as obtained from experimental observation,the T/To can be seen from air table and it comes out as (T/To)=0.7145
so T=0.7145*To in K
and C_av=M_a*sqrt(y*R*T) in m/s
ratio of kinetic energy= 0.869
so ratio of kinetic energy=0.869

example 13.3;pg no: 526

In [3]:
#cal of mach no,compressibility correction factor
#intiation of all variables
# Chapter 13
import math
print"Example 13.3, Page:526  \n \n"
print("Engineering Thermodynamics by Onkar Singh Chapter 13 Example 3")
C=300.;#aircraft flying speed in m/s
P=0.472*10**5;#altitude pressure in Pa
rho=0.659;#density in kg/m^3
y=1.4;#expansion constant
R=287.;#gas constant in J/kg K
print("From bernoulli equation,Po-P=(1/2)*rho*C^2")
print("so Po=P+(1/2)*rho*C^2 in N/m^2")
Po=P+(1/2)*rho*C**2
print("speed indicator reading shall be given by mach no.s")
print("mach no.,M=C/a=C/sqrt(y*R*T)")
print("using perfect gas equation,P=rho*R*T")
print("so T=P/(rho*R)in K")
T=P/(rho*R)
M=C/math.sqrt(y*R*T)
print("so mach no.,M"),round(M,2)
M=0.947;#approx.
print("considering compressibility effect,Po/P=(1+(y-1)*M^2/2)^(y/(y-1))")
print("so stagnation pressure,Po=P*((1+(y-1)*M^2/2)^(y/(y-1)))in N/m^2")
Po=P*((1+(y-1)*M**2/2)**(y/(y-1)))
print("also Po-P=(1+k)*(1/2)*rho*C^2")
k=((Po-P)/((1./2.)*rho*C**2))-1.
print("substitution yields,k="),round(k,4)
print("so compressibility correction factor,k=0.2437")
Example 13.3, Page:526  
 

Engineering Thermodynamics by Onkar Singh Chapter 13 Example 3
From bernoulli equation,Po-P=(1/2)*rho*C^2
so Po=P+(1/2)*rho*C^2 in N/m^2
speed indicator reading shall be given by mach no.s
mach no.,M=C/a=C/sqrt(y*R*T)
using perfect gas equation,P=rho*R*T
so T=P/(rho*R)in K
so mach no.,M 0.95
considering compressibility effect,Po/P=(1+(y-1)*M^2/2)^(y/(y-1))
so stagnation pressure,Po=P*((1+(y-1)*M^2/2)^(y/(y-1)))in N/m^2
also Po-P=(1+k)*(1/2)*rho*C^2
substitution yields,k= 0.2437
so compressibility correction factor,k=0.2437

example 13.4;pg no: 527

In [4]:
#cal of mach number
#intiation of all variables
# Chapter 13
import math
print"Example 13.4, Page:527  \n \n"
print("Engineering Thermodynamics by Onkar Singh Chapter 13 Example 4")
Po=2;#total pressure in bar
P=0.3;#static pressure in bar
y=1.4;#expansion constant
print("we know that,Po/P=(1+(y-1)*M^2/2)^((y)/(y-1))")
M=math.sqrt((math.exp(math.log(Po/P)/(y/(y-1)))-1)/((y-1)/2))
print("so M="),round(M,3)
print("so mach number,M=1.89")
Example 13.4, Page:527  
 

Engineering Thermodynamics by Onkar Singh Chapter 13 Example 4
we know that,Po/P=(1+(y-1)*M^2/2)^((y)/(y-1))
so M= 1.897
so mach number,M=1.89

example 13.5;pg no: 527

In [5]:
#cal of air stream velocity
#intiation of all variables
# Chapter 13
import math
print"Example 13.5, Page:527  \n \n"
print("Engineering Thermodynamics by Onkar Singh Chapter 13 Example 5")
To=305.;#stagnation temperature of air stream in K
y=1.4;#expansion constant
R=287.;#gas constant in J/kg K
print("actual static pressure(P)=1+0.3 in bar")
P=1.+0.3
print("It is also given that,Po-P=0.6,")
print("so Po=P+0.6 in bar")
Po=P+0.6
print("air velocity,ao=sqrt(y*R*To)in m/s")
ao=math.sqrt(y*R*To)
print("density of air,rho_o=Po/(R*To)in ")
rho_o=Po*10.**5/(R*To)
print("considering air to be in-compressible,")
print("Po=P+rho_o*C^2/2")
C=math.sqrt((Po-P)*10.**5*2./rho_o)
print("so C in m/s="),round(C,2)
print("for compressible fluid,Po/P=(1+(y-1)*M^2/2)^(y/(y-1))")
print("so M=sqrt((exp(log(Po/P)/(y/(y-1)))-1)/((y-1)/2))")
M=math.sqrt((math.exp(math.log(Po/P)/(y/(y-1)))-1)/((y-1)/2))
M=0.7567;#approx.
print("compressibility correction factor,k")
print("k=(M^2/4)+((2-y)/24)*M^4")
k=(M**2/4.)+((2.-y)/24.)*M**4
print("stagnation temperature,To/T=1+((y-1)/2)*M^2")
print("so T=To/(1+((y-1)/2)*M^2) in K")
T=To/(1+((y-1)/2)*M**2)
print("density,rho=P/(R*T) in kg/m^3")
rho=P*10**5/(R*T)
print("substituting Po-P=(1/2)*rho*C^2(1+k)")
C=math.sqrt((Po-P)*10.**5/((1./2.)*rho*(1.+k)))
print("C in m/s="),round(C,2)
print("so C=250.95 m/s")
Example 13.5, Page:527  
 

Engineering Thermodynamics by Onkar Singh Chapter 13 Example 5
actual static pressure(P)=1+0.3 in bar
It is also given that,Po-P=0.6,
so Po=P+0.6 in bar
air velocity,ao=sqrt(y*R*To)in m/s
density of air,rho_o=Po/(R*To)in 
considering air to be in-compressible,
Po=P+rho_o*C^2/2
so C in m/s= 235.13
for compressible fluid,Po/P=(1+(y-1)*M^2/2)^(y/(y-1))
so M=sqrt((exp(log(Po/P)/(y/(y-1)))-1)/((y-1)/2))
compressibility correction factor,k
k=(M^2/4)+((2-y)/24)*M^4
stagnation temperature,To/T=1+((y-1)/2)*M^2
so T=To/(1+((y-1)/2)*M^2) in K
density,rho=P/(R*T) in kg/m^3
substituting Po-P=(1/2)*rho*C^2(1+k)
C in m/s= 250.94
so C=250.95 m/s