In [1]:

```
# Change in length due to heating
import math
#Variable Declaration
alfe=8.8*10**-6 # linear coefficient of thermal expansion for alumina
lo=0.1 # length of the alumina rod
delT=973.0 # difference in temperature
#Calculation
delL=alfe*lo*delT
#Result
print('The change in length produced by heating is %.3f mm'%(delL*10**3))
```

In [2]:

```
# Change in length due to heating
import math
#Variable Declaration
alfe=5.3*10**-6 # linear coefficient of thermal expansion or alumina
lo=0.1 # length of the alumina rod
delT=973.0 # difference in temperature
#Calculation
delL=alfe*lo*delT
#Result
print('The change in length produced by heating is %.3f mm'%(delL*10**3))
```

In [3]:

```
# Steady state heat Transfer
import math
#Variable Declaration
k=371.0 # Thermal conductivity of copper in J/msk
delT=50.0 # change in temperature
delx=10*10**-3 # change in thickness of the copper's sheet
#Calculation
ht=k*delT/delx
#Result
print('The steady state heat transfer of 10 mm copper sheet is %.3f *10^6 J.m^-2.s^-1'%(ht*10**-6))
```

In [4]:

```
# Compression Stress due to Heating
import math
#Variable Declaration
alfe=8.8*10**-6 # linear coefficient of thermal expansion for alumina
t1=1300.0 # Temperature 1
t2=327.0 # Temperature 2
E=370.0 # modulus of elasticity
#Calculation
delT=t1-t2
ep=alfe*delT
sig=ep*E
#Result
print('\nThe unconstrained thermal expansion produced by the heating is %.4f *10^-3'%(ep*10**3))
print('\nthe compression stress produced by heating is %.3f GPa'%(math.ceil(sig*1000)/1000))
```

In [5]:

```
# Heat flux transmitted
import math
#Variable Declaration
K=120.0 # thermal conductivity of brass
t2=423.0 # Temperature 2
t1=323.0 # Temperature 1
delT=t2-t1 # temperature difference
delx=7.5*10**-3 # change in thickness of the brass's sheet
A=0.5 # Area of the sheet
#Calculation
Q=K*A*(delT/delx)
hph=Q*3600
#Result
print('The heat flux transmitted through a sheet per hour is %.2f *10^9 J.h^-1'%(hph*10**-9))
```

In [6]:

```
# Young's Modulus
import math
#Variable Declaration
alfe=17*10**-6 # linear coefficient of thermal expansion for copper
t2=293.0 # Temperature 2
t1=233.0 # Temperature 1
delT=t2-t1 # temperature difference
st=119.0 # Maximum thermally induced stress
#Calculation
k=alfe*delT
E=(st*10**6)/k
#Result
print('\nThe strain produced in te rod is %.2f * 10^-3'%(k*10**3))
print('\nThe Youngs Modulus of the rod is %.1f GPa'%(E*10**-9))
```

In [7]:

```
# Temperature Change
import math
#Variable Declaration
lo=11.6 # length of the steel rod
delx=5.4*10**-3 # difference in length
alfL=12*10**-6 # Linear coefficient of thermal expansion for steel
#Calculation
delT=delx/(lo*alfL)
#Result
print('The maximum temperature cange can withstand without any thermal stress is %.2f K'%delT)
```

In [8]:

```
#compressive Sress
import math
#Variable Declaration
lo=0.35 # length of the Al rod
alfe=23.6*10**-6 # Linear coefficient of thermal expansion for Al
t2=358.0 # temperature 2
t1=288.0 # temperature 1
delT=t2-t1 # temperature difference
ym=69.0 # Young's modulus
#Calculation
k=alfe*delT
E=ym*k*10**9
#Result
print('\nThe strain produced in te rod is %.3f * 10^-3'%(k*10**3))
print('\nThe compressive stress produced in Al rod is %.3f GPa'%(E*10**-9))
```

In [9]:

```
# limit to compression stress
import math
#Variable Declaration
alfe=20*10**-6 # Linear coefficient of thermal expansion for alumina
t1=293.0 # temperature
sig=172.0 # compressive stress
E=100.0 # modulus of elasticity
#Calculation
delT=(sig*10**6)/(E*alfe*10**9)
#Result
print('\nTf-Ti=%.0f'%delT)
print('\n\nThe maximum temperature at which the rod may be heated without\nexceeding a compresssive stress of %.0f MPa is %.0f K'%(sig,delT+t1))
```

In [10]:

```
# Heat energy Requirement
import math
#Variable Declaration
h_ir=444.0 # specific heat capacity of iron in J.kg^-1.K^-1
h_gr=711.0 # specific heat capacity of graphite in J.kg^-1.K^-1
h_pl=1880.0 # specific heat capacity of polypropylene in J.kg^-1.K^-1
t2=373.0 # Temperature 2
t1=300.0 # Temperature 1
delT=t2-t1 # difference in temperature
W=2.0 # weight
#Calculation
#(a) For Iron
q=W*h_ir*delT
#(b)for Graphite
q1=W*h_gr*delT
#(b)for polypropylene
q2=W*h_pl*delT
#Result
print('The heat energy required to raise temperature %.0f K from its temperature of \niron, graphite and polypropylene is %.0f,%.0f,%.0f J respectively'%(delT,q,q1,q2))
```