#example 10.1 :
Gamma=18.0;
H=7.0;
sigmaa=0.3*Gamma*H;
print"maximum pressure intensity in kN/m^2 is",sigmaa ;
#partb
A=54.02;
B1=1.0/2*1.75*37.8+37.8*1.75-A;
B2=45.2;
C=54.02;
s=3.0; #spacing
Pa=C*s;
print "strut loads in kN is",Pa
Pb=(B1+B2)*s;
print "strut loads in kN is",Pb
Pc=C*s;
print "strut loads in kN is", Pc
#partc
Me=45.2*1.196-37.8*1.196*1.196/2;#Me=Mmax
Sall=170e3;#sigmaall
S=Me/Sall;
print "section modulus in m^3/m is ",round(S,7)
#partd
Mmax=(B1+B2)*s**2.0/8;
S=Mmax/Sall;
print"section modulus in m^3/m is",round(S,6)
#example 10.2
import math
phi=35.0;
Gamma=17.0; # kN/m^3
s=4; #spacing in m
H=9;
Ka=(math.tan(45*(math.pi/180)-35*(math.pi/(180.0*2))))**2
sigma=0.65*Gamma*Ka*H
A=sigma*5*5.0/6;
B1=sigma*5-A;
C=sigma*4*4/6.0;
B2=sigma*s-C;
Pa=A*s;
Pb=(B1+B2)*s;
Pc=C*s;
print "strut loads at A in kN is",round(Pa,2)
print "strut loads at B in kN is",round(Pb,2)
print "strut loads at C in kN is",round(Pc,2)
#example 10.3
import math
q=0;
Gamma=17; # in KN/m^3
B=3.0 # in meter
L=20; # in meter
c=30;# in KN/m^3
T=1.5;# in meter
H=5.5;# in meter
B1=B/2;#B'
B11=T*math.sqrt(2);#B''
FS=(5.14*c*(1+B11*0.2/L)+c*H/B1)/(Gamma*H+q) # from equation of factor of safety
print"factor of safety is",round(FS,2)
#example 10.4
L1=5; # in meter
L2=4;# in meter
B=5;# in meter
h=4.5;# in meter
icr=1 #
iexit= 0.54*h/L2
FOS=icr/iexit # Factor of safety
print "The Factory of safety is",round(FOS,3)