General comments
See original GitHub issueDescribe the bug For a section made up of multiple CustomSections only the last mesh size defined seems to be being applied to all custom sections (with the others not being taken into account). Not sure if I am interpreting how it should be working incorrectly or not.
To Reproduce Steps to reproduce the behavior: Run the following, play with mesh sizes and see that first 4 have no effect on the mesh being generated.
import sectionproperties.pre.sections as sections
from sectionproperties.analysis.cross_section import CrossSection
def built_up_I_section():
d = 380
b = 100
t_f = 17.5
t_w = 10
r = 0
n_r = 1
I_section = sections.ISection(d=d, b=b, t_f=t_f, t_w=t_w, r=r, n_r=n_r, shift=[-b / 2, -d / 2])
weld_leg_size = 20
# create 'welds'
points1 = [[0, 0], [weld_leg_size, 0], [0, weld_leg_size]]
points2 = [[0, 0], [-weld_leg_size, 0], [0, weld_leg_size]]
points3 = [[0, 0], [weld_leg_size, 0], [0, -weld_leg_size]]
points4 = [[0, 0], [-weld_leg_size, 0], [0, -weld_leg_size]]
facets = [[0, 1], [1, 2], [2, 0]]
holes = []
control_points1 = [[0, 0]]
control_points2 = [[0, 0]]
control_points3 = [[0, 0]]
control_points4 = [[0, 0]]
weld1 = sections.CustomSection(points1, facets, holes, control_points1, shift=[t_w / 2, -d / 2 + t_f])
weld2 = sections.CustomSection(points2, facets, holes, control_points2, shift=[-t_w / 2, -d / 2 + t_f])
weld3 = sections.CustomSection(points3, facets, holes, control_points3, shift=[t_w / 2, d / 2 - t_f])
weld4 = sections.CustomSection(points4, facets, holes, control_points4, shift=[-t_w / 2, d / 2 - t_f])
# create a list of the customsections to be merged
section_list = [I_section, weld1, weld2, weld3, weld4]
# merge the 5vsections into one geometry object
geometry = sections.MergedSection(section_list)
# clean the geometry
geometry.clean_geometry()
geometry.plot_geometry() # plot the geometry
# create a mesh - in this line the last 10 mesh size is applied to all of the customsections, first 4 values are ignored
mesh = geometry.create_mesh(mesh_sizes=[100, 100, 100, 100, 10])
# create a CrossSection object
section = CrossSection(geometry, mesh)
# section.display_mesh_info() # display the mesh information
section.plot_mesh() # plot the generated mesh
Expected behavior Based on the above code and based on examples in the readme/readthedocs for built up sections I would have expected that the I section and first three triangular areas representing welds would have a different mesh size to the last triangular area.
Screenshots Results showing similar 10 mesh for all customsection elements
Desktop (please complete the following information):
- OS: Windows 10
- Version 1.03
- Note actually running through xlwings but altered my code to run by itself and demonstrate the effect
Additional context Excellent tool by the way!
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (16 by maintainers)
Top GitHub Comments
Hi Agent6-6-6,
Thanks for pointing that out, I didn’t realise the integration axis and hence the shear centre sign flips depending on which flange is in compression. Have implemented this now in the latest commit 90f8ffb.
Happy to hear your thoughts 😄
Robbie
Hi Robbie
I’ll give it a test and compare to some simple hand examples.
One comment though based on reviewing the code and trying a few examples with the new mono-symmetric section generator:-
For each axis there should be a plus and minus value (similar to the elastic moduli) dependent on which flange is in compression (see discussion above), the +/- values come about because of the shear center being of the opposite absolute sign from the elastic centroid for consideration of the section being flipped. plus and minus value should be consistent with the way section is being bent for determining the elastic modulus (for consistent approach). I am assuming the same holds true for any “general” defined section.
If you run an example with the top/bottom flange values being swapped vs original section you should see the same beta value will be reported except the opposite sign. The sign is quite important when using the value to calculate the moment capacity of a mono-symmetric section! For example manually flipping a monosymmetric I section gives the following results for beta values:-
152.77800483318694 2.3494952064576823e-06 152.77800483318694 2.3494952064576823e-06
&-152.77799891389088 -1.4679902385065195e-06 -152.77799891389088 -1.4679902385065195e-06