Skip to content

Commit 206f123

Browse files
authored
Merge pull request #473 from Blueprints-org/472-documentation-issue-latex-vs-math-in-chapter-8-12-from-nen-en-1992-1-1-and-all-other-ecs
472 documentation issue latex vs math in all current code
2 parents 89cde9f + 70e73f3 commit 206f123

File tree

139 files changed

+1083
-1102
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+1083
-1102
lines changed

blueprints/checks/nominal_concrete_cover/nominal_concrete_cover.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Calculation of nominal concrete cover from NEN-EN 1992-1-1: Chapter 4 - Durability and cover to reinforcement."""
1+
r"""Calculation of nominal concrete cover from NEN-EN 1992-1-1: Chapter 4 - Durability and cover to reinforcement."""
22

33
from dataclasses import dataclass, field
44
from typing import Literal
@@ -28,15 +28,15 @@
2828

2929
@dataclass(frozen=True)
3030
class NominalConcreteCover:
31-
"""Class responsible for the calculation of the nominal concrete cover :math:`c_{nom}` [:math:`mm`].
31+
r"""Class responsible for the calculation of the nominal concrete cover [$$c_{nom}$$] [$$mm$$].
3232
It takes considerations of art.4.4.1.2 and 4.4.1.3 into account.
3333
3434
Parameters
3535
----------
3636
reinforcement_diameter: MM
37-
The diameter of the reinforcement [:math:`mm`].
37+
The diameter of the reinforcement [$$mm$$].
3838
nominal_max_aggregate_size: MM
39-
The nominal maximum aggregate size [:math:`mm`].
39+
The nominal maximum aggregate size [$$mm$$].
4040
constants: ConstantsBase
4141
The constants for the calculation of the nominal concrete cover.
4242
structural_class: ConcreteStructuralClassBase | int
@@ -49,16 +49,16 @@ class NominalConcreteCover:
4949
chloride_seawater: ChlorideSeawater | Literal["XS1", "XS2", "XS3", "NA"]
5050
The classification of corrosion induced by chlorides from sea water. Default is "Not applicable".
5151
delta_c_dur_gamma: MM
52-
[:math:`Δc_{dur,γ}`] An additional safety requirement based on art. 4.4.1.2 (6) [:math:`mm`].
53-
The value of [:math:`Δc_{dur,γ}`] for use in a Country may be found in its National Annex.
54-
The recommended value is O mm. 0 mm is the default value in the formula if not specified otherwise.
52+
[$$\Delta c_{dur,\gamma}$$] An additional safety requirement based on art. 4.4.1.2 (6) [$$mm$$].
53+
The value of [$$\Delta c_{dur,\gamma}$$] for use in a Country may be found in its National Annex.
54+
The recommended value is 0 mm. 0 mm is the default value in the formula if not specified otherwise.
5555
delta_c_dur_st: MM
56-
[:math:`Δc_{dur,st}`] A reduction of minimum concrete cover when using stainless steel based on art. 4.4.1.2 (7) [:math:`mm`].
57-
The value of [:math:`Δc_{dur,st}`] for use in a Country may be found in its National Annex.
56+
[$$\Delta c_{dur,st}$$] A reduction of minimum concrete cover when using stainless steel based on art. 4.4.1.2 (7) [$$mm$$].
57+
The value of [$$\Delta c_{dur,st}$$] for use in a Country may be found in its National Annex.
5858
The recommended value, without further specification, is 0 mm. 0 mm is the default value in the formula if not specified otherwise.
5959
delta_c_dur_add: MM
60-
[:math:`Δc_{dur,add}`] A reduction of minimum concrete cover when using additional protection based on art. 4.4.1.2 (8) [:math:`mm`].
61-
The value of [:math:`Δc_{dur,add}`] for use in a Country may be found in its National Annex.
60+
[$$\Delta c_{dur,add}$$] A reduction of minimum concrete cover when using additional protection based on art. 4.4.1.2 (8) [$$mm$$].
61+
The value of [$$\Delta c_{dur,add}$$] for use in a Country may be found in its National Annex.
6262
The recommended value, without further specification, is 0 mm. 0 mm is the default value in the formula if not specified otherwise.
6363
casting_surface: CastingSurface
6464
The casting surface of the concrete according to art. 4.4.1.3 (4).

blueprints/codes/eurocode/nen_9997_1_c2_2017/chapter_1_general_rules/formula_1_0_1.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,22 @@
1010

1111

1212
class Form1Dot0Dot1EquivalentPilePointCenterline(Formula):
13-
"""Class representing formula 1.0.1 for the calculation of the equivalent pile point centerline :math:`D_{eq}` in [m]."""
13+
r"""Class representing formula 1.0.1 for the calculation of the equivalent pile point centerline [$$D_{eq}$$] in [$$m$$]."""
1414

1515
label = "1.0.1"
1616
source_document = NEN_9997_1_C2_2017
1717

1818
def __init__(self, a: M, b: M) -> None:
19-
"""[:math:`D_{eq}`] Equivalent pile point centerline.
19+
r"""[$$D_{eq}$$] Equivalent pile point centerline.
2020
2121
NEN 9997-1+C2:2017 art.1.5.2.106a - Formula (1.0.1)
2222
2323
Parameters
2424
----------
2525
a : M
26-
[:math:`a`] minor dimension of the largest cross-section at the pile tip [:math:`m`].
26+
[$$a$$] minor dimension of the largest cross-section at the pile tip [$$m$$].
2727
b : M
28-
[:math:`b`] major dimension of the largest cross-section at the pile tip [:math:`m`].
28+
[$$b$$] major dimension of the largest cross-section at the pile tip [$$m$$].
2929
3030
Where: b ≤ 1.5 * a
3131
"""

