# Chapter 05: Energy methods¶

## Example 5.1 Pg.No.116¶

In [2]:
from __future__ import division
import math

A=1800        # cross sectional area (mm^2)
E=200000        #youngs modulus  (N/mm^2)
sum_FLdFdP_B=1268*10**6      #(N.mm^2)
sum_FLdFdP_D=880*10**6     #(N.mm^2)

del_Bv=sum_FLdFdP_B/A/E
del_Dh=sum_FLdFdP_D/A/E

print "\ndeflection at point B =%2.2f mm\n"%(del_Bv)
print "deflection at point D =%2.2f mm\n"%(del_Dh)

deflection at point B =3.52 mm

deflection at point D =2.44 mm



## Example 5.9 Pg.No.142¶

In [8]:
from __future__ import division
import math
import numpy as np

a=np.array([[4.32,2.7],[2.7,11.62]])
b=np.array([27.1,48.11])
x=np.linalg.solve(a,b)
print "\nX1 = %1.2f kN & R2 = %1.2f kN\n"%(x[0],x[1])

X1 = 4.31 kN & R2 = 3.14 kN



## Example 5.10 Pg.No.144¶

In [14]:
from __future__ import division
import math

E=200000          #youngs modulus (N/mm^2)
A=200             #cross sectional area of each member (mm^2)
a=7*10**-6         #linear coefficient of heating (/C)
L=3*10**3          #length of BC (mm)
T=30               #temperature of truss (C)
sum_f2L=48000

expansion=L*T*a
a11=sum_f2L/A/E
X1=-0.63/a11        #compatibility condition
print "\nX1 = %5.0f N\n"%(X1)

X1 =  -525 N



## Example 5.12 Pg.No.151¶

In [16]:
from __future__ import division
import math

def_C=-1.05-.6            #deflection at C (mm)
L=300                      #length of cantilever (mm)

theta_B=math.atan(def_C/L)
print "\ndeflection at C = %2.3f degree\n"%(theta_B*180/math.pi)

deflection at C = -0.315 degree


In [ ]: