#Calculate the entropy change at 273 and 373 K
#Initialization of variables
H=100. #kJ
T1=273. #K
T2=373.#K
#calculations
S1=H*1000/T1
S2=H*1000/T2
#results
print '%s %d %s' %('Entropy change at 273 K is',S1,'J/K ')
print '%s %d %s' %('\n Entropy change at 373 K is',S2,'J/K ')
#Calculate the enthalpy of vaporization
#Initialization of variables
T=59.2 #K
#calculations
Hvap=85*(273.2+T)/1000.
#results
print '%s %d %s' %('Enthalpy of vaportization =',Hvap,'kJ/mol')
#Calculate the change in entropy
#Initialization of variables
SH2O=70 #J/K mol
SH2=131 #J/K mol
SO2=205 #J/K mol
#calculations
deltaS=2*SH2O-2*SH2-SO2
print '%s %d %s' %('Change in entropy =',deltaS,'J/K mol')
#Calculate the net heat transferred and entropy production per day
#Initialization of variables
Power=100. #W
time=1 #day
T=20 #C
#calculations
timeins=1*24*3600
qsurr=timeins*Power
Ssurr=qsurr/(T+273.)
#results
print '%s %d %s' %('Heat transferred to surroundings =',qsurr,'J')
print '%s %.2e %s' %('\n Entropy production per day =',Ssurr,'J/k')
#calculate the amount of food bird must consume
#Initialization of variables
import math
g=9.81 #m/s^2
m=30*math.pow(10,-3) #kg
d=10 #m
H=2.828*math.pow(10,6) #j/mol
M=180. #g/mol
#calculations
w=g*m*d
n=w/H
m=n*M
#results
print '%s %.1e %s' %('Amount bird must consume =',m,'g')