Chapter 8 : First law of thermodynamics

Example 8.1 page no : 261

In [3]:
# Variables
l = 80;			#latent heat of fusion in cal
j = 4.2*10**7;			#joules constant in ergs/cal
w = -0.092*10**6;			#work done in changing phase change in ergs

# Calculations
q = l*j;			#heat added in ergs
du = q-w;			#internal energy in ergs

# Result
print 'the change in internal energy is %.1e ergs'%(du)
the change in internal energy is 3.4e+09 ergs

Example 8.2 page no : 261

In [5]:
# Variables
m = 1.;	        		#mass in gm
l = 536.;		    	#latent heat in cal/gm
j = 4.2*10**7;			#joules constant in ergs/cal
v = 1649;			    #volume of water in cc
p = 76*13.6*981;		#pressure of water in dynes/sq.cm

# Calculations
dq = m*l*j;			#heat supplied in ergs
dw = p*v;			#work done in ergs
du = dq-dw;			#internal energy developed in ergs

# Result
print 'internal energy of water is %.2E ergs'%(du)
internal energy of water is 2.08E+10 ergs

Example 8.3 pageno : 261

In [7]:
# Variables
dv = 10;			#ratio of original volume to final volume
t1 = 293;			#inital temperature in K
y = 1.41;			#coefficent of expansion

# Calculations
t2 = t1*(dv)**(y-1);			#final temperature in K

# Result
print 'the final temperature is %.f K'%(t2)
the final temperature is 753 K

Example 8.4 pageno : 261

In [8]:
# Variables
t = 273;			#temperature of earth at height h in K
p = 760;			#pressure in mm of hg
dp = 1;			#change in pressure in mm of hg
y = 1.418;			#coefficient of expansion

# Calculations
dt = ((y-1)/y)*dp*t/p;			#change in temperature in deg.C

# Result
print 'the change in temperature is %3.3f deg.C'%(dt)
the change in temperature is 0.106 deg.C

Example 8.5 pageno : 262

In [12]:
# Variables
p1 = 2;			#pressure initial in atm
p2 = 1.;			#pressure final in atm
t1 = 273 + 15;			#inital temperature in K
y = 1.4;			#coefficent of expansion

# Calculations
t2 = t1*(p2/p1)**((y-1)/y);			#final temperature in K
dt = t1-t2;			#drop in temperature in K

# Result
print 'drop in temperature is %3.2f K'%(dt)
print "Note : answer is slightly different because of rounding error"
drop in temperature is 51.74 K
Note : answer is slightly different because of rounding error

Example 8.6 pageno : 262

In [13]:
# Variables
t1 = 288;			#inital temperature in K
dv = 1./2;			#ratio of inital to final volume
y = 1.4;			#coefficient of expansion

# Calculations
t2 = t1*(dv)**(y-1);			#final temperature in K

# Result
print 'the final temperature is %3.1f K'%(t2)
the final temperature is 218.3 K

Example 8.7 pageno : 262

In [14]:
# Variables
y = 1.4;			#coefficent of exapnsion
p1 = 1;			#standard pressure in atm
dv = 50;			#ratio of initial volume to final volume
t1 = 273;			#standard temperature in K

# Calculations
p2 = p1*dv;			#final pressure when slowly compressed in atm
p3 = p1*(dv)**(y);			#final pressure when suddenly compressed in atm
t2 = t1*(dv)**(y-1);			#rise in temperature when it is suddenly compressed in K

# Result
print 'the final pressure when it is compressed slowly is %.f atm  \
\nthe final pressure when it is compressed suddenly is %.f atm  \
\nthe rise in temperature when it is suddenly compressed is %.0f K'%(p2,p3,t2)
the final pressure when it is compressed slowly is 50 atm  
the final pressure when it is compressed suddenly is 239 atm  
the rise in temperature when it is suddenly compressed is 1305 K

Example 8.8 pageno : 263

In [15]:
# Variables
y = 1.5;			#coefficient of expansion
dp = 1./8;			#ratio of inital pressure to final pressure
t1 = 300;			#inital tempreature in K

# Calculations
t2 = t1*(dp)**((1-y)/y);			#change in temperature in K
t3 = t2-t1;			#rise in temperature in K

# Result
print 'the rise in temperature is %3.2f K'%(t3)
the rise in temperature is 300.00 K

Example 8.9 pageno : 263

In [17]:
import math

# Variables
t1 = 400;			#inital temperature in K
dv = 2;			#ratio of volumes final and inital
r = 8.31*10**7;			#universal gas constant in ergs/kg.K

# Calculations
w = r*t1*math.log(2);			#work done in expanding isothermally in ergs

# Result
print 'the work done in expanding isothermally is %.1e ergs'%(w)
the work done in expanding isothermally is 2.3e+10 ergs

Example 8.10 page no : 263

In [21]:
# Variables
p1 = 76;			#inital pressure in cm
t1 = 290;			#inital temperature in K
y = 1.4;			#coefficent of expansion
dv = 2;			#ratio of inital to fianl volume when air expands isothermally 
dv1 = 2;			#ratio of inital to final volume when air expands adiabatically

# Calculations
p2 = p1/dv;			#final pressure when air expands isothermally in cm of hg
t2 = t1;			#final temperature when air expands isothermally in K
t3 = t2*(1./dv1)**(y-1);			#temprature when air expands adiabatically in K
p3 = p2*(1./dv1)**(y);			#final pressure when air expands adiabatically in mm of hg

