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

Fix concrete_rectangular_section() bug when n_side=1 #322

Merged
merged 2 commits into from
Oct 3, 2023
Merged

Conversation

TLCFEM
Copy link
Contributor

@TLCFEM TLCFEM commented Oct 3, 2023

concrete = Material(
    name="Concrete",
    elastic_modulus=30.1e3,
    poissons_ratio=0.2,
    density=2.4e-6,
    yield_strength=32,
    color="lightgrey",
)

# define the steel material
steel = Material(
    name="Steel",
    elastic_modulus=200e3,
    poissons_ratio=0.3,
    yield_strength=500,
    density=7.85e-6,
    color="grey",
)

# create the geometry
geom = concrete_rectangular_section(
    d=500,
    b=400,
    dia_top=10,
    area_top=300,
    n_top=3,
    c_top=30,
    dia_bot=10,
    area_bot=300,
    n_bot=3,
    c_bot=30,
    dia_side=10,
    area_side=300,
    n_side=1,
    c_side=30,
    n_circle=10,
    conc_mat=concrete,
    steel_mat=steel,
)

geom.create_mesh(mesh_sizes=[200])
sec = Section(geometry=geom)

When n_side=1, spacing_side becomes zero, causing two rebars at the same location, boolean operations fail.

@robbievanleeuwen robbievanleeuwen added the bug Something isn't working label Oct 3, 2023
@robbievanleeuwen robbievanleeuwen changed the title Bugfix: wrong size computed Fix concrete_rectangular_section() bug when n_side=1 Oct 3, 2023
@robbievanleeuwen robbievanleeuwen merged commit 3102246 into robbievanleeuwen:master Oct 3, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants