Skip to content

503 feature request add formulas 6.17-6.22 from nen-en-1993-1-1 #504

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

Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
cb0846e
add formula 6.17 implementation and corresponding tests for shear for…
GerjanDorgelo Feb 25, 2025
2e722be
add formula 6.18 implementation and corresponding tests for shear for…
GerjanDorgelo Feb 25, 2025
6513e32
add subformula of 6.18 implementation and corresponding tests for she…
GerjanDorgelo Feb 25, 2025
03056d2
add formula 6.19 implementation and corresponding tests for shear for…
GerjanDorgelo Feb 25, 2025
70a0220
add formula 6.20 implementation and corresponding tests for shear for…
GerjanDorgelo Feb 25, 2025
02438b9
add formula 6.21 implementation and corresponding tests for shear for…
GerjanDorgelo Feb 25, 2025
34cff00
add formula 6.22 implementation and corresponding tests for shear buc…
GerjanDorgelo Feb 25, 2025
1729a9a
refactor formula classes for shear stress and design plastic shear re…
GerjanDorgelo Feb 25, 2025
4d1739e
update parameter description for shear area in formula 6.18 implement…
GerjanDorgelo Feb 25, 2025
559fba4
Merge branch 'main' into 503-feature-request-add-formulas-617-622-fro…
GerjanDorgelo Apr 9, 2025
c19c99c
Fix LaTeX formatting in test formulas for consistency
GerjanDorgelo Apr 9, 2025
539b586
Update blueprints/codes/eurocode/nen_en_1993_1_1_c2_a1_2016/chapter_6…
GerjanDorgelo Apr 27, 2025
86505b6
Refactor formulas in NEN-EN 1993-1-1+C2+A1:2016 to improve validation…
GerjanDorgelo Apr 27, 2025
daab118
Fix validation logic in formula 6.22 for shear buckling resistance; u…
GerjanDorgelo Apr 27, 2025
6392aac
Merge branch '503-feature-request-add-formulas-617-622-from-nen_en_19…
GerjanDorgelo Apr 27, 2025
b282e4e
Merge remote-tracking branch 'origin/main' into 503-feature-request-a…
GerjanDorgelo Apr 27, 2025
e561c9d
Update implementation status for formulas 6.9 to 6.16 in Eurocode 3 d…
GerjanDorgelo Apr 27, 2025
ae534cd
Merge branch 'main' into 503-feature-request-add-formulas-617-622-fro…
GerjanDorgelo Apr 28, 2025
4f51ebd
Merge branch 'main' into 503-feature-request-add-formulas-617-622-fro…
egarciamendez Jun 5, 2025
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
"""Formula 6.17 from NEN-EN 1993-1-1+C2+A1:2016: Chapter 6 - Ultimate Limit State."""

from blueprints.codes.eurocode.nen_en_1993_1_1_c2_a1_2016 import NEN_EN_1993_1_1_C2_A1_2016
from blueprints.codes.formula import Formula
from blueprints.codes.latex_formula import LatexFormula, latex_replace_symbols
from blueprints.type_alias import N
from blueprints.validations import raise_if_less_or_equal_to_zero, raise_if_negative


class Form6Dot17CheckShearForce(Formula):
r"""Class representing formula 6.17 for checking the design value of the shear force."""

label = "6.17"
source_document = NEN_EN_1993_1_1_C2_A1_2016

def __init__(
self,
v_ed: N,
v_c_rd: N,
) -> None:
r"""Check the design value of the shear force at each cross section.

NEN-EN 1993-1-1+C2+A1:2016 art.6.2.6(1) - Formula (6.17)

Parameters
----------
v_ed : N
[$V_{Ed}$] Design value of the shear force [$N$].
v_c_rd : N
[$V_{c,Rd}$] Design shear resistance [$N$].
"""
super().__init__()
self.v_ed = v_ed
self.v_c_rd = v_c_rd

@staticmethod
def _evaluate(
v_ed: N,
v_c_rd: N,
) -> bool:
"""Evaluates the formula, for more information see the __init__ method."""
raise_if_less_or_equal_to_zero(v_c_rd=v_c_rd)
raise_if_negative(v_ed=v_ed)

return v_ed / v_c_rd <= 1.0

def latex(self) -> LatexFormula:
"""Returns LatexFormula object for formula 6.17."""
_equation: str = r"\left( \frac{V_{Ed}}{V_{c,Rd}} \leq 1.0 \right)"
_numeric_equation: str = latex_replace_symbols(
_equation,
{
"V_{Ed}": f"{self.v_ed:.3f}",
"V_{c,Rd}": f"{self.v_c_rd:.3f}",
},
False,
)
return LatexFormula(
return_symbol=r"CHECK",
result="OK" if self.__bool__() else "\\text{Not OK}",
equation=_equation,
numeric_equation=_numeric_equation,
comparison_operator_label="\\to",
unit="",
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
"""Formula 6.18 from NEN-EN 1993-1-1+C2+A1:2016: Chapter 6 - Ultimate Limit State."""

import numpy as np

from blueprints.codes.eurocode.nen_en_1993_1_1_c2_a1_2016 import NEN_EN_1993_1_1_C2_A1_2016
from blueprints.codes.formula import Formula
from blueprints.codes.latex_formula import LatexFormula, latex_replace_symbols
from blueprints.type_alias import DIMENSIONLESS, MM2, MPA, N
from blueprints.validations import raise_if_less_or_equal_to_zero, raise_if_negative


class Form6Dot18DesignPlasticShearResistance(Formula):
r"""Class representing formula 6.18 for the calculation of [$V_{pl,Rd}$]."""

label = "6.18"
source_document = NEN_EN_1993_1_1_C2_A1_2016

def __init__(
self,
a_v: MM2,
f_y: MPA,
gamma_m0: DIMENSIONLESS,
) -> None:
r"""[$V_{pl,Rd}$] Calculation of the design plastic shear resistance [$N$].

NEN-EN 1993-1-1+C2+A1:2016 art.6.2.6(2) - Formula (6.18)

Parameters
----------
a_v : MM2
[$A_v$] Shear area, to be taken from a subformula from 6.18 [$mm^2$].
f_y : MPA
[$f_y$] Yield strength of the material [$MPa$].
gamma_m0 : DIMENSIONLESS
[$\gamma_{M0}$] Partial safety factor for resistance of cross-sections.
"""
super().__init__()
self.a_v = a_v
self.f_y = f_y
self.gamma_m0 = gamma_m0

@staticmethod
def _evaluate(
a_v: MM2,
f_y: MPA,
gamma_m0: DIMENSIONLESS,
) -> N:
"""Evaluates the formula, for more information see the __init__ method."""
raise_if_negative(a_v=a_v, f_y=f_y)
raise_if_less_or_equal_to_zero(gamma_m0=gamma_m0)

return (a_v * (f_y / np.sqrt(3))) / gamma_m0

def latex(self) -> LatexFormula:
"""Returns LatexFormula object for formula 6.18."""
_equation: str = r"\frac{A_v \cdot (f_y / \sqrt{3})}{\gamma_{M0}}"
_numeric_equation: str = latex_replace_symbols(
_equation,
{
r"A_v": f"{self.a_v:.3f}",
r"f_y": f"{self.f_y:.3f}",
r"\gamma_{M0}": f"{self.gamma_m0:.3f}",
},
False,
)
return LatexFormula(
return_symbol=r"V_{pl,Rd}",
result=f"{self:.3f}",
equation=_equation,
numeric_equation=_numeric_equation,
comparison_operator_label="=",
unit="N",
)
Loading