structuralcodes 0.4.0__tar.gz → 0.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of structuralcodes might be problematic. Click here for more details.

Files changed (68) hide show
  1. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/PKG-INFO +1 -1
  2. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/__init__.py +1 -1
  3. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/codes/ec2_2004/__init__.py +2 -0
  4. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/codes/ec2_2004/shear.py +44 -4
  5. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/codes/mc2010/__init__.py +18 -0
  6. structuralcodes-0.5.0/structuralcodes/codes/mc2010/_concrete_punching.py +455 -0
  7. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/core/base.py +1 -1
  8. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/geometry/_circular.py +3 -10
  9. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/geometry/_geometry.py +47 -92
  10. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/geometry/_rectangular.py +3 -10
  11. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/geometry/_reinforcement.py +8 -11
  12. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/materials/__init__.py +2 -1
  13. structuralcodes-0.5.0/structuralcodes/materials/basic/__init__.py +11 -0
  14. structuralcodes-0.5.0/structuralcodes/materials/basic/_elastic.py +52 -0
  15. structuralcodes-0.5.0/structuralcodes/materials/basic/_elasticplastic.py +75 -0
  16. structuralcodes-0.5.0/structuralcodes/materials/basic/_generic.py +26 -0
  17. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/materials/reinforcement/_reinforcementEC2_2004.py +1 -1
  18. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/materials/reinforcement/_reinforcementEC2_2023.py +1 -1
  19. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/materials/reinforcement/_reinforcementMC2010.py +1 -1
  20. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/sections/_generic.py +53 -14
  21. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/sections/_rc_utils.py +15 -5
  22. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/sections/section_integrators/_fiber_integrator.py +19 -11
  23. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/sections/section_integrators/_marin_integrator.py +24 -19
  24. structuralcodes-0.4.0/structuralcodes/codes/mc2010/_concrete_punching.py +0 -543
  25. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/LICENSE +0 -0
  26. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/README.md +0 -0
  27. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/pyproject.toml +0 -0
  28. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/codes/__init__.py +0 -0
  29. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/codes/ec2_2004/_concrete_creep_and_shrinkage.py +0 -0
  30. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/codes/ec2_2004/_concrete_material_properties.py +0 -0
  31. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/codes/ec2_2004/_reinforcement_material_properties.py +0 -0
  32. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/codes/ec2_2004/_section_7_3_crack_control.py +0 -0
  33. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/codes/ec2_2023/__init__.py +0 -0
  34. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/codes/ec2_2023/_annexB_time_dependent.py +0 -0
  35. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/codes/ec2_2023/_section5_materials.py +0 -0
  36. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/codes/ec2_2023/_section9_sls.py +0 -0
  37. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/codes/mc2010/_concrete_creep_and_shrinkage.py +0 -0
  38. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/codes/mc2010/_concrete_interface_different_casting_times.py +0 -0
  39. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/codes/mc2010/_concrete_material_properties.py +0 -0
  40. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/codes/mc2010/_concrete_shear.py +0 -0
  41. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/codes/mc2010/_concrete_torsion.py +0 -0
  42. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/codes/mc2010/_interface_concrete_steel_rebar.py +0 -0
  43. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/codes/mc2010/_reinforcement_material_properties.py +0 -0
  44. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/codes/mc2020/__init__.py +0 -0
  45. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/core/__init__.py +0 -0
  46. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/core/_section_results.py +0 -0
  47. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/geometry/__init__.py +0 -0
  48. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/geometry/_steel_sections.py +0 -0
  49. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/materials/concrete/__init__.py +0 -0
  50. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/materials/concrete/_concrete.py +0 -0
  51. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/materials/concrete/_concreteEC2_2004.py +0 -0
  52. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/materials/concrete/_concreteEC2_2023.py +0 -0
  53. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/materials/concrete/_concreteMC2010.py +0 -0
  54. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/materials/constitutive_laws/__init__.py +0 -0
  55. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/materials/constitutive_laws/_bilinearcompression.py +0 -0
  56. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/materials/constitutive_laws/_elastic.py +0 -0
  57. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/materials/constitutive_laws/_elasticplastic.py +0 -0
  58. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/materials/constitutive_laws/_parabolarectangle.py +0 -0
  59. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/materials/constitutive_laws/_popovics.py +0 -0
  60. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/materials/constitutive_laws/_sargin.py +0 -0
  61. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/materials/constitutive_laws/_userdefined.py +0 -0
  62. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/materials/reinforcement/__init__.py +0 -0
  63. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/materials/reinforcement/_reinforcement.py +0 -0
  64. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/sections/__init__.py +0 -0
  65. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/sections/section_integrators/__init__.py +0 -0
  66. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/sections/section_integrators/_factory.py +0 -0
  67. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/sections/section_integrators/_marin_integration.py +0 -0
  68. {structuralcodes-0.4.0 → structuralcodes-0.5.0}/structuralcodes/sections/section_integrators/_section_integrator.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: structuralcodes
