From d2f21c219d305a5137820f0fa1044c6009a31b44 Mon Sep 17 00:00:00 2001 From: GerjanDorgelo Date: Thu, 30 Jan 2025 20:16:32 +0100 Subject: [PATCH 1/5] Update formula documentation to use LaTeX-style formatting for variables and units --- .../formula_5_1.py | 26 +++++------ .../formula_5_10a.py | 14 +++--- .../formula_5_10b.py | 14 +++--- .../formula_5_11n.py | 8 ++-- .../formula_5_12n.py | 12 ++--- .../formula_5_14.py | 8 ++-- .../formula_5_15.py | 45 ++++++++----------- .../formula_5_16.py | 4 +- .../formula_5_2.py | 8 ++-- .../formula_5_3a.py | 10 ++--- .../formula_5_3b.py | 10 ++--- .../formula_5_4.py | 12 ++--- .../formula_5_5.py | 12 ++--- .../formula_5_6.py | 10 ++--- .../formula_5_7.py | 12 ++--- .../formula_5_7ab.py | 8 ++-- .../formula_5_8.py | 14 +++--- .../formula_5_9.py | 12 ++--- 18 files changed, 115 insertions(+), 124 deletions(-) diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_1.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_1.py index 0265436d2..69c6adc51 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_1.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_1.py @@ -10,7 +10,7 @@ class Form5Dot1Imperfections(Formula): - """Class representing formula 5.1 for the calculation of initial inclination imperfections, Θi.""" + r"""Class representing formula 5.1 for the calculation of initial inclination imperfections, [$$\Theta_i$$].""" label = "5.1" source_document = NEN_EN_1992_1_1_C2_2011 @@ -21,21 +21,21 @@ def __init__( alpha_h: DIMENSIONLESS, alpha_m: DIMENSIONLESS, ) -> None: - """[Θi] Initial inclination imperfections, Θi, is a ratio between height and inclination of the member [-]. + r"""[$$\\Theta_i$$] Initial inclination imperfections, [$$\\Theta_i$$], is a ratio between height and inclination of the member [-]. NEN-EN 1992-1-1+C2:2011 art.5.2(5) - Formula (5.1) Parameters ---------- theta_0 : float - [Θ0] Basic value [-]. - Note: The value of Θ0 for use in a Country may be found in its National Annex. + [$$\\Theta_0$$] Basic value [-]. + Note: The value of [$$\\Theta_0$$] for use in a Country may be found in its National Annex. The recommended value is 1/200 alpha_h : float - [αh] Reduction factor for length or height [-]. + [$$\alpha_h$$] Reduction factor for length or height [-]. Use your own implementation of this value or use the SubForm5Dot1ReductionFactorLengthOrHeight class. alpha_m : float - [αm] Reduction factor for number of members [-]. + [$$\alpha_m$$] Reduction factor for number of members [-]. Use your own implementation of this value or use the SubForm5Dot1ReductionFactorNumberOfMembers class. """ super().__init__() @@ -65,7 +65,7 @@ def latex(self) -> LatexFormula: class SubForm5Dot1ReductionFactorLengthOrHeight(Formula): - """Class representing sub-formula 5.1 for the calculation of the reduction factor for length or height, αh.""" + r"""Class representing sub-formula 5.1 for the calculation of the reduction factor for length or height, [$$\alpha_h$$].""" label = "5.1" source_document = NEN_EN_1992_1_1_C2_2011 @@ -74,16 +74,16 @@ def __init__( self, length: M, ) -> None: - """[αh] Reduction factor for length or height [-]. + r"""[$$\alpha_h$$] Reduction factor for length or height [-]. - The calculated value of αh is between 2/3 and 1.0. + The calculated value of [$$\alpha_h$$] is between 2/3 and 1.0. NEN-EN 1992-1-1+C2:2011 art.5.2(5) - Formula (5.1) Parameters ---------- length : M - [length] Length or height, see art.5.2(6) [m]. + [$$\text{length}$$] Length or height, see art.5.2(6) [m]. """ super().__init__() self.length = length @@ -114,7 +114,7 @@ def latex(self) -> LatexFormula: class SubForm5Dot1ReductionFactorNumberOfMembers(Formula): - """Class representing sub-formula 5.1 for the calculation of the reduction factor for number of members, αm.""" + r"""Class representing sub-formula 5.1 for the calculation of the reduction factor for number of members, [$$\alpha_m$$].""" label = "5.1" source_document = NEN_EN_1992_1_1_C2_2011 @@ -123,14 +123,14 @@ def __init__( self, members: int, ) -> None: - """[αm] Reduction factor for number of members [-]. + r"""[$$\alpha_m$$] Reduction factor for number of members [-]. NEN-EN 1992-1-1+C2:2011 art.5.2(5) - Formula (5.1) Parameters ---------- members : int - [m] Number of vertical members contributing to the total effect [-]. + [$$m$$] Number of vertical members contributing to the total effect [-]. """ super().__init__() self.members = members diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_10a.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_10a.py index 73defb0f0..7cb5e877a 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_10a.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_10a.py @@ -7,28 +7,28 @@ class Form5Dot10aRedistributionOfMomentsLowerFck: - r"""Class representing formula 5.10a for the redistribution of moments in continuous beams or slabs when :math:`f_{ck} \leq 50 MPa`.""" + r"""Class representing formula 5.10a for the redistribution of moments in continuous beams or slabs when [$$f_{ck} \leq 50 MPa$$].""" label = "5.10a" source_document = NEN_EN_1992_1_1_C2_2011 def __init__(self, delta: DIMENSIONLESS, k1: DIMENSIONLESS, k2: DIMENSIONLESS, xu: M, d: M) -> None: - r"""[:math:`δ`] Redistribution of moments in continuous beams or slabs when :math:`f_{ck} \leq 50 MPa`. + r"""[$$\delta$$] Redistribution of moments in continuous beams or slabs when [$$f_{ck} \leq 50 MPa$$]. NEN-EN 1992-1-1+C2:2011 art.5.5(4) - Formula (5.10a) Parameters ---------- delta : DIMENSIONLESS - [:math:`δ`] is the ratio of the redistributed moment to the elastic moment. + [$$\delta$$] is the ratio of the redistributed moment to the elastic moment. k1 : DIMENSIONLESS - [:math:`k1`] is a coefficient for redistribution. + [$$k_1$$] is a coefficient for redistribution. k2 : DIMENSIONLESS - [:math:`k2`] is a coefficient for redistribution. + [$$k_2$$] is a coefficient for redistribution. xu : M - [:math:`x_u`] is the depth of the compression zone in the ultimate limit state after redistribution. + [$$x_u$$] is the depth of the compression zone in the ultimate limit state after redistribution. d : M - [:math:`d`] is the effective depth of the section. + [$$d$$] is the effective depth of the section. """ super().__init__() self.delta = delta diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_10b.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_10b.py index bfa5873a6..a2cccc5e5 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_10b.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_10b.py @@ -7,28 +7,28 @@ class Form5Dot10bRedistributionOfMomentsUpperFck: - r"""Class representing formula 5.10b for the redistribution of moments in continuous beams or slabs when :math:`f_{ck} > 50 MPa`.""" + r"""Class representing formula 5.10b for the redistribution of moments in continuous beams or slabs when [$$f_{ck} > 50 MPa$$].""" label = "5.10b" source_document = NEN_EN_1992_1_1_C2_2011 def __init__(self, delta: DIMENSIONLESS, k3: DIMENSIONLESS, k4: DIMENSIONLESS, xu: M, d: M) -> None: - r"""[:math:`δ`] Redistribution of moments in continuous beams or slabs when :math:`f_{ck} > 50 MPa`. + r"""[$$\delta$$] Redistribution of moments in continuous beams or slabs when [$$f_{ck} > 50 MPa$$]. NEN-EN 1992-1-1+C2:2011 art.5.5(4) - Formula (5.10b) Parameters ---------- delta : DIMENSIONLESS - [:math:`δ`] is the ratio of the redistributed moment to the elastic moment. + [$$\delta$$] is the ratio of the redistributed moment to the elastic moment. k3 : DIMENSIONLESS - [:math:`k3`] is a coefficient for redistribution. + [$$k_3$$] is a coefficient for redistribution. k4 : DIMENSIONLESS - [:math:`k4`] is a coefficient for redistribution. + [$$k_4$$] is a coefficient for redistribution. xu : M - [:math:`x_u`] is the depth of the compression zone in the ultimate limit state after redistribution. + [$$x_u$$] is the depth of the compression zone in the ultimate limit state after redistribution. d : M - [:math:`d`] is the effective depth of the section. + [$$d$$] is the effective depth of the section. """ super().__init__() self.delta = delta diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_11n.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_11n.py index a6af23158..771bffd11 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_11n.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_11n.py @@ -8,7 +8,7 @@ class Form5Dot11nShearSlendernessCorrectionFactor(Formula): - """Class representing formula 5.11N for the calculation of the shear slenderness correction factor [:math:`k_{λ}`].""" + """Class representing formula 5.11N for the calculation of the shear slenderness correction factor [$$k_{λ}$$].""" label = "5.11N" source_document = NEN_EN_1992_1_1_C2_2011 @@ -17,15 +17,15 @@ def __init__( self, lambda_factor: DIMENSIONLESS, ) -> None: - """[:math:`k_{λ}`] Shear slenderness correction factor. + r"""[$$k_{λ}$$] Shear slenderness correction factor. NEN-EN 1992-1-1+C2:2011 art.5.6.3(4) - Formula (5.11N) Parameters ---------- lambda_factor : DIMENSIONLESS - [:math:`λ`] ratio of the distance between point of zero and maximum moment after redistribution and - effective depth, d [:math:`-`] + [$$λ$$] ratio of the distance between point of zero and maximum moment after redistribution and + effective depth, d [$$-$$] Use your own implementation for this value or use :class:`Form5Dot12nRatioDistancePointZeroAndMaxMoment`. """ diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_12n.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_12n.py index 9557ad2f7..e4b5b2b55 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_12n.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_12n.py @@ -12,7 +12,7 @@ class Form5Dot12nRatioDistancePointZeroAndMaxMoment(Formula): Note: Ratio of the distance between point of zero and maximum moment after redistribution and - effective depth, d. [:math:`λ`] + effective depth, d. [$$λ$$] """ label = "5.12N" @@ -24,19 +24,19 @@ def __init__( v_sd: KN, d: M, ) -> None: - """[:math:`λ`] ratio of the distance between point of zero and maximum moment after redistribution and - effective depth, d [:math:`-`]. + r"""[$$λ$$] ratio of the distance between point of zero and maximum moment after redistribution and + effective depth, d [$$-$$]. NEN-EN 1992-1-1+C2:2011 art.5.6.3(4) - Formula (5.12N) Parameters ---------- m_sd : KNM - [:math:`M_{sd}`] Design moment at the section [:math:`kNm`]. + [$$M_{sd}$$] Design moment at the section [$$kNm$$]. v_sd : KN - [:math:`V_{sd}`] Design shear force at the section [:math:`kN`]. + [$$V_{sd}$$] Design shear force at the section [$$kN$$]. d : M - [:math:`d`] Effective depth [:math:`m`]. + [$$d$$] Effective depth [$$m$$]. """ super().__init__() self.m_sd = m_sd diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_14.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_14.py index cf6863532..82910160a 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_14.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_14.py @@ -8,7 +8,7 @@ class Form5Dot14SlendernessRatio(Formula): - """Class representing formula 5.14 for the calculation of the slenderness ratio, :math:`λ`.""" + r"""Class representing formula 5.14 for the calculation of the slenderness ratio, [$$\lambda$$].""" label = "5.14" source_document = NEN_EN_1992_1_1_C2_2011 @@ -18,18 +18,18 @@ def __init__( l_0: M, i: M, ) -> None: - """[:math:`λ`] Slenderness ratio [:math:`-`]. + r"""[$$\lambda$$] Slenderness ratio [$$-$$]. NEN-EN 1992-1-1+C2:2011 art.5.8.3.2(1) - Formula (5.14) Parameters ---------- l_0 : M - [:math:`l_{0}`] Effective length [:math:`m`]. + [$$l_{0}$$] Effective length [$$m$$]. Use your own implementation of this value or use :class: `Form5Dot15EffectiveLengthBraced` or :class: `Form5Dot15EffectiveLengthUnbraced`. i : M - [:math:`i`] Radius of gyration of the uncracked concrete section [:math:`m`]. + [$$i$$] Radius of gyration of the uncracked concrete section [$$m$$]. """ super().__init__() self.l_0 = l_0 diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_15.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_15.py index cb94a4b64..82407da10 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_15.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_15.py @@ -4,53 +4,44 @@ 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 from blueprints.validations import raise_if_negative class Form5Dot15EffectiveLengthBraced(Formula): - """Class representing formula 5.15 for the calculation of the effective length of braced members, :math:`l_0`.""" + """Class representing formula 5.15 for the calculation of the effective length of braced members, [$$l_0$$].""" label = "5.15" source_document = NEN_EN_1992_1_1_C2_2011 def __init__(self, k_1: DIMENSIONLESS, k_2: DIMENSIONLESS, height: M) -> None: - """[:math:`l_{0}`] Effective length for braced members [:math:`m`]. + r"""[$$l_{0}$$] Effective length for braced members [$$m$$]. NEN-EN 1992-1-1+C2:2011 art.5.8.3.2(3) - Formula (5.15) Parameters ---------- k_1 : DIMENSIONLESS - [:math:`k_{1}`] Relative flexibility of rotational constraint at end 1 [:math:`-`]. + [$$k_{1}$$] Relative flexibility of rotational constraint at end 1 [$$-$$]. k_2 : DIMENSIONLESS - [:math:`k_{2}`] Relative flexibility of rotational constraint at end 2 [:math:`-`]. + [$$k_{2}$$] Relative flexibility of rotational constraint at end 2 [$$-$$]. height : M - [:math:`l`] Clear height of compression member between end restraints [:math:`m`]. + [$$l$$] Clear height of compression member between end restraints [$$m$$]. """ - super().__init__() + raise_if_negative(k_1=k_1) + raise_if_negative(k_2=k_2) + raise_if_negative(height=height) + self.k_1 = k_1 self.k_2 = k_2 self.height = height - @staticmethod - def _evaluate( - k_1: DIMENSIONLESS, - k_2: DIMENSIONLESS, - height: M, - ) -> M: - """Evaluates the formula, for more information see the __init__ method.""" - raise_if_negative(k_1=k_1, k_2=k_2, height=height) - return 0.5 * height * math.sqrt((1 + k_1 / (0.45 + k_1)) * (1 + k_2 / (0.45 + k_2))) - - def latex(self) -> LatexFormula: - """Returns LatexFormula object for formula 5.15.""" - return LatexFormula( - return_symbol=r"l_0", - result=f"{self:.3f}", - equation=r"0.5 \cdot l \cdot \sqrt{\left(1+\frac{k_1}{0.45 + k_1}\right) \cdot \left(1 + \frac{k_2}{0.45 + k_2}\right)}", - numeric_equation=rf"0.5 \cdot {self.height:.3f} \cdot \sqrt{{\left(1+\frac{{{self.k_1:.3f}}}{{0.45 + " - rf"{self.k_1:.3f}}}\right) \cdot \left(1 + \frac{{{self.k_2:.3f}}}{{0.45 + {self.k_2:.3f}}}\right)}}", - comparison_operator_label="=", - ) + def calculate(self) -> M: + """Calculate the effective length for braced members [$$l_0$$]. + + Returns + ------- + l_0 : M + Effective length for braced members [$$m$$]. + """ + return self.height * math.sqrt(self.k_1 * self.k_2) diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_16.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_16.py index 81f2d7118..ea574a8a2 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_16.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_16.py @@ -16,7 +16,7 @@ class Form5Dot16EffectiveLengthUnbraced(Formula): source_document = NEN_EN_1992_1_1_C2_2011 def __init__(self, k_1: DIMENSIONLESS, k_2: DIMENSIONLESS, height: M) -> None: - """[:math:`l_{0}`] Effective length for unbraced members [:math:`m`]. + r"""[:math:`l_{0}`] Effective length for unbraced members [:math:`m`]. NEN-EN 1992-1-1+C2:2011 art.5.8.3.2(3) - Formula (5.16) @@ -27,7 +27,7 @@ def __init__(self, k_1: DIMENSIONLESS, k_2: DIMENSIONLESS, height: M) -> None: k_2 : DIMENSIONLESS [:math:`k_{2}`] Relative flexibility of rotational constraint at end 2 [:math:`-`]. height : M - [:math:`l`] Clear height of compression member between end restraints [:math:`M`]. + [:math:`l`] Clear height of compression member between end restraints [:math:`m`]. """ super().__init__() self.k_1 = k_1 diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_2.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_2.py index 6aee599de..9164bd170 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_2.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_2.py @@ -8,7 +8,7 @@ class Form5Dot2Eccentricity(Formula): - """Class representing formula 5.2 for the calculation of eccentricity, ei.""" + """Class representing formula 5.2 for the calculation of eccentricity, [$$e_i$$].""" label = "5.2" source_document = NEN_EN_1992_1_1_C2_2011 @@ -18,17 +18,17 @@ def __init__( theta_i: DIMENSIONLESS, l_0: M, ) -> None: - """[ei] Eccentricity, ei, for isolated members [m]. + r"""[$$e_i$$] Eccentricity, [$$e_i$$], for isolated members [$$m$$]. NEN-EN 1992-1-1+C2:2011 art.5.2(7) - Formula (5.2) Parameters ---------- theta_i : DIMENSIONLESS - [Θi] Eccentricity, initial inclination imperfections [-]. + [$$\Theta_i$$] Eccentricity, initial inclination imperfections [-]. Use your own implementation of this value or use the Form5Dot2Imperfections class. l_0 : M - [l0] Effective length of the member, see 5.8.3.2 [m]. + [$$l_0$$] Effective length of the member, see 5.8.3.2 [$$m$$]. """ super().__init__() self.theta_i = theta_i diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_3a.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_3a.py index 7834ee786..fc7bb8597 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_3a.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_3a.py @@ -8,7 +8,7 @@ class Form5Dot3aTransverseForceUnbracedMembers(Formula): - """Class representing formula 5.3a for the calculation of the transverse force for unbraced members, :math:`H_{i}`. + """Class representing formula 5.3a for the calculation of the transverse force for unbraced members, [$$H_{i}$$]. See Figure 5.1 a1. """ @@ -21,25 +21,25 @@ def __init__( theta_i: DIMENSIONLESS, n_axial_force: KN, ) -> None: - """[:math:`H_{i}`] Transverse force for unbraced members [:math:`kN`]. + r"""[$$H_{i}$$] Transverse force for unbraced members [$$kN$$]. NEN-EN 1992-1-1+C2:2011 art.5.2(7) - Formula (5.3a) Parameters ---------- theta_i : DIMENSIONLESS - [:math:`Θ_{i}`] Eccentricity, initial inclination imperfections [-]. + [$$\Theta_{i}$$] Eccentricity, initial inclination imperfections [-]. Use your own implementation of this value or use the :class:`Form5Dot1Imperfections` class. n_axial_force : KN - [:math:`N`] Axial force [:math:`kN`]. + [$$N$$] Axial force [$$kN$$]. Positive values for compression, tension is not allowed. Notes ----- Eccentricity is suitable for statically determinate members, whereas transverse load can be used for - both determinate and indeterminate members. The force :math:`H_{i}` may be substituted by some other equivalent + both determinate and indeterminate members. The force [$$H_{i}$$] may be substituted by some other equivalent transverse action. """ super().__init__() diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_3b.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_3b.py index 33bebc6b0..70184b61d 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_3b.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_3b.py @@ -8,7 +8,7 @@ class Form5Dot3bTransverseForceBracedMembers(Formula): - """Class representing formula 5.3b for the calculation of the transverse force for braced members, :math:`H_{i}`. + """Class representing formula 5.3b for the calculation of the transverse force for braced members, [$$H_{i}$$]. See Figure 5.1 a2. """ @@ -21,25 +21,25 @@ def __init__( theta_i: DIMENSIONLESS, n_axial_force: KN, ) -> None: - """[:math:`H_{i}`] Transverse force for braced members [:math:`kN`]. + r"""[$$H_{i}$$] Transverse force for braced members [$$kN$$]. NEN-EN 1992-1-1+C2:2011 art.5.2(7) - Formula (5.3b) Parameters ---------- theta_i : DIMENSIONLESS - [:math:`Θ_{i}`] Eccentricity, initial inclination imperfections [-]. + [$$Θ_{i}$$] Eccentricity, initial inclination imperfections [-]. Use your own implementation of this value or use the :class:`Form5Dot1Imperfections` class. n_axial_force : KN - [:math:`N`] Axial force [:math:`kN`]. + [$$N$$] Axial force [$$kN$$]. Positive values for compression, tension is not allowed. Notes ----- Eccentricity is suitable for statically determinate members, whereas transverse load can be used for - both determinate and indeterminate members. The force :math:`H_{i}` may be substituted by some other equivalent + both determinate and indeterminate members. The force [$$H_{i}$$] may be substituted by some other equivalent transverse action. """ super().__init__() diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_4.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_4.py index d5fe73ad0..07a6a70dc 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_4.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_4.py @@ -8,7 +8,7 @@ class Form5Dot4TransverseForceEffectBracingSystem(Formula): - """Class representing formula 5.4 for the calculation of the effect of the inclination on bracing systems, :math:`H_{i}`. + """Class representing formula 5.4 for the calculation of the effect of the inclination on bracing systems, [$$H_{i}$$]. See Figure 5.1 b. """ @@ -22,22 +22,22 @@ def __init__( n_a: KN, n_b: KN, ) -> None: - """[:math:`H_{i}`] Effect of the inclination on bracing systems [:math:`kN`]. + r"""[$$H_{i}$$] Effect of the inclination on bracing systems [$$kN$$]. NEN-EN 1992-1-1+C2:2011 art.5.2(8) - Formula (5.4) Parameters ---------- theta_i : DIMENSIONLESS - [:math:`Θ_{i}`] Eccentricity, initial inclination imperfections [-]. + [$$Θ_{i}$$] Eccentricity, initial inclination imperfections [-]. n_a : KN - [:math:`N_{a}`] Axial force in the member [:math:`kN`]. + [$$N_{a}$$] Axial force in the member [$$kN$$]. n_b : KN - [:math:`N_{b}`] Axial force in the member [:math:`kN`]. + [$$N_{b}$$] Axial force in the member [$$kN$$]. Notes ----- - where :math:`N_{a} and :math:`N_{b}` are longitudinal forces contributing to :math:`H_{i}`. + where [$$N_{a}$$] and [$$N_{b}$$] are longitudinal forces contributing to [$$H_{i}$$]. Positive values for compression, tension is not allowed. """ super().__init__() diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_5.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_5.py index e28b8426f..b94b93467 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_5.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_5.py @@ -8,7 +8,7 @@ class Form5Dot5TransverseForceEffectFloorDiaphragm(Formula): - """Class representing formula 5.5 for the calculation of the effect of the inclination on floor diaphragm, :math:`H_{i}`. + """Class representing formula 5.5 for the calculation of the effect of the inclination on floor diaphragm, [$$H_{i}$$]. See Figure 5.1 c1. """ @@ -22,22 +22,22 @@ def __init__( n_a: KN, n_b: KN, ) -> None: - """[:math:`H_{i}`] Effect of the inclination on floor diaphragm [:math:`kN`]. + r"""[$$H_{i}$$] Effect of the inclination on floor diaphragm [$$kN$$]. NEN-EN 1992-1-1+C2:2011 art.5.2(8) - Formula (5.5) Parameters ---------- theta_i : DIMENSIONLESS - [:math:`Θ_{i}`] Eccentricity, initial inclination imperfections [-]. + [$$Θ_{i}$$] Eccentricity, initial inclination imperfections [-]. n_a : KN - [:math:`N_{a}`] Axial force in the member [:math:`kN`]. + [$$N_{a}$$] Axial force in the member [$$kN$$]. n_b : KN - [:math:`N_{b}`] Axial force in the member [:math:`kN`]. + [$$N_{b}$$] Axial force in the member [$$kN$$]. Notes ----- - where :math:`N_{a} and :math:`N_{b}` are longitudinal forces contributing to :math:`H_{i}`. + where [$$N_{a}$$] and [$$N_{b}$$] are longitudinal forces contributing to [$$H_{i}$$]. Positive values for compression, tension is not allowed. """ super().__init__() diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_6.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_6.py index bbecb72f9..c7ca47443 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_6.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_6.py @@ -8,7 +8,7 @@ class Form5Dot6TransverseForceEffectRoofDiaphragm(Formula): - """Class representing formula 5.6 for the calculation of the effect of the inclination on roof diaphragm, :math:`H_{i}`. + """Class representing formula 5.6 for the calculation of the effect of the inclination on roof diaphragm, [$$H_{i}$$]. See Figure 5.1 c2. """ @@ -20,20 +20,20 @@ def __init__( theta_i: DIMENSIONLESS, n_a: KN, ) -> None: - """[:math:`H_{i}`] Effect of the inclination on roof diaphragm [:math:`kN`]. + r"""[$$H_{i}$$] Effect of the inclination on roof diaphragm [$$kN$$]. NEN-EN 1992-1-1+C2:2011 art.5.2(8) - Formula (5.6) Parameters ---------- theta_i : DIMENSIONLESS - [:math:`Θ_{i}`] Eccentricity, initial inclination imperfections [-]. + [$$Θ_{i}$$] Eccentricity, initial inclination imperfections [-]. n_a : KN - [:math:`N_{a}`] Axial force in the member [:math:`kN`]. + [$$N_{a}$$] Axial force in the member [$$kN$$]. Notes ----- - where :math:`N_{a} is a longitudinal force contributing to :math:`H_{i}`. + where [$$N_{a}$$] is a longitudinal force contributing to [$$H_{i}$$]. Positive values for compression, tension is not allowed. """ super().__init__() diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_7.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_7.py index 23d467ce6..deda80058 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_7.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_7.py @@ -8,7 +8,7 @@ class Form5Dot7EffectiveFlangeWidth(Formula): - """Class representing formula 5.7 for the calculation of effective flange width [:math:`b_{eff}`] for a T beam or L beam. + """Class representing formula 5.7 for the calculation of effective flange width [$$b_{eff}$$] for a T beam or L beam. See Figure 5.3. """ @@ -21,22 +21,22 @@ def __init__( b_w: M, b: M, ) -> None: - """[:math:`b_{eff}`] Effective flange width for a T beam or L beam [:math:`m`]. + r"""[$$b_{eff}$$] Effective flange width for a T beam or L beam [$$m$$]. NEN-EN 1992-1-1+C2:2011 art.5.3.2.1(3) - Formula (5.7) Parameters ---------- b_eff_i : M - [:math:`b_{eff,i}`] Effective flange width of the i-th flange [:math:`m`]. + [$$b_{eff,i}$$] Effective flange width of the i-th flange [$$m$$]. b_w : M - [:math:`b_{w}`] Width of the web [:math:`m`]. + [$$b_{w}$$] Width of the web [$$m$$]. b : M - [:math:`b`] Total width of the flange [:math:`m`]. + [$$b$$] Total width of the flange [$$m$$]. Notes ----- - where [:math:`b_{eff,i}`] is the effective flange width of the i-th flange + where [$$b_{eff,i}$$] is the effective flange width of the i-th flange """ super().__init__() self.b_eff_i = b_eff_i diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_7ab.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_7ab.py index 4b5a76cb7..6f707252b 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_7ab.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_7ab.py @@ -8,7 +8,7 @@ class Form5Dot7abFlangeEffectiveFlangeWidth(Formula): - """Class representing formula 5.7a and formula 5.7b for the calculation of effective flange width of the i-th flange [:math:`b_{eff,i}`]. + """Class representing formula 5.7a and formula 5.7b for the calculation of effective flange width of the i-th flange [$$b_{eff,i}$$]. See Figure 5.3. """ @@ -20,16 +20,16 @@ def __init__( b_i: M, l_0: M, ) -> None: - """[:math:`b_{eff,i}`] Effective flange width of the i-th flange of a beam [:math:`m`]. + r"""[$$b_{eff,i}$$] Effective flange width of the i-th flange of a beam [$$m$$]. NEN-EN 1992-1-1+C2:2011 art.5.3.2.1(3) - Formula (5.7a) and (5.7b) Parameters ---------- b_i : M - [:math:`b_{i}`] Effective flange width of the i-th flange [:math:`m`]. + [$$b_{i}$$] Effective flange width of the i-th flange [$$m$$]. l_0 : M - [:math:`l_{0}`] distance between points of zero moment, which may be obtained from Figure 5.2 [:math:`m`]. + [$$l_{0}$$] distance between points of zero moment, which may be obtained from Figure 5.2 [$$m$$]. Notes ----- diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_8.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_8.py index 8e76e93c6..aba8a4a12 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_8.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_8.py @@ -8,7 +8,7 @@ class Form5Dot8EffectiveSpan(Formula): - """Class representing formula 5.8 for calculating the effective span of beams and slabs, :math:`l_{eff}`. + """Class representing formula 5.8 for calculating the effective span of beams and slabs, [$$l_{eff}$$]. See Figure 5.4 """ @@ -22,20 +22,20 @@ def __init__( a_1: M, a_2: M, ) -> None: - """[:math:`l_{eff}`] the effective span of a member [:math:`m`]. + r"""[$$l_{eff}$$] the effective span of a member [$$m$$]. NEN-EN 1992-1-1+C2:2011 art.5.3.2.2(1) - Formula (5.8) Parameters ---------- l_n : M - [:math:`l_{n}`] clear distance between the faces of the supports [:math:`m`]. + [$$l_{n}$$] clear distance between the faces of the supports [$$m$$]. a_1 : M - [:math:`a_{1}`] values for :math:`a_{1}` and :math:`a_{2}` at each end of the span, may be determined from the appropriate :math:`a_{i}` - values in Figure 5.4 where t is the width of the supporting element as shown. [:math:`m`]. + [$$a_{1}$$] values for [$$a_{1}$$] and [$$a_{2}$$] at each end of the span, may be determined from the appropriate [$$a_{i}$$] + values in Figure 5.4 where t is the width of the supporting element as shown. [$$m$$]. a_2 : M - [:math:`a_{2}`] values for :math:`a_{1}` and :math:`a_{2}` at each end of the span, may be determined from the appropriate :math:`a_{i}` - values in Figure 5.4 where t is the width of the supporting element as shown. [:math:`m`]. + [$$a_{2}$$] values for [$$a_{1}$$] and [$$a_{2}$$] at each end of the span, may be determined from the appropriate [$$a_{i}$$] + values in Figure 5.4 where t is the width of the supporting element as shown. [$$m$$]. """ super().__init__() self.l_n = l_n diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_9.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_9.py index c21398e76..4b1f758b6 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_9.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_9.py @@ -8,7 +8,7 @@ class Form5Dot9DesignSupportMomentReduction(Formula): - """Class representing formula 5.9 for the calculation of the design support moment reduction, :math:`ΔM_{Ed}`. + """Class representing formula 5.9 for the calculation of the design support moment reduction, [$$ΔM_{Ed}$$]. See Figure 5.4 b. """ @@ -20,23 +20,23 @@ def __init__( f_ed_sup: KN, t: M, ) -> None: - """[:math:`ΔM_{Ed}`] Design support moment reduction [:math:`kN`]. + r"""[$$ΔM_{Ed}$$] Design support moment reduction [$$kN$$]. Note: Regardless of the method of analysis used, where a beam or slab is continuous over a support which may be considered to provide no restraint to rotation (e.g. over walls), the design support moment, calculated on the basis of a span equal to the centre-to-centre distance - between supports, may be reduced by an amount :math:`ΔM_{Ed}`. + between supports, may be reduced by an amount [$$ΔM_{Ed}$$]. NEN-EN 1992-1-1+C2:2011 art.5.3.2.2(4) - Formula (5.9) Parameters ---------- f_ed_sup : KN - [:math:`F_{Ed,sup}`] Design support reaction [:math:`kN`]. + [$$F_{Ed,sup}$$] Design support reaction [$$kN$$]. t : M - [:math:`t`] breadth of the support (see Figure 5.4 b) [:math:`m`]. + [$$t$$] breadth of the support (see Figure 5.4 b) [$$m$$]. - Note: Where support bearings are used [:math:`t`] should be taken as the bearing width. + Note: Where support bearings are used [$$t$$] should be taken as the bearing width. """ super().__init__() self.f_ed_sup = f_ed_sup From 0647cb8e142cc2a08e753fde12bb6cdcf9eeccdc Mon Sep 17 00:00:00 2001 From: GerjanDorgelo Date: Thu, 30 Jan 2025 20:33:49 +0100 Subject: [PATCH 2/5] Update formula documentation to use LaTeX-style formatting for variables --- .../formula_5_16.py | 10 +++---- .../formula_5_17.py | 12 ++++----- .../formula_5_18.py | 18 ++++++------- .../formula_5_19.py | 8 +++--- .../formula_5_20.py | 8 +++--- .../formula_5_21.py | 18 ++++++------- .../formula_5_22.py | 14 +++++----- .../formula_5_23.py | 6 ++--- .../formula_5_24.py | 10 +++---- .../formula_5_25.py | 6 ++--- .../formula_5_26.py | 10 +++---- .../formula_5_27.py | 8 +++--- .../formula_5_28.py | 12 ++++----- .../formula_5_29.py | 4 +-- .../formula_5_30.py | 10 +++---- .../formula_5_31.py | 8 +++--- .../formula_5_32.py | 8 +++--- .../formula_5_33.py | 12 ++++----- .../formula_5_34.py | 14 +++++----- .../formula_5_35.py | 8 +++--- .../formula_5_36.py | 24 ++++++++--------- .../formula_5_37.py | 10 +++---- .../formula_5_38a.py | 4 +-- .../formula_5_38b.py | 26 +++++++++---------- .../formula_5_39.py | 10 +++---- .../formula_5_40a.py | 12 ++++----- .../formula_5_40b.py | 12 ++++----- 27 files changed, 151 insertions(+), 151 deletions(-) diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_16.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_16.py index ea574a8a2..a09220656 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_16.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_16.py @@ -10,24 +10,24 @@ class Form5Dot16EffectiveLengthUnbraced(Formula): - """Class representing formula 5.16 for the calculation of effective length of unbraced members, :math:`l_0`.""" + """Class representing formula 5.16 for the calculation of effective length of unbraced members, [$$l_0$$].""" label = "5.16" source_document = NEN_EN_1992_1_1_C2_2011 def __init__(self, k_1: DIMENSIONLESS, k_2: DIMENSIONLESS, height: M) -> None: - r"""[:math:`l_{0}`] Effective length for unbraced members [:math:`m`]. + r"""[$$l_{0}$$] Effective length for unbraced members [$$m$$]. NEN-EN 1992-1-1+C2:2011 art.5.8.3.2(3) - Formula (5.16) Parameters ---------- k_1 : DIMENSIONLESS - [:math:`k_{1}`] Relative flexibility of rotational constraint at end 1 [:math:`-`]. + [$$k_{1}$$] Relative flexibility of rotational constraint at end 1 [$$-$$]. k_2 : DIMENSIONLESS - [:math:`k_{2}`] Relative flexibility of rotational constraint at end 2 [:math:`-`]. + [$$k_{2}$$] Relative flexibility of rotational constraint at end 2 [$$-$$]. height : M - [:math:`l`] Clear height of compression member between end restraints [:math:`m`]. + [$$l$$] Clear height of compression member between end constraint [$$m$$]. """ super().__init__() self.k_1 = k_1 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 2ce5f4b46..0f0819d59 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 @@ -10,25 +10,25 @@ 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`. + r"""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, [$$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`]. + r"""[$$l_{0}$$] Effective length for unbraced members [$$m$$]. NEN-EN 1992-1-1+C2:2011 art.5.8.3.2(6) - Formula (5.17) Parameters ---------- ei : KN_M2 - [:math:`EI`] is a representative bending stiffness [:math:`kN/m^2`]. + [$$EI$$] is a representative bending stiffness [$$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:`kN`]. + [$$N_{b}$$] is the buckling load expressed in terms of EI (in equation (5.14) i should correspond + to this EI). [$$kN$$]. """ super().__init__() self.ei = ei diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_18.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_18.py index a067e15ab..2655de0a1 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_18.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_18.py @@ -14,25 +14,25 @@ class Form5Dot18ComparisonGeneralSecondOrderEffects: source_document = NEN_EN_1992_1_1_C2_2011 def __init__(self, f_ved: KN, k_1: DIMENSIONLESS, n_s: DIMENSIONLESS, length: M, e_cd: MPA, i_c: MM4) -> None: - """[:math:`CHECK`] Criteria met, based on damage accumulation. + r"""[$$CHECK$$] Criteria met, based on damage accumulation. NEN-EN 1992-1-1+C2:2011 art.5.8.3.3(1) - Formula (5.18) Parameters ---------- f_ved : KN - [:math: F_{v,ed}`] Total vertical load (on braced and bracing members) [:math:`kN`]. + [$$F_{v,ed}$$] Total vertical load (on braced and bracing members) [$$kN$$]. k_1 : DIMENSIONLESS - [:math: k_1`] The value of k1 for use in a Country may be found in its National Annex. Recommend value is - 0.31 [:math:`-`]. + [$$k_1$$] The value of k1 for use in a Country may be found in its National Annex. Recommend value is + 0.31 [$$-$$]. n_s : DIMENSIONLESS - [:math: `n_s`] is the total number of storeys [:math:`-`]. + [$$n_s$$] is the total number of storeys [$$-$$]. length : M - [:math: `L`] is the total height of the building above level of moment restraint. [:math:`m`]. + [$$L$$] is the total height of the building above level of moment restraint. [$$m$$]. e_cd : MPa - [:math: `E_{cd}`] is the design value of the modulus of elasticity of concrete. [:math:`MPa`]. + [$$E_{cd}$$] is the design value of the modulus of elasticity of concrete. [$$MPa$$]. i_c : MM4 - [:math: `l_c`] is the second moment of area (uncracked concrete section) of bracing member(s). [:math:`mm^4`]. + [$$I_c$$] is the second moment of area (uncracked concrete section) of bracing member(s). [$$mm^4$$]. """ self.f_ved = f_ved self.k_1 = k_1 @@ -54,7 +54,7 @@ def left_hand_side(self) -> KN: @property def right_hand_side(self) -> KN: - """Calculate the left hand side of the comparison. + """Calculate the right hand side of the comparison. Returns ------- diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_19.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_19.py index 374c10170..b90e04723 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_19.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_19.py @@ -14,18 +14,18 @@ class Form5Dot19EffectiveCreepCoefficient(Formula): source_document = NEN_EN_1992_1_1_C2_2011 def __init__(self, phi_inf_t0: DIMENSIONLESS, m0_eqp: KN_M, m0_ed: KN_M) -> None: - """[:math:`ϕ_{ef}`] Effective creep coefficient. + r"""[$$\phi_{ef}$$] Effective creep coefficient. NEN-EN 1992-1-1+C2:2011 art.5.8.4(2) - Formula (5.19) Parameters ---------- phi_inf_t0 : DIMENSIONLESS - [:math:`ϕ (∞,t0)`] is the final value of the creep coefficient according to art. 3.1.4. + [$$\phi (\infty,t_0)$$] is the final value of the creep coefficient according to art. 3.1.4. m0_eqp : KN_M - [:math:`M_{0,Eqp}`] is the first-order bending moment in the quasi-permanent load combination (SLS). + [$$M_{0,Eqp}$$] is the first-order bending moment in the quasi-permanent load combination (SLS). m0_ed : KN_M - [:math:`M_{0,Ed}`] is the first-order bending moment in the ultimate limit state (ULS). + [$$M_{0,Ed}$$] is the first-order bending moment in the ultimate limit state (ULS). """ super().__init__() self.phi_inf_t0 = phi_inf_t0 diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_20.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_20.py index 8809acd53..a990f7d85 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_20.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_20.py @@ -8,22 +8,22 @@ class Form5Dot20DesignModulusElasticity(Formula): - """Class representing formula 5.20 for the calculation of the design modulus of elasticity, :math:`E_{cd}`.""" + """Class representing formula 5.20 for the calculation of the design modulus of elasticity, [$$E_{cd}$$].""" label = "5.20" source_document = NEN_EN_1992_1_1_C2_2011 def __init__(self, e_cm: MPA, gamma_ce: DIMENSIONLESS = 1.2) -> None: - r"""[:math:`E_{cd}`] Design modulus of elasticity. + r"""[$$E_{cd}$$] Design modulus of elasticity. NEN-EN 1992-1-1+C2:2011 art.5.8.6(3) - Formula (5.20) Parameters ---------- e_cm : MPA - [:math:`E_{cm}`] is the characteristic modulus of elasticity of concrete. + [$$E_{cm}$$] is the characteristic modulus of elasticity of concrete. gamma_ce : DIMENSIONLESS, optional - [:math:`\gamma_{cE}`] is the factor for the design value of the modulus of elasticity. Default is 1.2 which is the recommended value. + [$$\gamma_{cE}$$] is the factor for the design value of the modulus of elasticity. Default is 1.2 which is the recommended value. """ super().__init__() self.e_cm = e_cm diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_21.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_21.py index 382417478..e566ff7b8 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_21.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_21.py @@ -8,32 +8,32 @@ class Form5Dot21NominalStiffness(Formula): - """Class representing formula 5.21 for the calculation of the nominal stiffness of slender compression members - with arbitrary cross-section, :math:`EI` [:math:`Nmm^2`]. + r"""Class representing formula 5.21 for the calculation of the nominal stiffness of slender compression members + with arbitrary cross-section, [$$EI$$] [$$Nmm^2$$]. """ label = "5.21" source_document = NEN_EN_1992_1_1_C2_2011 def __init__(self, k_c: DIMENSIONLESS, e_cd: MPA, i_c: MM4, k_s: DIMENSIONLESS, e_s: MPA, i_s: MM4) -> None: - r"""[:math:`EI`] Nominal stiffness of slender compression members with arbitrary cross-section. + r"""[$$EI$$] Nominal stiffness of slender compression members with arbitrary cross-section. NEN-EN 1992-1-1+C2:2011 art.5.8.7.2(2) or (3) - Formula (5.21) Parameters ---------- k_c : DIMENSIONLESS - [:math:`K_{c}`] is a factor for effects of cracking, creep etc. see 5.8.7.2 (2) or (3). + [$$K_{c}$$] is a factor for effects of cracking, creep etc. see 5.8.7.2 (2) or (3). e_cd : MPA - [:math:`E_{cd}`] is the design value of the modulus of elasticity of concrete, see 5.8.6 (3) + [$$E_{cd}$$] is the design value of the modulus of elasticity of concrete, see 5.8.6 (3) i_c : MPA - [:math:`I_{c}`] is the moment of inertia of concrete cross section. + [$$I_{c}$$] is the moment of inertia of concrete cross section. k_s : DIMENSIONLESS - [:math:`K_{s}`] is a factor for contribution of reinforcement, see 5.8.7.2 (2) or (3). + [$$K_{s}$$] is a factor for contribution of reinforcement, see 5.8.7.2 (2) or (3). e_s : MPA - [:math:`E_{s}`] is the design value of the modulus of elasticity of reinforcement, 5.8.6 (3). + [$$E_{s}$$] is the design value of the modulus of elasticity of reinforcement, 5.8.6 (3). i_s : MPA - [:math:`I_{s}`] is the second moment of area of reinforcement, about the centre of area of the concrete. + [$$I_{s}$$] is the second moment of area of reinforcement, about the centre of area of the concrete. """ super().__init__() self.k_c = k_c diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_22.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_22.py index 1297dc987..6c3969e7b 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_22.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_22.py @@ -14,14 +14,14 @@ class Form5Dot22FactorKs(Formula): source_document = NEN_EN_1992_1_1_C2_2011 def __init__(self, rho: float) -> None: - r"""[:math:`K_s`] Factor K_s = 1. + r"""[$$K_s$$] Factor K_s = 1. NEN-EN 1992-1-1+C2:2011 art.5.8.7.2(2) - Formula (5.22) Parameters ---------- rho : float - [:math:`\rho`] Geometric reinforcement ratio, As/Ac. Must be >= 0.002. + [$$\rho$$] Geometric reinforcement ratio, As/Ac. Must be >= 0.002. """ super().__init__() self.rho = rho @@ -51,20 +51,20 @@ class Form5Dot22FactorKc(Formula): source_document = NEN_EN_1992_1_1_C2_2011 def __init__(self, k1: DIMENSIONLESS, k2: DIMENSIONLESS, phi_ef: DIMENSIONLESS, rho: float) -> None: - r"""[:math:`K_c`] Factor K_c = k_1 * k_2 / (1 + \phi_{ef}). + r"""[$$K_c$$] Factor K_c = k_1 * k_2 / (1 + \phi_{ef}). NEN-EN 1992-1-1+C2:2011 art.5.8.7.2(2) - Formula (5.22) Parameters ---------- k1 : DIMENSIONLESS - [:math:`k_1`] Factor which depends on concrete strength class, Expression (5.23). + [$$k_1$$] Factor which depends on concrete strength class, Expression (5.23). k2 : DIMENSIONLESS - [:math:`k_2`] Factor which depends on axial force and slenderness, Expression (5.24). + [$$k_2$$] Factor which depends on axial force and slenderness, Expression (5.24). phi_ef : DIMENSIONLESS - [:math:`\phi_{ef}`] Effective creep ratio, see 5.8.4. + [$$\phi_{ef}$$] Effective creep ratio, see 5.8.4. rho : float - [:math:`\rho`] Geometric reinforcement ratio, As/Ac. Must be >= 0.002. + [$$\rho$$] Geometric reinforcement ratio, As/Ac. Must be >= 0.002. """ super().__init__() self.k1 = k1 diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_23.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_23.py index 97b868966..bcf2022d8 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_23.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_23.py @@ -8,20 +8,20 @@ class Form5Dot23FactorConcreteStrengthClass(Formula): - """Class representing formula 5.23 for the calculation of the factor for concrete strength class, :math:`k_{1}`.""" + """Class representing formula 5.23 for the calculation of the factor for concrete strength class, [$$k_{1}$$].""" label = "5.23" source_document = NEN_EN_1992_1_1_C2_2011 def __init__(self, f_ck: MPA) -> None: - r"""[:math:`k_{1}`] Factor for concrete strength class. + r"""[$$k_{1}$$] Factor for concrete strength class. NEN-EN 1992-1-1+C2:2011 art.5.8.6(3) - Formula (5.23) Parameters ---------- f_ck : MPA - [:math:`f_{ck}`] is the characteristic compressive strength of concrete. + [$$f_{ck}$$] is the characteristic compressive strength of concrete. """ super().__init__() self.f_ck = f_ck diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_24.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_24.py index e162cfa87..e9fd94c51 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_24.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_24.py @@ -8,7 +8,7 @@ class Form5Dot24AxialForceCorrectionFactor(Formula): - """Class representing formula 5.24 for the calculation of the axial force correction factor [:math:`k_{2}`].""" + """Class representing formula 5.24 for the calculation of the axial force correction factor [$$k_{2}$$].""" label = "5.24" source_document = NEN_EN_1992_1_1_C2_2011 @@ -18,20 +18,20 @@ def __init__( n: DIMENSIONLESS, lambda_factor: DIMENSIONLESS, ) -> None: - """[:math:`k_{2}`] Axial force correction factor. + r"""[$$k_{2}$$] Axial force correction factor. NEN-EN 1992-1-1+C2:2011 art.5.8.3 - Formula (5.24) Parameters ---------- n : DIMENSIONLESS - [:math:`n`] Relative axial force, :math:`N_{ed} / (A_{c} * f_{cd})` [-]. + [$$n$$] Relative axial force, [$$N_{ed} / (A_{c} * f_{cd})$$] [-]. lambda_factor : DIMENSIONLESS - [:math:`λ`] Slenderness ratio, see 5.8.3 [-]. + [$$λ$$] Slenderness ratio, see 5.8.3 [-]. Notes ----- - The value of :math:`k_{2}` cannot be larger than 0.20. + The value of [$$k_{2}$$] cannot be larger than 0.20. """ super().__init__() self.n = n diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_25.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_25.py index 6953da7c9..a56359e4d 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_25.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_25.py @@ -8,20 +8,20 @@ class Form5Dot25AxialForceCorrectionFactor(Formula): - """Class representing formula 5.25 for the calculation of the axial force correction factor [:math:`k_{2}`].""" + """Class representing formula 5.25 for the calculation of the axial force correction factor [$$k_{2}$$].""" label = "5.25" source_document = NEN_EN_1992_1_1_C2_2011 def __init__(self, n: DIMENSIONLESS) -> None: - r"""[:math:`k_{2}`] Axial force correction factor. + r"""[$$k_{2}$$] Axial force correction factor. NEN-EN 1992-1-1+C2:2011 art.5.8.6(3) - Formula (5.25) Parameters ---------- n : DIMENSIONLESS - [:math:`n`] Relative axial force, :math:`N_{ed} / (A_{c} * f_{cd})` [-]. + [$$n$$] Relative axial force, [$$N_{ed} / (A_{c} * f_{cd})$$] [-]. """ super().__init__() self.n = n diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_26.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_26.py index 7a87adb72..6047ed6b3 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_26.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_26.py @@ -14,14 +14,14 @@ class Form5Dot26FactorKs(Formula): source_document = NEN_EN_1992_1_1_C2_2011 def __init__(self, rho: float) -> None: - r"""[:math:`K_s`] Factor K_s = 0. + r"""[$$K_s$$] Factor $$K_s = 0$$. NEN-EN 1992-1-1+C2:2011 art.5.8.7.2(2) - Formula (5.26) Parameters ---------- rho : float - [:math:`\rho`] Geometric reinforcement ratio, As/Ac. Must be >= 0.01. + [$$\rho$$] Geometric reinforcement ratio, As/Ac. Must be >= 0.01. """ super().__init__() self.rho = rho @@ -51,16 +51,16 @@ class Form5Dot26FactorKc(Formula): source_document = NEN_EN_1992_1_1_C2_2011 def __init__(self, phi_ef: DIMENSIONLESS, rho: float) -> None: - r"""[:math:`K_c`] Factor K_c = 0.3 / (1 + 0.5 * \phi_{ef}). + r"""[$$K_c$$] Factor $$K_c = \frac{0.3}{1 + 0.5 \cdot \phi_{ef}}$$. NEN-EN 1992-1-1+C2:2011 art.5.8.7.2(2) - Formula (5.26) Parameters ---------- phi_ef : DIMENSIONLESS - [:math:`\phi_{ef}`] Effective creep ratio, see 5.8.4. + [$$\phi_{ef}$$] Effective creep ratio, see 5.8.4. rho : float - [:math:`\rho`] Geometric reinforcement ratio, As/Ac. Must be > 0.01. + [$$\rho$$] Geometric reinforcement ratio, As/Ac. Must be > 0.01. """ super().__init__() self.phi_ef = phi_ef diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_27.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_27.py index 77ef8c742..ecf8a1285 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_27.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_27.py @@ -8,22 +8,22 @@ class Form5Dot27EffectiveDesignModulusElasticity(Formula): - """Class representing formula 5.27 for the calculation of the effective design modulus of elasticity, :math:`E_{cd,eff}`.""" + """Class representing formula 5.27 for the calculation of the effective design modulus of elasticity, [$$E_{cd,eff}$$].""" label = "5.27" source_document = NEN_EN_1992_1_1_C2_2011 def __init__(self, e_cd: MPA, phi_ef: DIMENSIONLESS) -> None: - r"""[:math:`E_{cd,eff}`] Effective design modulus of elasticity. + r"""[$$E_{cd,eff}$$] Effective design modulus of elasticity. NEN-EN 1992-1-1+C2:2011 art.5.8.6(3) - Formula (5.27) Parameters ---------- e_cd : MPA - [:math:`E_{cd}`] is the design modulus of elasticity of concrete according to 5.8.6 (3). + [$$E_{cd}$$] is the design modulus of elasticity of concrete according to 5.8.6 (3). phi_ef : DIMENSIONLESS - [:math:`\phi_{ef}`] is the effective creep coefficient; same value as for columns may be used. + [$$\phi_{ef}$$] is the effective creep coefficient; same value as for columns may be used. """ super().__init__() self.e_cd = e_cd diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_28.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_28.py index b477fb60e..cd9908f00 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_28.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_28.py @@ -8,7 +8,7 @@ class Form5Dot28TotalDesignMoment(Formula): - """Class representing formula 5.28 for the calculation of the total design moment, :math:`M_{Ed}`.""" + """Class representing formula 5.28 for the calculation of the total design moment, [$$M_{Ed}$$].""" label = "5.28" source_document = NEN_EN_1992_1_1_C2_2011 @@ -20,20 +20,20 @@ def __init__( n_ed: KN, n_b: KN, ) -> None: - """[:math:`M_{Ed}`] Total design moment [:math:`kNm`]. + r"""[$$M_{Ed}$$] Total design moment [$$kNm$$]. NEN-EN 1992-1-1+C2:2011 art.5.8.8.2(2) - Formula (5.28) Parameters ---------- m_0ed : KNM - [:math:`M_{0Ed}`] First order moment; see also 5.8.8.2 (2) [:math:`kNm`]. + [$$M_{0Ed}$$] First order moment; see also 5.8.8.2 (2) [$$kNm$$]. beta : float - [:math:`β`] Factor which depends on distribution of 1st and 2nd order moments, see 5.8.7.3 (2)-(3) [-]. + [$$\beta$$] Factor which depends on distribution of 1st and 2nd order moments, see 5.8.7.3 (2)-(3) [-]. n_ed : KN - [:math:`N_{Ed}`] Design value of axial load [:math:`kN`]. + [$$N_{Ed}$$] Design value of axial load [$$kN$$]. n_b : KN - [:math:`N_{B}`] Buckling load based on nominal stiffness [:math:`kN`]. + [$$N_{B}$$] Buckling load based on nominal stiffness [$$kN$$]. """ super().__init__() self.m_0ed = m_0ed diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_29.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_29.py index de642ac93..b1b48a4e2 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_29.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_29.py @@ -10,7 +10,7 @@ class Form5Dot29BetaFactor(Formula): - """Class representing formula 5.29 for the calculation of the beta factor, :math:`β`.""" + """Class representing formula 5.29 for the calculation of the beta factor, [$$β$$].""" label = "5.29" source_document = NEN_EN_1992_1_1_C2_2011 @@ -19,7 +19,7 @@ def __init__( self, c_0: DIMENSIONLESS, ) -> None: - """[:math:`β`] Factor which depends on the distribution of first order moment [-]. + r"""[$$\beta$$] Factor which depends on the distribution of first order moment [-]. NEN-EN 1992-1-1+C2:2011 art.5.8.8.2(3) - Formula (5.29) diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_30.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_30.py index 5e2563548..d46284e4f 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_30.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_30.py @@ -8,7 +8,7 @@ class Form5Dot30TotalDesignMoment(Formula): - """Class representing formula 5.30 for the calculation of the total design moment, :math:`M_{Ed}`.""" + """Class representing formula 5.30 for the calculation of the total design moment, [$$M_{Ed}$$].""" label = "5.30" source_document = NEN_EN_1992_1_1_C2_2011 @@ -19,18 +19,18 @@ def __init__( n_ed: KN, n_b: KN, ) -> None: - """[:math:`M_{Ed}`] Total design moment [:math:`kNm`]. + r"""[$$M_{Ed}$$] Total design moment [$$kNm$$]. NEN-EN 1992-1-1+C2:2011 art.5.8.8.2(2) - Formula (5.30) Parameters ---------- m_0ed : KNM - [:math:`M_{0Ed}`] First order moment; see also 5.8.8.2 (2) [:math:`kNm`]. + [$$M_{0Ed}$$] First order moment; see also 5.8.8.2 (2) [$$kNm$$]. n_ed : KN - [:math:`N_{Ed}`] Design value of axial load [:math:`kN`]. + [$$N_{Ed}$$] Design value of axial load [$$kN$$]. n_b : KN - [:math:`N_{B}`] Buckling load based on nominal stiffness [:math:`kN`]. + [$$N_{B}$$] Buckling load based on nominal stiffness [$$kN$$]. """ super().__init__() self.m_0ed = m_0ed diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_31.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_31.py index d7ab2b55e..e7015ebc4 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_31.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_31.py @@ -7,7 +7,7 @@ class Form5Dot31DesignMoment(Formula): - """Class representing formula 5.31 for the calculation of the design moment, :math:`M_{Ed}`.""" + """Class representing formula 5.31 for the calculation of the design moment, [$$M_{Ed}$$].""" label = "5.31" source_document = NEN_EN_1992_1_1_C2_2011 @@ -17,16 +17,16 @@ def __init__( m_0ed: KNM, m_2: KNM, ) -> None: - """[:math:`M_{Ed}`] Design moment [:math:`kNm`]. + r"""[$$M_{Ed}$$] Design moment [$$kNm$$]. NEN-EN 1992-1-1+C2:2011 art.5.8.8.2(2) - Formula (5.31) Parameters ---------- m_0ed : KNM - [:math:`M_{0Ed}`] First order moment, including the effect of imperfections; see also 5.8.8.2 (2) [:math:`kNm`]. + [$$M_{0Ed}$$] First order moment, including the effect of imperfections; see also 5.8.8.2 (2) [$$kNm$$]. m_2 : KNM - [:math:`M_{2}`] Nominal 2nd order moment; see 5.8.8.2 (3) [:math:`kNm`]. + [$$M_{2}$$] Nominal 2nd order moment; see 5.8.8.2 (3) [$$kNm$$]. """ super().__init__() self.m_0ed = m_0ed diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_32.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_32.py index b5e3a17ab..7af4f99e3 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_32.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_32.py @@ -7,7 +7,7 @@ class Form5Dot32EquivalentFirstOrderEndMoment(Formula): - """Class representing formula 5.32 for the calculation of the equivalent first order end moment, :math:`M_{0e}`.""" + """Class representing formula 5.32 for the calculation of the equivalent first order end moment, [$$M_{0e}$$].""" label = "5.32" source_document = NEN_EN_1992_1_1_C2_2011 @@ -17,16 +17,16 @@ def __init__( m_01: KNM, m_02: KNM, ) -> None: - """[:math:`M_{0e}`] Equivalent first order end moment [:math:`kNm`]. + r"""[$$M_{0e}$$] Equivalent first order end moment [$$kNm$$]. NEN-EN 1992-1-1+C2:2011 art.5.8.8.2(2) - Formula (5.32) Parameters ---------- m_01 : KNM - [:math:`M_{01}`] The smaller first order end moment [:math:`kNm`]. + [$$M_{01}$$] The smaller first order end moment [$$kNm$$]. m_02 : KNM - [:math:`M_{02}`] The larger first order end moment [:math:`kNm`]. + [$$M_{02}$$] The larger first order end moment [$$kNm$$]. """ super().__init__() self.m_01 = m_01 diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_33.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_33.py index f6c1bf3dc..8ad42eae6 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_33.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_33.py @@ -8,7 +8,7 @@ class Form5Dot33NominalSecondOrderMoment(Formula): - """Class representing formula 5.33 for the calculation of the nominal 2nd order moment, :math:`M_{2}`.""" + """Class representing formula 5.33 for the calculation of the nominal 2nd order moment, [$$M_{2}$$].""" label = "5.33" source_document = NEN_EN_1992_1_1_C2_2011 @@ -20,20 +20,20 @@ def __init__( l_o: M, c: DIMENSIONLESS, ) -> None: - r"""[:math:`M_{2}`] Nominal 2nd order moment [:math:`kNm`]. + r"""[$$M_{2}$$] Nominal 2nd order moment [$$kNm$$]. NEN-EN 1992-1-1+C2:2011 art.5.8.8.2 - Formula (5.33) Parameters ---------- n_ed : KN - [:math:`N_{Ed}`] Design value of axial force [:math:`kN`]. + [$$N_{Ed}$$] Design value of axial force [$$kN$$]. curvature : DIMENSIONLESS - [:math:`\frac{1}{r}`] Curvature (1/r), see 5.8.8.3 [:math:`1/m`]. + [$$\frac{1}{r}$$] Curvature (1/r), see 5.8.8.3 [$$1/m$$]. l_o : M - [:math:`l_{o}`] Effective length, see 5.8.3.2 [:math:`m`]. + [$$l_{o}$$] Effective length, see 5.8.3.2 [$$m$$]. c : DIMENSIONLESS - [:math:`c`] Factor depending on the curvature distribution, see 5.8.8.2 (4). [-]. + [$$c$$] Factor depending on the curvature distribution, see 5.8.8.2 (4). [-]. """ super().__init__() self.n_ed = n_ed diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_34.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_34.py index a6fc923ee..6e14d1feb 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_34.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_34.py @@ -8,7 +8,7 @@ class Form5Dot34Curvature(Formula): - r"""Class representing formula 5.34 for the calculation of the curvature, :math:`\frac{1}{r}`.""" + r"""Class representing formula 5.34 for the calculation of the curvature, [$$\frac{1}{r}$$].""" label = "5.34" source_document = NEN_EN_1992_1_1_C2_2011 @@ -21,22 +21,22 @@ def __init__( e_s: MPA, d: MM, ) -> None: - r"""[:math:`\frac{1}{r}`] Curvature [:math:`1/mm`]. + r"""[$$\frac{1}{r}$$] Curvature [$$1/mm$$]. NEN-EN 1992-1-1+C2:2011 art.5.8.8.3 - Formula (5.34) Parameters ---------- k_r : DIMENSIONLESS - [:math:`K_r`] Correction factor depending on axial load, see 5.8.8.3 (3) [-]. + [$$K_r$$] Correction factor depending on axial load, see 5.8.8.3 (3) [-]. k_phi : DIMENSIONLESS - [:math:`K_\\phi`] Factor for taking account of creep, see 5.8.8.3 (4) [-]. + [$$K_\phi$$] Factor for taking account of creep, see 5.8.8.3 (4) [-]. f_yd : MPA - [:math:`f_{yd}`] Design yield strength of reinforcement [:math:`MPa`]. + [$$f_{yd}$$] Design yield strength of reinforcement [$$MPa$$]. e_s : MPA - [:math:`E_s`] Modulus of elasticity of reinforcement [:math:`MPa`]. + [$$E_s$$] Modulus of elasticity of reinforcement [$$MPa$$]. d : MM - [:math:`d`] Effective depth; see also 5.8.8.3 (2) [:math:`mm`]. + [$$d$$] Effective depth; see also 5.8.8.3 (2) [$$mm$$]. """ super().__init__() self.k_r = k_r diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_35.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_35.py index f5d6bfb87..fe3831b33 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_35.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_35.py @@ -8,7 +8,7 @@ class Form5Dot35EffectiveDepth(Formula): - r"""Class representing formula 5.35 for the calculation of the effective depth, :math:`d`.""" + r"""Class representing formula 5.35 for the calculation of the effective depth, [$$d$$].""" label = "5.35" source_document = NEN_EN_1992_1_1_C2_2011 @@ -18,16 +18,16 @@ def __init__( h: MM, i_s: MM, ) -> None: - r"""[:math:`d`] Effective depth [:math:`mm`]. + r"""[$$d$$] Effective depth [$$mm$$]. NEN-EN 1992-1-1+C2:2011 art.5.8.8.3 - Formula (5.35) Parameters ---------- h : MM - [:math:`h`] Total height of the section [:math:`mm`]. + [$$h$$] Total height of the section [$$mm$$]. i_s : MM - [:math:`i_s`] Radius of gyration of the total reinforcement area [:math:`mm`]. + [$$i_s$$] Radius of gyration of the total reinforcement area [$$mm$$]. """ super().__init__() self.h = h diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_36.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_36.py index fd0f83106..b7a267114 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_36.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_36.py @@ -8,7 +8,7 @@ class Form5Dot36RelativeAxialForce(Formula): - r"""Class representing formula 5.36 for the calculation of the relative axial force, :math:`K_{r}`.""" + r"""Class representing formula 5.36 for the calculation of the relative axial force, [$$K_{r}$$].""" label = "5.36" source_document = NEN_EN_1992_1_1_C2_2011 @@ -22,24 +22,24 @@ def __init__( fyd: MPA, n_bal: DIMENSIONLESS, ) -> None: - r"""[:math:`K_{r}`] Relative axial force [:math:`DIMENSIONLESS`]. + r"""[$$K_{r}$$] Relative axial force [-]. NEN-EN 1992-1-1+C2:2011 art.5.8.8.3(3) - Formula (5.36) Parameters ---------- n_ed : KN - [:math:`N_{Ed}`] Design value of axial load [:math:`kN`]. - ac : float - [:math:`A_{c}`] Area of concrete cross section [:math:`mm^2`]. - fcd : float - [:math:`f_{cd}`] Design value of concrete compressive strength [:math:`MPa`]. - as_ : float - [:math:`A_{s}`] Total area of reinforcement [:math:`mm^2`]. - fyd : float - [:math:`f_{yd}`] Design yield strength of reinforcement [:math:`MPa`]. + [$$N_{Ed}$$] Design value of axial load [$$kN$$]. + ac : MM2 + [$$A_{c}$$] Area of concrete cross section [$$mm^2$$]. + fcd : MPA + [$$f_{cd}$$] Design value of concrete compressive strength [$$MPa$$]. + as_ : MM2 + [$$A_{s}$$] Total area of reinforcement [$$mm^2$$]. + fyd : MPA + [$$f_{yd}$$] Design yield strength of reinforcement [$$MPa$$]. n_bal : DIMENSIONLESS - [:math:`n_{bal}`] Value of n at maximum moment resistance, 0.4 may be used [-]. + [$$n_{bal}$$] Value of n at maximum moment resistance, 0.4 may be used [-]. """ super().__init__() self.n_ed = n_ed diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_37.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_37.py index 0e2930a72..711f15a29 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_37.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_37.py @@ -8,7 +8,7 @@ class Form5Dot37CreepFactor(Formula): - r"""Class representing formula 5.37 for the calculation of the creep factor, :math:`K_{\phi}`.""" + r"""Class representing formula 5.37 for the calculation of the creep factor, [$$K_{\phi}$$].""" label = "5.37" source_document = NEN_EN_1992_1_1_C2_2011 @@ -19,18 +19,18 @@ def __init__( lambda_: DIMENSIONLESS, phi_ef: DIMENSIONLESS, ) -> None: - r"""[:math:`K_{\phi}`] Creep factor [:math:`-`]. + r"""[$$K_{\phi}$$] Creep factor [$$-$$]. NEN-EN 1992-1-1+C2:2011 art.5.8.8.3(4) - Formula (5.37) Parameters ---------- f_ck : MPA - [:math:`f_{ck}`] Characteristic compressive strength of concrete [:math:`MPa`]. + [$$f_{ck}$$] Characteristic compressive strength of concrete [$$MPa$$]. lambda_ : DIMENSIONLESS - [:math:`\lambda`] Slenderness ratio, see 5.8.3.1 [-]. + [$$\lambda$$] Slenderness ratio, see 5.8.3.1 [-]. phi_ef : DIMENSIONLESS - [:math:`\phi_{ef}`] Effective creep ratio, see 5.8.4 [-]. + [$$\phi_{ef}$$] Effective creep ratio, see 5.8.4 [-]. """ super().__init__() self.f_ck = f_ck diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_38a.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_38a.py index 10e0b67b0..43b8fbe24 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_38a.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_38a.py @@ -25,9 +25,9 @@ def __init__( Parameters ---------- lambda_y : DIMENSIONLESS - [:math:`\lambda_{y}`] Slenderness ratio in y-direction [-]. + [$$\lambda_{y}$$] Slenderness ratio in y-direction [-]. lambda_z : DIMENSIONLESS - [:math:`\lambda_{z}`] Slenderness ratio in z-direction [-]. + [$$\lambda_{z}$$] Slenderness ratio in z-direction [-]. """ super().__init__() self.lambda_y = lambda_y diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_38b.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_38b.py index 3333cb0e8..f10b7d314 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_38b.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_38b.py @@ -1,4 +1,4 @@ -"""Formula 5.38b from NEN-EN 1992-1-1+C2:2011: Chapter 5 - Structural Analysis.""" +r"""Formula 5.38b from NEN-EN 1992-1-1+C2:2011: Chapter 5 - Structural Analysis.""" 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 @@ -26,14 +26,14 @@ def __init__( Parameters ---------- - e_y : DIMENSIONLESS - [:math:`e_{y}`] Eccentricity along y-axis [mm]. - e_z : DIMENSIONLESS - [:math:`e_{z}`] Eccentricity along z-axis [mm]. - b_eq : DIMENSIONLESS - [:math:`b_{eq}`] Equivalent width [mm]. - h_eq : DIMENSIONLESS - [:math:`h_{eq}`] Equivalent depth [mm]. + e_y : MM + [$$e_{y}$$] Eccentricity along y-axis [$$mm$$]. + e_z : MM + [$$e_{z}$$] Eccentricity along z-axis [$$mm$$]. + b_eq : MM + [$$b_{eq}$$] Equivalent width [$$mm$$]. + h_eq : MM + [$$h_{eq}$$] Equivalent depth [$$mm$$]. """ super().__init__() self.e_y = e_y @@ -43,10 +43,10 @@ def __init__( @staticmethod def _evaluate( - e_y: float, - e_z: float, - b_eq: float, - h_eq: float, + e_y: MM, + e_z: MM, + b_eq: MM, + h_eq: MM, ) -> bool: """Evaluates the formula, for more information see the __init__ method.""" raise_if_negative(e_y=e_y, e_z=e_z) diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_39.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_39.py index 117508cca..d3c384467 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_39.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_39.py @@ -28,15 +28,15 @@ def __init__( Parameters ---------- m_edz : KNM - [:math:`M_{Edz}`] Design moment including second order moment in z-direction [:math:`kNm`]. + [$$M_{Edz}$$] Design moment including second order moment in z-direction [$$kNm$$]. m_rdz : KNM - [:math:`M_{Rdz}`] Design moment resistance in z-direction [:math:`kNm`]. + [$$M_{Rdz}$$] Design moment resistance in z-direction [$$kNm$$]. m_edy : KNM - [:math:`M_{Edy}`] Design moment including second order moment in y-direction [:math:`kNm`]. + [$$M_{Edy}$$] Design moment including second order moment in y-direction [$$kNm$$]. m_rdy : KNM - [:math:`M_{Rdy}`] Design moment resistance in y-direction [:math:`kNm`]. + [$$M_{Rdy}$$] Design moment resistance in y-direction [$$kNm$$]. a : DIMENSIONLESS - [:math:`a`] Exponent for the interaction formula, for circular and elliptical cross sections: a = 2, for rectengular see table [-]. + [$$a$$] Exponent for the interaction formula, for circular and elliptical cross sections: a = 2, for rectangular see table [-]. """ super().__init__() self.m_edz = m_edz diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_40a.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_40a.py index bdb3b981d..9a319679e 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_40a.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_40a.py @@ -26,11 +26,11 @@ def __init__( Parameters ---------- l_0t : M - [:math:`l_{0t}`] is the distance between torsional restraints [m]. + [$$l_{0t}$$] is the distance between torsional restraints [$$m$$]. b : M - [:math:`b`] is the width of compression flange [m]. + [$$b$$] is the width of compression flange [$$m$$]. h : M - [:math:`h`] is the total depth of beam in central part of l_0t [m]. + [$$h$$] is the total depth of beam in central part of [$$l_{0t}$$] [$$m$$]. """ super().__init__() self.l_0t = l_0t @@ -39,9 +39,9 @@ def __init__( @staticmethod def _evaluate( - l_0t: float, - b: float, - h: float, + l_0t: M, + b: M, + h: M, ) -> bool: """Evaluates the formula, for more information see the __init__ method.""" raise_if_less_or_equal_to_zero(b=b, h=h) diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_40b.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_40b.py index 36a049291..d49e43550 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_40b.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_40b.py @@ -26,11 +26,11 @@ def __init__( Parameters ---------- l_0t : M - [:math:`l_{0t}`] is the distance between torsional restraints [m]. + [$$l_{0t}$$] is the distance between torsional restraints [$$m$$]. b : M - [:math:`b`] is the width of compression flange [m]. + [$$b$$] is the width of compression flange [$$m$$]. h : M - [:math:`h`] is the total depth of beam in central part of l_0t [m]. + [$$h$$] is the total depth of beam in central part of [$$l_{0t}$$] [$$m$$]. """ super().__init__() self.l_0t = l_0t @@ -39,9 +39,9 @@ def __init__( @staticmethod def _evaluate( - l_0t: float, - b: float, - h: float, + l_0t: M, + b: M, + h: M, ) -> bool: """Evaluates the formula, for more information see the __init__ method.""" raise_if_less_or_equal_to_zero(b=b, h=h) From 6b0803722e54d92ec931a2837a03b5967d592a47 Mon Sep 17 00:00:00 2001 From: GerjanDorgelo Date: Thu, 30 Jan 2025 20:35:24 +0100 Subject: [PATCH 3/5] Refactor parameter types in Form5Dot22FactorKs to use DIMENSIONLESS for rho --- .../chapter_5_structural_analysis/formula_5_22.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_22.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_22.py index 6c3969e7b..f8542c96b 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_22.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_22.py @@ -13,21 +13,21 @@ class Form5Dot22FactorKs(Formula): label = "5.22" source_document = NEN_EN_1992_1_1_C2_2011 - def __init__(self, rho: float) -> None: + def __init__(self, rho: DIMENSIONLESS) -> None: r"""[$$K_s$$] Factor K_s = 1. NEN-EN 1992-1-1+C2:2011 art.5.8.7.2(2) - Formula (5.22) Parameters ---------- - rho : float + rho : DIMENSIONLESS [$$\rho$$] Geometric reinforcement ratio, As/Ac. Must be >= 0.002. """ super().__init__() self.rho = rho @staticmethod - def _evaluate(rho: float) -> float: + def _evaluate(rho: DIMENSIONLESS) -> float: """Evaluates the formula, for more information see the __init__ method.""" if rho < 0.002: raise ValueError(f"Invalid rho: {rho}. rho cannot be less than 0.002") @@ -63,7 +63,7 @@ def __init__(self, k1: DIMENSIONLESS, k2: DIMENSIONLESS, phi_ef: DIMENSIONLESS, [$$k_2$$] Factor which depends on axial force and slenderness, Expression (5.24). phi_ef : DIMENSIONLESS [$$\phi_{ef}$$] Effective creep ratio, see 5.8.4. - rho : float + rho : DIMENSIONLESS [$$\rho$$] Geometric reinforcement ratio, As/Ac. Must be >= 0.002. """ super().__init__() From dc03c25c9f5ee9ff40c97339f09845ce429c196b Mon Sep 17 00:00:00 2001 From: GerjanDorgelo Date: Thu, 30 Jan 2025 20:41:45 +0100 Subject: [PATCH 4/5] Refactor Form5Dot15EffectiveLengthBraced to use static method for evaluation and add LaTeX representation --- .../formula_5_15.py | 39 ++++++++++++------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_15.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_15.py index 82407da10..1f4313cc9 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_15.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_15.py @@ -4,12 +4,13 @@ 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 from blueprints.validations import raise_if_negative class Form5Dot15EffectiveLengthBraced(Formula): - """Class representing formula 5.15 for the calculation of the effective length of braced members, [$$l_0$$].""" + r"""Class representing formula 5.15 for the calculation of the effective length of braced members, [$$l_0$$].""" label = "5.15" source_document = NEN_EN_1992_1_1_C2_2011 @@ -26,22 +27,30 @@ def __init__(self, k_1: DIMENSIONLESS, k_2: DIMENSIONLESS, height: M) -> None: k_2 : DIMENSIONLESS [$$k_{2}$$] Relative flexibility of rotational constraint at end 2 [$$-$$]. height : M - [$$l$$] Clear height of compression member between end restraints [$$m$$]. + [$$l$$] Clear height of compression member between end constraints [$$m$$]. """ - raise_if_negative(k_1=k_1) - raise_if_negative(k_2=k_2) - raise_if_negative(height=height) - + super().__init__() self.k_1 = k_1 self.k_2 = k_2 self.height = height - def calculate(self) -> M: - """Calculate the effective length for braced members [$$l_0$$]. - - Returns - ------- - l_0 : M - Effective length for braced members [$$m$$]. - """ - return self.height * math.sqrt(self.k_1 * self.k_2) + @staticmethod + def _evaluate( + k_1: DIMENSIONLESS, + k_2: DIMENSIONLESS, + height: M, + ) -> M: + """Evaluates the formula, for more information see the __init__ method.""" + raise_if_negative(k_1=k_1, k_2=k_2, height=height) + return 0.5 * height * math.sqrt((1 + k_1 / (0.45 + k_1)) * (1 + k_2 / (0.45 + k_2))) + + def latex(self) -> LatexFormula: + """Returns LatexFormula object for formula 5.15.""" + return LatexFormula( + return_symbol=r"l_0", + result=f"{self:.3f}", + equation=r"0.5 \cdot l \cdot \sqrt{\left(1+\frac{k_1}{0.45 + k_1}\right) \cdot \left(1 + \frac{k_2}{0.45 + k_2}\right)}", + numeric_equation=rf"0.5 \cdot {self.height:.3f} \cdot \sqrt{{\left(1+\frac{{{self.k_1:.3f}}}{{0.45 + " + rf"{self.k_1:.3f}}}\right) \cdot \left(1 + \frac{{{self.k_2:.3f}}}{{0.45 + {self.k_2:.3f}}}\right)}}", + comparison_operator_label="=", + ) From a98c318be31ec1e7aec908b8900f526d52b73a76 Mon Sep 17 00:00:00 2001 From: GerjanDorgelo Date: Fri, 31 Jan 2025 13:26:46 +0100 Subject: [PATCH 5/5] Update LaTeX formatting for variables and units in formulas --- .../chapter_5_structural_analysis/formula_5_1.py | 2 +- .../chapter_5_structural_analysis/formula_5_19.py | 10 +++++----- .../chapter_5_structural_analysis/formula_5_29.py | 2 +- .../chapter_5_structural_analysis/formula_5_40a.py | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_1.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_1.py index 69c6adc51..081a1396a 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_1.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_1.py @@ -83,7 +83,7 @@ def __init__( Parameters ---------- length : M - [$$\text{length}$$] Length or height, see art.5.2(6) [m]. + [$$\text{length}$$] Length or height, see art.5.2(6) [$$m$$]. """ super().__init__() self.length = length diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_19.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_19.py index b90e04723..63f39128f 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_19.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_19.py @@ -3,7 +3,7 @@ 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, KN_M +from blueprints.type_alias import DIMENSIONLESS, KNM from blueprints.validations import raise_if_less_or_equal_to_zero @@ -13,7 +13,7 @@ class Form5Dot19EffectiveCreepCoefficient(Formula): label = "5.19" source_document = NEN_EN_1992_1_1_C2_2011 - def __init__(self, phi_inf_t0: DIMENSIONLESS, m0_eqp: KN_M, m0_ed: KN_M) -> None: + def __init__(self, phi_inf_t0: DIMENSIONLESS, m0_eqp: KNM, m0_ed: KNM) -> None: r"""[$$\phi_{ef}$$] Effective creep coefficient. NEN-EN 1992-1-1+C2:2011 art.5.8.4(2) - Formula (5.19) @@ -22,9 +22,9 @@ def __init__(self, phi_inf_t0: DIMENSIONLESS, m0_eqp: KN_M, m0_ed: KN_M) -> None ---------- phi_inf_t0 : DIMENSIONLESS [$$\phi (\infty,t_0)$$] is the final value of the creep coefficient according to art. 3.1.4. - m0_eqp : KN_M + m0_eqp : KNM [$$M_{0,Eqp}$$] is the first-order bending moment in the quasi-permanent load combination (SLS). - m0_ed : KN_M + m0_ed : KNM [$$M_{0,Ed}$$] is the first-order bending moment in the ultimate limit state (ULS). """ super().__init__() @@ -33,7 +33,7 @@ def __init__(self, phi_inf_t0: DIMENSIONLESS, m0_eqp: KN_M, m0_ed: KN_M) -> None self.m0_ed = m0_ed @staticmethod - def _evaluate(phi_inf_t0: DIMENSIONLESS, m0_eqp: KN_M, m0_ed: KN_M) -> DIMENSIONLESS: + def _evaluate(phi_inf_t0: DIMENSIONLESS, m0_eqp: KNM, m0_ed: KNM) -> DIMENSIONLESS: """Evaluates the formula, for more information see the __init__ method.""" raise_if_less_or_equal_to_zero(m0_ed=m0_ed) return phi_inf_t0 * (m0_eqp / m0_ed) diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_29.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_29.py index b1b48a4e2..a3c739ae6 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_29.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_29.py @@ -10,7 +10,7 @@ class Form5Dot29BetaFactor(Formula): - """Class representing formula 5.29 for the calculation of the beta factor, [$$β$$].""" + r"""Class representing formula 5.29 for the calculation of the beta factor, [$$\beta$$].""" label = "5.29" source_document = NEN_EN_1992_1_1_C2_2011 diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_40a.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_40a.py index 9a319679e..268ddb97e 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_40a.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_40a.py @@ -30,7 +30,7 @@ def __init__( b : M [$$b$$] is the width of compression flange [$$m$$]. h : M - [$$h$$] is the total depth of beam in central part of [$$l_{0t}$$] [$$m$$]. + [$$h$$] is the total depth of beam in central part of $$l_{0t}$$ [$$m$$]. """ super().__init__() self.l_0t = l_0t