-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathis800_2007.py
More file actions
2110 lines (1828 loc) · 83.9 KB
/
is800_2007.py
File metadata and controls
2110 lines (1828 loc) · 83.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
"""Module for Indian Standard, IS 800 : 2007
Started on 01 - Nov - 2018
@author: ajmalbabums
"""
import math
from Common import *
# from Common import KEY_DP_FAB_SHOP
class IS800_2007(object):
"""Perform calculations on steel design as per IS 800:2007
"""
# ==========================================================================
""" SECTION 1 GENERAL """
# ==========================================================================
""" SECTION 2 MATERIALS """
# -------------------------------------------------------------
# 5.4 Strength
# -------------------------------------------------------------
# Clause 3.7 - Classification of cross-section, Table 2, Limiting width to thickness ratio
@staticmethod
def Table2_web_OfI_H_box_section(depth, web_thickness, f_y, axial_load, load_type='Compression', section_class='Plastic'):
""" Calculate the limiting width to thickness ratio; for web of an I, H or Box section in accordance to Table 2
Args:
depth: depth of the web in mm (float or int)
web_thickness: thickness of the web in mm (float or int)
f_y: yield stress of the section material in N/MPa (float or int)
axial_load: Axial load (Tension or Compression) acting on the member (i.e. web) in N (float or int)
load_type: Type of axial load (Tension or Compression) (string)
section_class: Class of the section (Class1 - Plastic, Class2 - Compact or Class3 - Semi-compact) (string)
Returns:
Results of the checks; 1. Neutral axis at mid-depth, 2. Generally (when there is axial tension or compression force acting on the section),
and 3. Axial compression, in the form of (list)
'Pass', if the section qualifies as the required section_class, 'Fail' if it does not
Reference: Table 2 and Cl.3.7.2, IS 800:2007
"""
gamma_m0 = IS800_2007.cl_5_4_1_Table_5["gamma_m0"]['yielding']
epsilon = math.sqrt(250 / f_y)
ratio = depth / web_thickness # ratio of the web/component
# Check 1: Neutral axis at mid-depth
if section_class == 'Plastic':
if ratio <= (84 * epsilon):
check_1 = 'Pass'
else:
check_1 = 'Fail'
elif section_class == 'Compact':
if ratio <= (105 * epsilon):
check_1 = 'Pass'
else:
check_1 = 'Fail'
else: # 'Semi-compact'
if ratio <= (126 * epsilon):
check_1 = 'Pass'
else:
check_1 = 'Fail'
# Check 2: Generally (when there is axial tension or compression force acting on the section)
actual_avg_stress = axial_load / (depth * web_thickness) # N/mm^2 or MPa
design_compressive_stress = f_y / gamma_m0 # N/mm^2 or MPa, design compressive stress only of web (cl. 7.1.2.1, IS 800:2007)
r_1 = actual_avg_stress / design_compressive_stress # stress ratio
if load_type == 'Compression':
r_1 = r_1
else:
r_1 = - r_1 # r_1 is negative for axial tension
if section_class == 'Plastic':
if ratio <= (min(((84 * epsilon) / (1 + r_1)), 42 * epsilon)):
check_2 = 'Pass'
else:
check_2 = 'Fail'
elif section_class == 'Compact':
if r_1 < 0:
if ratio <= ((105 * epsilon) / (1 + r_1)):
check_2 = 'Pass'
else:
check_2 = 'Fail'
else:
if ratio <= (min(((105 * epsilon) / (1 + (1.5 * r_1))), 42 * epsilon)):
check_2 = 'Pass'
else:
check_2 = 'Fail'
else: # 'Semi-compact'
if ratio <= (min(((126 * epsilon) / (1 + (2 * r_1))), 42 * epsilon)):
check_2 = 'Pass'
else:
check_2 = 'Fail'
# Check 3: Axial compression
if section_class == 'Semi-compact':
if ratio <= (42 * epsilon):
check_3 = 'Pass'
else:
check_3 = 'Fail'
else:
check_3 = 'Pass' # Not-applicable to Plastic and Compact sections (hence, Pass)
return [check_1, check_2, check_3]
@staticmethod
def Table2_hollow_tube(diameter, thickness, f_y, load='Axial Compression', section_class='Plastic'):
""" Calculate the limiting width to thickness ratio; for a hollow tube section in accordance to Table 2
Args:
diameter: diameter of the tube in mm (float or int)
thickness: thickness of the tube in mm (float or int)
f_y: yield stress of the section material in N/MPa (float or int)
load: Type of load ('Axial Compression' or 'Moment') (string)
section_class: Class of the section (Class1 - Plastic, Class2 - Compact or Class3 - Semi-compact) (string)
Returns:
Results of the section classification check(s)
'Pass', if the section qualifies as the required section_class, 'Fail' if it does not
Reference: Table 2 and Cl.3.7.2, IS 800:2007
"""
epsilon = math.sqrt(250 / f_y)
ratio = diameter / thickness # ratio of the web/component
# Check 1: If the load acting is Moment
if load == 'Moment':
if section_class == 'Plastic':
if ratio <= (42 * epsilon ** 2):
check = 'Pass'
else:
check = 'Fail'
elif section_class == 'Compact':
if ratio <= (52 * epsilon ** 2):
check = 'Pass'
else:
check = 'Fail'
else:
if ratio <= (146 * epsilon ** 2):
check = 'Pass'
else:
check = 'Fail'
# Check 1: If the load acting is Axial Compression
elif load == 'Axial Compression':
if section_class == 'Plastic':
check = 'Pass'
elif section_class == 'Compact':
check = 'Pass'
else:
if ratio <= (88 * epsilon ** 2):
check = 'Pass'
else:
check = 'Fail'
else:
pass
return check
@staticmethod
def Table2_i(width, thickness, f_y, section_type='Rolled'):
""" Calculate the limiting width to thickness ratio as per Table 2 for;
sr. no i) Outstanding element of compression flange
Args:
width: width of the element in mm (float or int)
thickness: thickness of the element in mm (float or int)
f_y: yield stress of the section material in MPa (float or int)
section_type: Type of section ('Rolled' or 'Welded') (string)
Returns:
A list of values with;
1- The class of the section as Plastic, Compact, Semi-compact or Slender on account of the flange
2- Ratio
['Section Class', 'Ratio']
Reference: Table 2 and Cl.3.7.2, IS 800:2007
"""
epsilon = math.sqrt(250 / f_y)
ratio = width / thickness
if section_type == 'Rolled':
if ratio <= (9.4 * epsilon):
section_class = 'Plastic'
elif ratio <= (10.5 * epsilon):
section_class = 'Compact'
elif ratio <= (15.7 * epsilon):
section_class = 'Semi-Compact'
else:
section_class = 'Slender'
else:
if ratio <= (8.4 * epsilon):
section_class = 'Plastic'
elif ratio <= (9.4 * epsilon):
section_class = 'Compact'
elif ratio <= (13.6 * epsilon):
section_class = 'Semi-Compact'
else:
section_class = 'Slender'
print(f" flange_class"
f" width {width}"
f" thickness {thickness}"
f" epsilon {epsilon}"
)
print(f" section_type {section_type}"
f" section_class {section_class}")
return [section_class, ratio]
@staticmethod
def Table2_iii(depth, thickness, f_y, classification_type='Neutral axis at mid-depth'):
""" Calculate the limiting width to thickness ratio as per Table 2 for;
sr. no iii) Web of an I, H or box section for axial compression
Args:
depth: width of the element in mm (float or int)
thickness: thickness of the element in mm (float or int)
f_y: yield stress of the section material in MPa (float or int)
classification_type: Type of classification required (Neutral axis at mid-depth, Generaly, Axial Compression) (string)
Returns:
The class of the section as Plastic, Compact, Semi-compact or Slender on account of the web
Reference: Table 2 and Cl.3.7.2, IS 800:2007
"""
epsilon = math.sqrt(250 / f_y)
ratio = depth / thickness
print(f" web_class \n"
f" depth {depth} \n"
f" thickness {thickness} \n"
f" epsilon {epsilon} \n"
f" classification_type {classification_type}\n"
)
if classification_type == 'Neutral axis at mid-depth':
if ratio < (84 * epsilon):
section_class = KEY_Plastic
elif ratio < (105 * epsilon):
section_class = KEY_Compact
elif ratio < (126 * epsilon):
section_class = KEY_SemiCompact
else:
section_class = 'Slender'
elif classification_type == 'Generally':
pass
elif classification_type == 'Axial compression':
if ratio > (42 * epsilon):
section_class = 'Slender'
else:
section_class = 'Semi-Compact'
print(f" section_class {section_class}")
return section_class
@staticmethod
def Table2_iv(depth, thickness_web, f_y):
""" Calculate the limiting width to thickness ratio as per Table 2 for;
sr. no i) Members subjected to Axial Compression
sr. no ii)Members subjected to Compression due to bending
Args:
width(b): width of the element in mm (float or int)
depth(d): depth of the element in mm (float or int)
thickness(t): thickness of the element in mm (float or int)
f_y: yield stress of the section material in MPa (float or int)
force_type: Type of failure in member ('Axial') ('Compression')
section_type: Type of section ('Angle') (string)
Returns:
A list of values with;
1- The class of the section as Semi-compact or Slender on account of the
b/t, d/t, (b+d)/t Ratio
['Section Class', 'Ratio']
Reference: Table 2 and Cl.3.7.2, IS 800:2007
"""
epsilon = math.sqrt(250 / int(f_y))
d_t = depth / thickness_web
if d_t <= (42 * epsilon) :
section_class = KEY_SemiCompact
else:
section_class = 'Slender'
return [section_class, d_t]
@staticmethod
def Table2_vi(width, depth, thickness, f_y, force_type = "Axial Compression"):
""" Calculate the limiting width to thickness ratio as per Table 2 for;
sr. no i) Members subjected to Axial Compression
sr. no ii)Members subjected to Compression due to bending
Args:
width(b): width of the element in mm (float or int)
depth(d): depth of the element in mm (float or int)
thickness(t): thickness of the element in mm (float or int)
f_y: yield stress of the section material in MPa (float or int)
force_type: Type of failure in member ('Axial') ('Compression')
section_type: Type of section ('Angle') (string)
Returns:
A list of values with;
1- The class of the section as Semi-compact or Slender on account of the
b/t, d/t, (b+d)/t Ratio
['Section Class', 'Ratio']
Reference: Table 2 and Cl.3.7.2, IS 800:2007
"""
epsilon = math.sqrt(250 / int(f_y))
b_t = width / thickness
d_t = depth / thickness
bd_t = (width + depth) / thickness
if force_type == 'Axial Compression':
if b_t <= (15.7 * epsilon) and d_t<= (15.7 * epsilon) and bd_t<= (25 * epsilon):
section_class = KEY_SemiCompact
else:
section_class = 'Slender'
else:
if b_t <= (9.4 * epsilon) and d_t<= (9.4 * epsilon):
section_class = KEY_Plastic
elif b_t <= (10.5 * epsilon) and d_t<= (10.5 * epsilon):
section_class = KEY_Compact
elif b_t <= (15.7 * epsilon) and d_t<= (15.7 * epsilon):
section_class = KEY_SemiCompact
else:
section_class = 'Slender'
return [section_class, b_t,d_t, bd_t ]
@staticmethod
def Table2_vii(width, depth, thickness, f_y, force_type = "Axial Compression"):
""" Calculate the limiting width to thickness ratio as per Table 2 for;
sr. no i) Members subjected to Axial Compression
sr. no ii)Members subjected to Compression due to bending
Args:
width(b): width of the element in mm (float or int)
depth(d): depth of the element in mm (float or int)
thickness(t): thickness of the element in mm (float or int)
f_y: yield stress of the section material in MPa (float or int)
force_type: Type of failure in member ('Axial') ('Compression')
section_type: Type of section ('Angle') (string)
Returns:
A list of values with;
1- The class of the section as Semi-compact or Slender on account of the
b/t, d/t, (b+d)/t Ratio
['Section Class', 'Ratio']
Reference: Table 2 and Cl.3.7.2, IS 800:2007
"""
epsilon = math.sqrt(250 / int(f_y))
b_t = width / thickness
d_t = depth / thickness
bd_t = (width + depth) / thickness
if force_type == 'Axial Compression':
if d_t<= (15.7 * epsilon) :
'''When adding more cases, you need to modify Strut angle'''
section_class = KEY_SemiCompact
else:
section_class = 'Slender'
else:
if b_t <= (9.4 * epsilon) and d_t<= (9.4 * epsilon):
section_class = KEY_Plastic
elif b_t <= (10.5 * epsilon) and d_t<= (10.5 * epsilon):
section_class = KEY_Compact
elif b_t <= (15.7 * epsilon) and d_t<= (15.7 * epsilon):
section_class = KEY_SemiCompact
else:
section_class = 'Slender'
return [section_class, b_t,d_t, bd_t ]
@staticmethod
def Table2_x(outer_diameter, tube_thickness, f_y, load_type='axial compression'):
""" Calculate the limiting width to thickness ratio as per Table 2 for;
sr. no x) Circular hollow tube
Args:
outer_diameter: outer diameter of the tube in mm (float or int)
tube_thickness: thickness of the tube in mm (float or int)
f_y: yield stress of the section material in MPa (float or int)
load_type: Type of loading (moment, axial compression) (string)
Returns:
The class of the section as Plastic, Compact, Semi-compact or Slender
Reference: Table 2 and Cl.3.7.2, IS 800:2007
"""
epsilon = math.sqrt(250 / f_y)
ratio = outer_diameter / tube_thickness
print(f"outer_diameter{outer_diameter},tube_thickness{tube_thickness}")
if load_type == 'axial compression':
if ratio > (88 * epsilon**2):
section_class = 'Slender'
else:
section_class = 'Semi-Compact'
else:
if ratio <= (42 * epsilon**2):
section_class = 'Plastic'
elif (ratio > (42 * epsilon**2)) and (ratio <= (52 * epsilon**2)):
section_class = 'Compact'
elif ratio <= (146 * epsilon**2):
section_class = 'Semi-Compact'
else:
section_class = 'Slender'
return section_class
# ==========================================================================
""" SECTION 3 GENERAL DESIGN REQUIREMENTS """
@staticmethod
def cl_3_8_max_slenderness_ratio(Type = 1):
"""
1) A member carrying compressive loads
resulting from dead loads and imposed
loads
2) A tension member in which a reversal
of direct stress occurs due to loads other
than wind or seismic forces
3) A member subjected to compression
forces resulting only from combination
with wind/earthquake actions, provided
the deformation of such member does
not adversely affect tbe stress in any
part of the structure
4) Compression flange of a beam against
lateral torsional buckling
5) A member normally acting m a tie in a
roof truss or a bracing system not
considered effective when subject to
possible reversal of stress into
compression resulting from the action
of wind or earthquake forces]]
6) Members always under tension’) (other
than pre-tensioned members)
"""
if Type == 1:
return 180
elif Type == 2:
return 180
elif Type == 3:
return 180
elif Type == 4:
return 180
elif Type == 5:
return 180
elif Type == 6:
return 180
# ==========================================================================
""" SECTION 4 METHODS OF STRUCTURAL ANALYSIS """
# ==========================================================================
""" SECTION 5 LIMIT STATE DESIGN """
# -------------------------------------------------------------
# 5.4 Strength
# -------------------------------------------------------------
# Table 5 Partial Safety Factors for Materials, gamma_m (dict)
cl_5_4_1_Table_5 = {"gamma_m0": {'yielding': 1.10, 'buckling': 1.10},
"gamma_m1": {'ultimate_stress': 1.25},
"gamma_mf": {KEY_DP_FAB_SHOP: 1.25, KEY_DP_FAB_FIELD: 1.25},
"gamma_mb": {KEY_DP_FAB_SHOP: 1.25, KEY_DP_FAB_FIELD: 1.25},
"gamma_mr": {KEY_DP_FAB_SHOP: 1.25, KEY_DP_FAB_FIELD: 1.25},
"gamma_mw": {KEY_DP_FAB_SHOP: 1.25, KEY_DP_FAB_FIELD: 1.50}
}
# ==========================================================================
""" SECTION 6 DESIGN OF TENSION MEMBERS """
# ------------------------------------------------------------
# 6.2 Design Strength Due to Yielding of Gross Section
# -------------------------------------------------------------
@staticmethod
def cl_6_2_tension_yielding_strength(A_g, f_y):
"""Calcualte the tension rupture capacity of plate as per clause 6.3.1
:param A_g: gross area of cross section
:param f_y: yield stress of the material
:return: design strength in tension yielding
"""
gamma_m0 = IS800_2007.cl_5_4_1_Table_5["gamma_m0"]['yielding']
T_dg = A_g * f_y / gamma_m0
return T_dg
# ------------------------------------------------------------
# 6.3 Design Strength Due to Rupture of Critical Section
# -------------------------------------------------------------
# cl.6.3.1 Plates
@staticmethod
def cl_6_3_1_tension_rupture_strength(A_n,f_u):
"""Calcualte the tension rupture capacity of plate as per clause 6.3.1
:param A_n: net effective area of member
:param f_u: ultimate stress of the material
:return: design strength in tension rupture
"""
gamma_m1 = IS800_2007.cl_5_4_1_Table_5["gamma_m1"]['ultimate_stress']
T_dn = 0.9*A_n*f_u/gamma_m1
return T_dn
# 6.4 Design Strength Due to Block Shear
# -------------------------------------------------------------
# cl. 6.4.1 Block shear strength of bolted connections
@staticmethod
def cl_6_4_1_block_shear_strength(A_vg, A_vn, A_tg, A_tn, f_u, f_y):
"""Calculate the block shear strength of bolted connections as per cl. 6.4.1
Args:
A_vg: Minimum gross area in shear along bolt line parallel to external force [in sq. mm] (float)
A_vn: Minimum net area in shear along bolt line parallel to external force [in sq. mm] (float)
A_tg: Minimum gross area in tension from the bolt hole to the toe of the angle,
end bolt line, perpendicular to the line of force, respectively [in sq. mm] (float)
A_tn: Minimum net area in tension from the bolt hole to the toe of the angle,
end bolt line, perpendicular to the line of force, respectively [in sq. mm] (float)
f_u: Ultimate stress of the plate material in MPa (float)
f_y: Yield stress of the plate material in MPa (float)
Return:
block shear strength of bolted connection in N (float)
Note:
Reference:
IS 800:2007, cl. 6.4.1
"""
gamma_m0 = IS800_2007.cl_5_4_1_Table_5["gamma_m0"]['yielding']
gamma_m1 = IS800_2007.cl_5_4_1_Table_5["gamma_m1"]['ultimate_stress']
T_db1 = A_vg * f_y / (math.sqrt(3) * gamma_m0) + 0.9 * A_tn * f_u / gamma_m1
T_db2 = 0.9 * A_vn * f_u / (math.sqrt(3) * gamma_m1) + A_tg * f_y / gamma_m0
return min(T_db1, T_db2)
# ==========================================================================
""" SECTION 7 DESIGN OF COMPRESS1ON MEMBERS """
# -------------------------------------------------------------
# 7.4 Column Bases
# -------------------------------------------------------------
# cl. 7.4.1, General
@staticmethod
def cl_7_4_1_bearing_strength_concrete(concrete_grade):
"""
Args:
concrete_grade: grade of concrete used for pedestal/footing (str).
Returns:
maximum permissible bearing strength of concrete pedestal/footing (float).
Note:
cl 7.4.1 suggests the maximum bearing strength equal to 0.60 times f_ck,
but, the value is amended to 0.45 times f_ck (f_ck is the characteristic strength of concrete)
"""
f_ck = {
'M10': 10,
'M15': 15,
'M20': 20,
'M25': 25,
'M30': 30,
'M35': 35,
'M40': 40,
'M45': 45,
'M50': 50,
'M55': 55,
}[str(concrete_grade)]
bearing_strength = 0.45 * f_ck # MPa (N/mm^2)
return bearing_strength
# cl. 7.1, Design strength
@staticmethod
def cl_7_1_2_design_compressisive_strength_member( effective_area , design_compressive_stress , axial_load ):
"""
Args:
effective_area:effective sectional area as defined in 7.3.2 (float)
design_compressive_stress:design compressive stress, obtained as per 7.1.2.1 (float)
axial_load:Load acting on column (float)
Returns:
Design compressive strength
'Pass', if the section qualifies as the required section_class, 'Fail' if it does not
Note:
Reference: IS 800 pg34
@author:Rutvik Joshi
"""
design_compressive_strength= effective_area * design_compressive_stress #area in mm2,stress in kN/mm2
if axial_load < design_compressive_strength: #kN
check = 'pass'
else:
check = 'fail'
return check #str
# cl. 7.2.2 Effective Length of Prismatic Compression Members
@staticmethod
def cl_7_2_2_effective_length_of_prismatic_compression_members(unsupported_length, end_1='Fixed', end_2='Fixed'):
"""
Calculate the effective length of the member as per Cl. 7.2.2 (Table 11) of IS 800:2007
Args:
unsupported_length: unsupported length of the member about any axis in mm (float)
end_1: End condition at end 1 of the member (string)
end_2: End condition at end 2 of the member (string)
Returns:
Effective length in mm
"""
if end_1 == 'Fixed' and end_2 == 'Fixed':
effective_length = 0.65 * unsupported_length
elif end_1 == 'Fixed' and end_2 == 'Hinged':
effective_length = 0.8 * unsupported_length
elif end_1 == 'Fixed' and end_2 == 'Roller':
effective_length = 1.2 * unsupported_length
elif end_1 == 'Hinged' and end_2 == 'Hinged':
effective_length = 1.0 * unsupported_length
elif end_1 == 'Hinged' and end_2 == 'Roller':
effective_length = 2.0 * unsupported_length
elif end_1 == 'Fixed' and end_2 == 'Free':
effective_length = 2.0 * unsupported_length
else:
effective_length = 2.0 * unsupported_length
return effective_length
@staticmethod
def cl_7_2_4_effective_length_of_truss_compression_members(length, section_profile = 'Angles'):
"""
Calculate the effective length of the member as per Cl. 7.5.2.1 (Table 11) of IS 800:2007
Args:
unsupported_length: actual length of the member about any axis in mm (float)
end_1: End condition at end 1 of the member (string)
end_2: End condition at end 2 of the member (string)
Returns:
Effective length in mm
"""
if section_profile == 'Angles':
effective_length = 1 * length
elif section_profile == 'Back to Back Angles':
effective_length = 0.85 * length
elif section_profile == 'Channels':
print('NEED TO CHECK AGAIN')
effective_length = 1 * length
elif section_profile == 'Back to Back Channels':
print('NEED TO CHECK AGAIN')
effective_length = 0.85 * length
else:
effective_length = 1 * length
return effective_length
# cl. 7.1.2.1, Design stress
@staticmethod
def cl_7_1_2_1_design_compressisive_stress(f_y, gamma_mo, effective_slenderness_ratio , imperfection_factor, modulus_of_elasticity, check_type ):
"""
Args:
f_y:Yield stress (float)
gamma_mo:Effective length of member (float)
effective_slenderness_ratio:Euler buckling class (float)
imperfection_factor
modulus_of_elasticity
Returns:
list of euler_buckling_stress, nondimensional_effective_slenderness_ratio, phi, stress_reduction_factor, design_compressive_stress_fr .design_compressive_stress, design_compressive_stress_min
Note:
Reference: IS 800 pg34
@author:Rutvik Joshi
"""
# 2.4 - Euler buckling stress
euler_buckling_stress = (math.pi ** 2 * modulus_of_elasticity) / effective_slenderness_ratio ** 2
if 'Concentric' in check_type:
# 2.5 - Non-dimensional effective slenderness ratio
nondimensional_effective_slenderness_ratio = math.sqrt(f_y / euler_buckling_stress)
elif 'Leg' in check_type:
nondimensional_effective_slenderness_ratio = check_type[1]
phi = 0.5 * (1 + imperfection_factor * (nondimensional_effective_slenderness_ratio - 0.2) + nondimensional_effective_slenderness_ratio ** 2)
# 2.6 - Design compressive stress
stress_reduction_factor = 1/(phi + math.sqrt(phi**2 - nondimensional_effective_slenderness_ratio**2))
design_compressive_stress_fr = f_y * stress_reduction_factor / gamma_mo
design_compressive_stress_max = f_y / gamma_mo
design_compressive_stress = min(design_compressive_stress_fr , design_compressive_stress_max)
return [euler_buckling_stress, nondimensional_effective_slenderness_ratio, phi, stress_reduction_factor,design_compressive_stress_fr, design_compressive_stress, design_compressive_stress_max] #kN/cm2
# Cl. 7.1.1, Cl.7.1.2.1, Imperfection Factor
@staticmethod
def cl_7_1_2_1_imperfection_factor(buckling_class=''):
"""
Determine the Imperfection Factor of the cross-section as per Cl 7.1.1, Cl.7.1.2.1 (Table 7) of IS 800:2007
Args:
buckling_class (string)
Returns: Imperfection factor value (string)
"""
imperfection_factor = {
'a': 0.21,
'b': 0.34,
'c': 0.49,
'd': 0.76
}[buckling_class]
return imperfection_factor
# cl. 7.1.2.1, Buckling Class of Cross-Sections
@staticmethod
def cl_7_1_2_2_buckling_class_of_crosssections(b, h, t_f, cross_section='Rolled I-sections', section_type='Hot rolled'):
"""
Determine the buckling class of the cross-section as per Cl 7.1.2.2 (Table 10) of IS 800:2007
Args:
b: width of the flange
h: depth of the section
t_f: thickness of the flange
cross_section: type of cross-section
section_type: Hot rolled or Cold formed
Returns: Buckling class values about z-z and y-y axis (dictionary)
"""
if cross_section == 'Rolled I-sections':
if h / b > 1.2:
if t_f <= 40:
buckling_class = {
'z-z': 'a',
'y-y': 'b'
}
elif 40 <= t_f <= 100:
buckling_class = {
'z-z': 'b',
'y-y': 'c'
}
else: # this case if not derived from the code (for t_f >100mm, buckling class d is assumed about both the axis)
buckling_class = {
'z-z': 'd',
'y-y': 'd'
}
elif h / b <= 1.2:
if t_f <= 100:
buckling_class = {
'z-z': 'b',
'y-y': 'c'
}
if t_f > 100:
buckling_class = {
'z-z': 'd',
'y-y': 'd'
}
elif cross_section == 'Welded I-section':
if t_f <= 40:
buckling_class = {
'z-z': 'b',
'y-y': 'c'
}
if t_f > 40:
buckling_class = {
'z-z': 'c',
'y-y': 'd'
}
elif cross_section == 'Hollow Section':
if section_type == 'Hot rolled':
buckling_class = {
'z-z': 'a',
'y-y': 'a'
}
else:
buckling_class = {
'z-z': 'b',
'y-y': 'b'
}
return buckling_class
@staticmethod
def cl_7_5_1_2_equivalent_slenderness_ratio_of_truss_compression_members_loaded_one_leg(length, r_min, b1, b2, t, f_y, bolt_no = 2, fixity = 'Fixed'):
"""
Calculate the equivalent slenderness ratio of the member as per Cl. 7.5.1.2 (Table 12) of IS 800:2007
Args:
length: actual length of the member about any axis in mm (float)
end_1: End condition at end 1 of the member (string)
end_2: End condition at end 2 of the member (string)
r_min: minimum radius of gyration of the section(angle)
b1: leg of section(angle) (float)
b2: another leg of section(angle) (float)
t : thickness (float)
f_y: yield strength (float)
bolt_no: number of bolt in the connection (float)
fixity = depends on end_1 and end_2 (string)
Returns:
list of
equivalent_slenderness_ratio
lambda_vv, lambda_psi defined in clause
k1, k2, k3
"""
e = math.sqrt(250/f_y )
E = 2 * 10 ** 5
if bolt_no >= 2:
if fixity == 'Fixed':
k1 = 0.2
k2 = 0.35
k3 = 20
elif fixity == 'Hinged':
k1 = 0.7
k2 = 0.6
k3 = 5
elif fixity == 'Partial':
temp = cl_7_5_1_2_equivalent_slenderness_ratio_of_truss_compression_members_loaded_one_leg(length, r_min, b1, b2, t, f_y, bolt_no , fixity = 'Fixed')
temp2 = cl_7_5_1_2_equivalent_slenderness_ratio_of_truss_compression_members_loaded_one_leg(length, r_min, b1, b2, t, f_y, bolt_no , fixity = 'Hinged')
k1 = (temp[3] +temp2[3]) /2
k2 = (temp[4] +temp2[4]) /2
k3 = (temp[5] +temp2[5]) /2
elif bolt_no == 1:
if fixity == 'Fixed':
k1 = 0.75
k2 = 0.35
k3 = 20
elif fixity == 'Hinged':
k1 = 1.25
k2 = 0.5
k3 = 60
elif fixity == 'Partial':
temp = cl_7_5_1_2_equivalent_slenderness_ratio_of_truss_compression_members_loaded_one_leg(length,
r_min, b1,
b2, t, f_y,
bolt_no,
fixity='Fixed')
temp2 = cl_7_5_1_2_equivalent_slenderness_ratio_of_truss_compression_members_loaded_one_leg(length,
r_min, b1,
b2, t, f_y,
bolt_no,
fixity='Hinged')
k1 = (temp[3] + temp2[3]) / 2
k2 = (temp[4] + temp2[4]) / 2
k3 = (temp[5] + temp2[5]) / 2
lambda_vv = (length/ r_min)/(e* math.sqrt(math.pi**2 * E/250))
lambda_psi = ((b1 + b2)/(2 * t) )/(e* math.sqrt(math.pi**2 * E/250))
equivalent_slenderness_ratio = math.sqrt(k1 + k2 * lambda_vv **2 + k3 * lambda_psi**2)
return [equivalent_slenderness_ratio, lambda_vv, lambda_psi, k1, k2, k3]
# ==========================================================================
""" SECTION 8 DESIGN OF MEMBERS SUBJECTED TO BENDING """
# -------------------------------------------------------------
# 8.4 Shear
# -------------------------------------------------------------
@staticmethod
def cl_8_2_1_web_buckling(d, tw, e):
d_tw = d / tw
if d_tw <= 67*e:
return False
return True
@staticmethod
def cl_8_2_1_2_design_bending_strength(section_class, Zp, Ze, fy, gamma_mo, support):
beta_b = 1.0 if section_class == KEY_Plastic or KEY_Compact else Ze/Zp
Md = beta_b * Zp * fy / gamma_mo
if support == KEY_DISP_SUPPORT1 :
if Md < 1.2 * Ze * fy / gamma_mo:
return Md
else:
return 1.2 * Ze * fy / gamma_mo
elif support == KEY_DISP_SUPPORT2 :
if Md < 1.5 * Ze * fy / gamma_mo:
return Md
else:
return 1.5 * Ze * fy / gamma_mo
@staticmethod
def cl_8_2_1_2_high_shear_check(V, Vd):
if V > 0.6 * Vd :
print('High shear')
return True
else:
print('Low shear')
return False
@staticmethod
def cl_8_2_1_4_holes_tension_zone(Anf_Agf, fy, fu, gamma_mo, gamma_m1):
if Anf_Agf > (fy/fu) * (gamma_m1/gamma_mo) / 0.9 :
return Anf_Agf
else :
return (fy/fu) * (gamma_m1/gamma_mo) / 0.9
@staticmethod
def cl_8_2_1_5_shear_lag(b0,b1, L0, type):
if type == 'outstand':
if b0<= L0/20 :
return b0
else :
return L0/20
else:
if b1<= L0/10 :
return b1
else :
return L0/10
@staticmethod
def cl_8_2_2_Unsupported_beam_bending_strength(Zp, Ze, fcd, section_class):
if section_class == KEY_Plastic or section_class == KEY_Compact:
return Zp * fcd
else:
return Ze * fcd
@staticmethod
def cl_8_2_2_Unsupported_beam_bending_compressive_stress(X_lt, fy, gamma_mo):
return X_lt * fy / gamma_mo
@staticmethod
def cl_8_2_2_Unsupported_beam_bending_stress_reduction_factor(phi_lt, lambda_lt):
si = 1 / ( phi_lt + (phi_lt **2 - lambda_lt **2) ** 0.5)
if si > 1.0:
si = 1.0
return si
@staticmethod
def cl_8_2_2_Unsupported_beam_bending_phi_lt(alpha_lt, lambda_lt):
a = 0.5 * ( 1 + alpha_lt * ( lambda_lt - 0.2) + lambda_lt ** 2)
print(alpha_lt, lambda_lt, a)
return a
@staticmethod
def cl_8_2_2_Unsupported_beam_bending_non_slenderness( E, meu,Iy, It, Iw, Llt,beta_b, Zp, hf,ry, tf):
''' Author : Rutvik Joshi
Clauses: 8.2.2.1 and Annex E
'''
G = E/(2+2*meu)
fcrb = (1.1 * math.pi**2 * E/(Llt/ry)**2) * math.sqrt(1 + (((Llt/ry)/(hf/tf))**2) / 20)
_ = math.sqrt((math.pi**2 * E * Iy/Llt**2)*(G *It + (math.pi**2 * E * Iw/Llt**2) ))
__ = beta_b * Zp * fcrb
___ = (math.pi**2 * E * Iy * hf/Llt**2)/2 * math.sqrt(1 + (((Llt/ry)/(hf/tf))**2) / 20 )
return [min(_,__,___), fcrb]
@staticmethod
def cl_8_2_2_Unsupported_beam_bending_fcrb(E, Llt_ry, hf_tf):
''' Author : Rutvik Joshi
Clauses: 8.2.2.1 and Annex E
'''
fcrb = 1.1 * math.pi**2 * E * (1 + (Llt_ry/hf_tf)**2/20)**0.5 / Llt_ry
return fcrb
@staticmethod
def cl_8_2_2_1_elastic_buckling_moment(betab, Zp, Ze, fy, Mcr, fcrb = 0):
if (betab * Zp * fy / Mcr) ** 0.5 <= (1.2 * Ze * fy / Mcr) ** 0.5:
return (betab * Zp * fy / Mcr) ** 0.5
else:
return (1.2 * Ze * fy / Mcr) ** 0.5
@staticmethod
def cl_8_2_2_1_elastic_buckling_moment_fcrb( fy, fcrb=0):
return math.sqrt(fy/fcrb)
@staticmethod
def cl_8_3_1_EffLen_Simply_Supported(Torsional, Warping, length, depth, load) :
""" Calculate the Effective Length for Simply Supported Beams as per Table 15 Cl 8.3.1
Args:
Torsional Restraint: Type of Restraint (string)
Warping Restraint: Type of Restraint (string)
depth(d): depth of the element in mm (float or int)
length(l): length of span in mm (float or int)
f_y: yield stress of the section material in MPa (float or int)
load: Type of load in member ('Normal') ('Destabilizing')