import math
#Initilization of Variables
b=12 #cm #width of steel plates
t=1 #cm #thickness of steel plates
sigma=75 #MPa #stress
#Calculations
#The maximum Load which the plate can carry
P=b*t*10**-6*sigma*10**6 #N
#Length of weld for static loading
#size of weld is equal to thickness of plate
S=t #cm
#P=2**0.5*l*S*sigma
#After substituting values and simplifying above equation, we get,
l=((P)*(2**0.5*S*sigma)**-1) #cm
#add 1.25 to allow start and stop of weld run
L=l+1.25 #cm
#Length of weld for Dynamic loading
#The stress concentration factor for transverse fillet weld is 1.5
sigma_2=sigma*1.5**-1 #MPa #Permissible tensile stress
#P=2**0.5*l_2*S*sigma_2
#After substituting values and simplifying above equation, we get,
l_2=((P)*(2**0.5*S*sigma_2)**-1) #cm
#add 1.25 cm
l_3=l_2+1.25 #cm
#Result
print"Length of weld for static loading",round(L,2),"cm"
print"Length of weld for Dynamic loading",round(l_3,2),"cm"
import math
#Initilization of Variables
d=6 #cm #diameter of rod
L=40 #cm #Length of steel plate
P=12 #KN #Load
sigma=180 #MPa #Allowable stress
#Calculations
A=pi*4**-1*d**2 #cm**2 #Area of rod
M=P*10**3*L #Ncm
F=M*A**-1 #N/cm #Force per unit cm of weld at top and bottom
V_s=P*10**3*(pi*d)**-1 #N/cm #vertical shear
R=(F**2+V_s**2)**0.5 #N/cm #resultant Load
S=R*(sigma)**-1*10**-2 #cm #size of weld
#Result
print"size of weld is",round(S,2),"cm"
import math
#Initilization of Variables
b=12 #cm #width of plate
S=t=1 #cm #thickness of plate
P=50 #KN #load
sigma_s=60 #MPa #shear stress
#Calculations (part-1)
#Under static Loading
#P=2**0.5*l*S*sigma_s
l=((P*10**3)*(2**0.5*S*sigma_s*10**-4*10**6)**-1) #cm
#add 1.25 cm to start and stop weld run
L=l+1.25 #cm #length of weld
#Calculations (part-2)
#Under Fatigue load
#stress concentration factor for parallel fillet weld is 2.7
sigma_s_2=sigma_s*2.7**-1 #MPa #permissible shear stress
#P=2**0.5*l_2*S*sigma_s_2
l_2=((P*10**3)*(2**0.5*S*sigma_s_2*10**-4*10**6)**-1) #cm
#add 1.25 cm
l_3=l_2+1.25 #cm #length of weld
#Result
print"Length of weld Under static Loading is",round(L,3),"cm"
print"Length of weld Under Ftigue Loading is",round(l_3,3),"cm"
import math
#Initilization of Variables
sigma_t=100 #MPa #tensile stress
P=170 #KN #Load
#Calculations
#For equal stress in the welds A and B, the load shared by the fillet welds will be proportional to size of weld
#t_a=0.7*s #Effective throat thickness of weld A in upper plate
#s=size of weld
#t_b=1.05*s #Effective throat thickness of weld B in lower plate
#For weld A
#P_1=l*t*sigma_t
#After substituting values and simplifying above equation, we get,
#P_1=84000*s #N (equation 1)
#P_2=l*t_2*sigma_t
#After substituting values and simplifying above equation, we get,
#P_2=126000*s #N (equation 2)
#After adding equation 1 and 2, we get,
#P=210000*s (equation 3)
#Now equating total forces of the fillets to load on the plates
s=P*10**3*210000**-1 #cm
#Result
print"size of end fillet is",round(s,2),"cm"
import math
#Initilization of Variables
L_1=30 #cm #length of longitudinal weld
L_2=16 #cm #length of transverse weld
#t=0.7*s #Effective thickness of weld
sigma_t_1=100 #MPa #working stress for transverse welds
sigma_t_2=85 #MPa #working stress for longitudinal welds
P=150 #KN #load
#Calculations
#For transverse weld
#P_1=L_1*t*10**-4*sigma_t_1*10**6
#After substituting values and simplifying above equation, we get,
#P_1=112000*s #N
#For longitudinal weld
#P_2=L_2*t*10**-4*sigma_t_2*10**6
#Total force of resistance of weld
#P=P_1+P_2 #N
#after adding we get,
#P=290500*s #N
#Now equating total forces of resistance to pull of the joint
s=P*10**3*290500**-1 #cm
#Result
print"size of weld is",round(s,3),"cm"
import math
#Initilization of Variables
P=200 #KN #Load carried by the angle
S=0.6 #mm #size of weld
b=4.46 #cm #Distance of centre of gravity of the angle from the top shorter leg
a=10.54 #cm #Distance of centre of gravity of the angle from the top edge of the angle
sigma_s=102.5 #MPa #shear stress
#l_1=Length of the top weld
#l_2=length of the bottom weld
#L=l_1+l_2 #cm #total length weld
#Using the relation
#P=L*0.7*S*sigma_s
#After substituting values and simplifying we get
L=(P*10**3)*(0.7*S*sigma_s*10**-4*10**6)**-1 #cm (equation 1)
#Using the relation
l_1=(L*b)*(a+b)**-1 #cm
#substituting this value in equation 1 we have,
l_2=L-l_1 #cm
#Result
print"Distance of centre of gravity of the angle from the top edge of the angle",round(l_2,2),"cm"
import math
#Initilization of Variables
P=12 #KN #Load
sigma_s=75 #N/mm**2 #shear stress
e=12 #cm
r_1=2.5 #cm
#Calculations
#A=(2*S*l)*(2)**0.5
#sigma_s=P*A**-1 #MPa #shear stress
#After substituting values and simplifying we get
#sigma_s=16.97*S**-1 #MPa
#I_g=S*l*(3*b**2+l**2)*(6)**-1 #cm**4 #Polar moment of Inertia of weld
#After substituting values and simplifying we get
#I_g=180.833*S #cm**4
r_2=((8*2**-1)**2)+((5*2**-1)**2)**0.5 #cm #max radius of weld
#sigma_s_2=P*e*r_2*I_g**-1 #MPa #shear stress due to bending moment
cos_theta=r_1*r_2**-1
#Now using the relation
#sigma_s=(sigma_s_1**2+sigma_s_2**2+2sigma_s_1*sigma_s_2*cos_theta
S=(2363.8958*5625**-1)**0.5 #cm #size of the weld
#Result
print"size of the weld",round(S,3),"cm"