# Chapter 13: Inelastic Action¶

## Example 13.13.1, Page No:461¶

In :
import math

#Variable Decleration
d=150 #Depth of the web in mm
wf=100 #Width of the flange in mm
df=20 #Depth of the flange in mm
t=20 #Thickness of the web in mm

#Calculations
y_bar=10**-3*(((wf*df*(d+df*0.5))+(d*t*d*0.5))/(wf*df+d*t)) #Distance of Neutral Axis in m
#Simplfying the computation
a=wf*df**3*12**-1
b=wf*df*((d+df*0.5)-y_bar*10**3)**2
c=t*d**3*12**-1
f=t*d*((d*0.5)-y_bar*10**3)**2
I=(a+b+c+f)*10**-12 #Moment of inertia in mm^3

#Limit Moment
yp=(wf*df+d*t)/(2*t) #Plastic Neutral Axis in mm
Myp=I/y_bar #Yielding will start at moment without the stress term to ease computation
mom=10**-9*((t*yp**2*0.5)+(wf*df*(d-yp+10))+(t*25**2*0.5)) #Sum of 1st moments
Ml_Myp=mom*Myp**-1 #Ratio

#Result
print "The ratio ML/Myp=",round(Ml_Myp,3)

The ratio ML/Myp= 1.765


## Example 13.13.2, Page No:467¶

In :
import math
import numpy as np

#Variable Decleration
E_st=200 #Youngs Modulus of Steel in GPa
sigma_st_yp=290 #Yielding Stress in MPa
E_al=70 #Youngs Modulus of Aluminium in GPa
sigma_al_yp=330 #Yielding Stresss of Aluminium in MPa
A_st=900 #Area of steel rod in mm^2
A_al=600 #Area of Aluminium rod in mm^2
L_st=350 #Length of the steel rod in mm
L_al=250 #Length of the aluminium rod in mm

#Calculations
P_st=sigma_st_yp*A_st*10**-3 #Load in limiting condition in kN
P_al=sigma_al_yp*A_al*10**-3 #Load in limiting condition in kN

#Solving for Pst and Pal using matri approach
A=np.array([[1,2],[L_st*(E_st*A_st)**-1,-L_al*(E_al*A_al)**-1]])
B=np.array([P_L,0])

#Residual Stresses

The Residual stresses are as follows