question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Describe 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 Figure_1

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:closed
  • Created 4 years ago
  • Comments:16 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
robbievanleeuwencommented, Apr 27, 2019

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

1reaction
Agent6-6-6commented, Apr 21, 2019

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

General Comments - OHCHR
CESCR: Draft general comment on Sustainable Development and the International Covenant on Economic, Social and Cultural Rights - Day of General Discussion on ......
Read more >
Compilation of General Comments and General ...
Compiles General Comments or Recommendations adopted by the Committee on Economic, Social and Cultural Rights, the Human Rights Committee, the Committee on ...
Read more >
Understanding the Treaty Bodies - General comments
General comments can provide substantive guidance on specific provisions of a treaty, or may provide more general guidance, such as what information should...
Read more >
General Comments/Recommendations - Refworld
General Comments /Recommendations. The UN Human Rights Treaty Committees publish their interpretation of the content of human rights ...
Read more >
General Comments | Icelandic Human Rights Centre
What is a General Comment? ... These documents provide guidelines for states parties on the interpretation of specific aspects of the human rights...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found