blueprints/codes/eurocode/nen_9997_1_c2_2017/chapter_2_basic_of_geotechnical_design/formula_2_1_a.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@
88

99

1010
class Form2Dot1aDesignValueLoad(Formula):
11-
"""Class representing formula 2.1a for the calculation of the design value :math:`F_{d}` of actions."""
11+
"""Class representing formula 2.1a for the calculation of the design value [$$F_{d}$$] of actions."""
1212

1313
label = "2.1a"
1414
source_document = NEN_9997_1_C2_2017
1515

16-
def __init__(self, gamma_f: DIMENSIONLESS, f_rep: float) -> None:
17-
"""[:math:`F_{d}`] Design value of actions.
16+
def __init__(self, gamma_f: DIMENSIONLESS, f_rep: DIMENSIONLESS) -> None:
17+
r"""[$$F_{d}$$] Design value of actions.
1818
1919
NEN 9997-1+C2:2017 art.2.4.6.1(2) - (Formula 2.1a)
2020
2121
Parameters
2222
----------
2323
gamma_f : DIMENSIONLESS
24-
[:math:`γ_{F}`] partial factor for actions for persistent and transient situations defined in annex A [-].
25-
f_rep : float
26-
[:math:`F_{rep}`] Representative value of actions.
24+
[$$\gamma_{F}$$] partial factor for actions for persistent and transient situations defined in annex A [$$-$$].
25+
f_rep : DIMENSIONLESS
26+
[$$F_{rep}$$] Representative value of actions.
2727
2828
Use your own implementation for this value or use :class:`Form2Dot1bRepresentativeValue`.
2929
"""
@@ -34,8 +34,8 @@ def __init__(self, gamma_f: DIMENSIONLESS, f_rep: float) -> None:
3434
@staticmethod
3535
def _evaluate(
3636
gamma_f: DIMENSIONLESS,
37-
f_rep: float,
38-
) -> float:
37+
f_rep: DIMENSIONLESS,
38+
) -> DIMENSIONLESS:
3939
"""Evaluates the formula, for more information see the __init__ method."""
4040
raise_if_negative(gamma_f=gamma_f)
4141
return gamma_f * f_rep

blueprints/codes/eurocode/nen_9997_1_c2_2017/chapter_2_basic_of_geotechnical_design/formula_2_1_b.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@
88

99

1010
class Form2Dot1bRepresentativeValue(Formula):
11-
"""Class representing formula 2.1b for the calculation of the representative value :math:`F_{rep}` of actions."""
11+
"""Class representing formula 2.1b for the calculation of the representative value [$$F_{rep}$$] of actions."""
1212

1313
label = "2.1b"
1414
source_document = NEN_9997_1_C2_2017
1515

16-
def __init__(self, psi: DIMENSIONLESS, f_k: float) -> None:
17-
"""[:math:`F_{rep}`] Representative value of actions.
16+
def __init__(self, psi: DIMENSIONLESS, f_k: DIMENSIONLESS) -> None:
17+
r"""[$$F_{rep}$$] Representative value of actions.
1818
1919
NEN 9997-1+C2:2017 art.2.4.6.1(2) - Formula (2.1b)
2020
2121
Parameters
2222
----------
2323
psi : DIMENSIONLESS
24-
[:math:`Ψ`] factor for converting the characteristic value to the representative value [-].
25-
f_k : float
26-
[:math:`F_{k}`] Characteristic value of actions.
24+
[$$\Psi$$] factor for converting the characteristic value to the representative value [$$-$$].
25+
f_k : DIMENSIONLESS
26+
[$$F_{k}$$] Characteristic value of actions [$$-$$].
2727
"""
2828
super().__init__()
2929
self.psi = psi
@@ -32,8 +32,8 @@ def __init__(self, psi: DIMENSIONLESS, f_k: float) -> None:
3232
@staticmethod
3333
def _evaluate(
3434
psi: DIMENSIONLESS,
35-
f_k: float,
36-
) -> float:
35+
f_k: DIMENSIONLESS,
36+
) -> DIMENSIONLESS:
3737
"""Evaluates the formula, for more information see the __init__ method."""
3838
raise_if_negative(psi=psi)
3939
return psi * f_k

blueprints/codes/eurocode/nen_9997_1_c2_2017/chapter_2_basic_of_geotechnical_design/formula_2_2.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,30 @@
88

99

1010
class Form2Dot2DesignValueGeotechnicalParameter(Formula):
11-
"""Class representing formula 2.2 for the calculation of the design value :math:`X_d` of geotechnical parameter :math:`X`."""
11+
"""Class representing formula 2.2 for the calculation of the design value [$$X_d$$] of geotechnical parameter [$$X$$]."""
1212

1313
label = "2.2"
1414
source_document = NEN_9997_1_C2_2017
1515

16-
def __init__(self, x_k: float, gamma_m: DIMENSIONLESS) -> None:
17-
"""[:math:`X_d`] Design value of geotechnical parameter [:math:`X`].
16+
def __init__(self, x_k: DIMENSIONLESS, gamma_m: DIMENSIONLESS) -> None:
17+
r"""[$$X_d$$] Design value of geotechnical parameter [$$X$$].
1818
1919
NEN 9997-1+C2:2017 art.2.4.6.2(1) - Formula (2.2)
2020
2121
Parameters
2222
----------
23-
x_k : float
24-
[:math:`X_{k}`] Characteristic value of geotechnical parameter [:math:`X`].
23+
x_k : DIMENSIONLESS
24+
[$$X_{k}$$] Characteristic value of geotechnical parameter [$$X$$].
2525
gamma_m : DIMENSIONLESS
26-
[:math:`gamma_M`] material partial factor [-].
26+
[$$\gamma_M$$] material partial factor [$$-$$].
2727
"""
2828
super().__init__()
2929
self.x_k = x_k
3030
self.gamma_m = gamma_m
3131

3232
@staticmethod
3333
def _evaluate(
34-
x_k: float,
34+
x_k: DIMENSIONLESS,
3535
gamma_m: DIMENSIONLESS,
3636
) -> float:
3737
"""Evaluates the formula, for more information see the __init__ method."""

blueprints/codes/eurocode/nen_9997_1_c2_2017/chapter_2_basic_of_geotechnical_design/formula_2_4.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,30 @@
99

1010

1111
class Form2Dot4DesignValueGeotechnicalParameter:
12-
"""Class representing formula 2.4 for the check of
12+
r"""Class representing formula 2.4 for the check of
1313
the destabilizing load effect
1414
against the stabilizing load effect and friction resistance
15-
:math:`E_{dst;d} E_{stb;d} + T_d`.
15+
[$$E_{dst;d} \leq E_{stb;d} + T_d$$].
1616
"""
1717

1818
label = "2.4"
1919
source_document = NEN_9997_1_C2_2017
2020