# Result
print 'final pressure when air expands isothermally in cm of hg %3.2f mm of hg  \
\nfinal temperature when air expands isothermally is %3.2f K  \
\ntemprature when air expands adiabatically is %3.1f K  \
\nfinal pressure when air expands adiabatically is %3.2f cm of mercury'%(p2,t2,t3,p3)
final pressure when air expands isothermally in cm of hg 38.00 mm of hg  
final temperature when air expands isothermally is 290.00 K  
temprature when air expands adiabatically is 219.8 K  
final pressure when air expands adiabatically is 14.40 cm of mercury

Example 8.11 pageno : 264

In [25]:
# Variables
p = 76*13.6*981;			#pressure of air in dynes/sq.cm
v = 11100.;			#volume expanded in ml
t1 = 273.;			#inital temperature in K
t2 = 274.;			#final temperature in K
cv = 2.411;			#specific heat at constant volume in cal/K
j = 4.2*10**7;			#joules constant in ergs/cal

# Calculations
w = p*v*math.log(t2/t1);			#work done in ergs
h = cv*(t2-t1)+w/j;			        #heat supplied in cal

# Result
print 'the work done is %3.3e erg  \
\nthe heat supplied is %3.3f cal'%(w,h)
print "Note : answer is different because of rounding error"
the work done is 4.115e+07 erg  
the heat supplied is 3.391 cal
Note : answer is different because of rounding error

Example 8.12 pageno : 264

In [31]:
# Variables
p = 10**6;			#pressure of air in dynes
d = 0.0001293;			#density of air in gm/cc
t1 = 273;			#inital temperature in K
dv = 2;			#ratio of inital volume to final volume
y = 1.4;			#coefficient of expansion

# Calculations
r = p/(d*t1);			#universal gas constant in dynes.cc/gm.K
t2 = round(t1*(dv)**(y-1));			#final temperature in K
w = r*(t2-t1)/(y-1);			#work done in adiabatic compression in ergs

# Result
print 'work done in adiabatic compression is %.3e ergs'%(w)
print "Note : answer is different because of rounding error"
work done in adiabatic compression is 6.162e+09 ergs
Note : answer is different because of rounding error

Example 8.13 pageno : 265

In [32]:
# Variables
m = 5;			#mass of air in gm
cv = 0.172;			#specific heat at consmath.tant volume cal/gm
dt = 10;			#changi in temperature in K

# Calculations
ie = m*cv*dt;			#change in internal energy in cal

# Result
print 'change in internal energy is %3.2f cal'%(ie)
change in internal energy is 8.60 cal

Example 8.14 pageno : 265

In [36]:
# Variables
v1 = 10**3;			#inital volume in cc
v2 = 2*v1;			#final volume in cc
p1 = 76*13.6*981;			#pressure in dyne/sq.cm
t1 = 273;			#intial temperature in K
d = 1.29;			#density of the gas gm/lit
cv = 0.168;			#specific heat at constant volume in cal/gm

# Calculations
t2 = (v2/v1)*t1;			#final temperature in K
r = 0.068;			#universal gas consmath.tant in cal
cp = cv+r;			#specific heat at constant pressure in cal
q = d*cp*(t2-t1);			#heat supplied in cal

# Result
print 'the heat supplied to the gas is %3.2f cal'%(q)
print "Note: answer is slightly different because of rounding error."
the heat supplied to the gas is 83.11 cal
Note: answer is slightly different because of rounding error.

Example 8.15 pageno : 165

In [38]:
# Variables
t = 303;			#temperature of the one mole of the argon in K
v1 = 1;			#intial volume in litres
v2 = 10;			#final volume in litres
r = 8.31*10**7;			#universal gas constant in ergs/K.mol

# Calculations
w = r*t*math.log(v2/v1);			#work done in isothermal expansion in ergs

# Result
print 'the work done in isothermal expansion is %.1e ergs'%(w)
the work done in isothermal expansion is 5.8e+10 ergs

Example 8.16 pageno : 266

In [40]:
# Variables
dv = 4;			#final volume of neon in lit
t = 273;			#temperature of the gas in K
n = 2.6/22.4;			#the no.of moles of neon
r = 1.98;			#universal gas constant in cal/K.mol

# Calculations
w = n*t*r*math.log(dv);			#work done by gas in ergs

# Result
print 'the work done by 2.6lit of neon is %3.2f ergs'%(w)
print "Note: answer is slightly different because of rounding error."
the work done by 2.6lit of neon is 86.98 ergs
Note: answer is slightly different because of rounding error.

Example 8.18 page no : 266

In [46]:
import math

# Variables
dv = 10**(-3);			#ratio of initial and final volume
t1 = 10**5;			#initial temperature in K
y = 1.66;			#coefficient of expansion

# Calculations
t2 = t1*((4./3*math.pi*10**12)/(4./3*math.pi*10**15))**(y-1);			#final temperature in K

# Result
print 'final temperature of the gas is %3.2f K'%(t2)
print "Note : Answer in book is wrong. Please calculate manually."
final temperature of the gas is 1047.13 K
Note : Answer in book is wrong. Please calculate manually.

Example 8.19 pageno : 267

In [42]:
# Variables
p1 = 8.;			#intial pressure in cm of hg
p2 = 6.;			#final pressure in cm of hg
v1 = 1000.;			#intial volume in cc
v2 = 1190.;			#final volume in cc

# Calculations
y = math.log(p1/p2)/math.log(v2/v1);			#coefficient of expansion

# Result
print 'the coefficent of expansion is %3.2f'%(y)
the coefficent of expansion is 1.65