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.

Area counted twice in plastic algorithm

See original GitHub issue

I have come across a case where the plastic algorithm can count an area twice and affect the plastic properties. See below example:

import sectionproperties.pre.library.primitive_sections as ps
from sectionproperties.analysis.section import Section

rect1 = ps.rectangular_section(d=600, b=300)
rect2 = ps.rectangular_section(d=100, b=100).shift_section(100, 450)
geom = rect1 + rect2
geom.create_mesh(100)
geom.plot_geometry()

sec = Section(geom)
sec.plot_mesh()

sec.calculate_geometric_properties()
print(sec.get_area())

sec.calculate_plastic_properties()
print(sec.get_pc())

The section meshes as expected and the correct area is calculated (area = 180000), however I believe the .split_section() method used by the plastic algorithm returns geometries that overlap for the top half of the section (i.e. two boxes are returned from the method and there is no hole in the larger box to accomodate the smaller box). This results in a plastic centroid shifted up the section (y_pc = 306.14, expecting y_pc = 300).

This is not the expected behaviour and it would be great to get a fix to this as this results in the incorrect reporting of plastic properties.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
connorferstercommented, Feb 26, 2022

Working on this…

0reactions
connorferstercommented, Feb 27, 2022

By using two analysis methods (shapely + FEM) and because these two geometry processors interpret overlapping geometries differently, I think this problem will be inevitable. Overlapping geometry creates ambiguity (did the user intend for “geometry 1” to take precedence or “geometry 2”?). I think the best way to deal with this issue (for now) is to post a warning and guide the user to a better solution.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Great Pacific Garbage Patch • The Ocean Cleanup
The Great Pacific Garbage Patch is the largest accumulation of ocean plastic in the world and is located between Hawaii and California.
Read more >
Evidence that the Great Pacific Garbage Patch is rapidly ...
To do so, we divided the count and weight of plastic objects within each category by the towed area of the sample.
Read more >
Twice elastic slope and plastic work criteria - ResearchGate
The plastic load of pressurised components can be calculated based on both the twice elastic slope and tangent methods. Both methods are problematic...
Read more >
Microplastics occurrence and frequency in soils under ...
The study area comprised soils under one of the following land ... All microplastic particles collected on each filter were counted twice.
Read more >
Constraining the atmospheric limb of the plastic cycle - PNAS
We postulate that, similar to other coarse mode aerosols, microplastics (<5 mm) are entrained into the atmosphere through mechanical processes, ...
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