3
- Version: 0.4.0
3
+ Version: 0.5.0
4
4
  Summary: A Python package that contains models from structural design codes.
5
5
  Author-email: fib - International Federation for Structural Concrete <info@fib-international.org>
6
6
  Requires-Python: >=3.8
@@ -3,7 +3,7 @@
3
3
  from . import codes, core, geometry, materials, sections
4
4
  from .codes import get_design_codes, set_design_code, set_national_annex
5
5
 
6
- __version__ = '0.4.0'
6
+ __version__ = '0.5.0'
7
7
 
8
8
  __all__ = [
9
9
  'set_design_code',
@@ -78,6 +78,7 @@ from ._section_7_3_crack_control import (
78
78
  )
79
79
  from .shear import (
80
80
  Asw_max,
81
+ Asw_s_required,
81
82
  VEdmax_unreinf,
82
83
  VRdc,
83
84
  VRdc_prin_stress,
@@ -90,6 +91,7 @@ __all__ = [
90
91
  'As_min_2',
91
92
  'As_min_p',
92
93
  'Asw_max',
94
+ 'Asw_s_required',
93
95
  'alpha_e',
94
96
  'eps_sm_eps_cm',
95
97
  'hc_eff',
@@ -112,8 +112,8 @@ def _theta(theta: float, cot_min: float = 1.0, cot_max: float = 2.5) -> None:
112
112
  'Wrong value for theta is chosen. Theta has '
113
113
  f'to be chosen such that 1/tan(theta) lies between '
114
114
  f'{cot_min} and {cot_max}. This corresponds to an angle '
115
- f'between {round(math.degrees(math.atan(1/cot_min)),2)} '
116
- f'and {round(math.degrees(math.atan(1/cot_max)),2)} '
115
+ f'between {round(math.degrees(math.atan(1 / cot_min)), 2)} '
116
+ f'and {round(math.degrees(math.atan(1 / cot_max)), 2)} '
117
117
  f'degrees, respectively. Current angle is set at {theta}'
118
118
  ' degrees.'
119
119
  )
@@ -152,7 +152,7 @@ def alpha_cw(Ned: float, Ac: float, fcd: float) -> float:
152
152
  value = 2.5 * (1 - sigma_cp / fcd)
153
153
  else:
154
154
  raise ValueError(
155
- f'sigma_cp/fcd={sigma_cp/fcd}. Prestress has to be smaller'
155
+ f'sigma_cp/fcd={sigma_cp / fcd}. Prestress has to be smaller'
156
156
  ' than design compressive strength.'
157
157
  )
158
158
  return value
@@ -400,6 +400,46 @@ def VRds(
400
400
  )
401
401
 
402
402
 
403
+ # Equation (6.8 & 6.13) -> Reinforcement ratio isolated from the equation.
404
+ def Asw_s_required(
405
+ Ved: float,
406
+ z: float,
407
+ theta: float,
408
+ fywd: float,
409
+ alpha: float = 90.0,
410
+ ) -> float:
411
+ """Calculate the required shear reinforcement.
412
+
413
+ EN 1992-1-1 (2005). Eq. (6.13)
414
+
415
+ Args:
416
+ Ved (float): The shear force in N.
417
+ z (float): The inner lever arm of internal forces in mm.
418
+ theta (float): The angle of the compression strut in degrees.
419
+ fywd (float): The design strength of the shear reinforcement steel in
420
+ MPa.
421
+
422
+ Keyword Args:
423
+ alpha (float): The angle of the shear reinforcement with respect to the
424
+ neutral axis in degrees. Default value = 90 degrees.
425
+
426
+ Returns:
427
+ float: The amount of required shear reinforcement in mm2/mm.
428
+
429
+ Raises:
430
+ ValueError: When theta < 21.8 degrees or theta > 45 degrees.
431
+ """
432
+ theta = math.radians(theta)
433
+ alpha = math.radians(alpha)
434
+ return (
435
+ Ved
436
+ / z
437
+ / fywd
438
+ / (1 / math.tan(theta) + 1.0 / math.tan(alpha))
439
+ / math.sin(alpha)
440
+ )
441
+
442
+
403
443
  # Equation (6.9 & 6.14)
404
444
  # For alpha == 90 degrees, Equation (6.14) reduces to Equation (6.9).
405
445
  def VRdmax(
@@ -480,7 +520,7 @@ def Asw_max(
480
520
  bw (float): The smallest width of the cross-section in tension in mm.
481
521
  s (float): The centre-to-centre distance of the shear reinforcement in
482
522
  mm.
483
- fwyd (float): The design strength of the shear reinforcement steel in
523
+ fywd (float): The design strength of the shear reinforcement steel in
484
524
  MPa.
485
525
  NEd (float): The normal force in the cross-section due to loading or
486
526
  prestress (NEd > 0 for compression) in N.
@@ -55,8 +55,17 @@ from ._concrete_material_properties import (
55
55
  )
56
56
  from ._concrete_punching import (
57
57
  b_0,
58
+ b_s,
59
+ b_sr,
60
+ k_dg,
61
+ k_psi,
58
62
  m_ed,
59
63
  psi_punching,
64
+ psi_punching_level_one,
65
+ psi_punching_level_three,
66
+ psi_punching_level_two,
67
+ r_s,
68
+ sigma_swd,
60
69
  v_rd_max_punching,
61
70
  v_rd_punching,
62
71
  v_rdc_punching,
@@ -184,6 +193,15 @@ __all__ = [
184
193
  's_tau_bu_split',
185
194
  'f_stm',
186
195
  'tau_yield',
196
+ 'b_s',
197
+ 'b_sr',
198
+ 'k_dg',
199
+ 'k_psi',
200
+ 'r_s',
201
+ 'psi_punching_level_one',
202
+ 'psi_punching_level_two',
203
+ 'psi_punching_level_three',
204
+ 'sigma_swd',
187
205
  ]
188
206
 
189
207
  __title__: str = 'fib Model Code 2010'
@@ -0,0 +1,455 @@
1
+ """Covers punching in Model code 2010, 7.3.5.1 to 7.3.5.4."""
2
+
3
+ import typing as t
4
+ import warnings
5
+ from math import cos, pi, sin
6
+
7
+
8
+ def b_0(v_ed: float, v_prep_d_max: float) -> float:
9
+ """Gives the general output for b_0, shear-resisting control perimeter.
10
+
11
+ fib Model Code 2010, Eq. (7.3-57).
12
+
13
+ Args:
14
+ V_ed (float): The acting shear force from the columns.
15
+ v_prep_d_max (float): The maximum shear force per unit length
16
+ perpendicular to the basic control parameter (Figure 7.3-24).
17
+
18
+ Returns:
19
+ float: The shear-resisting control perimeter, b_0.
20
+ """
21
+ return v_ed / v_prep_d_max
22
+
23
+
24
+ def b_s(
25
+ l_x: float,
26
+ l_y: float,
27
+ ) -> float:
28
+ """The width of the support strip for calculating m_ed.
29
+
30
+ fib Model Code 2010, Eq. (7.3-76).
31
+
32
+ Args:
33
+ l_x (float): The width in x direction that the collumn carries.
34
+ l_y (float): The width in y direction that the collumn carries.
35
+
36
+ Returns:
37
+ float: The width of the support strip for calculating m_ed.
38
+ """
39
+ r_sx = 0.22 * l_x # see MC2010 7.3.5.3
40
+ r_sy = 0.22 * l_y # see MC2010 7.3.5.3
41
+ l_min = min(l_x, l_y)
42
+ return min(1.5 * (r_sx * r_sy) ** 0.5, l_min)
43
+
44
+
45
+ def m_ed(
46
+ v_ed: float,
47
+ e_u: float,
48
+ b_s: float,
49
+ inner: bool,
50
+ edge_par: bool,
51
+ edge_per: bool,
52
+ corner: bool,
53
+ ) -> float:
54
+ """The average bending moment acting in the support strip.
55
+
56
+ fib Model Code 2010, Eq. (7.3-71), (7.3-72), (7.3-73) and (7.3-74).
57
+
58
+ Args:
59
+ v_ed (float): The acting shear force from the columns.
60
+ e_u (float): Refers to the eccentricity of the resultant of shear
61
+ forces with respect to the centroid.
62
+ b_s (float): The width of the support strip for calculating m_ed.
63
+ inner (bool): Is true only if the column is a inner column.
64
+ edge_par (bool): Is true only if the column is a edge column with
65
+ tension reinforcement parallel to the edge.
66
+ edge_per (bool): Is true only if the column is a edge column with
67
+ tension reinforcement perpendicular to the edge.
68
+ corner (bool): Is true only if the column is a corner column.
69
+
70
+ Returns:
71
+ float: The bending moment acting in the support strip regardless of the
72
+ position of the column.
73
+ """
74
+ if inner:
75
+ return v_ed * ((1 / 8) + abs(e_u) / (2 * b_s))
76
+ if edge_par:
77
+ return max(v_ed * ((1 / 8) + e_u / (2 * b_s)), v_ed / 4)
78
+ if edge_per:
79
+ return v_ed * ((1 / 8) + e_u / (b_s))
80
+ if corner:
81
+ return max(v_ed * ((1 / 8) + e_u / (b_s)), v_ed / 2)
82
+ raise ValueError('Placement is not defined, only one needs to be True')
83
+
84
+
85
+ def b_sr(
86
+ l_x: float,
87
+ l_y: float,
88
+ ) -> float:
89
+ """The width of the support strip in the radial direction.
90
+
91
+ fib Model Code 2010, 7.3.5.3.
92
+
93
+ Args:
94
+ l_x (float): The width in x direction that the collumn carries.
95
+ l_y (float): The width in y direction that the collumn carries.
96
+
97
+ Returns:
98
+ float: The width of the support strip in the radial direction.
99
+ """
100
+ return min(l_x, l_y)
101
+
102
+
103
+ def r_s(
104
+ l_x: float,
105
+ l_y: float,
106
+ x_direction: bool,
107
+ is_level_three_approximation: bool = False,
108
+ column_edge_or_corner: bool = False,
109
+ b_sr: t.Optional[float] = None,
110
+ ) -> float:
111
+ """The position where the radial bending moment is zero with respect to the
112
+ support axis.
113
+
114
+ fib Model Code 2010, 7.3.5.3 and Eq. (7.3-78) for Level III of
115
+ Approximation.
116
+
117
+ Args:
118
+ l_x (float): The width in x direction that the collumn carries.
119
+ l_y (float): The width in y direction that the collumn carries.
120
+ x_direction (bool): True if the radial bending moment is zero in the x
121
+ direction, False if it is in the y direction.
122
+ column_edge_or_corner (bool): True if the column is an edge or corner
123
+ column, False if it is an inner column. To be used for Level III of
124
+ Approximation.
125
+ b_sr (float): The width of the support strip in the radial direction.
126
+
127
+ Returns:
128
+ float: The position where the radial bending moment is zero with
129
+ respect to the support axis.
130
+ """
131
+ r_s = 0.22 * l_x if x_direction is True else 0.22 * l_y
132
+
133
+ if column_edge_or_corner and is_level_three_approximation:
134
+ if b_sr is None:
135
+ raise ValueError(
136
+ 'b_sr is not defined for Level 3 of Approximation'
137
+ )
138
+ return max(r_s, 0.67 * b_sr)
139
+ return r_s
140
+
141
+
142
+ def psi_punching_level_one(
143
+ l_x: float,
144
+ l_y: float,
145
+ f_yd: float,
146
+ d_eff: float,
147
+ e_s: float,
148
+ ) -> float:
149
+ """The psi value for the punching level one.
150
+
151
+ fib Model Code 2010, Eq. (7.3-70).
152
+
153
+ Args:
154
+ r_s (float): The position where the radial bending moment is zero with
155
+ respect to the support axis.
156
+ f_yd (float): Design strength of reinforment steel in MPa.
157
+ d_eff (float): The mean value of the effective depth in mm.
158
+ e_s (float): The E_modulus for steel in MPa.
159
+
160
+ Returns:
161
+ float: The psi value for the punching level one.
162
+ """
163
+ r_s = max(0.22 * l_x, 0.22 * l_y) # MC2010 7.3.5.3 - Unique for (7.3-70)
164
+ return 1.5 * r_s * f_yd / (d_eff * e_s)
165
+
166
+
167
+ def psi_punching_level_two(
168
+ r_s: float,
169
+ f_yd: float,
170
+ d_eff: float,
171
+ e_s: float,
172
+ m_ed: float,
173
+ m_rd: float,
174
+ m_Pd: float = 0,
175
+ ) -> float:
176
+ """The psi value for the punching level two.
177
+
178
+ fib Model Code 2010, Eq. (7.3-75) and (7.3-77).
179
+
180
+ Args:
181
+ r_s (float): The position where the radial bending moment is zero with
182
+ respect to the support axis.
183
+ f_yd (float): Design strength of reinforment steel in MPa.
184
+ d_eff (float): The mean value of the effective depth in mm.
185
+ e_s (float): The E_modulus for steel in MPa.
186
+ m_ed (float): The average bending moment acting in the support strip.
187
+ m_rd (float): The design average strength per unit length in MPa.
188
+ m_Pd (float): Optional to cover Eq. (7.3-77) for prestressed slabs.
189
+ The average decompression moment over the width of the support
190
+ strip (b_s) due to prestressing.
191
+
192
+ Returns:
193
+ float: The psi value for the punching level two.
194
+ """
195
+ return (1.5 * r_s * f_yd / (d_eff * e_s)) * (
196
+ (m_ed - m_Pd) / (m_rd - m_Pd)
197
+ ) ** 1.5
198
+
199
+
200
+ def psi_punching_level_three(
201
+ psi_punching_level_two: float,
202
+ is_uncracked_model: bool = False,
203
+ is_moment_from_uncracked_model: bool = False,
204
+ ) -> float:
205
+ """The psi value for the punching level three.
206
+
207
+ fib Model Code 2010, Level III of Approximation Eq. (7.3-75) and Eq.
208
+ (7.3-77) with coefficient 1.2 instead of 1.5 under specific conditions.
209
+
210
+ Args:
211
+ psi_punching_level_two (float): The psi value for the punching level 2.
212
+ is_uncracked_model (bool): True if r_s is calculated using a linear
213
+ elastic (uncracked) model.
214
+ is_moment_from_uncracked_model (bool): True if m_sd is calculated from
215
+ a linear elastic (uncracked) model as the average value of the
216
+ moment for design of the flexural reinforcement over the width of
217
+ the support strip (b_s).
218
+
219
+ Returns:
220
+ float: The psi value for the punching level three.
221
+ """
222
+ if is_uncracked_model and is_moment_from_uncracked_model:
223
+ return 1.2 / 1.5 * psi_punching_level_two
224
+ return psi_punching_level_two
225
+
226
+
227
+ def psi_punching(
228
+ psi_punching_level_one: float,
229
+ psi_punching_level_two: float,
230
+ psi_punching_level_three: float,
231
+ approx_lvl_p: float,
232
+ ) -> float:
233
+ """The rotation of the slab around the supported area.
234
+
235
+ fib Model Code 2010, Clause 7.3.5.4.
236
+
237
+ Args:
238
+ psi_punching_level_one (float): The psi value for the punching level 1.
239
+ psi_punching_level_two (float): The psi value for the punching level 2.
240
+ psi_punching_level_three (float): The psi value for the punching level
241
+ 3.
242
+ approx_lvl_p (float): The approx level for punching.
243
+
244
+ Returns:
245
+ float: psi for the chosen approx level in punching.
246
+ """
247
+ if approx_lvl_p == 1:
248
+ return psi_punching_level_one
249
+ if approx_lvl_p == 2:
250
+ return psi_punching_level_two
251
+ if approx_lvl_p == 3:
252
+ return psi_punching_level_three
253
+ raise ValueError('Approximation level is not defined')
254
+
255
+
256
+ def k_dg(
257
+ d_g: float,
258
+ ) -> float:
259
+ """Calculate k_dg factor for punching resistance.
260
+
261
+ fib Model Code 2010, Eq. (7.3-62).
262
+
263
+ Args:
264
+ d_g (float): Maximum size of aggregate.
265
+
266
+ Returns:
267
+ float: k_dg factor.
268
+ """
269
+ return max(32 / (16 + d_g), 0.75)
270
+
271
+
272
+ def k_psi(
273
+ k_dg: float,
274
+ d_eff: float,
275
+ psi_punching: float,
276
+ ) -> float:
277
+ """Calculate k_psi factor for punching resistance.
278
+
279
+ fib Model Code 2010, Eq. (7.3-63).
280
+
281
+ Args:
282
+ k_dg (float): k_dg factor.
283
+ d_eff (float): The mean value of the effective depth in mm.
284
+ psi_punching (float): psi value from psi_punching.
285
+
286
+ Returns:
287
+ float: k_psi factor.
288
+ """
289
+ return min(1 / (1.5 + 0.9 * k_dg * d_eff * psi_punching), 0.6)
290
+
291
+
292
+ def v_rdc_punching(
293
+ k_psi_val: float,
294
+ b_0: float,
295
+ d_v: float,
296
+ f_ck: float,
297
+ gamma_c: float = 1.5,
298
+ ) -> float:
299
+ """Punching resistance from the concrete.
300
+
301
+ fib Model Code 2010, Eq. (7.3-61).
302
+
303
+ Args:
304
+ k_psi_val (float): k_psi value from k_psi.
305
+ b_0 (float): The shear-resisting control perimeter from b_0.
306
+ d_v (float): The effective depth considering support in mm.
307
+ f_ck (float): Characteristic strength in MPa.
308
+ gamma_c: Safety factor for concrete.
309
+
310
+ Returns:
311
+ float: v_rdc for punching with the right approx level.
312
+ """
313
+ return k_psi_val * b_0 * d_v * (f_ck**0.5) / gamma_c
314
+
315
+
316
+ def f_ywd(
317
+ f_ywk: float,
318
+ gamma_s: float,
319
+ ) -> float:
320
+ """Calculate f_ywd for punching resistance.
321
+
322
+ fib Model Code 2010, Eq. (7.3-64).
323
+
324
+ Args:
325
+ f_ywk (float): Characteristic yield strength of the shear reinforcement
326
+ in MPa.
327
+ gamma_s (float): Safety factor for reinforcement.
328
+
329
+ Returns:
330
+ float: f_ywd for punching resistance.
331
+ """
332
+ return f_ywk / gamma_s
333
+
334
+
335
+ def sigma_swd(
336
+ e_s: float,
337
+ psi_punching: float,
338
+ alpha: float,
339
+ f_bd: float,
340
+ d_eff: float,
341
+ f_ywd: float,
342
+ phi_w: float,
343
+ ) -> float:
344
+ """Calculate sigma_swd for punching resistance.
345
+
346
+ fib Model Code 2010, Eq. (7.3-65).
347
+
348
+ Args:
349
+ e_s (float): The E_modulus for steel in MPa.
350
+ psi_punching (float): psi value from psi_punching.
351
+ alpha (float): Inclination of the stirrups in degrees.
352
+ f_bd (float): The design bond strength in MPa.
353
+ d_eff (float): The mean value of the effective depth in mm.
354
+ f_ywd (float): Design yield strength of the shear reinforcement in MPa.
355
+ phi_w (float): The diameter of the shear reinforcement.
356
+
357
+ Returns:
358
+ float: sigma_swd.
359
+ """
360
+ return min(
361
+ (e_s * psi_punching / 6)
362
+ * (sin(alpha * pi / 180) + cos(alpha * pi / 180))
363
+ * (sin(alpha * pi / 180) + f_bd * d_eff / (f_ywd * phi_w)),
364
+ f_ywd,
365
+ )
366
+
367
+
368
+ def v_rds_punching(
369
+ f_ywd: float,
370
+ e_u: float,
371
+ b_u: float,
372
+ alpha: float,
373
+ sigma_swd: float,
374
+ a_sw: float,
375
+ v_ed: float,
376
+ ) -> float:
377
+ """The punching resistance from shear reinforcement.
378
+
379
+ fib Model Code 2010, Eq. (7.3-64).
380
+
381
+ Args:
382
+ f_ywd (float): Design yield strength of the shear reinforcement in MPa.
383
+ e_u (float): The ecentrisity of the result of shear forces with respect
384
+ to the centroid (Figure 7.3-27b).
385
+ b_u (float): The diamter of a circle with same surface as the region
386
+ inside the basic control perimeter (Figure 7.3-27b).
387
+ alpha (float): Inclination of the stirrups in degrees.
388
+ sigma_swd (float): sigma_swd from sigma_swd.
389
+ a_sw (float): The area of the shear reinforcement in mm^2.
390
+ v_ed (float): The acting shear force from the columns.
391
+
392
+ Returns:
393
+ float: Punching resistance that comes from reinforcement.
394
+ """
395
+ k_e = 1 / (1 + e_u / b_u)
396
+ if (a_sw * k_e * f_ywd) < 0.5 * v_ed:
397
+ warnings.warn(
398
+ 'Consider increasing punching shear reinforcement for sufficient '
399
+ 'deformation capacity'
400
+ )
401
+ return a_sw * k_e * sigma_swd * sin(alpha * pi / 180)
402
+
403
+
404
+ def v_rd_max_punching(
405
+ d_v: float,
406
+ f_ck: float,
407
+ d_head: bool,
408
+ stirrups_compression: bool,
409
+ b0_val: float,
410
+ k_psi_val: float,
411
+ gamma_c: float = 1.5,
412
+ ) -> float:
413
+ """Finds the maximum value you can have for v_rd_punching.
414
+
415
+ fib Model Code 2010, Eq. (7.3-69).
416
+
417
+ Args:
418
+ d_v (float): The effective depth considering support in mm.
419
+ f_ck (float): Characteristic strength in MPa.
420
+ d_head (bool): True if diameter of heads is three times larger than.
421
+ stirrups_compression: (bool): Stirrups with sufficient length at
422
+ compression face, and bent on tension face.
423
+ b0_val (float): The shear-resisting control perimeter from b_0.
424
+ k_psi_val (float): k_psi value from k_psi.
425
+ gamma_c (float): Safety factor for concrete.
426
+
427
+ Return:
428
+ float: The maximum allowed punching resistance.
429
+ """
430
+ if d_head:
431
+ k_sys = 2.8
432
+ elif stirrups_compression:
433
+ k_sys = 2.4
434
+ else:
435
+ k_sys = 2
436
+
437
+ base_resistance = b0_val * d_v * (f_ck**0.5 / gamma_c)
438
+
439
+ return min(k_sys * k_psi_val * base_resistance, base_resistance)
440
+
441
+
442
+ def v_rd_punching(v_rd_c: float, v_rd_s: float, v_rd_max: float) -> float:
443
+ """The total resistance for punching.
444
+
445
+ fib Model Code 2010, Eq. (7.3-60).
446
+
447
+ Args:
448
+ v_rd_c: Concrete contribution to punching resistance.
449
+ v_rd_s: Shear reinforcement contribution to punching resistance.
450
+ v_rd_max: Maximum punching resistance.
451
+
452
+ Returns:
453
+ float: Total punching resistance as min(v_rd_c + v_rd_s, v_rd_max).
454
+ """
455
+ return min(v_rd_c + v_rd_s, v_rd_max)
@@ -29,7 +29,7 @@ class Material(abc.ABC):
29
29
  self._name = name if name is not None else 'Material'
30
30
 
31
31
  @property
32
- def constitutive_law(self):
32
+ def constitutive_law(self) -> ConstitutiveLaw:
33
33
  """Returns the ConstitutiveLaw of the object."""
34
34
  return self._constitutive_law
35
35
 
@@ -12,7 +12,7 @@ import numpy as np
12
12
  from numpy.typing import ArrayLike
13
13
  from shapely import Polygon
14
14
 
15
- from structuralcodes.core.base import ConstitutiveLaw, Material
15
+ from structuralcodes.core.base import Material
16
16
 
17
17
  from ._geometry import SurfaceGeometry
18
18
 
@@ -37,9 +37,8 @@ class CircularGeometry(SurfaceGeometry):
37
37
  def __init__(
38
38
  self,
39
39
  diameter: float,
40
- material: t.Union[Material, ConstitutiveLaw],
40
+ material: Material,
41
41
  n_points: int = 20,
42
- density: t.Optional[float] = None,
43
42
  concrete: bool = False,
44
43
  origin: t.Optional[ArrayLike] = None,
45
44
  name: t.Optional[str] = None,
@@ -49,14 +48,9 @@ class CircularGeometry(SurfaceGeometry):
49
48
 
50
49
  Arguments:
51
50
  diameter (float): The diameter of the geometry.
52
- material (Union(Material, ConstitutiveLaw)): A Material or
53
- ConsitutiveLaw class applied to the geometry.
51
+ material (Material): A Material class applied to the geometry.
54
52
  n_points (int): The number of points used to discretize the
55
53
  circle as a shapely `Polygon` (default = 20).
56
- density (Optional(float)): When a ConstitutiveLaw is passed as
57
- material, the density can be provided by this argument. When
58
- material is a Material object the density is taken from the
59
- material.
60
54
  concrete (bool): Flag to indicate if the geometry is concrete.
61
55
  origin (Optional(ArrayLike)): The center point of the circle.
62
56
  (0.0, 0.0) is used as default.
@@ -84,7 +78,6 @@ class CircularGeometry(SurfaceGeometry):
84
78
  super().__init__(
85
79
  poly=polygon,
86
80
  material=material,
87
- density=density,
88
81
  concrete=concrete,
89
82
  name=name,
90
83
  group_label=group_label,