Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
2e70179
Draft initial structure for the concrete class
mortenengen Dec 13, 2022
b8f67bb
Update docstring of base material
mortenengen Dec 13, 2022
c299dcc
minimum reinforcement areas functions
DanielGMorenaFhecor Dec 15, 2022
59a04f5
raise ValueError test functions for min area
DanielGMorenaFhecor Dec 27, 2022
b7167aa
crack_min_steel_without_direct_calculation
DanielGMorenaFhecor Jan 12, 2023
7189d31
Commit
DanielGMorenaFhecor Jan 12, 2023
4a0fcfb
crack without direct calculation tests
DanielGMorenaFhecor Jan 12, 2023
84c0140
adjusted bond strength
DanielGMorenaFhecor Jan 12, 2023
e0f1baa
hc_eff_concrete_tension formulation and testing
DanielGMorenaFhecor Jan 12, 2023
f2cbb49
requiremets.txt updated
DanielGMorenaFhecor Jan 12, 2023
333dcbe
rho_p_eff
DanielGMorenaFhecor Jan 12, 2023
59f1198
kt load duration
DanielGMorenaFhecor Jan 12, 2023
34d85d2
strain diff formula
DanielGMorenaFhecor Jan 12, 2023
a8ab129
chapter completed
DanielGMorenaFhecor Jan 13, 2023
ce4e432
imports and renamed functions
DanielGMorenaFhecor Jan 13, 2023
938c0f5
removed duplicate file
DanielGMorenaFhecor Jan 13, 2023
6ba6dc9
removed testing file
DanielGMorenaFhecor Jan 13, 2023
a9c9263
test renaming and docstring corrections
DanielGMorenaFhecor Jan 16, 2023
50c65b7
pull from upstream
DanielGMorenaFhecor Feb 8, 2023
ea3552b
Merge branch 'dev' of https://github.com/fib-international/structural…
DanielGMorenaFhecor Mar 9, 2023
4fd8b7e
230309 requested changes applied
DanielGMorenaFhecor Mar 9, 2023
1cffa61
small lint fixes
DanielGMorenaFhecor Mar 9, 2023
b483d40
vscode config updated
DanielGMorenaFhecor Mar 9, 2023
e9d953d
Merge branch 'dev' of https://github.com/fib-international/structural…
DanielGMorenaFhecor May 26, 2023
182e538
Merge branch 'dev' of https://github.com/fib-international/structural…
DanielGMorenaFhecor Dec 18, 2023
e509fb9
Merge branch 'dev' of https://github.com/fib-international/structural…
DanielGMorenaFhecor Mar 4, 2024
d57f945
Merge branch 'dev' of https://github.com/fib-international/structural…
DanielGMorenaFhecor Apr 4, 2024
bc049e4
Merge branch 'dev' of https://github.com/DanielGMorenaFhecor/structur…
DanielGMorenaFhecor Jul 30, 2024
0878723
chapter 8.6 finished
DanielGMorenaFhecor Aug 5, 2024
e6cbd0d
Merge branch 'dev' into ec2_2023-8.6
mortenengen Oct 17, 2024
9fa73b6
Fix docstring
mortenengen Oct 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions structuralcodes/codes/ec2_2023/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@
wk_cal,
wk_cal2,
)
from ._section_8_6_partially_loaded_areas import sigma_Rd_u
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe it is better the name sigma_Rdu? The u is not a subscript of Rd


__all__ = [
'sigma_Rd_u',
'A_phi_correction_exp',
'alpha_c_th',
'alpha_s_th',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
"""Functions from Section 8.6 of EN 1992-1-1:2023."""

import math


def sigma_Rd_u(
fcd: float,
a0: float,
b0: float,
a1: float,
b: float,
ea: float = 0,
eb: float = 0,
nu_part: float = 3.0,
) -> float:
"""Calculate the design resistance for partially loaded areas without
horizontal force components.

EN1992-1-1:2023 Eq. (8.126).
Copy link
Collaborator

Choose a reason for hiding this comment

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

Actually here there is not only (8.126) implemented, but also (8.127), (8.128), (8.129),...

A 1:1 implementation of (8.126) would require as input arguments in the function signature: fcd, Ac1, Ac0, nu_part


Args:
fcd (float): Design value of concrete compressive strength in MPa.
a0 (float): Length of the loaded area in the direction perpendicular to
the closest edge in mm.
b0 (float): Width of the loaded area in mm.
a1 (float): Length of the load introduction block parallel to a0 in mm.
b (float): Total width of the supporting area in mm.
ea (float): Eccentricity of the applied load parallel to a0 in mm.
Default is 0.
eb (float): Eccentricity of the applied load parallel to b0 (mm).
Default is 0.
nu_part (float): Confinement factor. Default is 3.0.

Returns:
float: Design resistance in MPa.

Raises:
ValueError: If any of the input dimensions or resistances are negative.
"""
if fcd < 0:
raise ValueError(f'fcd must not be negative. Got {fcd}')
if a0 < 0:
raise ValueError(f'a0 must not be negative. Got {a0}')
if b0 < 0:
raise ValueError(f'b0 must not be negative. Got {b0}')
if a1 < 0:
raise ValueError(f'a1 must not be negative. Got {a1}')
if b < 0:
raise ValueError(f'b must not be negative. Got {b}')
if ea < 0:
raise ValueError(f'ea must not be negative. Got {ea}')
if eb < 0:
raise ValueError(f'eb must not be negative. Got {eb}')

# Eccentrically reduced loaded area
a0_red = a0 - 2 * ea
b0_red = b0 - 2 * eb
Ac0_red = a0_red * b0_red # in mm²
Comment on lines +55 to +58
Copy link
Collaborator

Choose a reason for hiding this comment

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

Continuing above comment, for instance if we are in concentrically loaded area with don't need eccentiricity and determination of Ac0,red, so I find it strange having to specify this as a mandatory input.
One possible solution is refactor these equations into multiple functions. Alternatively we could use default values documenting it?
What do you think?


# Contributing concrete area
Ac1 = a1 * min(b0 + (a1 - a0), b) # in mm²

# Design resistance
sigma_Rdu = fcd * math.sqrt(Ac1 / Ac0_red)
return min(sigma_Rdu, nu_part * fcd)
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
"""Test for Functions from Section 8.6 of EN 1992-1-1:2023."""

import pytest

from structuralcodes.codes.ec2_2023 import _section_8_6_partially_loaded_areas


@pytest.mark.parametrize(
'f_cd, a0, b0, a1, b, ea, eb, nu_part, expected',
[
(25, 300, 200, 350, 500, 0, 0, 3.0, 30.19),
(30, 400, 300, 450, 600, 20, 10, 3.0, 37.5),
(40, 500, 400, 550, 700, 30, 20, 3.0, 50.0),
],
)
def test_calculate_design_resistance(
f_cd, a0, b0, a1, b, ea, eb, nu_part, expected
):
"""Test calculate_design_resistance with various
inputs to verify correctness.
"""
assert (
pytest.approx(
_section_8_6_partially_loaded_areas.sigma_Rd_u(
f_cd, a0, b0, a1, b, ea, eb, nu_part
),
rel=1e-2,
)
== expected
)