-
Notifications
You must be signed in to change notification settings - Fork 52
feat: EC2 2023 8.6-Partially Loaded Areas #125
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
base: dev-ec2-2023
Are you sure you want to change the base?
Changes from all commits
2e70179
b8f67bb
c299dcc
59a04f5
b7167aa
7189d31
4a0fcfb
84c0140
e0f1baa
f2cbb49
333dcbe
59f1198
34d85d2
a8ab129
ce4e432
938c0f5
6ba6dc9
a9c9263
50c65b7
ea3552b
4fd8b7e
1cffa61
b483d40
e9d953d
182e538
e509fb9
d57f945
bc049e4
0878723
e6cbd0d
9fa73b6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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). | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
|
|
||
| # 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 | ||
| ) |
There was a problem hiding this comment.
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