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,749 @@
1
+ """A collection of shear formulas for concrete."""
2
+
3
+ import typing as t
4
+ import warnings
5
+ from math import pi, sin, tan
6
+
7
+
8
+ def epsilon_x(
9
+ E_s: float,
10
+ As: float,
11
+ z: float,
12
+ loads: t.Dict,
13
+ ) -> float:
14
+ """Calculate the longitudinal strain from a distance z.
15
+
16
+ fib Model Code 2010, eq. (7.3-16).
17
+
18
+ Args:
19
+ E (float): The E-modulus to the material in MPa.
20
+ As (float): The cross-section area of reinforcement in mm^2.
21
+ z: (float): The effective shear depth in mm.
22
+ loads (dict): The given loads in a dictionary. See create_load_dict.
23
+
24
+ Returns:
25
+ float: The longitudinal strain.
26
+ """
27
+ return max(
28
+ (
29
+ (1 / (2 * E_s * As))
30
+ * (
31
+ (abs(loads.get('Med')) / z)
32
+ + abs(loads.get('Ved'))
33
+ + loads.get('Ned') * ((1 / 2) + (loads.get('delta_e') / z))
34
+ )
35
+ ),
36
+ 0,
37
+ )
38
+
39
+
40
+ def eta_fc(fck: float) -> float:
41
+ """Calculating eta_fc to determin the strength reduction factor.
42
+
43
+ fib Model Code 2010, eq. (7.3-28).
44
+
45
+ Args:
46
+ fck (float): Characteristic strength in MPa.
47
+
48
+ Returns:
49
+ float: eta_fc in the strength reduction factor.
50
+ """
51
+ return min((30 / fck) ** (1 / 3), 1)
52
+
53
+
54
+ def create_load_dict(
55
+ Med: float, Ved: float, Ned: float, delta_e: float
56
+ ) -> t.Dict:
57
+ """Returns dictionary assosiated with loads.
58
+
59
+ Args:
60
+ Med (Float): The positive moment working on the material in Nmm.
61
+ Ved (float): The positive shear force working on the material in N.
62
+ Ned (float): The normal force working on the material in N with
63
+ positive sign for tension and negative sign for compression.
64
+ delta_E (float): The eccentricity of the axial load due to imperfection
65
+ in the construction with distance in mm as a positive value in
66
+ compression direction.
67
+
68
+ Returns:
69
+ dict: A dictionary with the given loads.
70
+ """
71
+ return {'Med': Med, 'Ved': Ved, 'Ned': Ned, 'delta_e': delta_e}
72
+
73
+
74
+ def v_rd(
75
+ approx_lvl: int,
76
+ with_shear_reinforcment: bool,
77
+ fck: float,
78
+ z: float,
79
+ bw: float,
80
+ dg: float,
81
+ E_s: float,
82
+ As: float,
83
+ loads: t.Dict,
84
+ asw: t.Optional[float] = None,
85
+ sw: t.Optional[float] = None,
86
+ f_ywk: t.Optional[float] = None,
87
+ theta: t.Optional[float] = None,
88
+ alpha: float = 90.0,
89
+ gamma_c: float = 1.5,
90
+ gamma_s: float = 1.15,
91
+ ) -> float:
92
+ """Compute the shear resistance of a web or slab.
93
+
94
+ fib Model Code 2010, Eq. (7.3-11).
95
+
96
+ Args:
97
+ approx_lvl (int): Approximation level for concrete.
98
+ with_shear_reinforcment (bool): Shear reinforced concrete or no shear
99
+ reinforcement.
100
+ fck (float): Characteristic strength in MPa.
101
+ z (float): distances between the centerline of the compressive chord
102
+ and the reinforcement in mm.
103
+ bw (float): Thickness of web in cross section in mm.
104
+ dg (float): Maximum size of aggregate in mm.
105
+ E_s (float): The E_s-modulus to the material in MPa.
106
+ As (float): The cross-section area of reinforcement in mm^2.
107
+ loads (dict): The given loads in a dictionary. See create_load_dict.
108
+ asw (float): Area of shear reinforcement in mm^2.
109
+ sw (float): Senter distance between the shear reinforcement in mm.
110
+ f_ywk (float): The characteristic yield strength of the shear
111
+ reinforcement.
112
+ theta (float): Inclitantion of the compression stressfield in degrees.
113
+ alpha (float): Inclination of the stirrups in degrees.
114
+ gamma_c (float): Concrete safety factor.
115
+ gamma_s (float): Steel safety factor.
116
+
117
+ Returns:
118
+ float: Design shear resistance.
119
+ """
120
+ if not with_shear_reinforcment:
121
+ if approx_lvl not in (1, 2):
122
+ warnings.warn(
123
+ 'Chosen approximation is not suited without reinforcment'
124
+ )
125
+
126
+ return v_rdc(
127
+ approx_lvl,
128
+ fck,
129
+ z,
130
+ bw,
131
+ dg,
132
+ E_s,
133
+ As,
134
+ loads,
135
+ alpha,
136
+ gamma_c,
137
+ )
138
+
139
+ f_ywd = f_ywk / gamma_s
140
+
141
+ if approx_lvl in (1, 2):
142
+ return min(
143
+ v_rds(asw, sw, z, f_ywk, theta, alpha),
144
+ v_rd_max(
145
+ approx_lvl,
146
+ fck,
147
+ bw,
148
+ theta,
149
+ z,
150
+ E_s,
151
+ As,
152
+ loads,
153
+ alpha,
154
+ gamma_c,
155
+ ),
156
+ )
157
+
158
+ if approx_lvl == 3:
159
+ V_rdc = v_rdc(
160
+ approx_lvl,
161
+ fck,
162
+ z,
163
+ bw,
164
+ dg,
165
+ E_s,
166
+ As,
167
+ loads,
168
+ alpha,
169
+ gamma_c,
170
+ )
171
+
172
+ V_rd_max = v_rd_max(
173
+ approx_lvl,
174
+ fck,
175
+ bw,
176
+ theta,
177
+ z,
178
+ E_s,
179
+ As,
180
+ loads,
181
+ alpha,
182
+ gamma_c,
183
+ )
184
+
185
+ if (V_rdc + v_rds(asw, sw, z, f_ywd, theta, alpha)) < V_rd_max:
186
+ return V_rdc + v_rds(asw, sw, z, f_ywd, theta, alpha)
187
+
188
+ return v_rd(
189
+ 2,
190
+ with_shear_reinforcment,
191
+ fck,
192
+ z,
193
+ bw,
194
+ dg,
195
+ E_s,
196
+ As,
197
+ loads,
198
+ asw,
199
+ sw,
200
+ f_ywk,
201
+ theta,
202
+ alpha,
203
+ gamma_c,
204
+ )
205
+
206
+ raise ValueError('invalid approx level')
207
+
208
+
209
+ def v_rdc(
210
+ approx_lvl,
211
+ fck: float,
212
+ z: float,
213
+ bw: float,
214
+ dg: float,
215
+ E_s: float,
216
+ As: float,
217
+ loads: t.Dict,
218
+ alpha: float = 90.0,
219
+ gamma_c: float = 1.5,
220
+ ) -> float:
221
+ """Calculate shear resistance of a web / slab without shear reinforcement.
222
+
223
+ fib Model Code 2010, Eq. (7.3-17).
224
+
225
+ Args:
226
+ approx_lvl (int): Approximation level for concrete.
227
+ fck (float): Characteristic strength in MPa.
228
+ z (float): The length to the areasenter of cross-section in mm.
229
+ bw (float): Thickness of web in cross section in mm.
230
+ dg (float): Maximum size of aggregate.
231
+ E_s (float): The E_s-modulus to the materialb in MPa.
232
+ As (float): The cross-section area in mm^2.
233
+ loads (dict): The given loads in a dictionary. See create_load_dict.
234
+ alpha (float): Inclination of the stirrups in degrees.
235
+ gamma_c (float): Concrete safety factor.
236
+
237
+ Returns:
238
+ float: The design shear resistance attributed to the concrete.
239
+ """
240
+ if approx_lvl == 1:
241
+ return v_rdc_approx1(fck, z, bw, gamma_c)
242
+
243
+ if approx_lvl == 2:
244
+ return v_rdc_approx2(fck, z, bw, dg, E_s, As, loads, gamma_c)
245
+
246
+ if approx_lvl == 3:
247
+ return v_rdc_approx3(
248
+ approx_lvl,
249
+ fck,
250
+ z,
251
+ bw,
252
+ E_s,
253
+ As,
254
+ loads,
255
+ alpha,
256
+ gamma_c,
257
+ )
258
+
259
+ raise ValueError('Invalid approx level')
260
+
261
+
262
+ def v_rdc_approx1(
263
+ fck: float,
264
+ z: float,
265
+ bw: float,
266
+ gamma_c: float = 1.5,
267
+ ) -> float:
268
+ """Calculate shear resistance for concrete with approx level 1.
269
+
270
+ For members with no segnificant axal load, with fyk <= 600 Mpa, fck <= 70
271
+ Mpa and with maximum aggrigate size of no less then 10mm.
272
+
273
+ fib Model Code 2010, Eq. (7.3-17) and (7.3-19).
274
+
275
+ Args:
276
+ fck (float): The characteristic compressive strength in MPa.
277
+ z (float): The length to the areasenter of cross-section in mm.
278
+ bw (float): Thickness of web in cross section.
279
+ gamma_c (float): Safety factor for concrete.
280
+
281
+ Returns:
282
+ float: Design shear resistance without shear reinforcement.
283
+ """
284
+ fsqr = min(fck**0.5, 8)
285
+ kv = 180 / (1000 + 1.25 * z)
286
+
287
+ return (kv * fsqr * z * bw) / gamma_c
288
+
289
+
290
+ def v_rdc_approx2(
291
+ fck: float,
292
+ z: float,
293
+ bw: float,
294
+ dg: float,
295
+ E_s: float,
296
+ As: float,
297
+ loads: t.Dict,
298
+ gamma_c: float = 1.5,
299
+ ) -> float:
300
+ """Calculate shear resistance for concrete with approx level 2.
301
+
302
+ In higher strength concrete and light-weight aggregate concretes, the
303
+ fracture surface may go through the aggregate particles, rather then
304
+ around, reducing the crack roughness.
305
+
306
+ fib Model Code 2010, Eq. (7.3-17), (7.3-20) and (7.3-21).
307
+
308
+ Args:
309
+ fck (float): Characteristic strength in MPa.
310
+ z (float): The length to the areasenter of cross-section in mm.
311
+ bw (float): Thickness of web in cross section.
312
+ dg (float): Maximum size of aggregate.
313
+ E_s (float): The E_s-modulus to the materialb in MPa.
314
+ As (float): The cross-section area in mm^2.
315
+ loads (dict): The given loads in a dictionary. See create_load_dict.
316
+ gamma_c (float): Concrete safety factor.
317
+
318
+ Returns:
319
+ float: Design shear resistance without shear reinforcement.
320
+ """
321
+ if fck > 70:
322
+ dg = 0
323
+ fsqr = min(fck**0.5, 8)
324
+ epsilonx = epsilon_x(E_s, As, z, loads)
325
+ k_dg = max(32 / (16 + dg), 0.75)
326
+ kv = (0.4 / (1 + 1500 * epsilonx)) * (1300 / (1000 + k_dg * z))
327
+
328
+ return (kv * fsqr * z * bw) / gamma_c
329
+
330
+
331
+ def v_rdc_approx3(
332
+ approx_lvl: float,
333
+ fck: float,
334
+ z: float,
335
+ bw: float,
336
+ E_s: float,
337
+ As: float,
338
+ loads: t.Dict,
339
+ alpha: float = 90.0,
340
+ gamma_c: float = 1.5,
341
+ ) -> float:
342
+ """Calculate shear resistance for concrete with approx level 3.
343
+
344
+ The design shear resistance of a web or a slab without shear reinforcement.
345
+
346
+ fib Model Code 2010, Eq. (7.3-17), (7.3-39) and (7.3-43).
347
+
348
+ Args:
349
+ fck (float): Characteristic strength in MPa.
350
+ z: (float): The length to the areasenter of cross-section in mm.
351
+ bw: (float): Thickness of web in cross section.
352
+ E_s: (float): The E_s-modulus to the materialb in MPa.
353
+ As: (float): The cross-section area in mm^2.
354
+ loads (dict): The given loads in a dictionary. See create_load_dict.
355
+ alpha (float): Inclination of the stirrups in degrees.
356
+ gamma_c (float): Concrete safety factor.
357
+
358
+
359
+ Returns:
360
+ float: Design shear resistance without shear reinforcement.
361
+ """
362
+ fsqr = min(fck**0.5, 8)
363
+ epsilonx = epsilon_x(E_s, As, z, loads)
364
+ theta_min = 20 + 10000 * epsilonx
365
+ V_rd_max = v_rd_max(
366
+ approx_lvl,
367
+ fck,
368
+ bw,
369
+ theta_min,
370
+ z,
371
+ E_s,
372
+ As,
373
+ loads,
374
+ alpha,
375
+ gamma_c,
376
+ )
377
+ kv = max(
378
+ (0.4 / (1 + 1500 * epsilonx)) * (1 - loads.get('Ved') / V_rd_max),
379
+ 0,
380
+ )
381
+
382
+ return (kv * fsqr * z * bw) / gamma_c
383
+
384
+
385
+ def v_rds(
386
+ asw: float,
387
+ sw: float,
388
+ z: float,
389
+ f_ywk: float,
390
+ theta: float = 45.0,
391
+ alpha: float = 90.0,
392
+ gamma_s: float = 1.15,
393
+ ) -> float:
394
+ """The shear resistance that shear reinforcement gives.
395
+
396
+ fib Model Code 2010, Eq. (7.3-25) and (7.3-29)
397
+
398
+ Args:
399
+ asw (float): Area of shear reinforcement in mm.
400
+ sw (float): Senter distance between the shear reinforcement in mm.
401
+ z (float): The length to the areasenter of cross-section in mm.
402
+ f_ywk (float): The characteristic yield strength of the shear
403
+ reinforcement.
404
+ theta (float): Inclitaniton of the compression stressfield in degrees.
405
+ alpha (float): Inclination of the stirrups.
406
+ gamma_s (float): Steel safety factor.
407
+
408
+
409
+ Returns:
410
+ float: The design shear resistance provided by shear reinforcement.
411
+ """
412
+ if theta > 45 or theta < 20:
413
+ warnings.warn('Too high or too low compression field angel')
414
+ f_ywd = f_ywk / gamma_s
415
+ return (
416
+ (asw / sw)
417
+ * z
418
+ * f_ywd
419
+ * ((1 / tan(theta * pi / 180)) + (1 / tan(alpha * pi / 180)))
420
+ * sin(alpha * pi / 180)
421
+ )
422
+
423
+
424
+ def v_rd_max(
425
+ approx_lvl: int,
426
+ fck: float,
427
+ bw: float,
428
+ theta: float,
429
+ z: float,
430
+ E_s: t.Optional[float] = None,
431
+ As: t.Optional[float] = None,
432
+ loads: t.Optional[t.Dict] = None,
433
+ alpha: float = 90,
434
+ gamma_c: float = 1.5,
435
+ ) -> float:
436
+ """The maximum allowed shear resistance, when there is shear reinforcement.
437
+
438
+ fib Model Code 2010, eq. (7.3-24) and (7.3-26).
439
+
440
+ Args:
441
+ approx_lvl (int): Approximation level for steel.
442
+ fck (float): Characteristic strength in MPa.
443
+ bw (float): Thickness of web in cross section.
444
+ theta (float): Inclitaniton of the compression stressfield in degrees.
445
+ z (float): The length to the areasenter of cross-section in mm.
446
+ E_s (float): The E_s-modulus to the materialb in MPa.
447
+ As (float): The cross-section area in mm^2.
448
+ loads (dict): The given loads in a dictionary. See create_load_dict.
449
+ alpha (float): Inclination of the stirrups in degrees.
450
+ gamma_c (float): Concrete safety factor.
451
+
452
+ Returns:
453
+ float: The maximum allowed shear resistance regardless of approximation
454
+ level.
455
+ """
456
+ if approx_lvl == 1:
457
+ return v_rd_max_approx1(fck, bw, theta, z, alpha, gamma_c)
458
+
459
+ if approx_lvl == 2:
460
+ return v_rd_max_approx2(
461
+ fck, bw, theta, z, E_s, As, loads, alpha, gamma_c
462
+ )
463
+
464
+ if approx_lvl == 3:
465
+ return v_rd_max_approx3(fck, bw, z, E_s, As, loads, alpha, gamma_c)
466
+
467
+ raise ValueError('invalid approx level')
468
+
469
+
470
+ def v_rd_max_approx1(
471
+ fck: float,
472
+ bw: float,
473
+ theta: float,
474
+ z: float,
475
+ alpha: float = 90.0,
476
+ gamma_c: float = 1.5,
477
+ ) -> float:
478
+ """The maximum allowed shear resistance, with level 1 approximation.
479
+
480
+ fib Model Code 2010, eq. (7.3-37).
481
+
482
+ Args:
483
+ fck (float): Characteristic strength in MPa.
484
+ bw (float): Thickness of web in cross section.
485
+ theta (float): Inclitaniton of the compression stressfield in degrees.
486
+ z: (float): The length to the areasenter of cross-section in mm.
487
+ alpha (float): Inclination of the stirrups in degrees.
488
+ gamma_c (float): Concrete safety factor.
489
+
490
+ Returns:
491
+ float: Maximum allowed shear resistance for approximation level 1.
492
+ """
493
+ return (
494
+ 0.55
495
+ * eta_fc(fck)
496
+ * (fck / gamma_c)
497
+ * bw
498
+ * z
499
+ * (
500
+ ((1 / tan(theta * pi / 180)) + (1 / tan(alpha * pi / 180)))
501
+ / (1 + (1 / tan(theta * pi / 180)) ** 2)
502
+ )
503
+ )
504
+
505
+
506
+ def v_rd_max_approx2(
507
+ fck: float,
508
+ bw: float,
509
+ theta: float,
510
+ z: float,
511
+ E_s: float,
512
+ As: float,
513
+ loads: t.Dict,
514
+ alpha: float = 90.0,
515
+ gamma_c: float = 1.5,
516
+ ) -> float:
517
+ """The maximum allowed shear resistance, with level 2 approximation.
518
+
519
+ fib Model Code 2010, eq. (7.3-24), (7.3-40) and (7.3-41).
520
+
521
+ Args:
522
+ fck (float): Characteristic strength in MPa.
523
+ bw (float): Thickness of web in cross section.
524
+ theta (float): Inclitaniton of the compression stressfield in degrees.
525
+ z (float): The length to the areasenter of cross-section in mm.
526
+ E_s (float): The E_s-modulus to the materialb in MPa.
527
+ As (float): The cross-section area of reinforcement in mm^2.
528
+ loads (dict): The given loads in a dictionary. See create_load_dict.
529
+ alpha (float): Inclination of the stirrups in degrees.
530
+ gamma_c (float): Concrete safety factor.
531
+
532
+ Returns:
533
+ float: Maximum allowed shear resistance for approximation level 2.
534
+ """
535
+ epsilonx = epsilon_x(E_s, As, z, loads)
536
+ epsilon_1 = epsilonx + (epsilonx + 0.002) * (
537
+ (1 / tan(theta * pi / 180)) ** 2
538
+ )
539
+ k_epsilon = min(1 / (1.2 + 55 * epsilon_1), 0.65)
540
+
541
+ return (
542
+ k_epsilon
543
+ * eta_fc(fck)
544
+ * (fck / gamma_c)
545
+ * bw
546
+ * z
547
+ * (
548
+ ((1 / tan(theta * pi / 180)) + (1 / tan(alpha * pi / 180)))
549
+ / (1 + (1 / tan(theta * pi / 180)) ** 2)
550
+ )
551
+ )
552
+
553
+
554
+ def v_rd_max_approx3(
555
+ fck: float,
556
+ bw: float,
557
+ z: float,
558
+ E_s: float,
559
+ As: float,
560
+ loads: t.Dict,
561
+ alpha: float = 90.0,
562
+ gamma_c: float = 1.5,
563
+ ) -> float:
564
+ """The maximum allowed shear resistance, with level 3 approximation.
565
+
566
+ fib Model Code 2010, eq. (7.3-24), (7.3-40) and (7.3-41).
567
+
568
+ Args:
569
+ fck (float): Characteristic strength in MPa.
570
+ bw (float): Thickness of web in cross section.
571
+ z (float): The length to the areasenter of cross-section in mm.
572
+ E_s (float): The E_s-modulus to the materialb in MPa.
573
+ As (float): The cross-section area of reinforcement in mm^2.
574
+ loads (dict): The given loads in a dictionary. See create_load_dict.
575
+ alpha (float): Inclination of the stirrups in degrees.
576
+ gamma_c (float): Concrete safety factor.
577
+
578
+ Returns:
579
+ float: Maximum allowed shear resistance for approximation level 3.
580
+ """
581
+ epsilonx = epsilon_x(E_s, As, z, loads)
582
+ theta_min = 20 + 10000 * epsilonx
583
+
584
+ return v_rd_max_approx2(
585
+ fck, bw, theta_min, z, E_s, As, loads, alpha, gamma_c
586
+ )
587
+
588
+
589
+ def v_rd_ct(
590
+ approx_lvl_h: int,
591
+ f_ctd: float,
592
+ i_c: float,
593
+ s_c: float,
594
+ b_w: float,
595
+ sigma_cp: float,
596
+ l_x: float,
597
+ l_bd0: float,
598
+ S_cy: float,
599
+ b_wy: float,
600
+ y: float,
601
+ y_c: float,
602
+ A_c: float,
603
+ A_cy: float,
604
+ y_pt: float,
605
+ f_p_lx: float,
606
+ f_p_lx_dx: float,
607
+ ) -> float:
608
+ """The shear resistance for a hollow core slab.
609
+
610
+ fib Model Code 2010, eq. (7.3-44) and (7.3-45).
611
+
612
+ Args:
613
+ approx_lvl_h (int): approximationlevel for hollow core.
614
+ f_ctd (float): The design value of concrete axial tensile strength.
615
+ i_c (float): Second moment of area in mm^4.
616
+ s_c (float): First moment of area, above and about the centriodal axis
617
+ in mm^3.
618
+ b_w (float): The width of the cross-section at the centroidal axis.
619
+ sigma_cp (float): The compressive stress at centroidal axis due to
620
+ prestress.
621
+ l_x (float): The distance between edge and point of
622
+ failure (Figure: 7.3-12) in mm.
623
+ l_bd0 (float): follows 7.13-5 in mm.
624
+ S_cy (float): The first moment of area above y in mm^3.
625
+ b_wy (float): The width at hight y in mm.
626
+ y (float): Hight at of the critical point at the line of failure in mm.
627
+ y_c (float): The hight of the concrete centroidal axis in mm.
628
+ A_c (float): The area of concrete cross-section in mm^2.
629
+ A_cy (float): The area of concrete cross-section above y in mm^2.
630
+ y_pt (float): The hight of centroidal axis of prestressed steel in mm.
631
+ f_p_lx (float): The prestressing force at the distance l_x in N.
632
+ f_p_lx_dx (float): The change of prestressing force at the distance
633
+ l_x.
634
+
635
+ Returns:
636
+ float: The maximum allowed shear force in a hollow core. Regardless of
637
+ the approximation level.
638
+ """
639
+ if approx_lvl_h == 1:
640
+ return v_rd_ct_approx1(f_ctd, i_c, s_c, b_w, sigma_cp, l_x, l_bd0)
641
+
642
+ if approx_lvl_h == 2:
643
+ return v_rd_ct_approx2(
644
+ f_ctd,
645
+ i_c,
646
+ l_x,
647
+ l_bd0,
648
+ S_cy,
649
+ b_wy,
650
+ y,
651
+ y_c,
652
+ A_c,
653
+ A_cy,
654
+ y_pt,
655
+ f_p_lx,
656
+ f_p_lx_dx,
657
+ )
658
+
659
+ raise ValueError('Invalid approx level')
660
+
661
+
662
+ def v_rd_ct_approx1(
663
+ f_ctd: float,
664
+ i_c: float,
665
+ s_c: float,
666
+ b_w: float,
667
+ sigma_cp: float,
668
+ l_x: float,
669
+ l_bd0: float,
670
+ ) -> float:
671
+ """Calculating level 1 approximation for shear resistance in hollow core
672
+ slabs.
673
+
674
+ fib Model Code 2010, eq. (7.3-44).
675
+
676
+ Args:
677
+ f_ctd (float): The design value of concrete axial tensile strength.
678
+ i_c (float): The second moment of area.
679
+ s_c (float): The first moment of area, above and about the centriodal
680
+ axis in mm^3.
681
+ b_w (float): The width of the cross-section at the centroidal axis.
682
+ sigma_cp (float): The compressive stress at centroidal axis due to
683
+ prestress in MPa.
684
+ l_x (float): Distance from the edge to point of failure (Figure:
685
+ 7.3-12).
686
+ l_bd0 (float): follows 7.13-5.
687
+
688
+ Return:
689
+ float: Vrd Appoximation 1 for hollow slabs.
690
+ """
691
+ alpha_l = l_x / (1.2 * l_bd0)
692
+
693
+ return (
694
+ 0.8
695
+ * ((i_c * b_w) / s_c)
696
+ * ((f_ctd**2) + alpha_l * sigma_cp * f_ctd) ** 0.5
697
+ )
698
+
699
+
700
+ def v_rd_ct_approx2(
701
+ f_ctd: float,
702
+ i_c: float,
703
+ l_x: float,
704
+ l_bd0: float,
705
+ S_cy: float,
706
+ b_wy: float,
707
+ y: float,
708
+ y_c: float,
709
+ A_c: float,
710
+ A_cy: float,
711
+ y_pt: float,
712
+ f_p_lx: float,
713
+ f_p_lx_dx: float,
714
+ ) -> float:
715
+ """Calculates the maximum shear force for level 2 approximationin hollow
716
+ core slabs.
717
+
718
+ fib Model Code 2010, eq. (7.3-45), (7.3-46) and (7.3-47)
719
+
720
+ Args:
721
+ f_ctd (float): Design value of concrete axial tensile strength in MPa.
722
+ i_c (float): The second moment of area in mm^4.
723
+ l_x (float): Distance from the edge to point of failure (Figure:
724
+ 7.3-12).
725
+ l_bd0 (float): follows 7.13-5.
726
+ S_cy (float): The first moment of area above y in mm^3.
727
+ b_wy (float): The width at hight y in mm.
728
+ y (float): The highh of the critical point at the line of failure in
729
+ mm.
730
+ y_c (float): The hight of the concrete centroidal axis in mm.
731
+ A_c (float): The area of concrete cross-section in mm^2.
732
+ A_cy (float): The area of concrete cross-section above y in mm^2.
733
+ y_pt (float): The hight of centroidal axis of prestressed steel in mm.
734
+ f_p_lx (float): The prestressing force at the distance l_x in N.
735
+ f_p_lx (float): The derivative of prestressing force at the distance
736
+ l_x with respect to dx.
737
+
738
+ Returns:
739
+ float: The maximum shear force for level 2 approximation.
740
+ """
741
+ alpha_l = l_x / (1.2 * l_bd0)
742
+ sigma_cpy = ((1 / A_c) * ((y_c - y) / i_c)) * f_p_lx
743
+ tau_cpy = (
744
+ (1 / b_wy) * ((A_cy / A_c) - (S_cy * (y_c - y_pt)) / i_c) * f_p_lx_dx
745
+ )
746
+
747
+ return (i_c * b_wy / S_cy) * (
748
+ ((f_ctd**2) + alpha_l * sigma_cpy * f_ctd) ** 0.5 - tau_cpy
749
+ )