from __future__ import division
#Input data
C=3.5#Capacity in litres
P=13.1#Indicated power in kW/m**3
N=3600#Speed in rpm
ve=82#Volumetric efficiency in percent
p1=1.013#Pressure in bar
T1=25+273#Temperature in K
rp=1.75#Pressure ratio
ie=70#Isentropic efficiency in percent
me=80#Mechanical efficiency in percent
g=1.4#Ratio of specific heats
R=0.287#Gas constant in kJ/kg.K
Cp=1.005#Specific heat in kJ/kg.K
#Calculations
EC=(C/1000)#Engine capacity in m**3
Vs=(N/2)*EC#Swept volume in m**3
Vui=(ve/100)*Vs#Unsupercharged induced volume in m**3/min
dp=(rp*p1)#Blower delivery pressure in bar
T2sT1=(rp)**((g-1)/g)#Ratio of temperatures
T2s=(T2sT1*T1)#Temperature in K
dT21=(T2s-T1)/(ie/100)#Difference in temperature in K
T2=dT21+T1#Temperature in K
EV=(Vs*dp*T1)/(p1*T2)#Equivalent volume in m**3/min
iiv=EV-Vui#Increase in induced volume in m**3/min
iip=(P*iiv)#Increase in indicated power in kW
iipi=((dp-p1)*100*Vs)/60#Increase in induced power due to increase in induction pressure in kW
tiip=iip+iipi#Total increase in indicated power in kW
tibp=tiip*(me/100)#Total increase in brake power in kW
ma=(dp*100*Vs)/(60*R*T2)#Mass of air in kg/s
WI=(ma*Cp*(T2-T1))#Work input to heater in kW
Pb=(WI/(me/100))#Power required in kW
NI=tibp-Pb#Net increase in brake power in kW
#Output
print "Net increase in brake power is %3.2f kW"%(NI)
#Input data
p1=0.97#Pressure in bar
t1=30+273#Temperature in K
p2=2.1#Pressure in bar
af=18#Air fuel ratio
t3=580+273#Temperature in K
p3=1.9#Pressure in bar
p4=1.06#Pressure in bar
iec=0.75#Isentropic efficiency of compressor
iet=0.85#Isentropic efficiency of turbine
cpa=1.01#Specific heat for air in kJ/kg.K
ga=1.4#Ratio of specific heats
cpex=1.15#Specific heat in kJ/kg.K
gex=1.33#Ratio of specific heats
#Calculations
t2s=t1*(p2/p1)**((ga-1)/ga)#Tempeature in K
t21=(t2s-t1)/iec#Temperature in K
t2=t21+t1#Temperature in K
T2=t2-273#Temperature in degree C
t3t4s=(p3/p4)**((gex-1)/gex)#Ratio of temperatures
t4s=(t3/t3t4s)#Temperature in K
t4=t3-((t3-t4s)*iet)#Temperature in K
T4=t4-273#Temperature in degree C
mp=(((cpex*(1+(1/af))*(t3-t4))-(cpa*(t2-t1)))/(cpex*(1+(1/af))*(t3-t4)))*100#Percentage of mechanical power loss
#Output
print " (a) the temperature of air leaving the compressor is %3.2f degree C \n (b) the temperature of gases leaving the turbine is %3.2f degree C \n (c) the mechanical power loss in the turbocharger as a percentage of the power generated in the turbine is %3.2f percent"%(T2,T4,mp)
from __future__ import division
#Input data
a=215#Current in A
v=210#Voltage in V
e=85#Efficiency in percent
q=11.8#Quantity of fuel supplied in kg/h
cv=43#Calorific value in MJ/kg
af=18#Air fuel ratio
w=560#Water in litres/h
tw=38#Temeparature in degree C
te=97#Temeparature in degree C
cp=1.04#Specific heat in kJ/kg.K
ta=30#Temeparature in degree C
l=32#Percentage lost
sw=4.187#Specific heat in kJ/kg.K
#Calculations
P=(a*v)/1000#Power in kW
BP=(P/(e/100))#Brake power in kW
E=(q/3600)*cv*1000#Energy supplied in kW
mg=(q/3600)*(1+af)#Rate of gases in kg/s
he=(mg*cp*(te-ta))+((w/3600)*sw*tw)#Heat carried away by exhaust gases in kW
hj=(l/100)*E#Heat lost to jacket cooling water in kW
pBP=(BP/E)*100#Percentage
pE=(E/E)*100#Percentage
phe=(he/E)*100#Percenatge
phj=(hj/E)*100#Percenatge
#Output
print " ENERGY BALANCE SHEET \n (in kW) (in percent)\n 1. Brake power %3.2f %3.2f \n 2. Heat carried away by exhaust gases %3.2f %3.2f \n 3. Heat lost to jacket cooling water %3.2f %3.2f \n 4. Heat loss unaccounted %3.2f %3.2f \n Total %3.2f %3.2f"%(BP,pBP,he,phe,hj,phj,(E-(BP+he+hj)),(((E-(BP+he+hj))/E)*100),E,(pBP+phe+phj+(((E-(BP+he+hj))/E)*100)))
from __future__ import division
#Input data
t=20#Trial time in minutes
NL=680#Net brake load in N
mep=3#Mean effective pressure in bar
N=360#Speed in rpm
Fc=1.56#Fuel consumption in kg
cw=160#Cooling water in kg
Tw=32#Temperature of water at inlet in degree C
Wo=57#Water outlet temperature in degree C
a=30#Air in kg
Ta=27#Room temperature in degree C
Te=310#Exhaust gas temperature in degree C
d=210#Bore in mm
l=290#Stroke in mm
bd=1#Brake diameter in m
cv=44#Calorific value in MJ/kg
st=1.3#Steam formed in kg per kg fuel in the exhaust
cp=2.093#Specific heat of steam in exhaust in kJ/kg.K
cpx=1.01#Specific heat of dry exhaust gases in kJ/kg.K
cpw=4.187#Specific heat of water in kJ/kg.K
#Calculations
ip=(mep*100*(l/1000)*(3.14/4)*(d/1000)**2*N)/60#Indicated Power in kW
bp=((2*3.14*N*(NL*(1/2)))/60)/1000#Brake power in kW
nm=(bp/ip)*100#Mechanical efficiency in percent
qs=(Fc*cv*10**3)#Heat supplied in kJ
qip=(ip*t*60)#Heat equivalent of ip in kJ
qcw=(cw*cpw*(Wo-Tw))#Heat carried away by cooling water in kJ
tm=(Fc*a)#Toatl mass of exhaust gas in kg
ms=(st*Fc)#Mass of steam formed in kg
mde=(tm-ms)#Mass of dry exhaust gas in kg
Ed=(mde*cpx*(Te-Ta))#Energy carried away by dry exhaust gases in kJ
Es=(ms*((cpw*(100-Ta))+2257.9+(cp*(Te-100))))#Energy carried away by steam in kJ
TE=(Ed+Es)#Total energy carried away by exhaust gases in kJ
ue=(qs-(qip+qcw+TE))#Unaccounted energy in kJ
pqip=(qip/qs)*100#Percentage
pqcw=(qcw/qs)*100#Percentage
pTE=(TE/qs)*100#Percentage
pue=(ue/qs)*100#Percentage
#Output
print " Indicated power is %3.2f kW \n Brake power is %3.3f kW \n\n ENERGY BALANCE SHEET \n (in kJ) (in percent)\n 1. Energy equivalent in ip %3.0f %3.2f \n 2. Energy carried away by cooling water %3.0f %3.2f \n 3. Energy carried away by exhaust gases %3.0f %3.2f \n 4. Unaccounted for energy loss %3.0f %3.2f \n Total %3.0f %3.2f"%(ip,bp,qip,pqip,qcw,pqcw,TE,pTE,ue,pue,qs,(pqip+pqcw+pTE+pue))
from math import tan,sin,atan,degrees,pi,cos,sqrt
#Input data
Vbm=360#Blade velocity in m/s
b1=20#Blade angle at inlet in degrees
a2=b1#Angle in degrees
b2=52#Blade angle at exit in degrees
a1=b2#Angle in degrees
R=50#Degree of reaction in percent
dm=0.45#Mean diameter of the blade in m
bh=0.08#Mean blade height in m
#Calculations
Vf=(Vbm/(tan(pi/180*b2)-tan(pi/180*b1)))#Velocity in m/s
rt=(dm/2)+(bh/2)#Mean radius in m
Vbt=(Vbm*(rt/(dm/2)))#Velocity in m/s
Vw1m=Vf*tan(pi/180*a1)#Velocity in m/s
Vw1t=(Vw1m*((dm/2)/rt))#Velocity in m/s
dVw1=(Vf*(tan(pi/180*b1)+tan(pi/180*b2))*Vbm)/Vbt#Velocity in m/s
rr=(dm/2)-(bh/2)#Radius in m
Vbr=(Vbm*(rr/(dm/2)))#Velocity in m/s
Vw1r=(Vw1m*((dm/2)/rr))#Velocity in m/s
Vr2=Vf/cos(pi/180*b2)#Velocity in m/s
dVwr=((Vw1m+((Vr2*sin(pi/180*b2))-Vbm))*Vbm)/Vbr#Velocity in m/s
a1r=degrees(atan(Vw1r/Vf))#Angle in degrees
a2r=degrees(atan((dVwr-Vw1r)/Vf))#Angle in degrees
b1r=degrees(atan((Vw1r-Vbr)/Vf))#Angle in degrees
b2r=degrees(atan((Vbr+(Vf*tan(pi/180*a2r)))/Vf))#Angle in degrees
a1t=degrees(atan(Vw1t/Vf))#Angle in degrees
a2t=degrees(atan((dVw1-Vw1t)/Vf))#Angle in degrees
b1t=degrees(atan((Vw1t-Vbt)/Vf))#Angle in degrees
b2t=degrees(atan((Vbt+(Vf*tan(pi/180*a2t)))/Vf))#Angle in degrees
Rt=((Vf*(tan(pi/180*b2t)-tan(pi/180*b1t)))/(2*Vbt))*100#Degree of reaction at the tip in percent
Rr=((Vf*(tan(pi/180*b2r)-tan(pi/180*b1r)))/(2*Vbr))*100#Degree of reaction at the root in percent
#Output
print " (a)The flow velocity is %3.0f m/s \n (b) The blade angles at the tip are : \n Fixed blades (root) are %3.2f degrees and %3.2f degrees \n Moving blades (root) are %3.2f degrees and %3.2f degrees \n Fixed blades (tip) are %3.2f degrees and %3.2f degrees \n Moving blades (tip) are %3.2f degrees and %3.2f degrees \n (c) The degree of reaction at : \n the tip is %3.0f percent \n the root is %3.0f percent"%(Vf,a1r,a2r,b1r,b2r,a1t,a2t,b1t,b2t,Rt,Rr)
from math import tan,sin,atan,degrees,pi,cos,sqrt
#Input data
N=16000#Speed in rpm
T1=17+273#Temperature in K
rp=4#Pressure ratio
In=82#Isentropic efficiency in percent
s=0.85#Slip factor
a=20#Angle in degrees
d=200#Diameter in mm
V=120#Velocity in m/s
cp=1.005#Specific heat in kJ/kg.K
g=1.4#Ratio of specific heats
#Calculations
T2sT1=(rp)**((g-1)/g)#Temperature ratio
T2s=T1*T2sT1#Temeprature in K
dTs=(T2s-T1)#Temperature difference in K
dT=dTs/(In/100)#Temperature difference in K
Wc=(cp*dT)#Power input in kJ/kg
Vb1=(3.14*(d/1000)*N)/60#Velocity in m/s
Vw1=(V*sin(pi/180*a))#Pre-whirl velocity in m/s
Vb2=sqrt(((Wc*1000)+(Vb1*Vw1))/s)#Velocity in m/s
d2=((Vb2*60)/(3.14*N))*1000#Tip diameter in mm
#Output
print "Impeller tip diameter is %3.0f mm"%(d2)
from math import tan,sin,atan,degrees,pi,cos,sqrt
#Input data
T1=25+273#Temperature in K
rp=6#Pressure ratio
Vb=220#Mean velocity in m/s
b1=45#Angle in degrees
a2=b1#Angle in degrees
b2=15#Angle in degrees
a1=b2#Angle in degrees
R=50#Degree of reaction in percent
n=10#Number of stages
In=83#Isentropic efficiency in percent
cp=1.005#Specific heat in kJ/kg.K
g=1.4#Ratio of specific heats
#Calculations
V1=(Vb/(sin(pi/180*b2)+(cos(pi/180*a1)*tan(pi/180*a2))))#Velocity in m/s
V2=(V1*cos(pi/180*b2))/cos(pi/180*b1)#Velocity in m/s
dVw=(V2*sin(pi/180*a2))-(V1*sin(pi/180*a1))#Velocity in m/s.Textbook answer is wrong. Correct answer is 127 m/s
T2sT1=rp**((g-1)/g)#Temperature ratio
T2s=(T2sT1*T1)#Temperature in K
dTs=(T2s-T1)#Temperature difference in K
dT=(dTs/(In/100))#Temperature difference in K
W=(cp*dT)#Workdone in kJ/kg
w=(W*10**3)/(Vb*dVw*n)#Work done factor
#Output
print "Workdone factor of the compressor is %3.2f"%(w)
from math import sqrt,pi
#Input data
p1=1#Pressure in bar
T1=20+273#Temperature in K
Tm=900+273#Maximum temperature in K
rp=6#Pressure ratio
e=0.7#Effectiveness of regenerator
ma=210#Rate of air flow in kg/s
CV=40800#Calorific value in kJ/kg
ic=0.82#Isentropic efficiencies of both the compressors
it=0.92#Isentropic efficiencies of both the turbine
cn=0.95#Combustion efficiency
mn=0.96#Mechanical efficiency
gn=0.95#Generator efficiency
cp=1.005#Specific heat of air in kJ/kg.K
cpg=1.08#Specific heat of gas in kJ/kg.K
g1=1.4#Ratio of specific heats for air
g=1.33#Ratio of specific heats for gas
#Calculations
pi=sqrt(p1*rp)#Intermediate pressure in bar
T2sT1=(pi/p1)**((g1-1)/g1)#Temperature ratio
T2s=(T2sT1*T1)#temperature in K
T2=((T2s-T1)/ic)+T1#Temperature in K
T4s=(T1*(rp/pi)**((g1-1)/g1))#Temperature in K
T4=((T4s-T1)/ic)+T1#Temperature in K
T7s=(Tm/(rp/p1)**((g-1)/g))#Temperature in K
T7=Tm-(it*(Tm-T7s))#Temperature in K
T5=(e*(T7-T4))+T4#Temperature in K
mf=1/((cp*(Tm-T5))/((CV*cn)-(cp*(Tm-T5))))#Air fuel ratio
Wgt=((1+(1/mf))*cpg*(Tm-T7))#Workdone by turbine in kJ/kg of air
Wc=(cp*((T2-T1)+(T4-T1)))#Workdone by compressor in kJ/kg of air
Wnet=(Wgt-Wc)#Net workdone in kJ/kg of air
Q=(CV*cn)/mf#Heat supplied in kJ/kg of air
ncy=(Wnet/Q)*100#Cycle efficiency in percent
PO=(Wnet*ma*mn*gn)/10**3#Power output in MW
Fc=(ma*3600*(1/mf))#Fuel consumption per hour in kg
SFC=(Fc/(PO*10**3))#Specific fuel consumption in kg/kW.h
#Output
print " (a) the air fuel ratio is %3.2f \n (b) the cycle efficiency is %3.1f percent \n (c) the power supplied by the plant is %3.0f MW \n (d) the specific fuel consumption of the plant is %3.3f kg/kW.h and the fuel consumption per hour is %3.2f kg"%(mf,ncy,PO,SFC,Fc)