Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rectangular reinforced cross section (including visualisation) #351

Merged
merged 69 commits into from
Nov 6, 2024

Conversation

egarciamendez
Copy link
Member

@egarciamendez egarciamendez commented Sep 8, 2024

Description

Rectangular reinforced cross section (including visualization)

There we are again...this time ready for Blueprints:

  • Base class is made thinking about extension with another reinforced cross section (circular, octagonal, etc)
  • Interface made as clean as possible , hopefully really easy and intuitive to use
  • Plotter out of the box but swappable if you want (own logo, own colors, totally other plot if you want)

Fixes #268

afbeelding

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Checklist:

  • I have added tests that prove my fix is effective or that my feature works
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • New and existing unit tests pass locally with my changes
from blueprints.materials.concrete import ConcreteMaterial, ConcreteStrengthClass
from blueprints.materials.reinforcement_steel import ReinforcementSteelQuality, ReinforcementSteelMaterial
from blueprints.structural_sections.concrete.rebar import Rebar
from blueprints.structural_sections.concrete.reinforced_concrete_sections.rectangular import RectangularReinforcedCrossSection

# Define a concrete material
concrete = ConcreteMaterial(concrete_class=ConcreteStrengthClass.C35_45)

# Define a reinforcement steel material
steel = ReinforcementSteelMaterial(steel_quality=ReinforcementSteelQuality.B500B)

# Define a rectangular reinforced cross-section
cs = RectangularReinforcedCrossSection(
    width=1000,
    height=800,
    covers=(45, 30, 35, 50),  # upper, right, lower, left
    concrete_material=concrete,
)

# Add reinforcement to the cross-section
cs.add_longitudinal_reinforcement_by_quantity(
    n=5,
    diameter=14,
    edge="upper",
    material=steel,
)
cs.add_longitudinal_reinforcement_by_quantity(
    n=4,
    diameter=40,
    edge="lower",
    material=steel,
)

# Add stirrups to the cross-section
cs.add_stirrup_along_edges(
    diameter=8,
    distance=150,
    material=steel,
)
# Add stirrups to the cross-section
cs.add_stirrup_along_edges(
    diameter=12,
    distance=300,
    material=steel,
)

# Add a longitudinal rebar to the cross-section
cs.add_longitudinal_rebar(
    rebar=Rebar(
        diameter=12,
        x=-250,
        y=-100,
        material=steel,
    )
)

cs.plot(show=True)

Copy link
Contributor

@bro-wi bro-wi left a comment

Choose a reason for hiding this comment

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

Nice work! some minor comments, after that I think we're good to go.

…ctions/rectangular.py

Co-authored-by: Wichard Bron <102153534+bro-wi@users.noreply.github.com>
Copy link
Contributor

@RamiEvans RamiEvans left a comment

Choose a reason for hiding this comment

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

General comments on coding - less engineering check

@egarciamendez egarciamendez merged commit 54e842c into main Nov 6, 2024
4 checks passed
@egarciamendez egarciamendez deleted the adding_reinforcement_configurations branch November 6, 2024 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[✨ Feature request]: EPIC: Rectangular Reinforced Cross Section
3 participants