Chapter3-Zeroth law of thermodynamics

Ex1-pg63

In [2]:
##Part A Chapter 3 Example 1 pg no 63
##find the temperature in degree
T_F=98.6;##degree F
T_C=(T_F-32.)/1.8;##degree C
print"%s %.2f %s"%("Temperature in degree celsius = ",T_C," degree C");
Temperature in degree celsius =  37.00  degree C

Ex2-pg63

In [3]:
##Part A Chapter 3 Example 2 pg no 63
import math
import numpy
##find the celsius temperature
t_ice=0.;##degree C
p_ice=3.;##thermometric property
t_steam=100.;##degree C
p_steam=8.;##thermometric property
##t=a*log(p)+b/2
##solving by matrix multiplication for a and b
A=numpy.matrix([[math.log(p_ice), (1/2.)],[math.log(p_steam), (1/2.)]]);
B=numpy.matrix([[t_ice],[t_steam]]);
X=A**-1*B;
a=X[0];##constant
b=abs(X[1]);##constant
p=6.5;##thermometric property
t=a*math.log(p)+b/2.;##degree C
print"%s %.2f %s"%("Celsius temperature corresponding to thermometric property = ",t," degree C");
Celsius temperature corresponding to thermometric property =  302.85  degree C

Ex3-pg64

In [4]:
##Part A Chapter 3 Example 3 pg no 64
##find the temperature
t_ice=0;##degree C
E0=0.003*t_ice-5*10**-7*t_ice**2+0.5*10**-3;##V
t_steam=100.;##degree C
E100=0.003*t_steam-5*10**-7*t_steam**2+0.5*10**-3;##V
t=30.;##degree C
E30=0.003*t-5*10**-7*t**2+0.5*10**-3;##V
t=((E30-E0)/(E100-E0))*(t_steam-t_ice);##degree C
print"%s %.2f %s"%("Temperature shown by thermometer = ",t," degree C");
##Answer given in the book is wrong.
Temperature shown by thermometer =  30.36  degree C