# Variables
Vs = 0.01; #in m**3
Pm = 600.; #in kPa
N = 300.; #in rpm
# Calculations
n = N/2;
IP = (Vs*Pm*n)/60;
# Results
print 'Indicated Power = %2.0f kW'%(IP);
#from sympy import Symbol,solve
#import math
# Variables
n = 6.; #Number of Cylinders
IP = 90.; #Indicated Power in kW
Eff = 0.85; #Mechanical Efficiency
Pmb = 5.; #in bar
LD = 1.5;
Pm = Pmb/Eff;
N = 800.;
nx = N/2;
# Calculations and Results
#Length = 1.5*D
#D = Symbol("D")
#eq = 588*math.pi/4*D**2*LD*D*nx*n/60 - 90
#ans = solve(eq,D)
#print ans
D = ((IP*60*4)/(Pm*100*(22./7)*LD*nx*n))**(1./3);
print 'D = %3.4f mm'%(D*100);
L = D*LD;
print 'L = %3.4f mm'%(L*100);
# It seems book answer wrong. kindly check.
# Variables
BP = 22.; #Brake Power
Eff = 0.85; #Mechanical Efficiency
IP = BP/Eff;
mf = 6.5;
CV = 30000.; #Calorific Value
# Calculations and Results
Ebth = BP/((mf/3600)*CV);
print 'Brake Thermal Eff = %3.1f Percent'%(Ebth*100);
Eith = IP/((mf/3600)*CV);
print 'Indicated Thermal Eff = %3.1f Percent'%(Eith*100);
BSFC = mf/BP;
print 'BSFC = %3.1f kg/kWh'%(BSFC);
# Variables
BP = 185.; #Brake Power
Eff = 0.75;
IP = BP/Eff;
LD = 1.5;
N = 35.;
n = N/2;
nx = 4.;
Pm = 830.; #in kPa
D = ((IP*4)/(Pm*(22./7)*LD*nx*n))**(1./3);
print 'D = %3.0f mm'%(D*1000);
L = D*LD;
print 'L = %3.0f mm'%(L*1000);
# Variables
Vc = 5*(10**-4);
D = 0.15;
L = 0.2;
Vs = (22./7)*D*D*L*(1./4);
r = (Vc+Vs)/Vc;
G = 1.4;
# Calculations and Results
Ea = (1-(1./(r**(G-1))));
Eith = 0.3;
Erel = Eith/Ea;
print 'Erel = %3.2f Percent'%(Erel*100);
Pm = 500.; #in kPa
n = 1000./2;
IP = (Pm*Vs*n)/60;
print 'IP = %3.2f kW'%(IP);
# Variables
Pm = 600.;
A = (22./7)*(1./4)*0.11*0.11*0.14;
n = 1000;
# Calculations
IP = (Pm*A*n)/60;
Em = 0.8;
BP = Em*IP;
# Results
print 'BP = %3.2f kW'%(BP);
# Variables
r = 6.;
G = 1.4;
Ea = 100*(1-(1./(r**(G-1))));
# Calculations
Ebt = Ea/2;
CV = 41500;
BP = 15.;
Mf = BP/(CV*(Ebt/100));
# Results
print 'Mf = %3.3f kg/hr'%(Mf*3600);
# Variables
n = 4.;
DL = 1.2;
BP = 32.;
N = 2500.;
Pm = 9.;
Em = 0.86;
Mf = 9.;
CV = 43000.;
# Calculations and Resultse
IP = BP/Em;
D = ((IP*60*4)/(Pm*100*(22./7)*DL*N*n))**(1./3);
print 'D = %3.0f mm'%(D*1000);
L = DL*D;
print 'L = %3.0f mm'%(L*1000);
Ebth = BP/(Mf*CV/3600);
print 'Ebth = %3.2f Percent'%(Ebth*100);
Eith = Ebth/Em;
print 'Eith = %3.2f Percent'%(Eith*100);
# Variables
Eith = 0.29;
Em = 0.77;
BP = 5.5;
SG = 0.87;
CV = 43000;
# Calculations
Ebth = Em*Eith;
Mf = (BP*3600)/(Ebth*CV);
D = SG*1000;
Mff = (Mf*1000)/D
# Results
print 'Mf = %3.2f litre/hr'%(Mff);
# Variables
D = 16.;
L = 19.;
Vc = 700.;
Pm = 5.;
N = 1000.;
Eith = 0.32;
# Calculations and Results
Vs = (22./7)*D*D*L*(1./4);
Vc = 700.;
G = 1.4;
r = (Vs+Vc)/Vc;
Ea = (1-(1./(r**(G-1))));
Er = Eith/Ea;
print 'Relative Efficiency = %3.2f Percent'%(Er*100);
IP = (Pm*100*Vs*(10**-6)*N)/60;
print 'IP = %3.2f KW'%(IP);
# Variables
T = 50.;
Vst = 870.;
N = 300.;
Pm = 10.;
n = N/2;
# Calculations
BP = (2*(22./7)*N*T)/(60*1000);
IP = (Pm*100*Vst*(10**-6)*N)/(60*2);
Em = BP/IP;
# Results
print 'Mechanical Efficiency = %3.2f Percent'%(Em*100);
# Variables
Pm = 7.;
A = (22./7)*(1./4)*((0.15/1.25)**2);
n = 900.;
L = 0.15;
N = 2
# Calculations
IP = (Pm*100*A*L*n*N)/(60*2);
# Results
print 'IP = %3.2f kW'%(IP);
import math
# Variables
N = 900.;
D = 0.1;
L = 0.14;
Mf = 2.1;
CV = 42000.;
Pm = 7.5;
Vc = 0.15;
G = 1.4;
A = (22./7)*(1./4)*D*D;
# Calculations and Results
IP = (Pm*100*A*L*N*2)/(60*2);
Eith = (IP*3600)/(Mf*CV);
print 'Eith = %3.1f Percent'%(Eith*100);
r = (1+0.15)/(0.15);
Ea = 1-(1./(r**(G-1)));
Er = Eith/Ea;
print 'Relative Efficiency = %3.2f Percent'%(Er*100);
import math
# Variables
NOC = 6.;
N = 820.;
n = N/2;
IP = 90.;
LD = 1.4;
Pbm = 5;
# Calculations and Results
Em = 0.79;
BP = IP*Em;
D = ((IP*60*2)/(Pbm*100*(math.pi)*(1./4)*LD*N*NOC))**(1./3);
print 'D = %3.0f mm'%(D*1000);
L = LD*D;
print 'L = %3.0f mm'%(L*1000);
# rouding off error.
import math
# Variables
NOC = 4;
N = 2500;
n = N/2;
BP = 200;
LD = 1.2;
Pm = 10;
Em = 0.81;
Mf = 65;
CV = 42000;
IP = BP/Em;
# Calculations and Results
D = ((IP*60*2*4)/(Pm*100*(22./7)*(1.2*(N)*NOC)))**(1./3);
print 'D = %3.0f mm'%(D*1000);
L = LD*D;
print 'L = %3.0f mm'%(L*1000);
Eith = (IP*3600)/(Mf*CV);
print 'Eith = %3.2f Percent'%(Eith*100);
Ebth = Eith*Em;
print 'Ebth = %3.2f Percent'%(Ebth*100);
# Variables
IP = 42.;
FP = 7.;
ES = 1800.;
BP = IP-FP;
# Calculations and Results
Em = BP/IP;
print 'Mechanical Efficiency = %3.0f Percent'%(Em*100);
BSFC = 0.3;
CV = 43000.;
Ebth = 3600/(BSFC*CV);
print 'Brake Thermal Efficiency = %3.0f Percent'%(Ebth*100);
Eith = Ebth/Em;
print 'Indicated Thermal Efficiency = %3.2f Percent'%(Eith*100);
# Variables
D = 0.3;
L = 0.45;
N = 300.;
Pimep = 6.;
F = 1.5;
Reff = (180+4)/2;
# Calculations and Results
IP = (Pimep*100*L*(22./7)*(1./4)*(D*D)*N)/(2*60);
print 'Indicated Power = %3.2f kW'%(IP);
BP = (2*(22./7)*N*F*Reff)/6000;
print 'Brake Power = %3.2f kW'%(BP);
Em = BP/IP;
print 'Mechanical Efficiency = %3.2f Percent'%(Em*100);
# Variables
D = 0.27;
L = 0.38;
Pmep = 6.;
N = 250.;
F = 1000.;
Reff = 0.75;
Mf = 10.;
CV = 44400.;
# Calculations and Results
BP = (2*(22./7)*N*(F*Reff))/60;
print 'Brake Power = %3.2f kW'%(BP/1000);
A = (22./7)*(1./4)*(D*D);
IP = (Pmep*100*L*A*N)/(2*60);
print 'Indicated Power = %3.2f kW'%(IP);
Em = BP/(IP*1000);
print 'Mechanical Efficiency = %3.2f Percent'%(Em*100);
Eith = (IP*3600)/(Mf*CV);
print 'Indicated Thermal Power = %3.2f Percent'%(Eith*100);
# Variables
NOC = 6.;
IP = 89.5;
N = 800.;
LD = 1.25;
Em = 0.8;
Pbemp = 5.;
Em = 0.8;
Pimep = Pbemp/0.8;
# Calculations
D3 = (IP*2*60*4)/(Pimep*100*LD*(22./7)*N*NOC);
D = D3**(1./3);
L = LD*D;
# Results
print 'L = %3.1f mm'%(L*1000);
print 'D = %3.0f mm'%(D*1000);
# Variables
D = 0.25;
L = 0.4;
Pm = 6.5;
N = 250;
W = 1080;
Ddrum = 1.5;
Mf = 10;
CV = 44300;
# Calculations and Results
A = (22./7)*(1./4)*D*D;
IP = (Pm*100*A*L*N)/(60*2);
print 'Indicated Power = %3.2f kW'%(IP);
Reff = Ddrum/2;
W = 1.08;
BP = (2*(22./7)*N*W*Reff)/60;
print 'Brake Power = %3.2f kW'%(BP);
Em = BP/IP;
Eith = (IP*3600)/(Mf*CV);
print 'Em = %3.2f Percent'%(Em*100);
print 'Eith = %3.2f Percent'%(Eith*100);
# Variables
W = 50;
S = 7;
D = 1.25;
N = 450;
Mf = 4;
CV = 43000;
Em = 0.7;
Reff = 9.81*(D/2);
# Calculations and Results
BP = (2*(22./7)*N*(W-S)*Reff)/(60*1000);
Ebth = (BP*3600)/(Mf*CV);
print 'Ebth = %3.2f Percent'%(Ebth*100);
Eith = Ebth/Em;
print 'Eith = %3.2f Percent'%(Eith*100);
# Variables
T = 640;
D = 0.21;
N = 350;
L = 0.28;
Pm = 5.6;
Mf = 8.16;
CV = 42705;
# Calculations and Results
BP = (2*(22./7)*N*T)/60000;
print 'Brake Power = %3.2f kW'%(BP/1000);
A = (22./7)*(1./4)*D*D;
IP = (Pm*100*A*L*N)/60;
Em = BP/IP;
print 'Em = %3.2f Percent'%(Em*100);
Eith = (IP*3600)/(Mf*CV);
print 'Eith = %3.2f Percent'%(Eith*100);
Ebth = (BP*3600)/(Mf*CV);
print 'Ebth = %3.2f Percent'%(Ebth*100);
BSFC = Mf/BP;
print 'BSFC = %3.2f kg/kWh'%(BSFC);
# Variables
IP = 37.;
FP = 6.;
BSFC = 0.28;
CV = 44300.;
# Calculations and Results
BP = IP-FP;
Em = (IP-FP)/IP;
print 'Em = %3.2f Percent'%(Em*100);
Mf = BSFC*BP;
Ebth = (BP*3600)/(Mf*CV);
print 'Ebth = %3.2f Percent'%(Ebth*100);
Eith = Ebth/Em;
print 'Eith = %3.2f Percent'%(Eith*100);
# Variables
D = 0.1;
L = 0.125;
Pm = 2.6;
W = 60;
S = 19;
Reff = 0.4;
r = 6;
Mf = 1;
CV = 42000;
N = 2000;
# Calculations and Results
A = (22./7)*(1./4)*D*D;
IP = (Pm*100*A*L*N)/(60*2);
print 'indicated Power = %3.2f kW'%(IP);
BP = (2*(22./7)*N*(W-S)*Reff)/60000;
print 'Brake Power = %3.2f kW'%(BP);
Em = BP/IP;
print 'Em = %3.2f Percent'%(Em*100);
Ebth = (BP*3600)/(Mf*CV);
print 'Ebth = %3.2f Percent'%(Ebth*100);
Eith = Ebth/Em;
print 'Eith = %3.2f Percent'%(Eith*100);
G = 1.4;
Ea = 1-(1./(r**(G-1)));
print 'Ea = %3.2f Percent'%(Ea*100);
Er = Ebth/Ea;
print 'Er = %3.2f Percent'%(Er*100);
# Variables
IP = 30.;
N = 2500;
Pm = 800;
Em = 0.8;
LD = 1.5;
Ebth = 0.28;
CV = 44000;
# Calculations and Results
BP = IP*Em;
print 'Brake Power = %3.2f kW'%(BP);
Mf = (BP/(Ebth*CV));
print 'Mass Flow Rate = %3.2f kg/hr'%(Mf*3600);