-
Notifications
You must be signed in to change notification settings - Fork 6
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
egarciamendez
merged 19 commits into
main
from
503-feature-request-add-formulas-617-622-from-nen_en_1993_1_1
Jun 5, 2025
Merged
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 2e722be
add formula 6.18 implementation and corresponding tests for shear for…
GerjanDorgelo 6513e32
add subformula of 6.18 implementation and corresponding tests for she…
GerjanDorgelo 03056d2
add formula 6.19 implementation and corresponding tests for shear for…
GerjanDorgelo 70a0220
add formula 6.20 implementation and corresponding tests for shear for…
GerjanDorgelo 02438b9
add formula 6.21 implementation and corresponding tests for shear for…
GerjanDorgelo 34cff00
add formula 6.22 implementation and corresponding tests for shear buc…
GerjanDorgelo 1729a9a
refactor formula classes for shear stress and design plastic shear re…
GerjanDorgelo 4d1739e
update parameter description for shear area in formula 6.18 implement…
GerjanDorgelo 559fba4
Merge branch 'main' into 503-feature-request-add-formulas-617-622-fro…
GerjanDorgelo c19c99c
Fix LaTeX formatting in test formulas for consistency
GerjanDorgelo 539b586
Update blueprints/codes/eurocode/nen_en_1993_1_1_c2_a1_2016/chapter_6…
GerjanDorgelo 86505b6
Refactor formulas in NEN-EN 1993-1-1+C2+A1:2016 to improve validation…
GerjanDorgelo daab118
Fix validation logic in formula 6.22 for shear buckling resistance; u…
GerjanDorgelo 6392aac
Merge branch '503-feature-request-add-formulas-617-622-from-nen_en_19…
GerjanDorgelo b282e4e
Merge remote-tracking branch 'origin/main' into 503-feature-request-a…
GerjanDorgelo e561c9d
Update implementation status for formulas 6.9 to 6.16 in Eurocode 3 d…
GerjanDorgelo ae534cd
Merge branch 'main' into 503-feature-request-add-formulas-617-622-fro…
GerjanDorgelo 4f51ebd
Merge branch 'main' into 503-feature-request-add-formulas-617-622-fro…
egarciamendez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
65 changes: 65 additions & 0 deletions
65
.../codes/eurocode/nen_en_1993_1_1_c2_a1_2016/chapter_6_ultimate_limit_state/formula_6_17.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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="", | ||
) |
73 changes: 73 additions & 0 deletions
73
.../codes/eurocode/nen_en_1993_1_1_c2_a1_2016/chapter_6_ultimate_limit_state/formula_6_18.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | ||
) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.