Skip to content

Commit 756fd7d

Browse files
Merge pull request #444 from Blueprints-org/443-add-formulas-from-chapter-644-from-nen_en_1992_1_1
443 add formulas from chapter 644 from nen en 1992 1 1
2 parents 440765a + e023402 commit 756fd7d

File tree

14 files changed

+1379
-6
lines changed

14 files changed

+1379
-6
lines changed
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
"""Formula 6.47 from NEN-EN 1992-1-1+C2:2011: Chapter 6 - Ultimate Limit State."""
2+
3+
from blueprints.codes.eurocode.nen_en_1992_1_1_c2_2011 import NEN_EN_1992_1_1_C2_2011
4+
from blueprints.codes.formula import Formula
5+
from blueprints.codes.latex_formula import LatexFormula, latex_replace_symbols
6+
from blueprints.type_alias import DIMENSIONLESS, MPA
7+
from blueprints.validations import raise_if_negative
8+
9+
10+
class Form6Dot47PunchingShearResistance(Formula):
11+
r"""Class representing formula 6.47 for the calculation of punching shear resistance, $$v_{Rd,c}$$ of slabs and column bases
12+
without shear reinforcement.
13+
"""
14+
15+
label = "6.47"
16+
source_document = NEN_EN_1992_1_1_C2_2011
17+
18+
def __init__(
19+
self,
20+
c_rd_c: DIMENSIONLESS,
21+
k: DIMENSIONLESS,
22+
rho_l: DIMENSIONLESS,
23+
f_ck: MPA,
24+
k_1: DIMENSIONLESS,
25+
sigma_cp: MPA,
26+
v_min: MPA,
27+
) -> None:
28+
r"""$$v_{Rd,c}$$ Calculation of punching shear resistance of slabs and column bases without shear reinforcement.
29+
30+
NEN-EN 1992-1-1+C2:2011 art.6.4.4(1) - Formula (6.47).
31+
32+
The values of $$C_{Rd,c}$$, $$v_{min}$$, and $$k_1$$ for use in a country may be found in its national annex.
33+
The recommended value for $$C_{Rd,c}$$ is $$0.18 / \gamma_c$$, for $$v_{min}$$ is given by Expression (6.3N),
34+
and that for $$k_1$$ is $$0.1$$.
35+
36+
Parameters
37+
----------
38+
c_rd_c : DIMENSIONLESS
39+
$$C_{Rd,c}$$ Coefficient for punching shear resistance, recommended value $$0.18 / \gamma_c$$ [-].
40+
k : DIMENSIONLESS
41+
$$k$$ Size effect factor, see equation SubForm6Dot47FactorK [-].
42+
rho_l : DIMENSIONLESS
43+
$$\rho_l$$ Longitudinal reinforcement ratio, see equation SubForm6Dot47FactorRhoL [-].
44+
f_ck : MPA
45+
$$f_{ck}$$ Characteristic compressive strength of concrete [$$MPa$$].
46+
k_1 : DIMENSIONLESS
47+
$$k_1$$ Coefficient for concrete strength, recommended value 0.1 [-].
48+
sigma_cp : MPA
49+
$$\sigma_{cp}$$ Stress in the critical section as average of the two perpendicular directions, see
50+
equation SubForm6Dot47FactorSigmaCp [$$MPa$$].
51+
v_min : MPA
52+
$$v_{min}$$ Minimum shear stress capacity concrete, recommended value with Expression (6.3N) [$$MPa$$].
53+
"""
54+
super().__init__()
55+
self.c_rd_c = c_rd_c
56+
self.k = k
57+
self.rho_l = rho_l
58+
self.f_ck = f_ck
59+
self.k_1 = k_1
60+
self.sigma_cp = sigma_cp
61+
self.v_min = v_min
62+
63+
@staticmethod
64+
def _evaluate(
65+
c_rd_c: DIMENSIONLESS,
66+
k: DIMENSIONLESS,
67+
rho_l: DIMENSIONLESS,
68+
f_ck: MPA,
69+
k_1: DIMENSIONLESS,
70+
sigma_cp: MPA,
71+
v_min: MPA,
72+
) -> MPA:
73+
"""Evaluates the formula, for more information see the __init__ method."""
74+
raise_if_negative(c_rd_c=c_rd_c, k=k, rho_l=rho_l, f_ck=f_ck, k_1=k_1, sigma_cp=sigma_cp, v_min=v_min)
75+
76+
term1 = c_rd_c * k * (100 * rho_l * f_ck) ** (1 / 3) + k_1 * sigma_cp
77+
term2 = v_min + k_1 * sigma_cp
78+
return max(term1, term2)
79+
80+
def latex(self) -> LatexFormula:
81+
"""Returns LatexFormula object for formula 6.47."""
82+
_equation: str = (
83+
r"\max \left( C_{Rd,c} \cdot k \cdot (100 \cdot \rho_l \cdot f_{ck})^{1/3} "
84+
r"+ k_1 \cdot \sigma_{cp}, v_{min} + k_1 \cdot \sigma_{cp} \right)"
85+
)
86+
_numeric_equation: str = latex_replace_symbols(
87+
_equation,
88+
{
89+
r"C_{Rd,c}": f"{self.c_rd_c:.3f}",
90+
r"\rho_l": f"{self.rho_l:.3f}",
91+
r"f_{ck}": f"{self.f_ck:.3f}",
92+
r"k_1": f"{self.k_1:.3f}",
93+
r"\sigma_{cp}": f"{self.sigma_cp:.3f}",
94+
r"v_{min}": f"{self.v_min:.3f}",
95+
r"k": f"{self.k:.3f}",
96+
},
97+
False,
98+
)
99+
return LatexFormula(
100+
return_symbol=r"v_{Rd,c}",
101+
result=f"{self:.3f}",
102+
equation=_equation,
103+
numeric_equation=_numeric_equation,
104+
comparison_operator_label="=",
105+
unit="MPa",
106+
)
Lines changed: 258 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,258 @@
1+
"""Formula 6.47 from NEN-EN 1992-1-1+C2:2011: Chapter 6 - Ultimate Limit State."""
2+
3+
import numpy as np
4+
5+
from blueprints.codes.eurocode.nen_en_1992_1_1_c2_2011 import NEN_EN_1992_1_1_C2_2011
6+
from blueprints.codes.formula import Formula
7+
from blueprints.codes.latex_formula import LatexFormula, latex_replace_symbols
8+
from blueprints.type_alias import DIMENSIONLESS, MM, MM2, MPA, N
9+
from blueprints.validations import raise_if_less_or_equal_to_zero, raise_if_negative
10+
11+
12+
class SubForm6Dot47FactorK(Formula):
13+
r"""Class representing the sub-formula which calculates the factor [$$k$$] for formula 6.47 ."""
14+
15+
label = "6.47 (factor k)"
16+
source_document = NEN_EN_1992_1_1_C2_2011
17+
18+
def __init__(self, d: MM) -> None:
19+
r"""[$$k$$] Calculation of factor k.
20+
21+
NEN-EN 1992-1-1+C2:2011 art.6.4.4(1) - Factor k for Formula (6.47)
22+
23+
Parameters
24+
----------
25+
d : MM
26+
[$$d$$] Effective depth [$$mm$$].
27+
"""
28+
super().__init__()
29+
self.d = d
30+
31+
@staticmethod
32+
def _evaluate(d: MM) -> DIMENSIONLESS:
33+
"""Evaluates the formula, for more information see the __init__ method."""
34+
raise_if_less_or_equal_to_zero(d=d)
35+
return min(1 + np.sqrt(200 / d), 2.0)
36+
37+
def latex(self) -> LatexFormula:
38+
"""Returns LatexFormula object for sub-formula 6.47 (factor k)."""
39+
_equation: str = r"\min \left( 1 + \sqrt{\frac{200}{d}}, 2.0 \right)"
40+
_numeric_equation: str = latex_replace_symbols(
41+
_equation,
42+
{
43+
r"d": f"{self.d:.3f}",
44+
},
45+
False,
46+
)
47+
return LatexFormula(
48+
return_symbol=r"k",
49+
result=f"{self:.3f}",
50+
equation=_equation,
51+
numeric_equation=_numeric_equation,
52+
comparison_operator_label="=",
53+
unit="-",
54+
)
55+
56+
57+
class SubForm6Dot47FactorRhoL(Formula):
58+
r"""Class representing the sub-formula which calculates the factor [$$\rho_l$$] for formula 6.47 ."""
59+
60+
label = "6.47 (factor rho_l)"
61+
source_document = NEN_EN_1992_1_1_C2_2011
62+
63+
def __init__(self, rho_ly: DIMENSIONLESS, rho_lz: DIMENSIONLESS) -> None:
64+
r"""[$$\rho_l$$] Calculation of factor [$$\rho_l$$].
65+
66+
NEN-EN 1992-1-1+C2:2011 art.6.4.4(1) - Factor rho_l for Formula (6.47)
67+
68+
Parameters
69+
----------
70+
rho_ly : DIMENSIONLESS
71+
[$$\rho_{ly}$$] Related to the bonded tension steel in y- drection. The value $$\rho_ly$$ should be calculated as mean values taking
72+
into account a slab width equal to the column width plus 3d each side [$$-$$].
73+
rho_lz : DIMENSIONLESS
74+
[$$\rho_{lz}$$] Related to the bonded tension steel in z- drection. The value $$\rho_lz$$ should be calculated as mean values taking
75+
into account a slab width equal to the column width plus 3d each side [$$-$$].
76+
"""
77+
super().__init__()
78+
self.rho_ly = rho_ly
79+
self.rho_lz = rho_lz
80+
81+
@staticmethod
82+
def _evaluate(rho_ly: DIMENSIONLESS, rho_lz: DIMENSIONLESS) -> DIMENSIONLESS:
83+
"""Evaluates the formula, for more information see the __init__ method."""
84+
raise_if_negative(rho_ly=rho_ly, rho_lz=rho_lz)
85+
return min(np.sqrt(rho_ly * rho_lz), 0.02)
86+
87+
def latex(self) -> LatexFormula:
88+
"""Returns LatexFormula object for sub-formula 6.47 (factor rho_l)."""
89+
_equation: str = r"\min \left( \sqrt{\rho_{ly} \cdot \rho_{lz}}, 0.02 \right)"
90+
_numeric_equation: str = latex_replace_symbols(
91+
_equation,
92+
{
93+
r"\rho_{ly}": f"{self.rho_ly:.3f}",
94+
r"\rho_{lz}": f"{self.rho_lz:.3f}",
95+
},
96+
False,
97+
)
98+
return LatexFormula(
99+
return_symbol=r"\rho_l",
100+
result=f"{self:.3f}",
101+
equation=_equation,
102+
numeric_equation=_numeric_equation,
103+
comparison_operator_label="=",
104+
unit="-",
105+
)
106+
107+
108+
class SubForm6Dot47FactorSigmaCp(Formula):
109+
r"""Class representing the sub-formula which calculates the factor [$$\sigma_{cp}$$] for formula 6.47,."""
110+
111+
label = "6.47 (factor sigma_cp)"
112+
source_document = NEN_EN_1992_1_1_C2_2011
113+
114+
def __init__(self, sigma_cy: MPA, sigma_cz: MPA) -> None:
115+
r"""[$$\sigma_{cp}$$] Calculation of factor [$$\sigma_{cp}$$].
116+
117+
NEN-EN 1992-1-1+C2:2011 art.6.4.4(1) - Factor sigma_cp for Formula (6.47)
118+
119+
Parameters
120+
----------
121+
sigma_cy : MPA
122+
[$$\sigma_{cy}$$] Normal concrete stress in the critical section in the y-direction [$$MPa$$], Positive if compression.
123+
See equation SubForm6Dot47FactorSigmaCy.
124+
sigma_cz : MPA
125+
[$$\sigma_{cz}$$] Normal concrete stress inm the critical section in the z-direction [$$MPa$$], Positive if compression.
126+
See equation SubForm6Dot47FactorSigmaCz.
127+
"""
128+
super().__init__()
129+
self.sigma_cy = sigma_cy
130+
self.sigma_cz = sigma_cz
131+
132+
@staticmethod
133+
def _evaluate(sigma_cy: MPA, sigma_cz: MPA) -> MPA:
134+
"""Evaluates the formula, for more information see the __init__ method."""
135+
raise_if_negative(sigma_cy=sigma_cy, sigma_cz=sigma_cz)
136+
return (sigma_cy + sigma_cz) / 2
137+
138+
def latex(self) -> LatexFormula:
139+
"""Returns LatexFormula object for sub-formula 6.47 (sigma_cp)."""
140+
_equation: str = r"\frac{\sigma_{cy} + \sigma_{cz}}{2}"
141+
_numeric_equation: str = latex_replace_symbols(
142+
_equation,
143+
{
144+
r"\sigma_{cy}": f"{self.sigma_cy:.3f}",
145+
r"\sigma_{cz}": f"{self.sigma_cz:.3f}",
146+
},
147+
False,
148+
)
149+
return LatexFormula(
150+
return_symbol=r"\sigma_{cp}",
151+
result=f"{self:.3f}",
152+
equation=_equation,
153+
numeric_equation=_numeric_equation,
154+
comparison_operator_label="=",
155+
unit="MPa",
156+
)
157+
158+
159+
class SubForm6Dot47FactorSigmaCy(Formula):
160+
r"""Class representing the sub-formula which calculates the factor [$$\sigma_{cy}$$] for formula 6.47."""
161+
162+
label = "6.47 (factor sigma_cy)"
163+
source_document = NEN_EN_1992_1_1_C2_2011
164+
165+
def __init__(self, n_ed_y: N, a_cy: MM2) -> None:
166+
r"""[$$\sigma_{cy}$$] Calculation of factor [$$\sigma_{cy}$$].
167+
168+
NEN-EN 1992-1-1+C2:2011 art.6.4.4(1) - Factor sigma_cy for Formula (6.47)
169+
170+
Parameters
171+
----------
172+
n_ed_y : N
173+
[$$N_{Ed,y}$$] Longitudinal forces across the full bay for internal columns and the logintudinal force across
174+
the control section for edge columns. The force may be from a load or prestressing action [$$N$$].
175+
a_cy : MM2
176+
[$$A_{cy}$$] Cross-sectional area in y-direction [$$mm^2$$].
177+
"""
178+
super().__init__()
179+
self.n_ed_y = n_ed_y
180+
self.a_cy = a_cy
181+
182+
@staticmethod
183+
def _evaluate(n_ed_y: N, a_cy: MM2) -> MPA:
184+
"""Evaluates the formula, for more information see the __init__ method."""
185+
raise_if_less_or_equal_to_zero(a_cy=a_cy)
186+
raise_if_negative(n_ed_y=n_ed_y)
187+
return n_ed_y / a_cy
188+
189+
def latex(self) -> LatexFormula:
190+
"""Returns LatexFormula object for sub-formula 6.47 (sigma_cy)."""
191+
_equation: str = r"\frac{N_{Ed,y}}{A_{cy}}"
192+
_numeric_equation: str = latex_replace_symbols(
193+
_equation,
194+
{
195+
r"N_{Ed,y}": f"{self.n_ed_y:.3f}",
196+
r"A_{cy}": f"{self.a_cy:.3f}",
197+
},
198+
False,
199+
)
200+
return LatexFormula(
201+
return_symbol=r"\sigma_{cy}",
202+
result=f"{self:.3f}",
203+
equation=_equation,
204+
numeric_equation=_numeric_equation,
205+
comparison_operator_label="=",
206+
unit="MPa",
207+
)
208+
209+
210+
class SubForm6Dot47FactorSigmaCz(Formula):
211+
r"""Class representing the sub-formula which calculates the factor [$$\sigma_{cz}$$] for formula 6.47."""
212+
213+
label = "6.47 (factor sigma_cz)"
214+
source_document = NEN_EN_1992_1_1_C2_2011
215+
216+
def __init__(self, n_ed_z: N, a_cz: MM2) -> None:
217+
r"""[$$\sigma_{cz}$$] Calculation of factor [$$\sigma_{cz}$$].
218+
219+
NEN-EN 1992-1-1+C2:2011 art.6.4.4(1) - Factor sigma_cz for Formula (6.47)
220+
221+
Parameters
222+
----------
223+
n_ed_z : N
224+
[$$N_{Ed,z}$$] Longitudinal forces across the full bay for internal columns and the logintudinal force across
225+
the control section for edge columns. The force may be from a load or prestressing action [$$N$$].
226+
a_cz : MM2
227+
[$$A_{cz}$$] Cross-sectional area in z-direction [$$mm^2$$].
228+
"""
229+
super().__init__()
230+
self.n_ed_z = n_ed_z
231+
self.a_cz = a_cz
232+
233+
@staticmethod
234+
def _evaluate(n_ed_z: N, a_cz: MM2) -> MPA:
235+
"""Evaluates the formula, for more information see the __init__ method."""
236+
raise_if_less_or_equal_to_zero(a_cz=a_cz)
237+
raise_if_negative(n_ed_z=n_ed_z)
238+
return n_ed_z / a_cz
239+
240+
def latex(self) -> LatexFormula:
241+
"""Returns LatexFormula object for sub-formula 6.47 sigma_cz."""
242+
_equation: str = r"\frac{N_{Ed,z}}{A_{cz}}"
243+
_numeric_equation: str = latex_replace_symbols(
244+
_equation,
245+
{
246+
r"N_{Ed,z}": f"{self.n_ed_z:.3f}",
247+
r"A_{cz}": f"{self.a_cz:.3f}",
248+
},
249+
False,
250+
)
251+
return LatexFormula(
252+
return_symbol=r"\sigma_{cz}",
253+
result=f"{self:.3f}",
254+
equation=_equation,
255+
numeric_equation=_numeric_equation,
256+
comparison_operator_label="=",
257+
unit="MPa",
258+
)

0 commit comments

Comments
 (0)