#Input data
import math
Pa=10 #Single cylinder double acting steam engine pressure in bar
Pb=1.5 #Single cylinder double acting steam engine pressure in bar
rc=100/35 #Cut-off of the stroke in %
#Calculation
Pm=((Pa/rc)*(1+math.log(rc))-Pb) #Therotical mean effective pressure
#Output
print("Therotical mean effective pressure=",round(Pm,2),"bar")
#Input data
a=5/100 #Engine cylinder of the stroke valume in %
P1=12 #Pressure of the stream
rc=3 #Cut-off is one-third
Pb=1.1 #Constant the back pressure in bar
#Calulation
#Therotical mean effective pressure Pm
Pm=P1*(1/rc+((1/rc)+a)*math.log((1+a)/((1/rc)+a)))-Pb
#Output
print("#Therotical mean effective pressure=",round(Pm,2),"N/m**2")
#Input data
import math
P1=14 #Steam is ssupplied in bar
P6=6 #Pressure at the end in bar
Pb=1.2 #Pressure at back in bar
a=0.1
re=4
#From hyperbolic process
b=0.4
#Calculation
#Mean Effective pressure in N/m**2
Pm=P1*((1/re)+((1/re)+a)*math.log((1+a)/((1+re)+a)))-Pb*((1+b)+(a+b)*math.log((a+b)/a))
#Output
print("Mean Effective pressure=",round(-Pm,3),"N/m**2")
#Input data
Cover=1200 #Area of the indicator diagram for cover
Crank=1100 #Area of the indicator diagram for crank
ID=75
PS=0.15
#Calculation
CoverMEP=Cover/ID*PS #Cover end mean effective pressure
CrankMEP=Crank/ID*PS #Crank end mean effective pressure
AverageMEP=(CoverMEP+CrankMEP)/2 #Average end mean effective pressure
#Output
print("Cover end mean effective pressure=",CoverMEP,"bar")
print("Crank end mean effective pressure=",round(CrankMEP,2),"bar")
print("Average end mean effective pressure=",AverageMEP,"bar")
#Input data
a=25 #Area of indicator diagram cm**2
Vs=0.15 #swept volume m**2
S=1 #Scale in cm
cm=0.02 #pressure axis m**3
#Calculation
b=Vs/cm #Base length of diagram
Pm=a/b*S #Mean effective pressure
#Output
print("Base length of diagram=",b,"bar")
print("Mean effective pressure=",round(Pm,2),"bar")
#Input data
import math
P1=14 #Steam Engine pressure in bar
Pb=0.15 #Back pressure in bar
K=0.72 #Diagram factor
rc=100/20
#Calculation
Pm=((P1/rc)*(1+math.log(rc))-Pb) #Therotical mean effective pressure Pm
Pma=Pm*K #Actual mean effective pressure Pma
#Output
print("Therotical mean effective pressure=",round(Pm,3),"bar")
print("Actual mean effective pressure=",round(Pma,2),"bar")
#Input data
import math
P1=9 #Reciprocating engine pressure in bar
Pb=1.5 #Back pressure in bar
rc=100/25 #Cut-off
K=0.8 #Diagram factor
#Calculation
Pm=((P1/rc)*(1+math.log(rc))-Pb) #Therotical mean effective pressure Pm
Pma=Pm*K #Actual mean effective pressure Pma
#Output
print("Therotical mean effective pressure= ",round(Pm,2),"bar")
print("Actual mean effective pressure=",round(Pma,2),"bar")
#Input data
import math
P1=10 #Inlet pressure
Pb=1 #Back pressure
rc=3 #Expansion ratio
a=12.1 #Area of indicator diagram
b=7.5 #Length of indicator diagram
S=3 #Pressure scale
#calculation
Pm=((P1/rc)*(1+math.log(rc))-Pb )#Therotical mean effective pressure Pm
Pma=a/b*S #Actual mean effective pressure Pma
K=Pma/Pm #diagram factor
#Output
print("Therotical mean effective pressure=",round(Pm,2),"bar")
print("Actual mean effective pressure=",round(Pma,2),"bar")
print("Diagram factor=",round(K,3),)
#Input data
D=200*10**-3 #Steam engine cylinder in mm
L=300*10**-3 #Bore of steam engine cylinder in mm
rc=100/40 #Cut-off of the sroke
P1=7 #Admission pressure of steam in bar
Pb=0.38 #Exhaust pressure of steam in bar
K=0.8 #Diagram factor
N=200 #Indicator factor of engine
pi=3.142 #Constant value
#Indicated power of the engine in rpm
A=pi*(200*10**-3)**2/4
#Calculation
Pm=((P1/rc)*(1+math.log(rc))-Pb) #Therotical mean effective pressure Pm
Pma=Pm*K #Actual mean effective pressure Pma
IP=(2*Pma*L*A*N/60000)*10**5 #Indicated power of steam engine in Kw
#Output
print("Therotical mean effective pressure= ",round(Pm,3),"bar")
print("Actual mean effective pressure=",round(Pma,),"bar")
print("Indicated power of steam engine=",round(IP,2),"Kw")
#Input data
import math
IP=343 #Steam engine develop indicated power in Kw
N=180 #power In rpm
P1=15 #Steam supplied i bar
Pb=1.25 #Steam is exhausted in bar
rc=100/25 #Cut-off take place of stroke
K=0.78 #Diagram factor
#x=L/D=4/3
x=4/3 #Stroke to bore ratio
pi=3.142
A=((pi/4)*(D**2))
#calculation
Pm=((P1/rc)*(1+math.log(rc))-Pb) #Therotical mean effective pressure Pm
Pma=Pm*K #Actual mean effective pressure Pma
D=(((60000*IP)/(2*(Pma*10**5)*(4/3)*N))/(pi/4))**(1/3)#Indicated power of steam engine
L=(x)*D
#Output
print("Therotical mean effective pressure=",round(Pm,2),"bar")
print("Actual mean effective pressure=",round(Pma,2),"bar")
print("Indicated power of steam engine=",round(D,3),"mm")
print("Indicated power of steam engine=",round(L,1),"mm")
#Input data
import math
D=240*10**-3 #Steam engine bor
L=300*10**-3 #Stroke of engine
N=220 #Speed of engine 220 in rpm
IP=36 #Indicated power in Kw
Pb=1.3 #Exhaust pressure in bar
re=2.5 #Expansion ratio
K=0.8 #Diagram factor
A=((pi/4)*(D**2))
#Calculation
Pma=((IP*60000)/(2*10**5*L*A*N)) #Indicated power of steam engine in bar
Pm=Pma/K #Actual mean effective pressure in bar
P1=((Pm+Pb)*re)/(1+math.log(re)) #Theoretical mean effective pressure in bar
#Output
print("Indicated power of steam engine=",round(Pma,3),"bar")
print("Actual mean effective pressure=",round(Pm,3),"bar")
print("theoretical mean effective pressure=",round(P1,1),"bar")
#Input data
import math
D=700*10**-3 #Steam engine diameter in mm
L=900*10**-3 #Steam engine diameter in mm
Ip=450 #Develop indicated power Kw
N=90 #Speed of steam engine in rpm
P2=12 #Pressure at cut-off in bar
P1=12 #Pressure at cut-off in bar
Pb=1.3 #Back pressure in bar
K=0.76 #Diameter factor
pi=3.142
A=((pi/4)*0.7**2)
#Calculation
Pma=(Ip*60000)/(2*10**5*L*A*90) #Indicated power of steam engine in bar
Pm=Pma/K #Theoretical mean effective pressure in bar
#using trial and error method
re=1/0.241 #Expansion ratio
#Output
print("Indicated power of steam engine=",round(Pma,2),"bar")
print("Theoretical mean effective pressure=",round(Pm,1),"bar")
print("Expansion ratio=",round(re,2),)
#Input data
Db=900*10**-3 #Diameter of break drum in mm
dr=50*10**-3 #Diameter of rope in mm
W=105*9.81 #dead weight on the tight side of the rope in Kg
S=7*9.81 #Spring balance of the rope in N
N=240 #Speed of the engine in rpm
#Calculation
T=(W-S)*((Db+dr)/2) #Torque Nm
Bp=2*pi*N*T/ 60000 #Brake Power in Kw
#Output
print("Torque= ",round(T,2),"Nm")
print("Brake Power=",round(Bp,2),"Kw")
#Input data
D=300*10**-3 #steam engine bor
L=400*10**-3 #stroke
Db=1.5 #effective brake diameter
W=6.2*10**3 #net load on the brake
N=180 #speed of engine in rpm
Pma=6.5*10**3 #mean effective pressure in bar
A=((pi/4)*0.3**2)
dr=0
S=0
#Calculation
Ip=((2*Pma*L*A*N)/60000)*100 #Indicated power of steam engine in Kw
T=(W-S)*((Db+dr)/2) #Torque in Nm
Bp=2*pi*N*T/ 60000 #Break power Kw
eta=(Bp/Ip)*100 #Mechanical efficiency in%
#Output
print("Indicated power of steam engine=",round(Ip,2),"Kw")
print("Torque=",T,"Nm")
print("Break power=",round(Bp,2),"Kw")
print("Mechanical efficiency=",round(eta,1),"%")