Plastic centroid/principal axis centroid not at elastic centroid for doubly symmetric section
See original GitHub issueDescribe the bug In the following code I would expect the plastic centroid to be at the origin (0, 0) and align with the elastic centroid. Yet it is reporting the plastic centroid below the origin. Section geometry centroid is shifted to 0,0 position.
Also, the horizontal principal axis is shown correctly at y=0, but the principal plastic axis centroid is not, being drawn below y=0.
The reported results agree with the plot in so far as the plastic centroid is not at 0,0 point.
Is this possibly a bug or maybe I’m missing something obvious here?
To Reproduce Run code below and observe results
import sectionproperties.pre.sections as sections
from sectionproperties.analysis.cross_section import CrossSection
mesh_area = 25 # max mesh size
d = 612 # I section depth
b_f = 229 # I-section flange width
t_f = 19.6 # I-section flange thickness
t_w = 11.9 # I-section web thickness
r_1 = 14 # I-section root radii
n_r = 50 # number of points considered around root radii
d_p = 650 # strengthening plate depth
b_p = 12 # strengthening plate thickness
# create constituent geometry
geometry1 = sections.ISection(d=d, b=b_f, t_f=t_f, t_w=t_w, r=r_1, n_r=n_r, shift=[-b_f / 2, -d / 2])
geometry2 = sections.RectangularSection(d=d_p, b=b_p, shift=[-b_f / 2 - b_p, -d_p / 2])
geometry3 = sections.RectangularSection(d=d_p, b=b_p, shift=[b_f / 2, -d_p / 2])
# create merged section
geometry = sections.MergedSection([geometry1, geometry2, geometry3])
# add holes
geometry.add_hole([-b_f / 2, 0])
geometry.add_hole([b_f / 2, 0])
# create mesh
mesh = geometry.create_mesh(mesh_sizes=[mesh_area, mesh_area, mesh_area])
# clean geometry
geometry.clean_geometry(verbose=True)
# create section
section = CrossSection(geometry, mesh)
# calculate results
section.calculate_geometric_properties()
section.calculate_plastic_properties()
section.calculate_warping_properties()
# plot results
section.plot_mesh()
section.plot_centroids()
# display all results
# check https://sectionproperties.readthedocs.io/en/latest/rst/post.html for definitions
section.display_results(fmt='.3f')
# this will specifically display torsion and warping constants
J = section.get_j()
I_w = section.get_gamma()
print(f'J = {J}')
print(f'I_w = {I_w}')
Expected behaviour For doubly symmetric section plastic and elastic centroid should align?
Screenshots Note how principal plastic axis centroid does not align with the principal axes, and plastic centroid is shown below elastic centroid:-
Additional context Using latest version 1.0.7
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (10 by maintainers)
Top GitHub Comments
I’ve added a PR that should add this check, but it is not nearly as clean looking as what @Agent6-6-6 posted above 😃 It does do the entire calculation vectorized in numpy though, so it should be much faster than looping in python.
Agree, I always find it useful to protect the user against themselves… by providing sufficient warnings when stuff matters.
If you’re already using shapely and moving that way you can check for “touching” geometry as follows:-
Probably the easiest way to implement the intersection check.