2121
def __init__(self, e_dst_d: KN, e_stb_d: KN, t_d: KN) -> None:
22-
"""Check of the destabilizing load effect
22+
r"""Check of the destabilizing load effect
2323
against the stabilizing load effect and friction resistance
24-
[:math:`E_{dst;d} E_{stb;d} + T_d`].
24+
[$$E_{dst;d} \leq E_{stb;d} + T_d$$].
2525
2626
NEN 9997-1+C2:2017 art.2.4.7.2(1) - Formula (2.4)
2727
2828
Parameters
2929
----------
30-
E_dst_d : N
31-
[:math:`E_dst;d`] Design value of destabilizing load effect.
32-
E_stb_d : N
33-
[:math:`E_stb;d`] Design value of stabilizing load effect.
34-
T_d : N
35-
[:math: `T_d`] Design value of friction resistance.
30+
E_dst_d : KN
31+
[$$E_{dst;d}$$] Design value of destabilizing load effect [$$kN$$].
32+
E_stb_d : KN
33+
[$$E_{stb;d}$$] Design value of stabilizing load effect [$$kN$$].
34+
T_d : KN
35+
[$$T_d$$] Design value of friction resistance [$$kN$$].
3636
"""
3737
self.e_dst_d = e_dst_d
3838
self.e_stb_d = e_stb_d

blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_3_materials/formula_3_1.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
from blueprints.codes.eurocode.nen_en_1992_1_1_c2_2011 import NEN_EN_1992_1_1_C2_2011
44
from blueprints.codes.formula import Formula
55
from blueprints.codes.latex_formula import LatexFormula
6-
from blueprints.type_alias import MPA
6+
from blueprints.type_alias import DIMENSIONLESS, MPA
77
from blueprints.validations import raise_if_negative
88

99

1010
class Form3Dot1EstimationConcreteCompressiveStrength(Formula):
11-
"""Class representing formula 3.1 for the estimation of the concrete compressive strength, fcm(t), after t days
11+
r"""Class representing formula 3.1 for the estimation of the concrete compressive strength, [$$f_{cm}(t)$$], after t days
1212
with an average temperature of 20 degrees Celsius.
1313
"""
1414

@@ -17,19 +17,19 @@ class Form3Dot1EstimationConcreteCompressiveStrength(Formula):
1717

