structuralcodes 0.0.1__py3-none-any.whl

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 (50) hide show
  1. structuralcodes/__init__.py +17 -0
  2. structuralcodes/codes/__init__.py +79 -0
  3. structuralcodes/codes/ec2_2004/__init__.py +133 -0
  4. structuralcodes/codes/ec2_2004/_concrete_material_properties.py +239 -0
  5. structuralcodes/codes/ec2_2004/_reinforcement_material_properties.py +104 -0
  6. structuralcodes/codes/ec2_2004/_section_7_3_crack_control.py +941 -0
  7. structuralcodes/codes/ec2_2004/annex_b_shrink_and_creep.py +257 -0
  8. structuralcodes/codes/ec2_2004/shear.py +506 -0
  9. structuralcodes/codes/ec2_2023/__init__.py +104 -0
  10. structuralcodes/codes/ec2_2023/_annexB_time_dependent.py +17 -0
  11. structuralcodes/codes/ec2_2023/_section5_materials.py +1160 -0
  12. structuralcodes/codes/ec2_2023/_section9_sls.py +325 -0
  13. structuralcodes/codes/mc2010/__init__.py +169 -0
  14. structuralcodes/codes/mc2010/_concrete_creep_and_shrinkage.py +704 -0
  15. structuralcodes/codes/mc2010/_concrete_interface_different_casting_times.py +104 -0
  16. structuralcodes/codes/mc2010/_concrete_material_properties.py +463 -0
  17. structuralcodes/codes/mc2010/_concrete_punching.py +543 -0
  18. structuralcodes/codes/mc2010/_concrete_shear.py +749 -0
  19. structuralcodes/codes/mc2010/_concrete_torsion.py +164 -0
  20. structuralcodes/codes/mc2010/_reinforcement_material_properties.py +105 -0
  21. structuralcodes/core/__init__.py +1 -0
  22. structuralcodes/core/_section_results.py +211 -0
  23. structuralcodes/core/base.py +260 -0
  24. structuralcodes/geometry/__init__.py +25 -0
  25. structuralcodes/geometry/_geometry.py +875 -0
  26. structuralcodes/geometry/_steel_sections.py +2155 -0
  27. structuralcodes/materials/__init__.py +9 -0
  28. structuralcodes/materials/concrete/__init__.py +82 -0
  29. structuralcodes/materials/concrete/_concrete.py +114 -0
  30. structuralcodes/materials/concrete/_concreteEC2_2004.py +477 -0
  31. structuralcodes/materials/concrete/_concreteEC2_2023.py +435 -0
  32. structuralcodes/materials/concrete/_concreteMC2010.py +494 -0
  33. structuralcodes/materials/constitutive_laws.py +979 -0
  34. structuralcodes/materials/reinforcement/__init__.py +84 -0
  35. structuralcodes/materials/reinforcement/_reinforcement.py +172 -0
  36. structuralcodes/materials/reinforcement/_reinforcementEC2_2004.py +103 -0
  37. structuralcodes/materials/reinforcement/_reinforcementEC2_2023.py +93 -0
  38. structuralcodes/materials/reinforcement/_reinforcementMC2010.py +98 -0
  39. structuralcodes/sections/__init__.py +23 -0
  40. structuralcodes/sections/_generic.py +1249 -0
  41. structuralcodes/sections/_reinforcement.py +115 -0
  42. structuralcodes/sections/section_integrators/__init__.py +14 -0
  43. structuralcodes/sections/section_integrators/_factory.py +41 -0
  44. structuralcodes/sections/section_integrators/_fiber_integrator.py +238 -0
  45. structuralcodes/sections/section_integrators/_marin_integration.py +47 -0
  46. structuralcodes/sections/section_integrators/_marin_integrator.py +222 -0
  47. structuralcodes/sections/section_integrators/_section_integrator.py +49 -0
  48. structuralcodes-0.0.1.dist-info/METADATA +40 -0
  49. structuralcodes-0.0.1.dist-info/RECORD +50 -0
  50. structuralcodes-0.0.1.dist-info/WHEEL +4 -0
