-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNormalstrss.py
28 lines (20 loc) · 1.2 KB
/
Normalstrss.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import numpy as np
def Normalstress(parameters,element_locations):
#normalstress along booms due to bending around z axis
ycentroid = parameters['ideal_cog_y']
zcentroid = parameters['ideal_cog_z']
Iyyprimeid = parameters['Iyy']
Izzprimeid = parameters['Izz']
totalstressz = np.zeros([len(element_locations['y_booms']),len(parameters['Moment_z'])])
totalstressy = np.zeros([len(element_locations['y_booms']),len(parameters['Moment_z'])])
#Calculates normal stress due to bending around zprime axis
for i in range(len(parameters['Moment_z'])):
for j in range(len(element_locations['z_booms'])):
sigmazx = (parameters['Moment_z'][i]*(-element_locations['y_booms'][j]-ycentroid))/Izzprimeid
totalstressz[j,i] = sigmazx
#Calculates normal stress due to bending around yprime axis
for i in range(len(parameters['Moment_y'])):
for j in range(len(element_locations['z_booms'])):
sigmayx = (parameters['Moment_y'][i]*(element_locations['z_booms'][j]-zcentroid))/Iyyprimeid
totalstressy[j,i] = sigmayx
parameters['normalstress'] = totalstressy + totalstressz