Chapter 1 : Introduction

Example 1.1 pg : 23

In [1]:
# Calculations
Q = 84-8.4-21+4.2;

# Results
print 'The Net Work Done =  %2.1f kJ'%(Q);     #Displaying result
The Net Work Done =  58.8 kJ

Example 1.2 pg : 23

In [2]:
#Declaring values
Q = -700.;
W = -3000.;
m = 5.;

# Calculations
U = Q-W;
Us = U/m;

# Results
print 'Change in Specific Energy =  %3.0f J/kg'%(Us);     #print laying result
Change in Specific Energy =  460 J/kg

Example 1.3 pg : 23

In [3]:
#Declaring values
Q = 50;
W = 40;

# Calculations
U = Q-W;

# Results
print 'Change in Internal Energy =  %2.0f kJ'%(U);
Change in Internal Energy =  10 kJ

Example 1.4 pg : 24

In [5]:
# Variables
m = 3000.;     #mass in kg
P = 736.;      #Power in kW
t = 5.*3600;   #Time in seconds
HV = 27170.    #Heating value in kJ/kg

# Calculations
E = P/((m/t)*HV);
Eff = E*100;

# Results
print 'Thermal Efficiency =  %2.2f %%'%(Eff);
Thermal Efficiency =  16.25 %

Example 1.5 pg : 24

In [6]:
# Variables
U = 22.;       #Internal Energy in kJ/s
P2 = 0.95*1000;   #Pressure in kPa
V2 = 0.09;        #Volume in m**3/s;
P1 = 0.5*1000;
V1 = 0.15;

# Calculations
X = (P2*V2)-(P1*V1);
H = U+X;

# Results
print 'Change in Enthalpy: %2.1f kJ/s'%(H);
Change in Enthalpy: 32.5 kJ/s

Example 1.6 pg : 24

In [7]:
# Variables
Th = 0.22;        #Thermal Efficiency
Hr = 1260.;        #Heat Rejected in MJ/hr
CV = 42.;          #Calorific Value of Coal
X = 1-Th;
HI = Hr/X;        #Heat Input in MJ/hr

# Calculations
O = ((HI-Hr)*1000)/3600;        #Output
Mf = HI/CV;       #Mass of Fuel Used

# Results
print 'Power Output is %2.2f kW'%(O);
print 'Mass of Fuel used per hour: %2.1f kg/hr'%(Mf);
Power Output is 98.72 kW
Mass of Fuel used per hour: 38.5 kg/hr

Example 1.7 pg : 25

In [8]:
import math
# Variables
m = 2.;        #mass in kg
T1 = 30.+273;  #Temperature in K
T2 = 60.+273;  
Cp = 4.187;

# Calculations
T = T2/T1;
X = (math.log(T));
S = m*Cp*X;

# Results
print 'Entropy Change of Water: %1.4f kJ/K'%(S);
Entropy Change of Water: 0.7906 kJ/K

Example 1.8 pg : 25

In [10]:
#Declaring Values
m = 600.;          #Mass in kg
z = 50000.;        #Dismath.tance in meters
V = 2500000.;      #Velocity in m/hr
g = 7.9;          #Gravitational Field in m/s**2

# Results
Vel = V/3600;
KE = (0.5*m*Vel*Vel)/1000000;   #Kinetic Energy in MJ
PE = (m*g*z)/1000000;                   #Potential Energy in MJ

#Displaying Results
print 'The Kinetic Energy is %3.2f MJ'%(KE);
print 'The Potential Energy is %3.2f MJ'%(PE);
The Kinetic Energy is 144.68 MJ
The Potential Energy is 237.00 MJ