forked from Nandagopalvs25/Osdag-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Report_functions_a.py
2553 lines (2148 loc) · 106 KB
/
Report_functions_a.py
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
from builtins import str
import time
import math
from Common import *
from utils.common.is800_2007 import *
import os
# from utils.common import component
from pylatex import Document, Section, Subsection
from pylatex.utils import italic, bold
#import pdflatex
import sys
import datetime
#from PyQt5.QtCore import pyqtSlot,pyqtSignal, QObject
from pylatex import Document, Section, Subsection, Tabular, Tabularx,MultiColumn
from pylatex import Math, TikZ, Axis, Plot, Figure, Matrix, Alignat
from pylatex.utils import italic, NoEscape
#from pdflatex import PDFLaTeX
import os
from pylatex import Document, PageStyle, Head, MiniPage, Foot, LargeText, \
MediumText, LineBreak, simple_page_number
from pylatex.utils import bold
def min_pitch(d):#TODO:Done
"""
Calculate the min pitch distance
Args:
d:Diameter of provided bolt in mm (float)
Returns:
Minimum pitch distance in mm (float)
Note:
Reference:
IS 800:2007, cl. 10.2.2
"""
min_pitch = 2.5*d
d = str(d)
min_pitch = str(min_pitch)
min_pitch_eqn = Math(inline=True)
min_pitch_eqn.append(NoEscape(r'\begin{aligned}p/g_{min}&= 2.5 ~ d\\'))
min_pitch_eqn.append(NoEscape(r'&=2.5*' + d + r'\\&=' + min_pitch + r'\\'))
min_pitch_eqn.append(NoEscape(r'[Ref.~I&S~800:2007,~Cl.~10.2.2] \end{aligned}'))
return min_pitch_eqn
def cl_10_2_2_min_spacing(d, parameter='pitch'):
""" minimum spacing between two adjacent fasteners as per cl.10.2.2, IS 800:2007
Args:
d: diameter of the fastener (int)
Returns:
equation for the minimum spacing between two adjacent fasteners which is 2.5 * diameter of the fastener
"""
d = str(d)
min_spacing = 2.5 * d
min_spacing = str(min_spacing)
min_spacing_eqn = Math(inline=True)
if parameter == 'pitch':
min_spacing_eqn.append(NoEscape(r'\begin{aligned}Pitch~Distance~_{min} = 2.5 ~ d\\'))
else:
min_spacing_eqn.append(NoEscape(r'\begin{aligned}Gauge~Distance~_{min} = 2.5 ~ d\\'))
min_spacing_eqn.append(NoEscape(r'= &2.5*' + d + r'&=' + min_spacing + r'\end{aligned}'))
return min_spacing_eqn
def cl_10_2_3_1_max_spacing(t, parameter='pitch'):
""" maximum spacing between two adjacent fasteners as per cl.10.2.3.1, IS 800:2007
Args:
t: thickness of the thinner plate (int)
Returns:
equation for the maximum spacing between two adjacent fasteners which is minimum of (32*t, 300mm)
"""
t = str(t)
max_spacing = min(32 * t, 300)
max_spacing = str(max_spacing)
max_spacing_eqn = Math(inline=True)
if parameter == 'pitch':
max_spacing_eqn.append(NoEscape(r'\begin{aligned}Pitch~Distance~_{max} = min~(32 ~ t, ~300~mm)\\'))
else:
max_spacing_eqn.append(NoEscape(r'\begin{aligned}Gauge~Distance~_{max} = min~(32 ~ t, ~300~mm)\\'))
max_spacing_eqn.append(NoEscape(r'= min (&32*' + t + r', 300~mm)&=' + max_spacing + r'\end{aligned}'))
return max_spacing_eqn
def cl_10_2_4_2_min_edge_end_dist(d, bolt_hole_type='Standard', edge_type='a - Sheared or hand flame cut', parameter='end_dist'):
"""Calculate minimum end and edge distance
Args:
d - Nominal diameter of fastener in mm (float)
bolt_hole_type - Either 'Standard', 'Over-sized', 'Short Slot' or 'Long Slot' (str)
edge_type - Either 'hand_flame_cut' or 'machine_flame_cut' (str)
parameter - edge or end distance required to return the specific equation (str)
Returns:
Equation for minimum end and edge distance from the centre of any hole to the nearest edge of a plate in mm (float)
Note:
Reference:
IS 800:2007, cl. 10.2.4.2
"""
d_0 = IS800_2007.cl_10_2_1_bolt_hole_size(d, bolt_hole_type)
if edge_type == 'a - Sheared or hand flame cut':
end_edge_multiplier = 1.7
else:
# TODO : bolt_hole_type == 'machine_flame_cut' is given in else
end_edge_multiplier = 1.5
min_end_edge_dist = end_edge_multiplier * d_0
d_0 = str(d_0)
end_edge_multiplier = str(end_edge_multiplier)
min_end_edge_dist = str(min_end_edge_dist)
end_edge_eqn = Math(inline=True)
if parameter == 'end_dist':
end_edge_eqn.append(NoEscape(r'\begin{aligned}End~Distance~_{min} = ' + end_edge_multiplier + '~d_0\\'))
else: # parameter == 'edge_dist'
end_edge_eqn.append(NoEscape(r'\begin{aligned}Edge~Distance~_{min} = ' + end_edge_multiplier + '~d_0\\'))
end_edge_eqn.append(NoEscape(r'\begin = ' + end_edge_multiplier + '~ ' + d_0 + '\\'))
end_edge_eqn.append(NoEscape(r'\begin = ' + min_end_edge_dist + ''))
return end_edge_eqn
def cl_10_2_4_3_max_edge_dist(plate_thicknesses, f_y, corrosive_influences=False, parameter='end_dist'):
"""Calculate maximum end and edge distance
Args:
plate_thicknesses - List of thicknesses in mm of outer plates (list or tuple)
f_y - Yield strength of plate material in MPa (float)
corrosive_influences - Whether the members are exposed to corrosive influences or not (Boolean)
Returns:
Maximum end and edge distance to the nearest line of fasteners from an edge of any un-stiffened part in mm (float)
Note:
Reference:
IS 800:2007, cl. 10.2.4.3
"""
t = min(plate_thicknesses)
epsilon = math.sqrt(250 / f_y)
if corrosive_influences is True:
max_end_edge_dist = 40.0 + 4 * t
else:
max_end_edge_dist = 12 * t * epsilon
t = str(t)
epsilon = str(epsilon)
max_end_edge_dist = str(max_end_edge_dist)
end_edge_eqn = Math(inline=True)
if corrosive_influences is False and parameter == 'end_dist':
end_edge_eqn.append(NoEscape(r'\begin{aligned}End~Distance~_{max} = 12~t~\epsilon~-when~members~are~not~exposed~to~corrosive~influences\\'))
end_edge_eqn.append(NoEscape(r'\begin = 12' + t + '~' + epsilon + '\\'))
else: # corrosive_influences is True and parameter is 'end_dist'
end_edge_eqn.append(NoEscape(r'\begin{aligned}End~Distance~_{max} = 40~mm~+~4~t~-when~members~are~exposed~to~corrosive~influences\\'))
end_edge_eqn.append(NoEscape(r'\begin = 40~mm~+~4~' + t + '\\'))
if corrosive_influences is False and parameter == 'edge_dist':
end_edge_eqn.append(NoEscape(r'\begin{aligned}Edge~Distance~_{max} = 12~t~\epsilon~-when~members~are~not~exposed~to~corrosive~influences\\'))
end_edge_eqn.append(NoEscape(r'\begin = 12' + t + '~' + epsilon + '\\'))
else: # corrosive_influences is True and parameter is 'edge_dist'
end_edge_eqn.append(NoEscape(r'\begin{aligned}Edge~Distance~_{max} = 40~mm~+~4~t~-when~members~are~exposed~to~corrosive~influences\\'))
end_edge_eqn.append(NoEscape(r'\begin = 40~mm~+~4~' + t + '\\'))
end_edge_eqn.append(NoEscape(r'\begin = ' + max_end_edge_dist + ''))
return end_edge_eqn
def max_pitch(t):#todo:done
"""
Calculate the maximum pitch distance
Args:
t: Thickness of thinner plate in mm (float)
Returns:
Max pitch in mm (float)
Note:
Reference:
IS 800:2007, cl. 10.2.3
"""
t1 = str(t[0])
t2 = str(t[0])
max_pitch_1 = 32*min(t)
max_pitch_2 = 300
max_pitch = min(max_pitch_1,max_pitch_2)
t = str(min(t))
max_pitch = str(max_pitch)
max_pitch_eqn = Math(inline=True)
max_pitch_eqn.append(NoEscape(r'\begin{aligned}p/g_{max}&=\min(32~t,~300~mm)\\'))
max_pitch_eqn.append(NoEscape(r'&=\min(32 *~' + t+ r',~ 300 ~mm)\\&='+max_pitch+r'\\'))
max_pitch_eqn.append(NoEscape(r'&t = min('+t1+','+t2+r'\\'))
max_pitch_eqn.append(NoEscape(r'[Ref.~IS~&800:2007,~Cl.~10.2.3]\end{aligned}'))
return max_pitch_eqn
def min_edge_end(d_0,edge_type):
if edge_type == 'a - Sheared or hand flame cut':
factor = 1.7
else:
factor = 1.5
min_edge_dist = round(factor * d_0,2)
min_edge_dist = str(min_edge_dist)
factor = str(factor)
d_0 = str(d_0)
min_end_edge_eqn = Math(inline=True)
min_end_edge_eqn.append(NoEscape(r'\begin{aligned}e/e`_{min} &=[1.5~or~ 1.7] * d_0\\'))
min_end_edge_eqn.append(NoEscape(r'&='+factor + r'*' + d_0+r'='+min_edge_dist+r' \end{aligned}'))
return min_end_edge_eqn
#TODO: consider using max_edge_end_new instead of this function in all modules
def max_edge_end(f_y,t):
epsilon = round(math.sqrt(250/f_y),2)
max_edge_dist = round(12*t*epsilon,2)
max_edge_dist = str(max_edge_dist)
t = str(t)
f_y = str(f_y)
max_end_edge_eqn = Math(inline=True)
max_end_edge_eqn.append(NoEscape(r'\begin{aligned}e/e`_{max} &= 12~ t~ \varepsilon&\\'))
max_end_edge_eqn.append(NoEscape(r'\varepsilon &= \sqrt{\frac{250}{f_y}}\\'))
max_end_edge_eqn.append(NoEscape(r'e/e`_{max}&=12 ~*'+ t + r'*\sqrt{\frac{250}{'+f_y+r'}}\\ &='+max_edge_dist+r'\\ \end{aligned}'))
return max_end_edge_eqn
def max_edge_end_new(t_fu_fy,corrosive_influences):
t_epsilon_considered = t_fu_fy[0][0] * math.sqrt(250 / float(t_fu_fy[0][2]))
t_considered = t_fu_fy[0][0]
t_min = t_considered
for i in t_fu_fy:
t = i[0]
f_y = i[2]
epsilon = math.sqrt(250 / f_y)
if t * epsilon <= t_epsilon_considered:
t_epsilon_considered = t * epsilon
t_considered = t
if t < t_min:
t_min = t
if corrosive_influences is True:
max_edge_dist = 40.0 + 4 * t_min
else:
max_edge_dist = 12 * t_epsilon_considered
max_edge_dist = str(max_edge_dist)
t1=str(t_fu_fy[0][0])
t2=str(t_fu_fy[1][0])
fy1 = str(t_fu_fy[0][2])
fy2 = str(t_fu_fy[1][2])
max_end_edge_eqn = Math(inline=True)
if corrosive_influences is False:
max_end_edge_eqn.append(NoEscape(r'\begin{aligned}e/e`_{max} &= 12~ t~ \varepsilon&\\'))
max_end_edge_eqn.append(NoEscape(r'\varepsilon &= \sqrt{\frac{250}{f_y}}\\'))
max_end_edge_eqn.append(NoEscape(r'e1 &= 12 ~*' + t1 + r'*\sqrt{\frac{250}{' + fy1 + r'}}\\'))
max_end_edge_eqn.append(NoEscape(r'e2 &= 12 ~*' + t2 + r'*\sqrt{\frac{250}{' + fy2 + r'}}\\'))
max_end_edge_eqn.append(NoEscape(r'e/e`_{max}&=min(e1,e2)\\'))
max_end_edge_eqn.append(NoEscape(r' &=' + max_edge_dist + r'\\ \end{aligned}'))
else:
max_end_edge_eqn.append(NoEscape(r'e/e`_{max}&=40 + 4*t \\'))
max_end_edge_eqn.append(NoEscape(r'Where, t&= min(' + t1 +', '+t2+r')\\'))
max_end_edge_eqn.append(NoEscape(r'e/e`_{max}&='+max_edge_dist+r' \end{aligned}'))
return max_end_edge_eqn
def bolt_shear_prov(f_ub,n_n,a_nb,gamma_mb,bolt_shear_capacity):
f_ub = str(f_ub)
n_n = str(n_n)
a_nb = str(a_nb)
gamma_mb= str(gamma_mb)
bolt_shear_capacity=str(bolt_shear_capacity)
bolt_shear_eqn = Math(inline=True)
bolt_shear_eqn.append(NoEscape(r'\begin{aligned}V_{dsb} &= \frac{f_{ub} ~n_n~ A_{nb}}{\sqrt{3} ~\gamma_{mb}}\\'))
bolt_shear_eqn.append(NoEscape(r'&= \frac{'+f_ub+'*'+n_n+'*'+a_nb+'}{\sqrt{3}~*~'+ gamma_mb+r'}\\'))
bolt_shear_eqn.append(NoEscape(r'&= '+bolt_shear_capacity+r'\end{aligned}'))
return bolt_shear_eqn
def bolt_bearing_prov(k_b,d,conn_plates_t_fu_fy,gamma_mb,bolt_bearing_capacity):
t_fu_prev = conn_plates_t_fu_fy[0][0] * conn_plates_t_fu_fy[0][1]
t = conn_plates_t_fu_fy[0][0]
f_u = conn_plates_t_fu_fy[0][1]
for i in conn_plates_t_fu_fy:
t_fu = i[0] * i[1]
if t_fu <= t_fu_prev:
t = i[0]
f_u = i[1]
k_b = str(k_b)
d = str(d)
t = str(t)
f_u= str(f_u)
gamma_mb=str(gamma_mb)
bolt_bearing_capacity = str(bolt_bearing_capacity)
bolt_bearing_eqn = Math(inline=True)
bolt_bearing_eqn.append(NoEscape(r'\begin{aligned}V_{dpb} &= \frac{2.5~ k_b~ d~ t~ f_u}{\gamma_{mb}}\\'))
bolt_bearing_eqn.append(NoEscape(r'&= \frac{2.5~*'+ k_b+'*'+ d+'*'+t+'*'+f_u+'}{'+gamma_mb+r'}\\'))
bolt_bearing_eqn.append(NoEscape(r'&='+bolt_bearing_capacity+r'\end{aligned}'))
return bolt_bearing_eqn
def bolt_capacity_prov(bolt_shear_capacity,bolt_bearing_capacity,bolt_capacity):
bolt_shear_capacity = str(bolt_shear_capacity)
bolt_bearing_capacity = str(bolt_bearing_capacity)
bolt_capacity = str(bolt_capacity)
bolt_capacity_eqn = Math(inline=True)
bolt_capacity_eqn.append(NoEscape(r'\begin{aligned}V_{db} &= min~ (V_{dsb}, V_{dpb})\\'))
bolt_capacity_eqn.append(NoEscape(r'&= min~ ('+bolt_shear_capacity+','+ bolt_bearing_capacity+r')\\'))
bolt_capacity_eqn.append(NoEscape(r'&='+ bolt_capacity+r'\end{aligned}'))
return bolt_capacity_eqn
def cl_10_3_5_bearing_bolt_tension_resistance(f_ub, f_yb, A_sb, A_n, safety_factor_parameter=KEY_DP_FAB_FIELD):
"""
Calculate design tensile strength of bearing bolt
Args:
f_ub - Ultimate tensile strength of the bolt in MPa (float)
f_yb - Yield strength of the bolt in MPa (float)
A_sb - Shank area of bolt in sq. mm (float)
A_n - Net tensile stress area of the bolts as per IS 1367 in sq. mm (float)
return:
T_db - Design tensile strength of bearing bolt in N (float)
Note:
Reference:
IS 800:2007, cl 10.3.5
"""
f_ub = str(f_ub)
f_yb = str(f_yb)
A_sb = str(A_sb)
A_n = str(A_n)
gamma_mb = IS800_2007.cl_5_4_1_Table_5['gamma_mb'][safety_factor_parameter]
gamma_m0 = IS800_2007.cl_5_4_1_Table_5['gamma_m0']['yielding']
tension_resistance = Math(inline=True)
tension_resistance.append(NoEscape(r'\begin{aligned} T_{db} = 0.90~f_{ub}~A_n < f_{yb}~A_{sb}~(\gamma_{mb}~/~\gamma_{m0}) \\'))
tension_resistance.append(NoEscape(r'\begin = 0.90~' + f_ub + '~ ' + A_n + '< ' + f_yb + '~ ' + A_sb + '~(' + gamma_mb + '~/~' + gamma_m0 + ''))
tension_resistance.append(NoEscape(r'\begin = 0.90~' + f_ub + '~ ' + A_n + ''))
return tension_resistance
def cl_10_3_6_bearing_bolt_combined_shear_and_tension(V_sb, V_db, T_b, T_db, value):
"""Check for bolt subjected to combined shear and tension
Args:
V_sb - factored shear force acting on the bolt,
V_db - design shear capacity,
T_b - factored tensile force acting on the bolt,
T_db - design tension capacity.
return: combined shear and friction value
Note:
Reference:
IS 800:2007, cl 10.3.6
"""
V_sb = str(V_sb)
V_db = str(V_db)
T_b = str(T_b)
T_db = str(T_db)
value = str(value)
combined_capacity_eqn = Math(inline=True)
combined_capacity_eqn.append(NoEscape(r'\begin{aligned}\bigg(\frac{V_{sb}}{V_{db}}\bigg)^2 + \bigg(\frac{T_{b}}{T_{db}}\bigg)^2 \leq 1.0\\'))
combined_capacity_eqn.append(NoEscape(r'\bigg(\frac{' + V_sb + '}{' + V_db + '}\bigg)^2 + \bigg(\frac{' + T_b + '}{' + T_db + '}\bigg)^2 = '
+ value + ''))
return combined_capacity_eqn
def HSFG_bolt_capacity_prov(mu_f,n_e,K_h,fub,Anb,gamma_mf,capacity):
mu_f = str(mu_f)
n_e = str(n_e)
K_h = str(K_h)
fub = str(fub)
Anb = str(Anb)
gamma_mf = str(gamma_mf)
capacity = str(capacity)
HSFG_bolt_capacity_eqn = Math(inline=True)
HSFG_bolt_capacity_eqn.append(NoEscape(r'\begin{aligned}V_{dsf} & = \frac{\mu_f~ n_e~ K_h~ F_o}{\gamma_{mf}}\\'))
HSFG_bolt_capacity_eqn.append(NoEscape(r'& Where, F_o = 0.7 * f_{ub} A_{nb}\\'))
HSFG_bolt_capacity_eqn.append(NoEscape(r'V_{dsf} & = \frac{'+ mu_f + '*' + n_e + '*' + K_h +'* 0.7 *' +fub+'*'+Anb +r'}{'+gamma_mf+r'}\\'))
HSFG_bolt_capacity_eqn.append(NoEscape(r'& ='+capacity+r'\end{aligned}'))
return HSFG_bolt_capacity_eqn
def get_trial_bolts(V_u, A_u,bolt_capacity,multiple=1,conn=None):
res_force = math.sqrt(V_u**2+ A_u**2)
trial_bolts = multiple * math.ceil(res_force/bolt_capacity)
V_u=str(V_u)
A_u=str(A_u)
bolt_capacity=str(bolt_capacity)
trial_bolts=str(trial_bolts)
trial_bolts_eqn = Math(inline=True)
trial_bolts_eqn.append(NoEscape(r'\begin{aligned}R_{u} &= \sqrt{V_u^2+A_u^2}\\'))
trial_bolts_eqn.append(NoEscape(r'n_{trial} &= R_u/ V_{bolt}\\'))
if conn == "flange_web":
trial_bolts_eqn.append(NoEscape(r'R_{u} &= \frac{2*\sqrt{' + V_u + r'^2+' + A_u + r'^2}}{' + bolt_capacity + r'}\\'))
else:
trial_bolts_eqn.append(NoEscape(r'R_{u} &= \frac{\sqrt{'+V_u+r'^2+'+A_u+r'^2}}{'+bolt_capacity+ r'}\\'))
trial_bolts_eqn.append(NoEscape(r'&='+trial_bolts+ r'\end{aligned}'))
return trial_bolts_eqn
def parameter_req_bolt_force(bolts_one_line,gauge,ymax,xmax,bolt_line,pitch,length_avail, conn=None):
"""
bolts_one_line =n_r
bolt_line = n_c
for column splice
bolts_one_line =n_c
bolt_line = n_r
"""
bolts_one_line = str(bolts_one_line)
ymax = str(ymax)
xmax = str(xmax)
gauge = str(gauge)
pitch = str(pitch)
bolt_line = str(bolt_line)
length_avail = str(length_avail)
parameter_req_bolt_force_eqn = Math(inline=True)
parameter_req_bolt_force_eqn.append(NoEscape(r'\begin{aligned} l_n~~~ &= length~available \\'))
if conn == 'fin':
parameter_req_bolt_force_eqn.append(NoEscape(r' l_n~~~ &= p * (n_r - 1)\\'))
elif conn == 'beam_beam':
parameter_req_bolt_force_eqn.append(NoEscape(r' l_n~~~ &= g * (n_r - 1)\\'))
elif conn== 'col_col':
parameter_req_bolt_force_eqn.append(NoEscape(r' l_n~~~ &= g * (n_c - 1)\\'))
parameter_req_bolt_force_eqn.append(NoEscape(r' &= '+gauge+r' * (' + bolts_one_line + r' - 1)\\'))
parameter_req_bolt_force_eqn.append(NoEscape(r' & ='+length_avail+ r'\\'))
parameter_req_bolt_force_eqn.append(NoEscape(r' y_{max} &= l_n / 2\\'))
parameter_req_bolt_force_eqn.append(NoEscape(r' &= '+length_avail+ r' / 2 \\'))
parameter_req_bolt_force_eqn.append(NoEscape(r' & =' + ymax + r'\\'))
if conn == 'fin':
parameter_req_bolt_force_eqn.append(NoEscape(r'x_{max} &= g * (n_c - 1)/2 \\'))
parameter_req_bolt_force_eqn.append(NoEscape(r' &= '+pitch+r' * (\frac{'+bolt_line+ r'}{2} - 1) / 2 \\'))
elif conn == 'col_col':
parameter_req_bolt_force_eqn.append(NoEscape(r'x_{max} &= p * (\frac{n_r}{2} - 1) / 2 \\'))
parameter_req_bolt_force_eqn.append(NoEscape(r' &= ' + pitch + r' * (\frac{' + bolt_line + r'}{2} - 1) / 2 \\'))
else:
parameter_req_bolt_force_eqn.append(NoEscape(r'x_{max} &= p * (\frac{n_c}{2} - 1) / 2 \\'))
parameter_req_bolt_force_eqn.append(NoEscape(r' &= ' + pitch + r' * (\frac{' + bolt_line + r'}{2} - 1) / 2 \\'))
parameter_req_bolt_force_eqn.append(NoEscape(r' & =' + xmax + r'\end{aligned}'))
return parameter_req_bolt_force_eqn
def moment_demand_req_bolt_force(shear_load, web_moment,moment_demand,ecc):
ecc = str(ecc)
web_moment = str(web_moment)
moment_demand = str(moment_demand)
shear_load = str(shear_load)
loads_req_bolt_force_eqn = Math(inline=True)
loads_req_bolt_force_eqn.append(NoEscape(r'\begin{aligned} M_d &= (V_u * ecc + M_w)\\'))
loads_req_bolt_force_eqn.append(NoEscape(r' &= \frac{('+shear_load+' * 10^3 *'+ecc+' + '+web_moment+r'*10^6)}{10^6}\\'))
loads_req_bolt_force_eqn.append(NoEscape(r' & =' + moment_demand + r'\end{aligned}'))
return loads_req_bolt_force_eqn
def design_capacity_of_end_plate(M_dp,b_eff,f_y,gamma_m0,t_p):
M_dp= str(M_dp)
t_p = str(t_p)
b_eff= str(b_eff)
f_y= str(f_y)
gamma_m0= str(gamma_m0)
design_capacity_of_end_plate= Math(inline=True)
design_capacity_of_end_plate.append(NoEscape(r'\begin{aligned} M_{dp} & = { \frac{ b_{eff} *t_p^2 *f_y}{ 4*\gamma_{m0}}}\\'))
design_capacity_of_end_plate.append(NoEscape(r'&={\frac{' + b_eff +r'*'+t_p+r'^2'+' *'+f_y + r'}{4*'+gamma_m0 + r'}}\\'))
design_capacity_of_end_plate.append(NoEscape(r'&=' +M_dp + r'\end{aligned}'))
return design_capacity_of_end_plate
def Vres_bolts(bolts_one_line,ymax,xmax,bolt_line,axial_load
,moment_demand,r,vbv,tmv,tmh,abh,vres,shear_load,conn=None): #vres bolt web
"""
bolts_one_line =n_r
bolt_line = n_c
for column_column splice connection
bolts_one_line =n_c
bolt_line = n_r
"""
bolts_one_line =str(bolts_one_line)
ymax =str(ymax)
xmax =str(xmax)
bolt_line = str(bolt_line)
r = str(r)
moment_demand = str(moment_demand)
axial_load =str(axial_load)
shear_load = str(shear_load)
vbv =str(vbv)
tmv =str(tmv)
tmh =str(tmh)
abh =str(abh)
vres = str(vres)
Vres_bolts_eqn = Math(inline=True)
if conn == "beam_beam":
Vres_bolts_eqn.append(NoEscape(r'\begin{aligned} vbv~~ &= V_u / (n_r * (n_c/2))\\'))
Vres_bolts_eqn.append(NoEscape(r' &= \frac{'+shear_load+ '}{ ('+bolts_one_line +'*('+ bolt_line+r'/2))}\\'))
elif conn == "col_col":
Vres_bolts_eqn.append(NoEscape(r'\begin{aligned} vbv~~ &= V_u / ((n_r/2) * n_c)\\'))
Vres_bolts_eqn.append(NoEscape(r' &= \frac{' + shear_load + '}{ (' + bolts_one_line + '*(' + bolt_line + r'/2))}\\'))
else:
Vres_bolts_eqn.append(NoEscape(r'\begin{aligned} vbv~~ &= V_u / (n_r * n_c)\\'))
Vres_bolts_eqn.append(NoEscape(r' &= \frac{' + shear_load + '}{ (' + bolts_one_line + '*' + bolt_line + r')}\\'))
Vres_bolts_eqn.append(NoEscape(r' & =' + vbv + r'\\'))
Vres_bolts_eqn.append(NoEscape(r'tmh~ &= \frac{M_d * y_{max} }{ \Sigma r_i^2} \\'))
Vres_bolts_eqn.append(NoEscape(r' &= \frac{'+moment_demand+' *'+ ymax+'}{'+r+r'}\\'))
Vres_bolts_eqn.append(NoEscape(r' & =' + tmh + r'\\'))
Vres_bolts_eqn.append(NoEscape(r' tmv ~&= \frac{M_d * x_{max}}{\Sigma r_i^2}\\'))
Vres_bolts_eqn.append(NoEscape(r'&= \frac{' +moment_demand+' * '+xmax+'}{'+r+ r'}\\'))
Vres_bolts_eqn.append(NoEscape(r' & =' + tmv + r'\\'))
if conn == "beam_beam":
Vres_bolts_eqn.append(NoEscape(r' abh~ & = \frac{A_u }{(n_r * n_c/2)}\\'))
Vres_bolts_eqn.append(NoEscape(r' & =\frac{' + axial_load + '}{ (' + bolts_one_line + ' *(' + bolt_line + r'/2))}\\'))
elif conn == "col_col":
Vres_bolts_eqn.append(NoEscape(r' abh~ & = \frac{A_u }{((n_r/2) * n_c)}\\'))
Vres_bolts_eqn.append(NoEscape(r' & =\frac{' + axial_load + '}{ (' + bolts_one_line + ' *(' + bolt_line + r'/2))}\\'))
else:
Vres_bolts_eqn.append(NoEscape(r' abh~ & = \frac{A_u }{(n_r * n_c)}\\'))
Vres_bolts_eqn.append(NoEscape(r' & =\frac{' + axial_load + '}{ (' + bolts_one_line + ' *' + bolt_line + r')}\\'))
Vres_bolts_eqn.append(NoEscape(r' & =' + abh + r'\\'))
Vres_bolts_eqn.append(NoEscape(r' vres &=\sqrt{(vbv +tmv) ^ 2 + (tmh+abh) ^ 2}\\'))
# Vres_bolts_eqn.append(NoEscape(r' vres &= \sqrt((vbv + tmv) ^ 2 + (tmh + abh) ^ 2)\\'))
Vres_bolts_eqn.append(NoEscape(r' &= \sqrt{('+vbv+' +'+ tmv+') ^2 + ('+tmh +'+'+ abh+r') ^ 2}\\'))
Vres_bolts_eqn.append(NoEscape(r' & =' + vres + r'\end{aligned}'))
return Vres_bolts_eqn
def forces_in_web(Au,T,A,t,D,Zw,Mu,Z,Mw,Aw):
Au = str(Au)
T = str(T)
A = str(A)
t = str(t)
D = str(D)
Zw = str(Zw)
Mu = str(Mu)
Z = str(Z)
Mw = str(Mw)
Aw = str(Aw)
forcesinweb_eqn = Math(inline=True)
forcesinweb_eqn.append(NoEscape(r'\begin{aligned}A_w &= Axial~ force~ in~ web \\'))
forcesinweb_eqn.append(NoEscape(r' &= \frac{(D- 2*T)*t* Au }{A} \\'))
forcesinweb_eqn.append(NoEscape(r'&= \frac{(' + D + '- 2*' + T + ')*' + t + '*' + Au + ' }{' + A + r'} \\'))
forcesinweb_eqn.append(NoEscape(r'&=' + Aw + r'~ kN\\'))
forcesinweb_eqn.append(NoEscape( r'M_w &= Moment ~in ~web \\'))
forcesinweb_eqn.append(NoEscape(r' &= \frac{Z_w * Mu}{Z} \\'))
forcesinweb_eqn.append(NoEscape(r'&= \frac{' + Zw + ' * ' + Mu + '}{' + Z + r'} \\'))
forcesinweb_eqn.append(NoEscape(r'&=' + Mw + r'~{kNm}\end{aligned}'))
return forcesinweb_eqn
def forces_in_flange(Au, B,T,A,D,Mu,Mw,Mf,Af,ff):
Au =str(Au)
B=str(B)
T=str(T)
A=str(A)
D=str(D)
Mu=str(Mu)
Mw=str(Mw)
Mf=str(Mf)
Af=str(Af)
ff = str(ff)
forcesinflange_eqn= Math(inline=True)
forcesinflange_eqn.append(NoEscape(r'\begin{aligned} A_f&= Axial~force~ in ~flange \\'))
forcesinflange_eqn.append(NoEscape(r'&= \frac{Au * B *T}{A} \\'))
forcesinflange_eqn.append(NoEscape(r'&= \frac{' + Au + ' * ' + B + '*' + T + '}{' + A + r'} \\'))
forcesinflange_eqn.append(NoEscape(r'&=' + Af + r'~ kN\\'))
forcesinflange_eqn.append(NoEscape(r'M_f& =Moment~ in~ flange \\'))
forcesinflange_eqn.append(NoEscape(r' & = Mu-M_w\\'))
forcesinflange_eqn.append(NoEscape(r'&= ' + Mu + '-' + Mw + r'\\'))
forcesinflange_eqn.append(NoEscape(r'&=' + Mf + r'~{kNm}\\'))
forcesinflange_eqn.append(NoEscape(r' F_f& =flange~force \\'))
forcesinflange_eqn.append(NoEscape(r'& = \frac{M_f *10^3}{D-T} + A_f \\'))
forcesinflange_eqn.append(NoEscape(r'&= \frac{' + Mf + '* 10^3}{' + D + '-' + T + '} +' + Af + r' \\'))
forcesinflange_eqn.append(NoEscape(r'&=' + ff + r'~kN \end{aligned}'))
return forcesinflange_eqn
def min_plate_ht_req(beam_depth,min_plate_ht):
beam_depth = str(beam_depth)
min_plate_ht = str(round(min_plate_ht,2))
min_plate_ht_eqn = Math(inline=True)
min_plate_ht_eqn.append(NoEscape(r'\begin{aligned}0.6 * d_b&= 0.6 * '+ beam_depth + r'='+min_plate_ht+r'\end{aligned}'))
return min_plate_ht_eqn
def min_flange_plate_ht_req(beam_width,min_flange_plate_ht):## when only outside plate is considered
beam_width = str(beam_width)
min_flange_plate_ht = str(min_flange_plate_ht)
min_flange_plate_ht_eqn = Math(inline=True)
min_flange_plate_ht_eqn.append(NoEscape(r'\begin{aligned}min~flange~plate~ht &= beam~width\\'))
min_flange_plate_ht_eqn.append(NoEscape(r'&='+min_flange_plate_ht+r'\end{aligned}'))
return min_flange_plate_ht_eqn
def min_inner_flange_plate_ht_req(beam_width, web_thickness,root_radius,min_inner_flange_plate_ht): ## when inside and outside plate is considered #todo
beam_width = str(beam_width) ### same function used for max height
min_inner_flange_plate_ht = str(min_inner_flange_plate_ht)
web_thickness=str(web_thickness)
root_radius=str(root_radius)
min_inner_flange_plate_ht_eqn = Math(inline=True)
min_inner_flange_plate_ht_eqn.append(NoEscape(r'\begin{aligned}&= \frac{B -t- (2*R1)}{2}\\'))
min_inner_flange_plate_ht_eqn.append(NoEscape(r'&=\frac{'+beam_width+ r' -' +web_thickness+ r' - 2*'+ root_radius+r'}{2}\\'))
min_inner_flange_plate_ht_eqn.append(NoEscape(r'&='+min_inner_flange_plate_ht+r'\end{aligned}'))
return min_inner_flange_plate_ht_eqn
def max_plate_ht_req(connectivity,beam_depth, beam_f_t, beam_r_r, notch, max_plate_h):
beam_depth = str(beam_depth)
beam_f_t = str(beam_f_t)
beam_r_r = str(beam_r_r)
max_plate_h = str(max_plate_h)
notch = str(notch)
max_plate_ht_eqn = Math(inline=True)
if connectivity in VALUES_CONN_1:
max_plate_ht_eqn.append(NoEscape(r'\begin{aligned} &d_b - 2 (t_{bf} + r_{b1} + gap)\\'))
max_plate_ht_eqn.append(NoEscape(r'&='+beam_depth+ '- 2* (' + beam_f_t + '+' + beam_r_r +r'+ 10)\\'))
else:
max_plate_ht_eqn.append(NoEscape(r'\begin{aligned} &d_b - t_{bf} + r_{b1} - notch_h\\'))
max_plate_ht_eqn.append(NoEscape(r'&=' + beam_depth + '-' + beam_f_t + '+' + beam_r_r + '-'+ notch+ r'\\'))
max_plate_ht_eqn.append(NoEscape(r'&=' + max_plate_h + '\end{aligned}'))
return max_plate_ht_eqn
def disp_clause(disp,clause):
disp_clause_eqn = Math(inline=True)
disp_clause_eqn.append(NoEscape(r'\begin{aligned}&'+ disp+r'\\'))
disp_clause_eqn.append(NoEscape(r'&'+clause+r'\end{aligned}'))
return disp_clause_eqn
def end_plate_ht_req(D,e,h_p):
D = str(D)
h_p = str(h_p)
e = str(e)
end_plate_ht_eqn = Math(inline=True)
end_plate_ht_eqn.append(NoEscape(r'\begin{aligned} &D + 4*e \\'))
end_plate_ht_eqn.append(NoEscape(r'&=' + D + '+' + ' 4*' + e + r'\\'))
end_plate_ht_eqn.append(NoEscape(r'&=' + h_p + '\end{aligned}'))
return end_plate_ht_eqn
def end_plate_thk_req(M_ep,b_eff,f_y,gamma_m0,t_p):
M_ep= str(M_ep)
t_p = str(t_p)
b_eff= str(b_eff)
f_y= str(f_y)
gamma_m0= str(gamma_m0)
end_plate_thk_eqn = Math(inline=True)
end_plate_thk_eqn.append(NoEscape(r'\begin{aligned} t_p &= {\sqrt{\frac{ M_{ep}* 4*\gamma_{m0}}{ b_{eff}*f_y}}}\\'))
end_plate_thk_eqn.append(NoEscape(r'&={\sqrt{\frac{' + M_ep + '*4'+'*' +gamma_m0 + r'}{'+b_eff+ r'*' + f_y + r' }}}\\'))
end_plate_thk_eqn.append(NoEscape(r'&=' + t_p + '\end{aligned}'))
return end_plate_thk_eqn
def moment_acting_on_end_plate(M_ep,b_eff,f_y,gamma_m0,t_p):
M_ep= str(M_ep)
t_p = str(t_p)
b_eff= str(b_eff)
f_y= str(f_y)
gamma_m0= str(gamma_m0)
moment_acting_on_end_plate= Math(inline=True)
moment_acting_on_end_plate.append(NoEscape(r'\begin{aligned} M_{ep}&= {\frac{b_{eff} *t_p^2 *f_y}{ 4*\gamma_{m0}}}\\'))
moment_acting_on_end_plate.append(NoEscape(r'&={\frac{' + b_eff +'*'+t_p+'^2'+' *'+f_y + '}{4*'+gamma_m0 + r'}}\\'))
moment_acting_on_end_plate.append(NoEscape(r'&=' +M_ep + '\end{aligned}'))
return moment_acting_on_end_plate
def min_plate_length_req(min_pitch, min_end_dist,bolt_line,min_length):
min_pitch = str(min_pitch)
min_end_dist = str(min_end_dist)
bolt_line = str(bolt_line)
min_length = str(min_length)
min_plate_length_eqn = Math(inline=True)
min_plate_length_eqn.append(NoEscape(r'\begin{aligned} &2*e_{min} + (n~c-1) * p_{min})\\'))
min_plate_length_eqn.append(NoEscape(r'&=2*' + min_end_dist + '+(' + bolt_line + '-1) * ' + min_pitch + r'\\'))
min_plate_length_eqn.append(NoEscape(r'&=' + min_length + '\end{aligned}'))
return min_plate_length_eqn
def min_flange_plate_length_req(min_pitch, min_end_dist,bolt_line,min_length,gap,sec =None):
min_pitch = str(min_pitch)
min_end_dist = str(min_end_dist)
bolt_line = str(bolt_line)
min_length = str(min_length)
gap = str(gap)
min_flange_plate_length_eqn = Math(inline=True)
if sec =="column":
min_flange_plate_length_eqn.append(NoEscape(r'\begin{aligned} & 2[2*e_{min} + ({\frac{n_r}{2}}-1) * p_{min})]\\'))
min_flange_plate_length_eqn.append(NoEscape(r'& +\frac{gap}{2}]\\'))
min_flange_plate_length_eqn.append(NoEscape(r'&=2*[(2*' + min_end_dist +r' + (\frac{'+bolt_line+r'}{2}' + r'-1) * ' + min_pitch + r'\\'))
min_flange_plate_length_eqn.append(NoEscape(r'&= + \frac{'+gap+r'}{2}]\\'))
min_flange_plate_length_eqn.append(NoEscape(r'&=' + min_length + '\end{aligned}'))
else:
min_flange_plate_length_eqn.append(NoEscape(r'\begin{aligned} & 2[2*e_{min} + ({\frac{n_c}{2}}-1) * p_{min})]\\'))
min_flange_plate_length_eqn.append(NoEscape(r'& +\frac{gap}{2}]\\'))
min_flange_plate_length_eqn.append(NoEscape(r'&=2*[(2*' + min_end_dist + r' + (\frac{' + bolt_line + r'}{2}' + r'-1) * ' + min_pitch + r'\\'))
min_flange_plate_length_eqn.append(NoEscape(r'&= + \frac{' + gap + r'}{2}]\\'))
min_flange_plate_length_eqn.append(NoEscape(r'&=' + min_length + '\end{aligned}'))
return min_flange_plate_length_eqn
def min_plate_thk_req(t_w):
t_w = str(t_w)
min_plate_thk_eqn = Math(inline=True)
min_plate_thk_eqn.append(NoEscape(r'\begin{aligned} t_w='+t_w+'\end{aligned}'))
return min_plate_thk_eqn
def shear_yield_prov(h,t, f_y, gamma, V_dg,multiple=1):
h = str(h)
t = str(t)
f_y = str(f_y)
gamma = str(gamma)
V_dg = str(V_dg)
multiple = str(multiple)
shear_yield_eqn = Math(inline=True)
shear_yield_eqn.append(NoEscape(r'\begin{aligned} V_{dy} &= \frac{A_v*f_y}{\sqrt{3}*\gamma_{mo}}\\'))
shear_yield_eqn.append(NoEscape(r'&=\frac{'+multiple+'*'+h+'*'+t+'*'+f_y+'}{\sqrt{3}*'+gamma+r'}\\'))
shear_yield_eqn.append(NoEscape(r'&=' + V_dg + '\end{aligned}'))
return shear_yield_eqn
def shear_rupture_prov(h, t, n_r, d_o, fu,v_dn,multiple =1):
h = str(h)
t = str(t)
n_r = str(n_r)
d_o = str(d_o)
f_u = str(fu)
v_dn = str(v_dn)
multiple = str(multiple)
shear_rup_eqn = Math(inline=True)
shear_rup_eqn.append(NoEscape(r'\begin{aligned} V_{dn} &= \frac{0.75*A_{vn}*f_u}{\sqrt{3}*\gamma_{mo}}\\'))
shear_rup_eqn.append(NoEscape(r'&='+multiple+ r'*('+h+'-('+n_r+'*'+d_o+'))*'+t+'*'+f_u+r'\\'))
shear_rup_eqn.append(NoEscape(r'&=' + v_dn + '\end{aligned}'))
return shear_rup_eqn
def vres_cap_bolt_check(V_u, A_u,bolt_capacity,bolt_req,multiple=1,conn=None):
res_force = math.sqrt(V_u**2+ A_u**2)
trial_bolts = multiple * math.ceil(res_force/bolt_req)
V_u=str(V_u)
A_u=str(A_u)
bolt_req =str(bolt_req)
bolt_capacity=str(bolt_capacity)
trial_bolts=str(trial_bolts)
trial_bolts_eqn = Math(inline=True)
trial_bolts_eqn.append(NoEscape(r'\begin{aligned}R_{u} &= 2* \sqrt{V_u^2+A_u^2}\\'))
trial_bolts_eqn.append(NoEscape(r' V_{res} &= R_u/ bolt_{req}\\'))
if conn == "flange_web":
trial_bolts_eqn.append(NoEscape(r' &= \frac{2*\sqrt{' + V_u + r'^2+' + A_u + r'^2}}{' + bolt_req + r'}\\'))
else:
trial_bolts_eqn.append(NoEscape(r' &= \frac{\sqrt{'+V_u+r'^2+'+A_u+r'^2}}{'+bolt_req+ r'}\\'))
trial_bolts_eqn.append(NoEscape(r'&='+bolt_capacity+ r'\end{aligned}'))
return trial_bolts_eqn
def section_classification(class_of_section=None):
"""
Find class of the section
Args:
class_of_section:
Returns:
Note:
Reference:
[Ref: Table 2, cl. 3.7.2 and 3.7.4 IS 800:2007]
"""
section_classification_eqn = Math(inline=True)
if class_of_section == int(1):
section_classification_eqn.append(NoEscape( r'\begin{aligned} &Plastic \end{aligned}'))
section_classification_eqn.append(NoEscape(r' &[Ref: Table 2, cl. 3.7.2 and 3.7.4 IS 800:2007]\end{aligned}'))
elif class_of_section == int(2):
section_classification_eqn.append(NoEscape( r'\begin{aligned} &Compact \end{aligned}'))
section_classification_eqn.append(NoEscape(r' &[Ref: Table 2, cl. 3.7.2 and 3.7.4 IS 800:2007]\end{aligned}'))
else:
section_classification_eqn.append(NoEscape( r'\begin{aligned} &Semi-Compact \end{aligned}'))
section_classification_eqn.append(NoEscape(r' &[Ref: Table 2, cl. 3.7.2 and 3.7.4 IS 800:2007]\end{aligned}'))
return section_classification_eqn
# def shear_Rupture_prov_weld(h, t, fu,v_dn,gamma_mo): #weld
# h = str(h)
# t = str(t)
# gamma_mo = str(gamma_mo)
# f_u = str(fu)
# v_dn = str(v_dn)
#
# shear_rup_eqn = Math(inline=True)
# shear_rup_eqn.append(NoEscape(r'\begin{aligned} V_{dn} &= \frac{0.9*A_{vn}*f_u}{\sqrt{3}*\gamma_{mo}}\\'))
# shear_rup_eqn.append(NoEscape(r'&=(0.9*'+h+'*'+t+'*'+f_u+'}{\sqrt{3}*' +gamma_mo+ r'}\\'))
# shear_rup_eqn.append(NoEscape(r'&=' + v_dn + '\end{aligned}'))
# return shear_rup_eqn
# def shear_rupture_prov_beam(h, t, n_r, d_o, fu,v_dn):
# h = str(h)
# t = str(t)
# n_r = str(n_r)
# d_o = str(d_o)
# f_u = str(fu)
# v_dn = str(v_dn)
# shear_rup_eqn = Math(inline=True)
# shear_rup_eqn.append(NoEscape(r'\begin{aligned} V_{dn} &= \frac{0.9*A_{vn}*f_u}{\sqrt{3}*\gamma_{mo}}\\'))
# shear_rup_eqn.append(NoEscape(r'&= 0.9 *(' + h + '-(' + n_r + '*' + d_o + '))*' + t + '*' + f_u + r'\\'))
# shear_rup_eqn.append(NoEscape(r'&=' + v_dn + '\end{aligned}'))
# return shear_rup_eqn
# def shear_capacity_prov(V_dy, V_dn, V_db):
# V_d = min(V_dy,V_dn,V_db)
# V_d = str(V_d)
# V_dy = str(V_dy)
# V_dn = str(V_dn)
# V_db = str(V_db)
# shear_capacity_eqn = Math(inline=True)
# shear_capacity_eqn.append(NoEscape(r'\begin{aligned} V_d &= Min(V_{dy},V_{dn},V_{db})\\'))
# shear_capacity_eqn.append(NoEscape(r'&= Min('+V_dy+','+V_dn+','+V_db+r')\\'))
# shear_capacity_eqn.append(NoEscape(r'&='+V_d + '\end{aligned}'))
# return shear_capacity_eqn
# def shear_Rupture_prov(h, t, fu,v_dn): #weld
# h = str(h)
# t = str(t)
#
# f_u = str(fu)
# v_dn = str(v_dn)
#
# shear_rup_eqn = Math(inline=True)
# shear_rup_eqn.append(NoEscape(r'\begin{aligned} V_{dn} &= \frac{0.9*A_{vn}*f_u}{\sqrt{3}*\gamma_{mo}}\\'))
# shear_rup_eqn.append(NoEscape(r'&=(0.9*'+h+'*'+t+'*'+f_u+r'\\'))
# shear_rup_eqn.append(NoEscape(r'&=' + v_dn + '\end{aligned}'))
# return shear_rup_eqn
def tension_yield_prov(l,t, f_y, gamma, T_dg):
l = str(l)
t = str(t)
f_y = str(f_y)
gamma = str(gamma)
T_dg = str(T_dg)
tension_yield_eqn = Math(inline=True)
tension_yield_eqn.append(NoEscape(r'\begin{aligned} T_{dg} &= \frac{Depth*t_p*f_y}{\gamma_{mo}}\\'))
tension_yield_eqn.append(NoEscape(r'&=\frac{'+l+'*'+t+'*'+f_y+'}{'+gamma+r'}\\'))
tension_yield_eqn.append(NoEscape(r'&=' + T_dg + '\end{aligned}'))
return tension_yield_eqn
def height_of_flange_cover_plate(B,sp,b_fp): #weld
B = str(B)
sp = str(sp)
b_fp = str (b_fp)
height_for_flange_cover_plate_eqn =Math(inline=True)
height_for_flange_cover_plate_eqn.append(NoEscape(r'\begin{aligned} B_{fp} &= {B - 2*sp} \\'))
height_for_flange_cover_plate_eqn.append(NoEscape(r'&= {' + B + ' - 2 * ' + sp + r'} \\'))
height_for_flange_cover_plate_eqn.append(NoEscape(r'&=' + b_fp + '\end{aligned}'))
return height_for_flange_cover_plate_eqn
def height_of_web_cover_plate(D,sp,b_wp,T,R_1): #weld
D = str(D)
sp = str(sp)
b_wp = str (b_wp)
R_1 = str(R_1)
T= str(T)
height_for_web_cover_plate_eqn =Math(inline=True)
height_for_web_cover_plate_eqn.append(NoEscape(r'\begin{aligned} W_{wp} &= {D-2*T -(2 * R1)- 2*sp} \\'))
height_for_web_cover_plate_eqn.append(NoEscape(r'&= {' + D + ' - 2 * ' +T+'- (2 *'+ R_1+')- 2 *'+ sp + r'} \\'))
height_for_web_cover_plate_eqn.append(NoEscape(r'&=' + b_wp + '\end{aligned}'))
return height_for_web_cover_plate_eqn
def inner_plate_height_weld(B,sp,t,r_1, b_ifp):#weld
B = str(B)
sp = str(sp)
t = str (t)
r_1 = str(r_1)
b_ifp = str(b_ifp)
inner_plate_height_weld_eqn =Math(inline=True)
inner_plate_height_weld_eqn.append(NoEscape(r'\begin{aligned} B_{ifp} &= \frac{B - 4*sp - t- 2*R1}{2} \\'))
inner_plate_height_weld_eqn.append(NoEscape(r'&= \frac{'+B +'- 4*'+sp+'-' +t+ '- 2*'+r_1+r'} {2} \\'))
inner_plate_height_weld_eqn.append(NoEscape(r'&=' + b_ifp + '\end{aligned}'))
return inner_plate_height_weld_eqn
def plate_Length_req(l_w,t_w,g,l_fp,conn =None): #weld
l_w = str(l_w)
t_w = str (t_w)
g = str (g)
l_fp = str(l_fp)
min_plate_Length_eqn = Math(inline=True)
if conn =="Flange":
min_plate_Length_eqn.append(NoEscape(r'\begin{aligned} L_{fp} & = [2*(l_{w} + 2*t_w) + g]\\'))
min_plate_Length_eqn.append(NoEscape(r'&= [2*('+ l_w +'+2*'+t_w+') +' + g+ r']\\'))
min_plate_Length_eqn.append(NoEscape(r'&=' + l_fp + '\end{aligned}'))
else:
min_plate_Length_eqn.append(NoEscape(r'\begin{aligned} L_{wp} & = [2*(l_{w} + 2*t_w) + g]\\'))
min_plate_Length_eqn.append(NoEscape(r'&= [2*(' + l_w + '+2*' + t_w + ') +' + g + r']\\'))
min_plate_Length_eqn.append(NoEscape(r'&=' + l_fp + '\end{aligned}'))
return min_plate_Length_eqn
def flange_weld_stress(F_f,l_eff,F_ws):
l_eff = str(l_eff)
F_ws = str(F_ws)
F_f =str(F_f)
flange_weld_stress_eqn = Math(inline=True)
flange_weld_stress_eqn.append(NoEscape(r'\begin{aligned} Stress &= \frac{F_f*1000}{l_{eff}}}\\'))
flange_weld_stress_eqn.append(NoEscape(r' &= \frac{' + F_f + '*1000}{' + l_eff + r'}\\'))
flange_weld_stress_eqn.append(NoEscape(r'&= ' + F_ws + r'\end{aligned}'))
return flange_weld_stress_eqn
def tension_yield_prov(l,t, f_y, gamma, T_dg,multiple =1):
l = str(l)
t = str(t)
f_y = str(f_y)
gamma = str(gamma)
multiple = str(multiple)
T_dg = str(T_dg)
tension_yield_eqn = Math(inline=True)
tension_yield_eqn.append(NoEscape(r'\begin{aligned} T_{dg} &= \frac{l*t*f_y}{\gamma_{mo}}\\'))
tension_yield_eqn.append(NoEscape(r'&=\frac{'+multiple+'*'+l+'*'+t+'*'+f_y+'}{'+gamma+r'}\\'))
tension_yield_eqn.append(NoEscape(r'&=' + T_dg + '\end{aligned}'))
return tension_yield_eqn
def tension_rupture_bolted_prov(w_p, t_p, n_c, d_o, fu,gamma_m1,T_dn,multiple=1):
w_p = str(w_p)
t_p = str(t_p)
n_c = str(n_c)
d_o = str(d_o)
f_u = str(fu)
T_dn = str(T_dn)
gamma_m1 = str(gamma_m1)
multiple = str(multiple)
Tensile_rup_eqnb = Math(inline=True)
Tensile_rup_eqnb.append(NoEscape(r'\begin{aligned} T_{dn} &= \frac{0.9*A_{n}*f_u}{\gamma_{m1}}\\'))
Tensile_rup_eqnb.append(NoEscape(r'&=\frac{'+multiple+'*0.9* ('+ w_p + '-' + n_c +'*'+ d_o + ')*' + t_p + '*' + f_u + r'}{' + gamma_m1 + r'}\\'))
Tensile_rup_eqnb.append(NoEscape(r'&=' + T_dn + '\end{aligned}'))
return Tensile_rup_eqnb
def tension_rupture_welded_prov(w_p, t_p, fu,gamma_m1,T_dn,multiple =1):
w_p = str(w_p)
t_p = str(t_p)
f_u = str(fu)
T_dn = str(T_dn)
multiple = str(multiple)
T_dn = str(T_dn)
gamma_m1 = str(gamma_m1)
Tensile_rup_eqnw = Math(inline=True)
Tensile_rup_eqnw.append(NoEscape(r'\begin{aligned} T_{dn} &= \frac{0.9*A_{n}*f_u}{\gamma_{m1}}\\'))
# Tensile_rup_eqnw.append(NoEscape(r'&=\frac{0.9*'+w_p+'*'+t_p+'*'+f_u+'}{'+gamma_m1+r'}\\'))
Tensile_rup_eqnw.append(NoEscape(r'&=\frac{' + multiple + '*0.9*' + w_p + '*' + t_p + '*' + f_u + '}{' + gamma_m1 + r'}\\'))
Tensile_rup_eqnw.append(NoEscape(r'&=' + T_dn +'\end{aligned}'))
return Tensile_rup_eqnw
def tensile_capacity_prov(T_dg, T_dn, T_db =0.0):