@@ -0,0 +1,325 @@
1
+ """Functions from Section 9 of EN 1992-1-1:2023."""
2
+
3
+ import math
4
+ from typing import Tuple
5
+
6
+ from ._annexB_time_dependent import alpha_c
7
+ from ._section5_materials import fcm, fctm
8
+
9
+
10
+ def Ec_eff(fcm: float, phi: float, kE: float = 9500) -> float:
11
+ """Returns de effective modulus of elasticity from fcm and phi.
12
+
13
+ EN 1992-1-1:2023, Eq. (9.1).
14
+
15
+ Args:
16
+ fcm (float): The mean compressive strength in MPa.
17
+ phi (float): The creep coefficient.
18
+
19
+ Keyword Args:
20
+ kE (float): Constant to account for the type of aggregate.
21
+
22
+ Returns:
23
+ float: The effective modulus of elastiticy in MPa.
24
+ """
25
+ Ecm = kE * fcm ** (1 / 3)
26
+ return alpha_c(fcm) * Ecm / (1 + phi)
27
+
28
+
29
+ def As_min_y(
30
+ NEd: float, b: float, h: float, fct_eff: float, fyk: float
31
+ ) -> Tuple[float, float]:
32
+ """Returns the minimum reinforcement to avoid yielding of steel. Box or T
33
+ sections are to be divided into rectangles.
34
+
35
+ EN 1992-1-1:2023, Eq. (9.4)
36
+
37
+ Eq. (9.2) and (9.3) are particular cases of the general equation
38
+
39
+ Eq. (9.2) is valid for pure bending, hence NEd=0
40
+
41
+ Eq. (9.3) is valid for pure tension. The general expression has an upper
42
+ limit that equals the values of Eq. (9.3)
43
+
44
+ Args:
45
+ NEd (float): SLS axial force applied on the section or rectangle
46
+ (compressions are negative) in kN.
47
+ b (float): The width of the section or rectangle in meters.
48
+ h (float): The height of the section or rectange in meters.
49
+ fct_eff (float): Effective tension strength of concrete (can normally
50
+ be taken as the mean tensile strength) in MPa.
51
+ fyk (float): Characteristic yield strength of steel in MPa.
52
+
53
+ Returns:
54
+ tuple(float, float): The minimum tensile reinforcement to avoid
55
+ yielding of steel on the most tensioned fibre of the rectangle
56
+ (As_min_y1) in cm2, and the minimum tensile reinforcement to avoid
57
+ yielding of steel on the most tensioned fibre of the rectangle
58
+ (As_min_y2) in cm2.
59
+ """
60
+ As_min_y1 = (
61
+ min(
62
+ max(
63
+ (0.3 * NEd / 1000 + 0.2 * kh(b, h) * fct_eff * b * h) / fyk, 0
64
+ ),
65
+ 0.5 * kh(b, h) * fct_eff * b * h / fyk,
66
+ )
67
+ * 1e4
68
+ )
69
+ return As_min_y1, min(max(NEd / fyk * 10 - As_min_y1, 0), As_min_y1)
70
+
71
+
72
+ def kh(b: float, h: float) -> float:
73
+ """Returns factor kh, which reduces the tensile strength of concrete to
74
+ account for imposed restrained deformations due to shrinkage.
75
+
76
+ EN 1992-1-1:2023, Eq. (9.5).
77
+
78
+ Args:
79
+ b (float): Width of the rectangle in meters.
80
+ h (float): Height of the rectangle in meters.
81
+
82
+ Returns:
83
+ float: Factor kh which reduces the tensile strength of concrete to
84
+ account for imposed restrained deformations due to shrinkage.
85
+ """
86
+ return min(max(0.8 - 0.6 * (min(b, h) - 0.3), 0.5), 0.8)
87
+
88
+
89
+ def wk_cal2(
90
+ kw: float, k_1_r: float, srm_cal: float, epssm_epscm: float
91
+ ) -> float:
92
+ """Returns the calculated characteristic crack width.
93
+
94
+ EN 1992-1-1:2023, Eq. (9.8).
95
+
96
+ Args:
97
+ kw (float): Factor that converts the mean crack spacing to a
98
+ characteristic value.
99
+ k_1_r (float): Factor accounting for the effect of curvature on crack
100
+ width - can be determined using the function k_1_r.
101
+ srm_cal (float): Mean crack spacing - can be determined using the
102
+ function srm_cal.
103
+ epssm_epscm (float): Mean diference of strain between steel and
104
+ concrete - can be determined using the function epssm_epscm.
105
+
106
+ Returns:
107
+ float: The calculated characteristic crack width in in units consistent
108
+ with srm_cal.
109
+ """
110
+ return kw * k_1_r * srm_cal * epssm_epscm
111
+
112
+
113
+ def k_1_r(h: float, x: float, ay: float) -> float:
114
+ """Returns k1/r factor to account for increase in crack width due to
115
+ curvature of the section in bending.
116
+
117
+ EN 1992-1-1:2023, Eq. (9.9).
118
+
119
+ Args:
120
+ h (float): Height of the section in consistent units (e.g. meters).
121
+ x (float): Distance from most compressed fibre to neutra axis in
122
+ consistent units (e.g. meters).
123
+ ay (float): Cover to centre of tensioned reinforcement closest to most
124
+ tensioned face in consistent units (e.g. meters).
125
+
126
+ Returns:
127
+ float: Factor k1/r (non-dimensional) which accounts for the increase in
128
+ crack width due to curvature of the section in bending.
129
+ """
130
+ return (h - x) / (h - ay - x)
131
+
132
+
133
+ def epssm_epscm(
134
+ sigma_s: float,
135
+ kt: float,
136
+ fct_eff: float,
137
+ rho_eff: float,
138
+ alphae: float,
139
+ Es: float,
140
+ ) -> float:
141
+ """Returns the mean strain difference between steel and concrete along 2
142
+ transfer lengths.
143
+
144
+ EN 1992-1-1:2023, Eq. (9.11).
145
+
146
+ Args:
147
+ sigma_s (float): The stress in steel at the section of the crack.
148
+ kt (float): An integration factor to account for the variation in
149
+ strain in steel and concrete it is to be taken as 0.6 for short
150
+ term loading or instantaneous loading and equal to 0.4 for long
151
+ term or repeated loading.
152
+ fct_eff (float): The effective cracking stress, which can be taken
153
+ equal to the mean tensile strength of concrete, fctm.
154
+ rho_eff (float): The effective reinforcement ratio in the tension zone.
155
+ alphae (float): The equivalence factor equal to Es/Ecm.
156
+ Es (float): The modulus of elasticity of steel, normally taken as 200
157
+ GPa.
158
+
159
+ Returns:
160
+ float: The mean strain difference bewteen steel and concrete along 2
161
+ transfer lengths.
162
+ """
163
+ return max(
164
+ (sigma_s - kt * fct_eff / rho_eff * (1 + alphae * rho_eff)) / Es,
165
+ (1 - kt) * sigma_s / Es,
166
+ )
167
+
168
+
169
+ def kfl(h: float, xg: float, hceff: float) -> float:
170
+ """Returns factor kfl which accounts for the distribution of stresses
171
+ before cracking.
172
+
173
+ EN 1992-1-1:2023, Eq. (9.17).
174
+
175
+ Args:
176
+ h (float): Height of the cross section.
177
+ xg (float): Distance from the compressed fibre to the centroid of the
178
+ uncracked section.
179
+ hceff (float): Height of the effective tension area.
180
+
181
+ Returns:
182
+ float: Returns factor kfl which accounts for the distribution of
183
+ stresses before cracking.
184
+ """
185
+ return max(0.5 * (1 + (h - xg - hceff) / (h - xg)), 0.5)
186
+
187
+
188
+ def srm_cal(
189
+ c: float,
190
+ kfl_: float,
191
+ kb: float,
192
+ phi: float,
193
+ rho_eff: float,
194
+ kw: float,
195
+ h,
196
+ x: float,
197
+ ) -> float:
198
+ """Returns the mean crack spacing.
199
+
200
+ EN 1992-1-1:2023, Eq. (9.15).
201
+
202
+ Args:
203
+ c (float): Concrete cover of reinforcement to bar surface. Larger value
204
+ of lateral and vertical cover should be applied.
205
+ kfl (float): Factor accounting for distribution of stresses prior to
206
+ cracking.
207
+ kb (float): Factor accounting for bond conditions.
208
+ phi (float): Bar diameter.
209
+ rho_eff(float): Effective reinforcement ratio in the tension zone.
210
+ kw (float): Factor converting the mean crack spacing into a
211
+ characteristic crack spacing, with a reocmmended value of 1.3
212
+ (NDP).
213
+ h (float): Height of the cross section.
214
+ x (float): Depth of the neutral axis measured form the most compressed
215
+ fibre.
216
+
217
+ Returns:
218
+ float: The mean crack spacing in units consistent with c and phi.
219
+ """
220
+ return min(1.5 * c + kfl_ * kb / 7.2 * phi / rho_eff, 1.3 / kw * (h - x))
221
+
222
+
223
+ def wk_cal(
224
+ kw: float,
225
+ h: float,
226
+ xg: float,
227
+ hc_eff: float,
228
+ c: float,
229
+ kb: float,
230
+ phi: float,
231
+ rho_eff: float,
232
+ x: float,
233
+ sigma_s: float,
234
+ kt: float,
235
+ fct_eff: float,
236
+ alphae: float,
237
+ Es: float,
238
+ ) -> Tuple[float, float, float, float]:
239
+ """Returns the characteristic crack width, wk,cal, as well as auxiliary
240
+ variables, 1/r, srm,cal and epssm-epscm.
241
+
242
+ EN1992-1-1:2023 Eq. (9.8), complemented with Eq. (9.11), Eq. (9.15), Eq.
243
+ (9.17).
244
+
245
+ Args:
246
+ kw (float): Factor that converts the mean crack spacing to a
247
+ characteristic value.
248
+ h (float): Height of cross section.
249
+ xg (float): Depth of centroid of section measured from compressed
250
+ fibre.
251
+ hc_eff (float): Height of the effective tensioned concrete area.
252
+ c (float): Concrete cover of reinforcement to bar surface. Larger
253
+ value of lateral and vertical cover should be applied.
254
+ kb (float): Factor account for bond conditions of bar.
255
+ phi (float): Diameter of tensioned bars (for different bar diameters,
256
+ equivalent diameter according to Eq. (9.19).
257
+ rho_eff (float): Effective tension reinforcement ratio.
258
+ x (float): Depth of the neutral axis of the cracked section measured
259
+ from compressed fibre.
260
+ sigma_s (float): Tension in most tensioned bar according to fully
261
+ cracked analysis.
262
+ kt (float): Factor accounting for tension stiffening.
263
+ fct_eff (float): Effective tensile strength of concrete.
264
+ alphae (float): Modular ratio Es/Ecm.
265
+ Es (float): Modulus of elasticity of steel bars (normally Es=200 MPa).
266
+
267
+ Returns:
268
+ Tuple[float, float, float, float]: The characteristic crack width,
269
+ wk,cal, in consistent units, as well as auxiliary variables, 1/r,
270
+ srm,cal and epssm-epscm.
271
+ """
272
+ k_1_r_ = k_1_r(h, x, c + phi / 2)
273
+ srm_cal_ = srm_cal(c, kfl(h, xg, hc_eff), kb, phi, rho_eff, kw, h, x)
274
+ epssm_epscm_ = epssm_epscm(sigma_s, kt, fct_eff, rho_eff, alphae, Es)
275
+ wk_cal_ = kw * k_1_r_ * srm_cal_ * epssm_epscm_
276
+ return wk_cal_, k_1_r_, srm_cal_, epssm_epscm_
277
+
278
+
279
+ def delta_simpl(
280
+ delta_loads: float,
281
+ delta_shr: float,
282
+ fck1: float,
283
+ phi1: float,
284
+ b1: float,
285
+ h: float,
286
+ d: float,
287
+ As1: float,
288
+ Mk: float,
289
+ ) -> float:
290
+ """Simplified calculation of the deflection for rectangular sections.
291
+
292
+ EN1992-1-1:2023, Eq. (9.23).
293
+
294
+ Args:
295
+ delta_loads (float): Linear elastic deflection due to loads.
296
+ delta_shr (float): Linear elastic deflection due to shrinkage.
297
+ fck1 (float): Characteristic concrete strength in MPa.
298
+ phi1 (float): Weighted mean value of the creep coefficient.
299
+ b1 (float): Width of rectangular cross-section in m.
300
+ h (float): Height of rectanguar cross-section in m.
301
+ d (float): Effective height of cross-section in m.
302
+ As1 (float): Tension reinforcement at centre span for continuous in cm2
303
+ beams or at the embedment for a cantilever.
304
+ Mk (float): Characteristic moment at centre span for continuous
305
+ beams or at the embedment for a cantilever.
306
+
307
+ Returns:
308
+ float: The deflection of the beam in units consistent with delta_loads
309
+ and delta_shr.
310
+ """
311
+ Mcr = fctm(fck1) * 1000 * b1 * h ** (2) / 6
312
+ zeta = 1 - 0.5 * (Mcr / Mk) ** 2
313
+ rho_l = As1 / b1 / d * 1e-4
314
+ alpha_e_eff = 200000 / Ec_eff(fcm(fck1), phi1)
315
+ Ig_Icr = 1 / (
316
+ 2.7 * math.pow(alpha_e_eff * rho_l, 0.6) * math.pow(d / h, 3)
317
+ )
318
+
319
+ if Mk < Mcr:
320
+ kS = 1.00
321
+ kI = 1.00
322
+ else:
323
+ kS = 455 * rho_l**2 - 35 * rho_l + 1.6
324
+ kI = zeta * Ig_Icr + (1 - zeta)
325
+ return kI * (delta_loads + kS * delta_shr)
@@ -0,0 +1,169 @@
1
+ """The fib Model Code 2010."""
2
+
3
+ import typing as t
4
+
5
+ from ._concrete_creep_and_shrinkage import (
6
+ alpha_fcm,
7
+ beta_bc_fcm,
8
+ beta_bc_t,
9
+ beta_bs,
10
+ beta_dc_fcm,
11
+ beta_dc_RH,
12
+ beta_dc_t,
13
+ beta_dc_t0,
14
+ beta_ds,
15
+ beta_h,
16
+ beta_RH,
17
+ beta_s1,
18
+ calc_J,
19
+ eps_cbs,
20
+ eps_cbs0,
21
+ eps_cds,
22
+ eps_cds0,
23
+ gamma_t0,
24
+ k_sigma,
25
+ phi,
26
+ phi_bc,
27
+ phi_dc,
28
+ t0_adj,
29
+ t_T,
30
+ )
31
+ from ._concrete_interface_different_casting_times import (
32
+ tau_edi,
33
+ tau_rdi_with_reinforcement,
34
+ tau_rdi_without_reinforcement,
35
+ )
36
+ from ._concrete_material_properties import (
37
+ Eci,
38
+ Eci_t,
39
+ Gf,
40
+ beta_cc,
41
+ beta_e,
42
+ eps_c1,
43
+ eps_c2,
44
+ eps_c3,
45
+ eps_cu1,
46
+ eps_cu2,
47
+ eps_cu3,
48
+ fcd,
49
+ fcm,
50
+ fctkmax,
51
+ fctkmin,
52
+ fctm,
53
+ k_sargin,
54
+ n_parabolic_rectangular,
55
+ )
56
+ from ._concrete_punching import (
57
+ b_0,
58
+ m_ed,
59
+ psi_punching,
60
+ v_rd_max_punching,
61
+ v_rd_punching,
62
+ v_rdc_punching,
63
+ v_rds_punching,
64
+ )
65
+ from ._concrete_shear import (
66
+ create_load_dict,
67
+ epsilon_x,
68
+ eta_fc,
69
+ v_rd,
70
+ v_rd_ct,
71
+ v_rd_ct_approx1,
72
+ v_rd_ct_approx2,
73
+ v_rd_max,
74
+ v_rd_max_approx1,
75
+ v_rd_max_approx2,
76
+ v_rd_max_approx3,
77
+ v_rdc,
78
+ v_rdc_approx1,
79
+ v_rdc_approx2,
80
+ v_rdc_approx3,
81
+ v_rds,
82
+ )
83
+ from ._concrete_torsion import t_rd, t_rd_max, v_ed_ti
84
+ from ._reinforcement_material_properties import (
85
+ epsud,
86
+ fyd,
87
+ reinforcement_duct_props,
88
+ )
89
+
90
+ __all__ = [
91
+ 'fcm',
92
+ 'fctm',
93
+ 'fctkmin',
94
+ 'fctkmax',
95
+ 'fcd',
96
+ 'Gf',
97
+ 'eps_c1',
98
+ 'eps_cu1',
99
+ 'k_sargin',
100
+ 'eps_c2',
101
+ 'eps_cu2',
102
+ 'n_parabolic_rectangular',
103
+ 'eps_c3',
104
+ 'eps_cu3',
105
+ 'fyd',
106
+ 'epsud',
107
+ 'reinforcement_duct_props',
108
+ 'Eci',
109
+ 'Eci_t',
110
+ 'beta_cc',
111
+ 'beta_e',
112
+ 'alpha_fcm',
113
+ 'beta_bc_fcm',
114
+ 'beta_bc_t',
115
+ 'beta_bs',
116
+ 'beta_dc_fcm',
117
+ 'beta_dc_RH',
118
+ 'beta_dc_t',
119
+ 'beta_dc_t0',
120
+ 'beta_ds',
121
+ 'beta_h',
122
+ 'beta_RH',
123
+ 'beta_s1',
124
+ 'calc_J',
125
+ 'eps_cbs',
126
+ 'eps_cbs0',
127
+ 'eps_cds',
128
+ 'eps_cds0',
129
+ 'gamma_t0',
130
+ 'k_sigma',
131
+ 'phi',
132
+ 'phi_bc',
133
+ 'phi_dc',
134
+ 't0_adj',
135
+ 't_T',
136
+ 'create_load_dict',
137
+ 'epsilon_x',
138
+ 'eta_fc',
139
+ 'v_rd',
140
+ 'v_rd_ct',
141
+ 'v_rd_ct_approx1',
142
+ 'v_rd_ct_approx2',
143
+ 'v_rd_max',
144
+ 'v_rd_max_approx1',
145
+ 'v_rd_max_approx2',
146
+ 'v_rd_max_approx3',
147
+ 'v_rdc',
148
+ 'v_rdc_approx1',
149
+ 'v_rdc_approx2',
150
+ 'v_rdc_approx3',
151
+ 'v_rds',
152
+ 'b_0',
153
+ 'm_ed',
154
+ 'psi_punching',
155
+ 'v_rd_max_punching',
156
+ 'v_rd_punching',
157
+ 'v_rdc_punching',
158
+ 'v_rds_punching',
159
+ 'v_ed_ti',
160
+ 't_rd_max',
161
+ 't_rd',
162
+ 'tau_edi',
163
+ 'tau_rdi_with_reinforcement',
164
+ 'tau_rdi_without_reinforcement',
165
+ ]
166
+
167
+ __title__: str = 'fib Model Code 2010'
168
+ __year__: str = '2013'
169
+ __materials__: t.Tuple[str] = ('concrete', 'reinforcement')