Skip to content

fix: area computation on Generic Section#132

Merged
mortenengen merged 4 commits intodevfrom
fix-area-computation
Aug 9, 2024
Merged

fix: area computation on Generic Section#132
mortenengen merged 4 commits intodevfrom
fix-area-computation

Conversation

@talledodiego
Copy link
Collaborator

@talledodiego talledodiego commented Aug 7, 2024

This fix an issue mentioned in PR #113: the area should be the sum of surface + reinforcement area.

This code now returns the expected value:

# imports
from shapely import Polygon
from structuralcodes.materials.concrete import ConcreteEC2_2004
from structuralcodes.materials.reinforcement import ReinforcementEC2_2004
from structuralcodes.geometry import SurfaceGeometry
from structuralcodes.sections._reinforcement import add_reinforcement_line
from structuralcodes.sections import GenericSection

# Materials
concrete = ConcreteEC2_2004(25)
reinforcemnet = ReinforcementEC2_2004(fyk=500, Es=200000, density=7850, ftk=550, epsuk=0.07) 

# Create section
poly = Polygon(((0, 0), (350, 0), (350, 500), (0, 500)))
geo = SurfaceGeometry(poly, concrete)
geo = add_reinforcement_line(geo, (50, 450), (300, 450), 12, reinforcemnet, n=3)
geo = add_reinforcement_line(geo, (50, 50), (300, 50), 20, reinforcemnet, n=6)
sec = GenericSection(geo, integrator='marin')
# Print gross properties
print(f"area = {round(sec.gross_properties.area*1e-2)} cm2")
print(f"area_reinforcement = {round(sec.gross_properties.area_reinforcement*1e-2)} cm2")
print(f"area_surface = {round(sec.gross_properties.area_surface*1e-2)} cm2")

and the output is:

area = 1772 cm2
area_reinforcement = 22 cm2
area_surface = 1750 cm2

This fix an issue mentioned in PR #113: the area should be the sum of surface + reinforcement area.
@talledodiego talledodiego added this to the v0.0.1 milestone Aug 7, 2024
@talledodiego talledodiego added the bug Something isn't working label Aug 7, 2024
@mortenengen mortenengen changed the title Fix area computation on Generic Section fix: area computation on Generic Section Aug 7, 2024
@mortenengen mortenengen removed this from the v0.0.1 milestone Aug 7, 2024
@mortenengen
Copy link
Member

I think I get it, but I am not sure if I find it intuitive.

For regular reinforcement embedded inside the concrete section, I would expect the area to be computed as the gross area of the concrete section. However, increased accuracy could be obtained by considering the concrete area as the gross area minus the reinforcement area, but this difference is usually neglected. We also rarely consider subtracting the reinforcement when calculating the area moments of the concrete. For external reinforcement, on the other hand, the total area should be the sum of the two.

Could you please elaborate a bit?

@talledodiego talledodiego marked this pull request as draft August 7, 2024 19:14
@mortenengen mortenengen added question Further information is requested and removed bug Something isn't working labels Aug 8, 2024
@talledodiego
Copy link
Collaborator Author

You are right!
With the last commit c06b47c the API has been improved removing area_surface result from the gross properties. Now area contains the area of all surfaces while area_reinforcement contain area of all point geometries.

@talledodiego talledodiego marked this pull request as ready for review August 9, 2024 07:24
Copy link
Member

@mortenengen mortenengen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good clarification.

@mortenengen mortenengen merged commit 1a3cefa into dev Aug 9, 2024
@mortenengen mortenengen added enhancement New feature or request and removed question Further information is requested labels Aug 9, 2024
@mortenengen mortenengen deleted the fix-area-computation branch August 9, 2024 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done 🚀

Development

Successfully merging this pull request may close these issues.

2 participants