From 54ea123da437b8e212e874050a8ad654ad1b207d Mon Sep 17 00:00:00 2001 From: Rami Evans Date: Wed, 31 Jul 2024 15:25:46 +0200 Subject: [PATCH 1/9] Added formula 5 17 Included changes to type aliases to support compound units such as kNm2 Included tests (slight deviation from standard by using pytest fixture for setup and tear down) --- .../formula_5_17.py | 54 ++++++++++++++++ blueprints/type_alias.py | 5 ++ .../eurocode/ec2_1992_1_1_2011/formulas.md | 2 +- .../test_formula_5_17.py | 61 +++++++++++++++++++ 4 files changed, 121 insertions(+), 1 deletion(-) create mode 100644 blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_17.py create mode 100644 tests/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/test_formula_5_17.py diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_17.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_17.py new file mode 100644 index 00000000..80805a8e --- /dev/null +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_17.py @@ -0,0 +1,54 @@ +"""Formula 5.17 from NEN-EN 1992-1-1+C2:2011: Chapter 5 - Structural Analysis.""" + +import math + +from blueprints.codes.eurocode.nen_en_1992_1_1_c2_2011 import NEN_EN_1992_1_1_C2_2011 +from blueprints.codes.formula import Formula +from blueprints.codes.latex_formula import LatexFormula +from blueprints.type_alias import DIMENSIONLESS, M, KN_M2, KN +from blueprints.validations import raise_if_negative, raise_if_less_or_equal_to_zero + + +class Form5Dot17EffectiveLengthBucklingLoad(Formula): + """Class representing formula 5.17 for the calculation of effective length of unbraced members, in the + case where criteria (2) and (3) do not apply such as by variable loading, :math:`l_0`.""" + + label = "5.17" + source_document = NEN_EN_1992_1_1_C2_2011 + + def __init__(self, ei: KN_M2, n_b: KN) -> None: + """[:math:`l_{0}`] Effective length for unbraced members [:math:`m`]. + + NEN-EN 1992-1-1+C2:2011 art.5.8.3.2(6) - Formula (5.17) + + Parameters + ---------- + ei : DIMENSIONLESS + [:math:`EI`] is a representative bending stiffness [:math:`-`]. + n_b : DIMENSIONLESS + [:math:`N_{b}`] is the buckling load expressed in terms of EI (in equation (5.14) i should correspond + to this EI). [:math:`-`]. + """ + super().__init__() + self.ei = ei + self.n_b = n_b + + @staticmethod + def _evaluate( + ei: KN_M2, + n_b: KN + ) -> M: + """Evaluates the formula, for more information see the __init__ method.""" + raise_if_negative(ei=ei, n_b=n_b) + raise_if_less_or_equal_to_zero(n_b=n_b) + return math.pi * math.sqrt(ei/n_b) + + def latex(self) -> LatexFormula: + """Returns LatexFormula object for formula 5.17.""" + return LatexFormula( + return_symbol=r"l_0", + result=f"{self:.3f}", + equation=r"\pi \cdot \sqrt{\frac{EI}{N_{b}}}", + numeric_equation=rf"\pi \cdot \sqrt{{\frac{{{self.ei}}}{{{self.n_b}}}}}", + comparison_operator_label="=", + ) diff --git a/blueprints/type_alias.py b/blueprints/type_alias.py index c8a720b4..68b81314 100644 --- a/blueprints/type_alias.py +++ b/blueprints/type_alias.py @@ -55,6 +55,11 @@ M4 = float # +# +N_M2 = float +KN_M2 = float +# + # HOURS = float MINUTES = float diff --git a/docs/source/codes/eurocode/ec2_1992_1_1_2011/formulas.md b/docs/source/codes/eurocode/ec2_1992_1_1_2011/formulas.md index a06e265f..df8d763c 100644 --- a/docs/source/codes/eurocode/ec2_1992_1_1_2011/formulas.md +++ b/docs/source/codes/eurocode/ec2_1992_1_1_2011/formulas.md @@ -63,7 +63,7 @@ Total of 304 formulas present. | 5.14 | :heavy_check_mark: | | Form5Dot14SlendernessRatio | | 5.15 | :heavy_check_mark: | | Form5Dot15EffectiveLengthBraced | | 5.16 | :heavy_check_mark: | | Form5Dot16EffectiveLengthUnbraced | -| 5.17 | :x: | | | +| 5.17 | :heavy_check_mark: | | Form5Dot17EffectiveLengthBucklingLoad | | 5.18 | :x: | | | | 5.19 | :x: | | | | 5.20 | :x: | | | diff --git a/tests/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/test_formula_5_17.py b/tests/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/test_formula_5_17.py new file mode 100644 index 00000000..1f3db396 --- /dev/null +++ b/tests/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/test_formula_5_17.py @@ -0,0 +1,61 @@ +"""Testing formula 5.16 of NEN-EN 1992-1-1+C2:2011.""" + +import pytest + +from blueprints.codes.eurocode.nen_en_1992_1_1_c2_2011.chapter_5_structural_analysis.formula_5_17 import Form5Dot17EffectiveLengthBucklingLoad +from blueprints.validations import NegativeValueError, LessOrEqualToZeroError + + +class TestForm5Dot16EffectiveLengthUnbraced: + """Validation for formula 5.17 from NEN-EN 1992-1-1+C2:2011.""" + + @pytest.fixture() + def form_5_17(self): + yield Form5Dot17EffectiveLengthBucklingLoad(ei=1_000_000, n_b=5) + + def test_evaluation(self, form_5_17) -> None: + """Test the evaluation of the result.""" + + # Expected result, manually calculated + manually_calculated_result = 1404.96 # M + assert form_5_17 == pytest.approx(expected=manually_calculated_result, rel=1e-4) + + @pytest.mark.parametrize( + ("ei", "n_b"), + [ + (-1_000_000, 5), + (1_000_000, -5), + (-1_000_000, -5), + ], + ) + def test_raise_error_when_zero_pars_are_given(self, ei: float, n_b: float) -> None: + """Test zero values for ei, n_b.""" + with pytest.raises(NegativeValueError): + Form5Dot17EffectiveLengthBucklingLoad(ei=ei, n_b=n_b) + + def test_raise_error_when_negative_pars_are_given(self) -> None: + """Test negative values for ei, n_b.""" + + ei = 1_000_000 + n_b = 0 + with pytest.raises(LessOrEqualToZeroError): + Form5Dot17EffectiveLengthBucklingLoad(ei=ei, n_b=n_b) + + @pytest.mark.parametrize( + ("representation", "expected"), + [ + ( + "complete", + r"l_0 = \pi \cdot \sqrt{\frac{EI}{N_{b}}} = \pi \cdot \sqrt{\frac{1000000}{5}} = 1404.963", + ), + ("short", r"l_0 = 1404.963"), + ], + ) + def test_latex(self, form_5_17, representation: str, expected: str) -> None: + """Test the latex representation of the formula.""" + + # Object to test + form_5_17_latex = form_5_17.latex() + actual = {"complete": form_5_17_latex.complete, "short": form_5_17_latex.short} + + assert actual[representation] == expected, f"{representation} representation failed." From e6054c5da73269236645c6098b65dc86a3513551 Mon Sep 17 00:00:00 2001 From: Rami Evans Date: Wed, 31 Jul 2024 15:30:44 +0200 Subject: [PATCH 2/9] Changes made according to PEP test checks - removed blank spaces --- .../chapter_5_structural_analysis/formula_5_17.py | 1 - .../chapter_5_structural_analysis/test_formula_5_17.py | 4 ---- 2 files changed, 5 deletions(-) diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_17.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_17.py index 80805a8e..42474392 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_17.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_17.py @@ -12,7 +12,6 @@ class Form5Dot17EffectiveLengthBucklingLoad(Formula): """Class representing formula 5.17 for the calculation of effective length of unbraced members, in the case where criteria (2) and (3) do not apply such as by variable loading, :math:`l_0`.""" - label = "5.17" source_document = NEN_EN_1992_1_1_C2_2011 diff --git a/tests/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/test_formula_5_17.py b/tests/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/test_formula_5_17.py index 1f3db396..d3f99855 100644 --- a/tests/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/test_formula_5_17.py +++ b/tests/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/test_formula_5_17.py @@ -8,14 +8,12 @@ class TestForm5Dot16EffectiveLengthUnbraced: """Validation for formula 5.17 from NEN-EN 1992-1-1+C2:2011.""" - @pytest.fixture() def form_5_17(self): yield Form5Dot17EffectiveLengthBucklingLoad(ei=1_000_000, n_b=5) def test_evaluation(self, form_5_17) -> None: """Test the evaluation of the result.""" - # Expected result, manually calculated manually_calculated_result = 1404.96 # M assert form_5_17 == pytest.approx(expected=manually_calculated_result, rel=1e-4) @@ -35,7 +33,6 @@ def test_raise_error_when_zero_pars_are_given(self, ei: float, n_b: float) -> No def test_raise_error_when_negative_pars_are_given(self) -> None: """Test negative values for ei, n_b.""" - ei = 1_000_000 n_b = 0 with pytest.raises(LessOrEqualToZeroError): @@ -53,7 +50,6 @@ def test_raise_error_when_negative_pars_are_given(self) -> None: ) def test_latex(self, form_5_17, representation: str, expected: str) -> None: """Test the latex representation of the formula.""" - # Object to test form_5_17_latex = form_5_17.latex() actual = {"complete": form_5_17_latex.complete, "short": form_5_17_latex.short} From a8a534ac867eb4180d96a8f0cc037c12a8cd7301 Mon Sep 17 00:00:00 2001 From: Rami Evans Date: Wed, 31 Jul 2024 15:43:03 +0200 Subject: [PATCH 3/9] Updates to PEP standards --- .../chapter_5_structural_analysis/formula_5_17.py | 6 ++++-- .../test_formula_5_17.py | 13 ++++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_17.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_17.py index 42474392..68e9ecb7 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_17.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_17.py @@ -5,13 +5,15 @@ from blueprints.codes.eurocode.nen_en_1992_1_1_c2_2011 import NEN_EN_1992_1_1_C2_2011 from blueprints.codes.formula import Formula from blueprints.codes.latex_formula import LatexFormula -from blueprints.type_alias import DIMENSIONLESS, M, KN_M2, KN +from blueprints.type_alias import M, KN_M2, KN from blueprints.validations import raise_if_negative, raise_if_less_or_equal_to_zero class Form5Dot17EffectiveLengthBucklingLoad(Formula): """Class representing formula 5.17 for the calculation of effective length of unbraced members, in the - case where criteria (2) and (3) do not apply such as by variable loading, :math:`l_0`.""" + case where criteria (2) and (3) do not apply such as by variable loading, :math:`l_0`. + """ + label = "5.17" source_document = NEN_EN_1992_1_1_C2_2011 diff --git a/tests/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/test_formula_5_17.py b/tests/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/test_formula_5_17.py index d3f99855..6f4f5345 100644 --- a/tests/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/test_formula_5_17.py +++ b/tests/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/test_formula_5_17.py @@ -2,17 +2,20 @@ import pytest -from blueprints.codes.eurocode.nen_en_1992_1_1_c2_2011.chapter_5_structural_analysis.formula_5_17 import Form5Dot17EffectiveLengthBucklingLoad +from blueprints.codes.eurocode.nen_en_1992_1_1_c2_2011.chapter_5_structural_analysis.formula_5_17 import \ + Form5Dot17EffectiveLengthBucklingLoad from blueprints.validations import NegativeValueError, LessOrEqualToZeroError class TestForm5Dot16EffectiveLengthUnbraced: """Validation for formula 5.17 from NEN-EN 1992-1-1+C2:2011.""" + @pytest.fixture() - def form_5_17(self): - yield Form5Dot17EffectiveLengthBucklingLoad(ei=1_000_000, n_b=5) + def form_5_17(self) -> Form5Dot17EffectiveLengthBucklingLoad: + """Setup and teardown for test""" + return Form5Dot17EffectiveLengthBucklingLoad(ei=1_000_000, n_b=5) - def test_evaluation(self, form_5_17) -> None: + def test_evaluation(self, form_5_17: Form5Dot17EffectiveLengthBucklingLoad) -> None: """Test the evaluation of the result.""" # Expected result, manually calculated manually_calculated_result = 1404.96 # M @@ -48,7 +51,7 @@ def test_raise_error_when_negative_pars_are_given(self) -> None: ("short", r"l_0 = 1404.963"), ], ) - def test_latex(self, form_5_17, representation: str, expected: str) -> None: + def test_latex(self, form_5_17: Form5Dot17EffectiveLengthBucklingLoad, representation: str, expected: str) -> None: """Test the latex representation of the formula.""" # Object to test form_5_17_latex = form_5_17.latex() From 3d1562a13db793b7b9caca6dd847a64774f4b00e Mon Sep 17 00:00:00 2001 From: Rami Evans Date: Wed, 31 Jul 2024 15:48:44 +0200 Subject: [PATCH 4/9] Optimized and organized imports --- .../chapter_5_structural_analysis/formula_5_17.py | 4 ++-- .../chapter_5_structural_analysis/test_formula_5_17.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_17.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_17.py index 68e9ecb7..b445cf73 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_17.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_17.py @@ -5,8 +5,8 @@ from blueprints.codes.eurocode.nen_en_1992_1_1_c2_2011 import NEN_EN_1992_1_1_C2_2011 from blueprints.codes.formula import Formula from blueprints.codes.latex_formula import LatexFormula -from blueprints.type_alias import M, KN_M2, KN -from blueprints.validations import raise_if_negative, raise_if_less_or_equal_to_zero +from blueprints.type_alias import KN, KN_M2, M +from blueprints.validations import raise_if_less_or_equal_to_zero, raise_if_negative class Form5Dot17EffectiveLengthBucklingLoad(Formula): diff --git a/tests/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/test_formula_5_17.py b/tests/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/test_formula_5_17.py index 6f4f5345..9d4292bf 100644 --- a/tests/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/test_formula_5_17.py +++ b/tests/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/test_formula_5_17.py @@ -4,7 +4,7 @@ from blueprints.codes.eurocode.nen_en_1992_1_1_c2_2011.chapter_5_structural_analysis.formula_5_17 import \ Form5Dot17EffectiveLengthBucklingLoad -from blueprints.validations import NegativeValueError, LessOrEqualToZeroError +from blueprints.validations import LessOrEqualToZeroError, NegativeValueError class TestForm5Dot16EffectiveLengthUnbraced: @@ -12,7 +12,7 @@ class TestForm5Dot16EffectiveLengthUnbraced: @pytest.fixture() def form_5_17(self) -> Form5Dot17EffectiveLengthBucklingLoad: - """Setup and teardown for test""" + """Setup and teardown for test.""" return Form5Dot17EffectiveLengthBucklingLoad(ei=1_000_000, n_b=5) def test_evaluation(self, form_5_17: Form5Dot17EffectiveLengthBucklingLoad) -> None: From 8e7a59e129b7bbc78d2b84b1aa03a43a23ee52d7 Mon Sep 17 00:00:00 2001 From: Rami Evans Date: Wed, 31 Jul 2024 15:52:01 +0200 Subject: [PATCH 5/9] Removed second line indentation of import --- .../chapter_5_structural_analysis/test_formula_5_17.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/test_formula_5_17.py b/tests/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/test_formula_5_17.py index 9d4292bf..d7e2ddbf 100644 --- a/tests/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/test_formula_5_17.py +++ b/tests/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/test_formula_5_17.py @@ -2,8 +2,7 @@ import pytest -from blueprints.codes.eurocode.nen_en_1992_1_1_c2_2011.chapter_5_structural_analysis.formula_5_17 import \ - Form5Dot17EffectiveLengthBucklingLoad +from blueprints.codes.eurocode.nen_en_1992_1_1_c2_2011.chapter_5_structural_analysis.formula_5_17 import Form5Dot17EffectiveLengthBucklingLoad from blueprints.validations import LessOrEqualToZeroError, NegativeValueError From 8cfe2dd3e2ce973d65291f916db8866a6a2a5d71 Mon Sep 17 00:00:00 2001 From: Rami Evans Date: Wed, 31 Jul 2024 16:00:16 +0200 Subject: [PATCH 6/9] Ruff auto format --- .../chapter_5_structural_analysis/formula_5_17.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_17.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_17.py index b445cf73..e7a22e6f 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_17.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_17.py @@ -35,14 +35,11 @@ def __init__(self, ei: KN_M2, n_b: KN) -> None: self.n_b = n_b @staticmethod - def _evaluate( - ei: KN_M2, - n_b: KN - ) -> M: + def _evaluate(ei: KN_M2, n_b: KN) -> M: """Evaluates the formula, for more information see the __init__ method.""" raise_if_negative(ei=ei, n_b=n_b) raise_if_less_or_equal_to_zero(n_b=n_b) - return math.pi * math.sqrt(ei/n_b) + return math.pi * math.sqrt(ei / n_b) def latex(self) -> LatexFormula: """Returns LatexFormula object for formula 5.17.""" From 5128fdf9c3fed261d544744487ffc3efa89c5439 Mon Sep 17 00:00:00 2001 From: Rami Evans Date: Wed, 4 Sep 2024 09:15:21 +0200 Subject: [PATCH 7/9] Resolved PR comments --- .../chapter_5_structural_analysis/formula_5_17.py | 4 ++-- .../chapter_5_structural_analysis/test_formula_5_17.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_17.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_17.py index e7a22e6f..7efc1e0c 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_17.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_17.py @@ -24,9 +24,9 @@ def __init__(self, ei: KN_M2, n_b: KN) -> None: Parameters ---------- - ei : DIMENSIONLESS + ei : kNm2 [:math:`EI`] is a representative bending stiffness [:math:`-`]. - n_b : DIMENSIONLESS + n_b : KN [:math:`N_{b}`] is the buckling load expressed in terms of EI (in equation (5.14) i should correspond to this EI). [:math:`-`]. """ diff --git a/tests/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/test_formula_5_17.py b/tests/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/test_formula_5_17.py index d7e2ddbf..4c27af69 100644 --- a/tests/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/test_formula_5_17.py +++ b/tests/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/test_formula_5_17.py @@ -1,4 +1,4 @@ -"""Testing formula 5.16 of NEN-EN 1992-1-1+C2:2011.""" +"""Testing formula 5.17 of NEN-EN 1992-1-1+C2:2011.""" import pytest @@ -6,7 +6,7 @@ from blueprints.validations import LessOrEqualToZeroError, NegativeValueError -class TestForm5Dot16EffectiveLengthUnbraced: +class TestForm5Dot17EffectiveLengthBucklingLoad: """Validation for formula 5.17 from NEN-EN 1992-1-1+C2:2011.""" @pytest.fixture() From ef084fbca3c671d37147d9b62a7cf0a893843629 Mon Sep 17 00:00:00 2001 From: Rami Evans Date: Wed, 4 Sep 2024 09:32:31 +0200 Subject: [PATCH 8/9] tUpdated docstring --- .../chapter_5_structural_analysis/formula_5_17.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_17.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_17.py index 7efc1e0c..d2280add 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_17.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_17.py @@ -24,7 +24,7 @@ def __init__(self, ei: KN_M2, n_b: KN) -> None: Parameters ---------- - ei : kNm2 + ei : KN_M2 [:math:`EI`] is a representative bending stiffness [:math:`-`]. n_b : KN [:math:`N_{b}`] is the buckling load expressed in terms of EI (in equation (5.14) i should correspond From 2ab08c7431c314aa6ebb2bc41e1f2430a18e38b6 Mon Sep 17 00:00:00 2001 From: Rami Evans Date: Wed, 4 Sep 2024 09:46:39 +0200 Subject: [PATCH 9/9] Updated docstring with human-readable --- .../chapter_5_structural_analysis/formula_5_17.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_17.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_17.py index d2280add..2ce5f4b4 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_17.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_17.py @@ -25,10 +25,10 @@ def __init__(self, ei: KN_M2, n_b: KN) -> None: Parameters ---------- ei : KN_M2 - [:math:`EI`] is a representative bending stiffness [:math:`-`]. + [:math:`EI`] is a representative bending stiffness [:math:`kN/m^2`]. n_b : KN [:math:`N_{b}`] is the buckling load expressed in terms of EI (in equation (5.14) i should correspond - to this EI). [:math:`-`]. + to this EI). [:math:`kN`]. """ super().__init__() self.ei = ei