1818
def __init__(
1919
self,
20-
beta_cc_t: float,
20+
beta_cc_t: DIMENSIONLESS,
2121
f_cm: MPA,
2222
) -> None:
23-
"""[fcm(t)] The estimated concrete compressive strength [MPa].
23+
r"""[$$f_{cm}(t)$$] The estimated concrete compressive strength [$$MPa$$].
2424
2525
NEN-EN 1992-1-1+C2:2011 art.3.1.2(6) - Formula (3.1)
2626
2727
Parameters
2828
----------
29-
beta_cc_t : float
30-
[βcc(t)] Coefficient dependent of the age of concrete [-].
29+
beta_cc_t : DIMENSIONLESS
30+
[$$\beta_{cc}(t)$$] Coefficient dependent of the age of concrete [$$-$$].
3131
f_cm : MPA
32-
[fcm] Average concrete compressive strength on day 28 based on table 3.1 [MPa].
32+
[$$f_{cm}$$] Average concrete compressive strength on day 28 based on table 3.1 [$$MPa$$].
3333
3434
Returns
3535
-------
@@ -41,7 +41,7 @@ def __init__(
4141

4242
@staticmethod
4343
def _evaluate(
44-
beta_cc_t: float,
44+
beta_cc_t: DIMENSIONLESS,
4545
f_cm: MPA,
4646
) -> MPA:
4747
"""Evaluates the formula, for more information see the __init__ method."""

blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_3_materials/formula_3_10.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from blueprints.codes.eurocode.nen_en_1992_1_1_c2_2011 import NEN_EN_1992_1_1_C2_2011
66
from blueprints.codes.formula import Formula
77
from blueprints.codes.latex_formula import LatexFormula
8-
from blueprints.type_alias import DAYS, MM, MM2
8+
from blueprints.type_alias import DAYS, DIMENSIONLESS, MM, MM2
99

1010

1111
class Form3Dot10CoefficientAgeConcreteDryingShrinkage(Formula):
@@ -20,18 +20,18 @@ def __init__(
2020
t_s: DAYS,
2121
h_0: MM,
2222
) -> None:
23-
"""[βds(t,ts)] Coefficient for drying shrinkage due to age of concrete [-].
23+
r"""[$$\beta_{ds}(t, t_s)$$] Coefficient for drying shrinkage due to age of concrete [$$-$$].
2424
2525
NEN-EN 1992-1-1+C2:2011 art.3.1.4(6) - Formula (3.10)
2626
2727
Parameters
2828
----------
2929
t : DAYS
30-
[t] Age in days of the concrete at the considered moment [days].
30+
[$$t$$] Age in days of the concrete at the considered moment [$$days$$].
3131
t_s : DAYS
32-
[t] Age in days of the concrete at the start of the drying shrinkage [days].
32+
[$$t_s$$] Age in days of the concrete at the start of the drying shrinkage [$$days$$].
3333
h_0 : MM
34-
[h0] fictional thickness of cross-section [mm].
34+
[$$h_0$$] fictional thickness of cross-section [$$mm$$].
3535
= 2 * Ac / u
3636
Use your own implementation of this formula or use the SubForm3Dot10FictionalCrossSection class.
3737
@@ -49,7 +49,7 @@ def _evaluate(
4949
t: DAYS,
5050
t_s: DAYS,
5151
h_0: MM,
52-
) -> float:
52+
) -> DIMENSIONLESS:
5353
"""Evaluates the formula, for more information see the __init__ method."""
5454
if t <= 0:
5555
raise ValueError(f"Invalid t: {t}. t cannot be negative or zero")
@@ -83,16 +83,16 @@ def __init__(
8383
a_c: MM2,
8484
u: MM,
8585
) -> None:
86-
"""[h0] Fictional thickness of the cross-section [mm].
86+
r"""[$$h_0$$] Fictional thickness of the cross-section [$$mm$$].
8787
8888
NEN-EN 1992-1-1+C2:2011 art.3.1.4(6) - h0
8989
9090
Parameters
9191
----------
9292
a_c : MM2
93-
[Ac] Area of the cross-section of the concrete [mm²].
93+
[$$A_c$$] Area of the cross-section of the concrete [$$mm^2$$].
9494
u : MM
95-
[u] Circumference of part that is subjected to drying [mm].
95+
[$$u$$] Circumference of part that is subjected to drying [$$mm$$].
9696
"""
9797
super().__init__()
9898
self.a_c = a_c

blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_3_materials/formula_3_11.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from blueprints.codes.eurocode.nen_en_1992_1_1_c2_2011 import NEN_EN_1992_1_1_C2_2011
44
from blueprints.codes.formula import Formula
55
from blueprints.codes.latex_formula import LatexFormula
6+
from blueprints.type_alias import DIMENSIONLESS
67

78

89
class Form3Dot11AutogeneShrinkage(Formula):
@@ -13,21 +14,21 @@ class Form3Dot11AutogeneShrinkage(Formula):
1314

1415
def __init__(
1516
self,
16-
beta_as_t: float,
17-
epsilon_ca_inf: float,
17+
beta_as_t: DIMENSIONLESS,
18+
epsilon_ca_inf: DIMENSIONLESS,
1819
) -> None:
19-
"""[εca(t)] Autogene shrinkage [-].
20+
r"""[$$\epsilon_{ca}(t)$$] Autogene shrinkage [$$-$$].
2021
2122
NEN-EN 1992-1-1+C2:2011 art.3.1.4(6) - Formula (3.11)
2223
2324
Parameters
2425
----------
25-
beta_as_t : float
26-
[βas(t)] Coefficient dependent on time in days for autogene shrinkage [-].
26+
beta_as_t : DIMENSIONLESS
27+
[$$\beta_{as}(t)$$] Coefficient dependent on time in days for autogene shrinkage [$$-$$].
2728
= 1 - exp(-0.2 * t^0.5)
2829
Use your own implementation of this formula or use the Form3Dot13CoefficientTimeAutogeneShrinkage class
29-
epsilon_ca_inf : float
30-
[εca(∞)] Autogene shrinkage at infinity [-].
30+
epsilon_ca_inf : DIMENSIONLESS
31+
[$$\epsilon_{ca}(\infty)$$] Autogene shrinkage at infinity [$$-$$].
3132
= 2.5 * (fck - 10) E-6
3233
Use your own implementation of this formula or use the Form3Dot12AutogeneShrinkageInfinity class.
3334
@@ -41,8 +42,8 @@ def __init__(
4142

4243
@staticmethod
4344
def _evaluate(
44-
beta_as_t: float,
45-
epsilon_ca_inf: float,
45+
beta_as_t: DIMENSIONLESS,
46+
epsilon_ca_inf: DIMENSIONLESS,
4647
) -> float:
4748
"""Evaluates the formula, for more information see the __init__ method."""
4849
if beta_as_t < 0:

0 commit comments

Comments
 (0)