Skip to content

Conversation

@DanielGMorenaFhecor
Copy link
Collaborator

I have just added two new methods (and their respective tests) that were missing in for the 'Deflection Control' chapter from the Eurocode 2:2023.

This work should complete the Issue #52 unless otherwise specified.

mortenengen and others added 29 commits December 13, 2022 21:01
Co-authored-by: talledodiego <38036285+talledodiego@users.noreply.github.com>
@DanielGMorenaFhecor DanielGMorenaFhecor added the enhancement New feature or request label Jul 30, 2024
@DanielGMorenaFhecor DanielGMorenaFhecor added the EC2 2023 Eurocode 2 (2023) label Jul 30, 2024
@DanielGMorenaFhecor DanielGMorenaFhecor self-assigned this Jul 30, 2024
@mortenengen mortenengen self-requested a review July 30, 2024 09:27
@mortenengen mortenengen linked an issue Jul 30, 2024 that may be closed by this pull request
1 task
@mortenengen mortenengen changed the title Ec2 2023 9.3 - 9.3.2 and 9.3.4 feat: Ec2 2023 9.3 - 9.3.2 and 9.3.4 Jul 31, 2024
@mortenengen mortenengen changed the base branch from dev to dev-ec2-2023 October 10, 2024 19:28
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.

Thanks for the excellent contribution 👍 I have merged dev and fixed docstrings before Diego will check the code equations.

Copy link
Collaborator

@talledodiego talledodiego left a comment

Choose a reason for hiding this comment

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

Excellent!
A couple of minor comments.

return wk_cal_, k_1_r_, srm_cal_, epssm_epscm_


def simpl_span_depth_ratio(
Copy link
Collaborator

Choose a reason for hiding this comment

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

May the prefix in the name simpl_ make some confusion with the simply supported conditions? If so, I suggest to rethink slighly the name.

the necessary values.

Args:
ss (str): An integer corresponding to the structural system type: 'ss'
Copy link
Collaborator

Choose a reason for hiding this comment

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

the final ss should be on a new line?

for simply supported beams/slabs, 'es' for end spans or one-way
spanning slab, 'is' for interior spans or one-way spanning slab,
'c' for cantilevers.
wr (float): The mechanical reinforcement ratio, expressed as a decimal
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should the relation for wr be implemented in a function with the equation reported in note a) of Table 9.3?

45, 30).

Returns:
float: The interpolated or extrapolated l/d ratio.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should be extrapolation permitted?
Notes a) and b) in Table 9.3 state that intermediate values may be interpolated (there is no mention to extrapolation).
"Extrapolation" is mentioned in subclause (3) with reference to other support conditions (multiplying them by cubic root of ...).

psi_2 = 0.3.

It uses linear interpolation; however, cubic or nearest interpolation
methods can also be applied.
Copy link
Collaborator

Choose a reason for hiding this comment

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

can something else than linear be used in this code? I don't see a kwarg for permitting so.

Deflection limits are set to l/250, in line with the standards.

The `wr` and `ll_tl` values should ideally be within the bounds given
in the table. Extrapolation is possible but may lead to less accurate
Copy link
Collaborator

Choose a reason for hiding this comment

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

See previous comment. I don't know if extrapolation should be permitted. Anyhow it seems to me that griddata does not manage extrapolation and returns nan?

Comment on lines +451 to +452
load_type: Literal['short', 'cycle'],
sigma_sr_sigma_s: float,
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe zeta should be the input parameter and factor out a new equation for (9,29) with definition of zeta?

Comment on lines +463 to +472
load_type (str): Used for getting the beta_parameter that takes into
consideration the type of the load. Short for 'short' loads and
'cycle' for repeated loading.
sigma_sr_sigma_s (float): The ratio between the highest stress having
occurred up to the moment being analysed in the tension
reinforcement calculated on the basis of a cracked section and the
stress in the tension reinforcement calculated on the basis of a
cracked section under loading conditions causing first cracking.
Can be replaced by Mcr/M or Ncr/N where Mcr is the cracking moment
and Ncr is the cracking force.
Copy link
Collaborator

Choose a reason for hiding this comment

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

See previous comment about factoring out (9.29)

Comment on lines +477 to +478
beta = 1.0 if load_type == 'short' else 0.5
zeta = max(0, 1 - beta * sigma_sr_sigma_s**2)
Copy link
Collaborator

Choose a reason for hiding this comment

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

See previous comment about factoring out this portion.

Comment on lines +501 to +522
@pytest.mark.parametrize(
'alpha_I, alpha_II, load_type, sigma_sr_sigma_s, expected',
[
# Basic functionality with short load type
(1.0, 0.5, 'short', 0.0, 0.5),
(1.0, 0.5, 'short', 1.0, 1.0),
# Basic functionality with cycle load type
(1.0, 0.5, 'cycle', 0.0, 0.5),
(1.0, 0.5, 'cycle', 1.0, 0.75),
# Testing edge cases where sigma_sr_sigma_s is at boundary conditions
(1.0, 0.5, 'short', -1.0, 1.0),
(1.0, 0.5, 'cycle', -1.0, 0.75),
# Testing extremes of sigma_sr_sigma_s
(1.0, 0.5, 'short', 10.0, 1.0),
(1.0, 0.5, 'cycle', 10.0, 1.0),
],
)
def test_delta_gen(alpha_I, alpha_II, load_type, sigma_sr_sigma_s, expected):
"""Test the general method for deflection calculations."""
assert _section9_sls.delta_gen(
alpha_I, alpha_II, load_type, sigma_sr_sigma_s
) == pytest.approx(expected)
Copy link
Collaborator

Choose a reason for hiding this comment

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

See previous comment about factoring out (9.29).

@talledodiego talledodiego moved this from Compliance review to Changes requested in EC2 2023 PR tracker Sep 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

EC2 2023 Eurocode 2 (2023) enhancement New feature or request

Projects

Status: Changes requested
Status: Under review 👀

Development

Successfully merging this pull request may close these issues.

EC2 2023: Deflection control

3 participants