Chapter 2 : First Law of Thermodynamics

Example 2.1, Page no:26

In [15]:
# Variables
#Given
W = -2.25*745.7; 			#work done on system in J/s
Q = -3400.*(10.**3)/3600; 			#heat transferred to the surrounding in J/s

# Calculations
#To find the change in internal energy
#Using equation 2.4 (Page no. 26)
U = Q-W; 			#change in internal energy in J/s

# Results
print 'Internal energy of system increases by %f J/s'%U
Internal energy of system increases by 733.380556 J/s

Example 2.2, Page no:26

In [16]:
#Given
T = 298.;    			#temperature in K
P = 101.; 	    		#pressure in kPa
n_iron = 2.; 			#moles of iron reacted
Q = -831.08; 			#heat liberated in kJ
R = 8.314; 		    	#ideal gas constant

# Calculations and Results
#To find heat liberated work done and change in internal energy
print 'Heat liberated during the reaction is %f kJ'%Q
n_oxygen = 1.5; 			#moles of oxygen reacted

#Using ideal gas equation P(Vf-Vi)=nRT and W=P(Vf-Vi)
W = -1.5*R*T; 		    	#work done by system in J

#Using equation 2.4 (Page no. 26)
U = (Q*10**3)-W; 			#change in internal energy in J
print 'Work done by gas is %f J'%W
print 'Change in internal energy is %6.3e J'%U
Heat liberated during the reaction is -831.080000 kJ
Work done by gas is -3716.358000 J
Change in internal energy is -8.274e+05 J

Example 2.3, Page no:27

In [1]:
# Variables
#Given
u = 20.; 			#speed of car in m/s
z = 30.; 			#height vertically above the bottom of hill in m
m = 1400.; 			#mass of car in kg
g = 9.81;           #acceleration due to gravity        

# Calculations
#To find the heat energy dissipated by brakes
#Using equation 2.3 (Page no. 26)
KE = -0.5*m*(u**2); 			#change in kinetic energy in J
PE = -m*g*z; 	    		#change in potential energy in J
Q = -(KE+PE);        			#heat dissipated by brakes in J

# Results
print 'Heat dissipated by brakes is %3.2e J'%Q
Heat dissipated by brakes is 6.92e+05 J

Example 2.4, Page no:27

In [18]:
# Variables
#Given:
#For step 1
W1 = -50.; 			#work received in J
Q1 = -25.; 			#heat gven out in J

# Calculations and Results
U1 = Q1-W1; 			#internal energy change in J
print 'Change in internal energy for constant pressure process is %i J'%U1

#For step 2
W2 = 0.; 			#work done for constant volume process is zero
Q2 = 75.; 			#heat received in J
U2 = Q2; 			#internal energy change in J
print 'Change in internal energy for constant volume process is %i J'%U2

#For step 3
Q3 = 0.; 			#no heat exchange in adiabatic process
#Since the process is cyclic
#U3+U2+U1 = 0;
U3 = -(U1+U2);
W3 = -U3; 			#work done in J
print 'Work done during adiabatic process is %i J'%W3
Change in internal energy for constant pressure process is 25 J
Change in internal energy for constant volume process is 75 J
Work done during adiabatic process is 100 J

Example 2.5, Page no:29

In [2]:
# Variables
#Given:
n_water = 10.**3; 			#moles of water
T = 373.; 			        #tempearture(K)
P = 101.3; 			        #pressure(kPa)
sv_liquid = 0.00104; 		#specific volume of liquid(m**3/kmol)
sv_vapour = 1.675; 			#specific volume of vapour(m**3/kmol)
Q = 1.03*10**3; 			#heat added in kJ
 
#To find change in internal energy and enthalpy
W = P*n_water*(sv_vapour-sv_liquid)*10**-3; 			#expansion work done in kJ
U = Q-W; 			                                    #change in internal energy in kJ
#For constant pressure process
H = Q; 			                                        #enthalpy change in kJ

# Results
print 'Change in internal energy is %f kJ'%U
print 'Change in enthalpy is %3.2e J'%H
Change in internal energy is 860.427852 kJ
Change in enthalpy is 1.03e+03 J

Example 2.6, Page no:29

In [20]:
# Variables
#Given:
T = 233.; 			                #temperature in K
VP = 1.005*10**3; 			        #vapour pressure of CO2 in kPa
sv_liquid = 0.9*10**-3; 			#specific volume of liquid CO2 in m**3/kg
sv_vapour = 38.2*10**-3; 			#specicific volume of CO2 vapour in m**3/kg
L = 320.5; 			                #latent heat of vaporisation of CO2 in kJ/kg
#Assuming at these conditions CO2 is saturated liquid so
H1 = 0; 			                #enthalpy in liquid state

# Calculations
#To find internal energy of saturated liquid and internal energy and enthalpy of saturated vapour
#For saturated liquid
U1 = H1-(VP*sv_liquid); 			# internal energy in liquid state in kJ/kg
#For saturated vapour
Hv = H1+L; 			                #enthalpy of saturated vapour in kJ/kg
Uv = Hv-(VP*sv_vapour); 			#internal energy in vapour state in kJ/kg

# Results
print 'Internal Energy of saturated liquid is %f kJ/kg'%U1
print 'Enthalpy of vapour state is %f kJ/kg'%Hv
print 'Internal Energy of vapour state is %f kJ/kg'%Uv
Internal Energy of saturated liquid is -0.904500 kJ/kg
Enthalpy of vapour state is 320.500000 kJ/kg
Internal Energy of vapour state is 282.109000 kJ/kg

Example 2.7, Page no:30

In [3]:
# Variables
#Given:
I = 0.5; 			#current in Amperes
V = 12.; 			#voltage in volts
t = 5*60.; 			#time in sec
m = 0.798; 			#mass of water vaporised in g
M = 18.; 			#molecular mass of water in g
R = 8.314*10**-3    #ideal gas constant
T = 373             #temperature

# Calculations
#To calculate molar internal energy change and molar enthalpy change
Q = (I*V*t/1000.); 			#electric energy supplied in kJ
#Referring equation 2.10 (Page no. 29)
H = (Q*M)/m; 			#molar enthalpy change in kJ/mole

#BY ideal gas equation PV=RT
#Referring equation 2.9 for constant pressure process (Page no. 29)
U = H-(R*T); 			#molar internal energy change in kJ/mole

# Results
print 'Molar Enthalpy change during the process is %i kJ/mole'%H
print 'Molar Interanl Energy change during the process is %f kJ/mole'%U
Molar Enthalpy change during the process is 40 kJ/mole
Molar Interanl Energy change during the process is 37.500382 kJ/mole

Example 2.8, Page no:32

In [22]:
# Variables
#Given:
m = 1650.; 			#mass of steam used in kg/hr
H1 = 3200.; 			#enthalpy at 1368 kPa and 645 K in kJ/kg
H2 = 2690.; 			#enthalpy at 137 kPa and 645 K in kJ/kg

#To determine the theoretical horsepower developed
#Using equation 2.13 (Page no.32)
Q = 0; 			#since the process is adiabatic
z = 0; 			#assuming that inlet and discharge of turbine are at same level
u = 0; 			#feed and discharge velocities being equal

# Calculations
Ws = -(H2-H1);
Wj = Ws*10**3*m/3600.; 			#work done by turbine in J
W = Wj/745.7; 			#work done by turbine in hp

# Results
print 'Work done by turbine is %f hp'%W
Work done by turbine is 313.463859 hp

Example 2.9, Page no:32

In [4]:
# Variables
#Given:
m = 25.*10**3; 		#mass flow rate of water in kg/h
P = 2.; 			#power supplied by motor in hp
q = 42000.; 		#heat given in kJ/min
z = 20.; 			#elevation in m
T = 368.; 			#temperature in K
To = 273.; 			#standard temperature in K
Cp = 4.2; 			#specific heat of water in kJ/kg K
g = 9.81            #acceleration due to gravity(m/s^2)

# Calculations
#To find temperature of water delivered to second storage tank
W = (P*745.7*10**-3*3600)/m; 			#work done per kg of water pumped in kJ/kg
Q = q*60./m; 			                #heat given out per kg of fluid
PE = g*z*10**-3; 			            #change in potential energy in kJ/kg

#Using equation 2.13 (Page no. 32)
H = -Q+W-PE;
#H = H2-H1
H1 = Cp*(T-To);
H2 = H1+H;
#Let T1 be the temperature at second storage tank
T1 = To+(H2/Cp);

# Results
print 'Temperature of water at second storage tank is %i K'%T1
Temperature of water at second storage tank is 344 K

Example 2.10, Page no:33

In [24]:
# Variables
#Given:
D1 = 25.; 			#internal diameter of pipe in mm
u1 = 10.; 			#upstream velocity in m/s
D2 = 50.; 			#downstream diameter of pipe in mm

# Calculations and Results
#(a)
#Let A1 nad A2 be upstream and downstream crosssectional areas of pipe
u2 = ((D1/D2)**2)*u1; 			#downstream velocity in m/s
H = 0.5*(u1**2-u2**2); 			#change in enthalpy in J/kg
print 'Change in enthalpy is %f J/kg'%H

#(b)
#For maximum enthalpy change 
u2 = 0;
Hmax = 0.5*u1**2; 			#(J/kg)
print 'Maximum enthalpy chnage for a sudden enlargement in pipe is %f J/kg'%Hmax
Change in enthalpy is 46.875000 J/kg
Maximum enthalpy chnage for a sudden enlargement in pipe is 50.000000 J/kg

Example 2.11, Page no:35

In [25]:
# Variables
#At inlet:
T1 = 293.;       			#Temperature(K)
P1 = 300+136.8; 			#Pressure(kPa)
#At exit:
T2 = 453.;   			#Temperature(K)
P2 = 136.8; 			#Pressure(kPa)
Cp = 29.4; 	    		#specific heat capacity at constant pressure in kJ/kmol
m = 1000.; 		    	#mass of hydrogen in kg
M = 2.02; 			    #molecular mass of hydrogen

# Calculations
#To determine heat transfer rates
#Neglecting the kinetic nd potential energy changes
#Assuming the process to be occuring through a number of steps
#Step 1 be isothermal and step 2 be isobaric
H1 = 0; 			#change in enthalpy for step 1
H2 = (m/M)*Cp*(T2-T1)/1000; 			#change in enthalpy for step 2 in kJ
H = H2+H1;
Q = H; 			#heat transferred in coils in kJ

# Results
print 'Heat transferred in coils is %f kJ'%Q
Heat transferred in coils is 2328.712871 kJ

Example 2.12, Page no:35

In [26]:
#Given:
m = 10.; 			#mass of air in kg
P1 = 100.; 			#initial pressure(kPa)
T1 = 300.; 			#initial temperature(K)
T2 = 600.; 			#final temperature(K)
R = 8.314; 			#ideal gas constant(kJ/kmol K)
Cp = 29.099;		#specific heat capacity at constant pressure (kJ/kmol K)
Cv = 20.785;		#specific heat capacity at constsant volume (kJ/kmol K)
M = 29.; 			#molecular weight of air

# Calculations and Results
#To determine change in internal energy enthalpy heat supplied and work done
n = m/M; 	        		#number of moles of gas(kmol)
V1 = (n*R*T1)/P1; 			#initial volume of air (m**3)

#(a)
#Constant volume process
V2 = V1      			#final volume
#Change in internal energy U = n*intg(CvdT)...so
U = n*Cv*(T2-T1); 			#change in internal energy(kJ)
Q = U; 			            #heat supplied(kJ)
W = 0; 			            #work done
H = U+(n*R*(T2-T1)); 		#change in enthalpy(kJ)
print 'For constant volume process'
print 'Change in internal energy is %i kJ'%U
print 'Heat supplied is %i kJ'%Q
print 'Work done is %i kJ'%W
print 'Change in enthalpy is %i kJ'%H

# (b)
# Constant pressure process
# Change in enthalpy H = n*intg(CpdT)...so 
H = n*Cp*(T2-T1); 			#change in enthalpy(kJ)
Q = H;			#heat supplied(kJ)
U = H-(n*R*(T2-T1));			#change in internal energy(kJ)
W = Q-U; 			#work done(kJ)
print 'For constant pressure process'
print 'Change in internal energy is %i kJ'%U
print 'Heat supplied is %i kJ'%Q
print 'Work done is %i kJ'%W
print 'Change in enthalpy is %i kJ'%H
For constant volume process
Change in internal energy is 2150 kJ
Heat supplied is 2150 kJ
Work done is 0 kJ
Change in enthalpy is 3010 kJ
For constant pressure process
Change in internal energy is 2150 kJ
Heat supplied is 3010 kJ
Work done is 860 kJ
Change in enthalpy is 3010 kJ

Example 2.13, Page no:36

In [27]:
# Variables
#Given:
R = 8.314; 			#ideal gas constant(kJ/kmol K)
Cv = 20.8; 			#specific heat capacity at constant volume(kJ/kmol K)
Cp = 29.1; 			#specific heat capacity at constant pressure(kJ/kmol K)
P1 = 10.; 			#initial pressure(bar)
T1 = 280.; 			#initial temperature in K
P2 = 1.; 			#final pressure(bar)
T2 = 340.; 			#final temperature(K)

# Calculations
#To determine the change in internal energy and change in enthalpy
#Solution
n = 1                    			#basis: 1 kmol of ideal gas
V1 = (n*R*T1)/(P1*100); 			#initial volume in m**3
V2 = (n*R*T2)/(P2*100); 			#final volume in m**3

Po = P2; 
Vo = V1;
To = (Po*100*Vo)/(n*R);
U1 = Cv*(To-T1);
H1 = U1+(V1*100*(P2-P1));
W1 = 0;
Q1 = U1;

H2 = Cp*(T2-To);
U2 = H2-100*(V2-V1);
Q2 = H2;
W2 = Q2-U2;
#For actual process
U = U1+U2; 			#change in internal energy(kJ)
H = H1+H2; 			#change in enthalpy(kJ)

# Results
print 'Change in internal energy is %f kJ'%U
print 'Change in enthalpy is %f kJ'%H
Change in internal energy is 1243.632000 kJ
Change in enthalpy is 1742.472000 kJ