Unable to calculate stress in a shape under loading. #434
-
I am having issues following the guide @ https://sectionproperties.readthedocs.io/en/stable/examples/analysis/stress_analysis.html When I attempt to run a stress analysis it does not recognize mxx as an input.
Code for replication: from sectionproperties.pre.geometry import Geometry, CompoundGeometry
from sectionproperties.analysis.section import Section
from sectionproperties.pre.library.steel_sections import i_section
from sectionproperties.pre.library.steel_sections import angle_section
from sectionproperties.pre.library.primitive_sections import circular_section
from sectionproperties.pre.library.steel_sections import tapered_flange_channel
from sectionproperties.pre.pre import Material
import sectionproperties.pre.geometry
import easygui
import math as math
#W-Shape Dimenions
Fy = 345#float(easygui.enterbox('Enter Yield Strength Fy (MPa) = '))
d = 537#float(easygui.enterbox('Enter Depth of W-Shape d (mm) = '))
b = 210#float(easygui.enterbox('Enter Width of W-Shape b (mm) = '))
t_f = 17.4#float(easygui.enterbox('Enter flange thickness t (mm) = '))
t_w = 10.9#float(easygui.enterbox('Enter web thickness w (mm) = '))
r = 11.4#float(easygui.enterbox('Enter fillet radius r (mm) = '))
n_r = 8
#Channel Dimensions
cd=381
cb=86
ct_f=16.5
ct_w=10.2
cr_r=0
cr_f=0
calpha=9.46
cn_r=0
#W-Shape Definition
geom = i_section(d=d, b=b, t_f=t_f, t_w=t_w, r=r, n_r=n_r)
#Channel Definition
geom2 = tapered_flange_channel(d=cd, b=cb, t_f=ct_f, t_w=ct_w, r_r=cr_r, r_f=cr_f, alpha=calpha, n_r=cn_r).rotate_section(angle=-90).align_center(align_to=geom).align_to(other=geom, on="top").shift_section(y_offset=(ct_w-cb))
#Shape Processing
reinforced = geom+geom2
reinforced.plot_geometry()
#Property Processing
reinforced.create_mesh(mesh_sizes=[10])
analysis_sec = Section(geometry=reinforced)
analysis_sec.plot_mesh()
analysis_sec.calculate_geometric_properties()
analysis_sec.calculate_plastic_properties()
analysis_sec.calculate_warping_properties()
analysis_sec.plot_centroids()
#Calculate Properties Table
analysis_sec.display_results(fmt='.4f')
loading = analysis_sec.calculate_stress(mxx=800e6) As an aside, I'm trying to find a reliable way to calculate the depth of web in compression to be able to calculate the rt value, and subsequently the moment resistance of an unsymetric shape (channel-capped I beam), shapes typically used for crane support systems. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @EngDM, can you confirm you are running the latest version of |
Beta Was this translation helpful? Give feedback.
Hi @EngDM, can you confirm you are running the latest version of
sectionproperties
? Inv2
a bending moment about the x-axis was passed tocalculate_stress
withMxx=
, however sincev3
, this has been changed tomxx=
to conform to the python style guide (release notes here - under breaking changes "Pythonic renaming of methods and variables...").