Skip to content

Analysing doubly symmetric reinforced section at 45 degree angle, weird behaviour, crashes kernel...? #58

@Agent6-6-6

Description

@Agent6-6-6

Hi @robbievanleeuwen, this is a bit of a weird one that I have encountered a few times and boiled it down the following:-

Describe the bug
Running the code below results in various consistent errors occurring from crashing the kernel and returning a triangle-related error. However, it completes every now and then (often only the first time you run it from VSCode in a jupyter notebook after booting up, but the next time you run it the same errors)!

Very weird, beyond my skills to really diagnose the cause.

This behaviour seems to occur when utilising a doubly symmetric section (section and reinforcement), and with a theta of 45 degrees only.

One thing I have noted is if say you go to 45+180 or 45+90 degrees rotation for the same section effectively being analysed, it always works. So it is something specifically about 45-degree neutral axes rotation that's causing the effect as far as I can tell.

Can you confirm you see the same behaviour? Any ideas?

Error variation 1
image
Error variation 2
image

To Reproduce
Run this code

import numpy as np
import matplotlib.pyplot as plt

import concreteproperties.stress_strain_profile as ssp
from concreteproperties.material import Concrete
from concreteproperties.material import SteelBar
from sectionproperties.pre.library.concrete_sections import concrete_rectangular_section
from concreteproperties.concrete_section import ConcreteSection
from concreteproperties.results import MomentInteractionResults

concrete = Concrete(
    name="40 MPa Concrete",
    density=2.4e-6,
    stress_strain_profile=ssp.ConcreteLinear(elastic_modulus=30e3),
    ultimate_stress_strain_profile=ssp.RectangularStressBlock(
        compressive_strength=40,
        alpha=0.85,
        gamma=0.77,
        ultimate_strain=0.003,
    ),
    flexural_tensile_strength=3.4,
    colour="lightgrey",
)

steel = SteelBar(
    name="500 MPa Steel",
    density=7.85e-6,
    stress_strain_profile=ssp.SteelElasticPlastic(
        yield_strength=500,
        elastic_modulus=200e3,
        fracture_strain=0.15,
    ),
    colour="grey",
)

bar_dia = 20
geom_col = concrete_rectangular_section(
    b=600,
    d=600,
    dia_top=bar_dia,
    n_top=4,
    dia_bot=bar_dia,
    n_bot=4,
    dia_side=bar_dia,
    n_side=2,
    n_circle=8,
    cover=35 + 12,
    area_top=bar_dia**2 * np.pi / 4,
    area_bot=bar_dia**2 * np.pi / 4,
    area_side=bar_dia**2 * np.pi / 4,
    conc_mat=concrete,
    steel_mat=steel,
)

conc_sec_col = ConcreteSection(geom_col)
conc_sec_col.plot_section()

f_mi_res = conc_sec_col.moment_interaction_diagram(theta=45 * np.pi / 180)

print('Success?')
f_mi_res.plot_diagram()

Desktop (please complete the following information):

  • OS: WIndows 10
  • Same behaviour on current version 2.1.3, and the latest master
  • Python 3.10.8 (errors seem to be independent of this, checked on python 3.8 as well and same behaviour, possibly seeing kernel crash more often than the triangle error on 3.8 though).

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions