midas-civil 1.4.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.
Files changed (40) hide show
  1. midas_civil/_BoundaryChangeAssignment.py +278 -0
  2. midas_civil/__init__.py +51 -0
  3. midas_civil/_analysiscontrol.py +585 -0
  4. midas_civil/_boundary.py +888 -0
  5. midas_civil/_construction.py +1004 -0
  6. midas_civil/_element.py +1346 -0
  7. midas_civil/_group.py +337 -0
  8. midas_civil/_load.py +967 -0
  9. midas_civil/_loadcomb.py +159 -0
  10. midas_civil/_mapi.py +249 -0
  11. midas_civil/_material.py +1692 -0
  12. midas_civil/_model.py +522 -0
  13. midas_civil/_movingload.py +1479 -0
  14. midas_civil/_node.py +532 -0
  15. midas_civil/_result_table.py +929 -0
  16. midas_civil/_result_test.py +5455 -0
  17. midas_civil/_section/_TapdbSecSS.py +175 -0
  18. midas_civil/_section/__init__.py +413 -0
  19. midas_civil/_section/_compositeSS.py +283 -0
  20. midas_civil/_section/_dbSecSS.py +164 -0
  21. midas_civil/_section/_offsetSS.py +53 -0
  22. midas_civil/_section/_pscSS copy.py +455 -0
  23. midas_civil/_section/_pscSS.py +822 -0
  24. midas_civil/_section/_tapPSC12CellSS.py +565 -0
  25. midas_civil/_section/_unSupp.py +58 -0
  26. midas_civil/_settlement.py +161 -0
  27. midas_civil/_temperature.py +677 -0
  28. midas_civil/_tendon.py +1016 -0
  29. midas_civil/_thickness.py +147 -0
  30. midas_civil/_utils.py +529 -0
  31. midas_civil/_utilsFunc/__init__.py +0 -0
  32. midas_civil/_utilsFunc/_line2plate.py +636 -0
  33. midas_civil/_view.py +891 -0
  34. midas_civil/_view_trial.py +430 -0
  35. midas_civil/_visualise.py +347 -0
  36. midas_civil-1.4.1.dist-info/METADATA +74 -0
  37. midas_civil-1.4.1.dist-info/RECORD +40 -0
  38. midas_civil-1.4.1.dist-info/WHEEL +5 -0
  39. midas_civil-1.4.1.dist-info/licenses/LICENSE +21 -0
  40. midas_civil-1.4.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,565 @@
1
+ from ._offsetSS import Offset
2
+ from ._offsetSS import _common
3
+
4
+
5
+ from math import hypot
6
+ class _SS_TAP_PSC_12CELL(_common):
7
+ def __init__(self,Name='',Shape='1CEL',Joint=[0,0,0,0,0,0,0,0],
8
+ HO1_I=0,HO2_I=0,HO21_I=0,HO22_I=0,HO3_I=0,HO31_I=0,
9
+ BO1_I=0,BO11_I=0,BO12_I=0,BO2_I=0,BO21_I=0,BO3_I=0,
10
+ HI1_I=0,HI2_I=0,HI21_I=0,HI22_I=0,HI3_I=0,HI31_I=0,HI4_I=0,HI41_I=0,HI42_I=0,HI5_I=0,
11
+ BI1_I=0,BI11_I=0,BI12_I=0,BI21_I=0,BI3_I=0,BI31_I=0,BI32_I=0,BI4_I=0,
12
+
13
+ HO1_J=0,HO2_J=0,HO21_J=0,HO22_J=0,HO3_J=0,HO31_J=0,
14
+ BO1_J=0,BO11_J=0,BO12_J=0,BO2_J=0,BO21_J=0,BO3_J=0,
15
+ HI1_J=0,HI2_J=0,HI21_J=0,HI22_J=0,HI3_J=0,HI31_J=0,HI4_J=0,HI41_J=0,HI42_J=0,HI5_J=0,
16
+ BI1_J=0,BI11_J=0,BI12_J=0,BI21_J=0,BI3_J=0,BI31_J=0,BI32_J=0,BI4_J=0,
17
+
18
+ Offset:Offset=Offset.CC(),useShear=True,use7Dof=False,id:int=0):
19
+
20
+ self.ID = id
21
+ self.NAME = Name
22
+ self.SHAPE = Shape
23
+ self.TYPE = 'TAPERED'
24
+
25
+ # print("***********")
26
+ # print(Name,Shape,Joint)
27
+
28
+ self.JO1=bool(Joint[0])
29
+ self.JO2=bool(Joint[1])
30
+ self.JO3=bool(Joint[2])
31
+ self.JI1=bool(Joint[3])
32
+ self.JI2=bool(Joint[4])
33
+ self.JI3=bool(Joint[5])
34
+ self.JI4=bool(Joint[6])
35
+ self.JI5=bool(Joint[7])
36
+
37
+ self.OFFSET = Offset
38
+ self.USESHEAR = bool(useShear)
39
+ self.USE7DOF = bool(use7Dof)
40
+
41
+ self.HO1_I = HO1_I
42
+ self.HO2_I = HO2_I
43
+ self.HO21_I = HO21_I
44
+ self.HO22_I= HO22_I
45
+ self.HO3_I = HO3_I
46
+ self.HO31_I = HO31_I
47
+
48
+ self.BO1_I = BO1_I
49
+ self.BO11_I = BO11_I
50
+ self.BO12_I = BO12_I
51
+ self.BO2_I = BO2_I
52
+ self.BO21_I = BO21_I
53
+ self.BO3_I = BO3_I
54
+
55
+ self.HI1_I = HI1_I
56
+ self.HI2_I = HI2_I
57
+ self.HI21_I = HI21_I
58
+ self.HI22_I = HI22_I
59
+ self.HI3_I = HI3_I
60
+ self.HI31_I = HI31_I
61
+ self.HI4_I = HI4_I
62
+ self.HI41_I = HI41_I
63
+ self.HI42_I = HI42_I
64
+ self.HI5_I = HI5_I
65
+
66
+ self.BI1_I = BI1_I
67
+ self.BI11_I = BI11_I
68
+ self.BI12_I = BI12_I
69
+ self.BI21_I = BI21_I
70
+ self.BI3_I = BI3_I
71
+ self.BI31_I = BI31_I
72
+ self.BI32_I = BI32_I
73
+ self.BI4_I = BI4_I
74
+
75
+
76
+
77
+
78
+ self.HO1_J = HO1_J
79
+ self.HO2_J = HO2_J
80
+ self.HO21_J = HO21_J
81
+ self.HO22_J= HO22_J
82
+ self.HO3_J = HO3_J
83
+ self.HO31_J = HO31_J
84
+
85
+ self.BO1_J = BO1_J
86
+ self.BO11_J = BO11_J
87
+ self.BO12_J = BO12_J
88
+ self.BO2_J = BO2_J
89
+ self.BO21_J = BO21_J
90
+ self.BO3_J = BO3_J
91
+
92
+ self.HI1_J = HI1_J
93
+ self.HI2_J = HI2_J
94
+ self.HI21_J = HI21_J
95
+ self.HI22_J = HI22_J
96
+ self.HI3_J = HI3_J
97
+ self.HI31_J = HI31_J
98
+ self.HI4_J = HI4_J
99
+ self.HI41_J = HI41_J
100
+ self.HI42_J = HI42_J
101
+ self.HI5_J = HI5_J
102
+
103
+ self.BI1_J = BI1_J
104
+ self.BI11_J = BI11_J
105
+ self.BI12_J = BI12_J
106
+ self.BI21_J = BI21_J
107
+ self.BI3_J = BI3_J
108
+ self.BI31_J = BI31_J
109
+ self.BI32_J = BI32_J
110
+ self.BI4_J = BI4_J
111
+
112
+
113
+ def __str__(self):
114
+ return f' > ID = {self.ID} | PSC 1-2 CELL SECTION \nJSON = {self.toJSON()}\n'
115
+
116
+
117
+ def toJSON(sect):
118
+ js = {
119
+ "SECTTYPE": "TAPERED",
120
+ "SECT_NAME": sect.NAME,
121
+ "SECT_BEFORE": {
122
+ "SHAPE": sect.SHAPE,
123
+ "TYPE" : 11,
124
+ "SECT_I": {
125
+ "vSIZE_PSC_A": [sect.HO1_I,sect.HO2_I,sect.HO21_I,sect.HO22_I,sect.HO3_I,sect.HO31_I],
126
+ "vSIZE_PSC_B": [sect.BO1_I,sect.BO11_I,sect.BO12_I,sect.BO2_I,sect.BO21_I,sect.BO3_I,],
127
+ "vSIZE_PSC_C": [sect.HI1_I,sect.HI2_I,sect.HI21_I,sect.HI22_I,sect.HI3_I,sect.HI31_I,sect.HI4_I,sect.HI41_I,sect.HI42_I,sect.HI5_I],
128
+ "vSIZE_PSC_D": [sect.BI1_I,sect.BI11_I,sect.BI12_I,sect.BI21_I,sect.BI3_I,sect.BI31_I,sect.BI32_I,sect.BI4_I],
129
+ "S_WIDTH" : sect.HO1_I
130
+ },
131
+ "SECT_J": {
132
+ "vSIZE_PSC_A": [sect.HO1_J,sect.HO2_J,sect.HO21_J,sect.HO22_J,sect.HO3_J,sect.HO31_J],
133
+ "vSIZE_PSC_B": [sect.BO1_J,sect.BO11_J,sect.BO12_J,sect.BO2_J,sect.BO21_J,sect.BO3_J,],
134
+ "vSIZE_PSC_C": [sect.HI1_J,sect.HI2_J,sect.HI21_J,sect.HI22_J,sect.HI3_J,sect.HI31_J,sect.HI4_J,sect.HI41_J,sect.HI42_J,sect.HI5_J],
135
+ "vSIZE_PSC_D": [sect.BI1_J,sect.BI11_J,sect.BI12_J,sect.BI21_J,sect.BI3_J,sect.BI31_J,sect.BI32_J,sect.BI4_J],
136
+ "S_WIDTH" : sect.HO1_J
137
+ },
138
+ "Y_VAR": 1,
139
+ "Z_VAR": 1,
140
+ "WARPING_CHK_AUTO_I": True,
141
+ "WARPING_CHK_AUTO_J": True,
142
+ "SHEAR_CHK": False,
143
+ "WARPING_CHK_POS_I": [[0,0,0,0,0,0],[0,0,0,0,0,0]],
144
+ "WARPING_CHK_POS_J": [[0,0,0,0,0,0],[0,0,0,0,0,0]],
145
+ "USE_WEB_THICK_SHEAR": [[True, True,True],[True,True,True]],
146
+ "WEB_THICK_SHEAR": [[0,0,0],[0,0,0]],
147
+ "USE_WEB_THICK": [True,True],
148
+ "WEB_THICK": [0,0],
149
+ "USE_SYMMETRIC": False,
150
+ "USE_SMALL_HOLE": False,
151
+ "USE_USER_DEF_MESHSIZE": False,
152
+ "USE_USER_INTPUT_STIFF": False,
153
+ "PSC_OPT1": "",
154
+ "PSC_OPT2": "",
155
+ "JOINT": [sect.JO1,sect.JO2,sect.JO3,sect.JI1,sect.JI2,sect.JI3,sect.JI4,sect.JI5]
156
+ }
157
+ }
158
+ js['SECT_BEFORE'].update(sect.OFFSET.JS)
159
+ js['SECT_BEFORE']['USE_SHEAR_DEFORM'] = sect.USESHEAR
160
+ js['SECT_BEFORE']['USE_WARPING_EFFECT'] = sect.USE7DOF
161
+ return js
162
+
163
+
164
+ @staticmethod
165
+ def _objectify(id,name,type,shape,offset,uShear,u7DOF,js):
166
+ #--- PSC 1,2 CELL -------------------
167
+ vA_I = js['SECT_BEFORE']['SECT_I']['vSIZE_PSC_A']
168
+ vB_I = js['SECT_BEFORE']['SECT_I']['vSIZE_PSC_B']
169
+ vC_I = js['SECT_BEFORE']['SECT_I']['vSIZE_PSC_C']
170
+ vD_I = js['SECT_BEFORE']['SECT_I']['vSIZE_PSC_D']
171
+
172
+ vA_J = js['SECT_BEFORE']['SECT_J']['vSIZE_PSC_A']
173
+ vB_J = js['SECT_BEFORE']['SECT_J']['vSIZE_PSC_B']
174
+ vC_J = js['SECT_BEFORE']['SECT_J']['vSIZE_PSC_C']
175
+ vD_J = js['SECT_BEFORE']['SECT_J']['vSIZE_PSC_D']
176
+
177
+ joint = js['SECT_BEFORE']['JOINT']
178
+ return _SS_TAP_PSC_12CELL(name,shape,joint,
179
+ *vA_I,*vB_I,*vC_I,*vD_I,
180
+ *vA_J,*vB_J,*vC_J,*vD_J,
181
+ offset,uShear,u7DOF,id)
182
+
183
+ def _centerLine(shape,end,*args):
184
+ import numpy as np
185
+ if shape.SHAPE in ['1CEL','2CEL'] :
186
+ if end:
187
+ HO1,HO2,HO21,HO22,HO3,HO31 = shape.HO1_J,shape.HO2_J,shape.HO21_J,shape.HO22_J,shape.HO3_J,shape.HO31_J
188
+ BO1,BO11,BO12,BO2,BO21,BO3 = shape.BO1_J,shape.BO11_J,shape.BO12_J,shape.BO2_J,shape.BO21_J,shape.BO3_J
189
+
190
+ HI1,HI2,HI21,HI22,HI3,HI31,HI4,HI41,HI42,HI5 = shape.HI1_J,shape.HI2_J,shape.HI21_J,shape.HI22_J,shape.HI3_J,shape.HI31_J,shape.HI4_J,shape.HI41_J,shape.HI42_J,shape.HI5_J
191
+ BI1,BI11,BI12,BI21,BI3,BI31,BI32,BI4 = shape.BI1_J,shape.BI11_J,shape.BI12_J,shape.BI21_J,shape.BI3_J,shape.BI31_J,shape.BI32_J,shape.BI4_J
192
+
193
+
194
+ else:
195
+ HO1,HO2,HO21,HO22,HO3,HO31 = shape.HO1_I,shape.HO2_I,shape.HO21_I,shape.HO22_I,shape.HO3_I,shape.HO31_I
196
+ BO1,BO11,BO12,BO2,BO21,BO3 = shape.BO1_I,shape.BO11_I,shape.BO12_I,shape.BO2_I,shape.BO21_I,shape.BO3_I
197
+
198
+ HI1,HI2,HI21,HI22,HI3,HI31,HI4,HI41,HI42,HI5 = shape.HI1_I,shape.HI2_I,shape.HI21_I,shape.HI22_I,shape.HI3_I,shape.HI31_I,shape.HI4_I,shape.HI41_I,shape.HI42_I,shape.HI5_I
199
+ BI1,BI11,BI12,BI21,BI3,BI31,BI32,BI4 = shape.BI1_I,shape.BI11_I,shape.BI12_I,shape.BI21_I,shape.BI3_I,shape.BI31_I,shape.BI32_I,shape.BI4_I
200
+
201
+
202
+
203
+ JO1,JO2,JO3,JI1,JI2,JI3,JI4,JI5 = shape.JO1,shape.JO2,shape.JO3,shape.JI1,shape.JI2,shape.JI3,shape.JI4,shape.JI5
204
+
205
+ sect_cg_LT = [-(BO1+BO2+BO3),0]
206
+ sect_cg_RB = [(BO1+BO2+BO3),-(HO1+HO2+HO3)]
207
+ sect_cg_CC = [0,-(HO1+HO2+HO3)/2]
208
+
209
+
210
+
211
+
212
+ def perpendicular_point(pt1,pt2,point, l=0):
213
+ """Function to get orthogonal point on line (x1,y1)-(x2,y2) from point (x3,y3). Enter l=0 for point 3 in between 1 & 2. Enter l=1 for other scenario."""
214
+ x1,y1 = pt1
215
+ x2,y2 = pt2
216
+ x3,y3 = point
217
+
218
+ if x2 != x1:
219
+ m = (y2 - y1) / (x2 - x1)
220
+ c = y1 - m * x1
221
+ x_perp = (x3 + m * (y3 - c)) / (1 + m**2)
222
+ y_perp = m * x_perp + c
223
+ else:
224
+ x_perp, y_perp = x1, y3
225
+
226
+ thk = ((x3 - x_perp)**2 + (y3 - y_perp)**2)**0.5
227
+ return (x_perp, y_perp),thk
228
+
229
+ def distance_point(pt1,pt2):
230
+ x1,y1 = pt1
231
+ x2,y2 = pt2
232
+
233
+ return hypot((x1-x2),(y1-y2))
234
+
235
+
236
+ HTI = HI1+HI2+HI3+HI4+HI5
237
+ HTO = HO1+HO2+HO3
238
+ slope = (HTI-HTO)/(BO1+BO2+BO3)
239
+
240
+
241
+ pt1 = (0,0)
242
+ pt2 = (0,-HI1)
243
+ pt5 = (-BI1,-HI1-HI2)
244
+ pt7 = (-BI3,-HI1-HI2-HI3)
245
+ pt10 = (0,-HI1-HI2-HI3-HI4)
246
+ pt11 = (0,-HTI)
247
+
248
+ pt12 = (-BO3,-HTI)
249
+ pt14 = (-BO3-BO2,(-HTI+HTO)-HO1-HO2)
250
+ pt17 = (-BO3-BO2-BO1,(-HTI+HTO)-HO1)
251
+ pt18 = (-BO3-BO2-BO1,(-HTI+HTO))
252
+
253
+ pt3 = (-BI11,-HI1-HI21)
254
+ pt4 = (-BI12,-HI1-HI22)
255
+
256
+ pt6 = (-BI21,-HI1-HI2-HI31)
257
+
258
+ pt8 = (-BI32,-HI1-HI2-HI3-HI4+HI42)
259
+ pt9 = (-BI31,-HI1-HI2-HI3-HI4+HI41)
260
+
261
+ pt13 = (-BO3-BO21,-HO1-HO2-HO3+HO31)
262
+
263
+ pt15 = (-BO3-BO2-BO1+BO12,(-HTI+HTO)-HO1-HO22)
264
+ pt16 = (-BO3-BO2-BO1+BO11,(-HTI+HTO)-HO1-HO21)
265
+
266
+
267
+ pt016 = (-BO3-BO2-BO1+BO11,slope*(-BO3-BO2-BO1+BO11))
268
+ pt015 = (-BO3-BO2-BO1+BO12,slope*(-BO3-BO2-BO1+BO12))
269
+ pt014 = (-BO3-BO2,slope*(-BO3-BO2))
270
+ pt05 = (-BI1,slope*(-BI1))
271
+ pt04 = (-BI12,slope*(-BI12))
272
+ pt03 = (-BI11,slope*(-BI11))
273
+
274
+ #----------------------------- THICKNESS COMPUTATION --------------
275
+
276
+ THI1 = HI1
277
+ TJI1 = distance_point(pt3,pt03)
278
+ TJI2 = distance_point(pt4,pt04)
279
+ THI2 = distance_point(pt5,pt05)
280
+ THO2 = distance_point(pt14,pt014)
281
+ THO1 = distance_point(pt17,pt18)
282
+ THI3 = (HI4+HI5)
283
+ THI5 = HI5
284
+ TJO1 = distance_point(pt16,pt016)
285
+ TJO2 = distance_point(pt15,pt015)
286
+ TJI4 = (HI5+HI42)
287
+ TJI5 = (HI5+HI41)
288
+
289
+ # ------------------- CENTER LINE POINTS ------------------
290
+
291
+ cp1 = (0,-HI1/2)
292
+
293
+
294
+ # cp2 = (-BI11,(-HI1-HI21)/2) #JI1
295
+ # cp2 = np.add(pt3,pt03)/2
296
+ cp2 = (pt03[0],pt03[1]-0.5*THI1)
297
+
298
+ # cp3 = (-BI12,(-HI1-HI22)/2) #JI2
299
+ # cp3 = np.add(pt4,pt04)/2
300
+ cp3 = (pt04[0],pt04[1]-0.5*THI1)
301
+ # cp4 = (-BI1,(-HI1-HI2)/2)
302
+ # cp4 = np.add(pt5,pt05)/2
303
+ cp4 = (pt05[0],pt05[1]-0.5*THI1)
304
+
305
+ # cp5 = (-BO3-BO2-BO1,-HO1/2)
306
+ cp5 = np.add(pt17,pt18)/2
307
+ # cp6 = (-BO3-BO2-BO1+BO11,(-HO1-HO21)/2) #JO1
308
+ # cp6 = np.add(pt16,pt016)/2
309
+ cp6 = (pt016[0],pt016[1]-0.5*THO1)
310
+ # cp7 = (-BO3-BO2-BO1+BO12,(-HO1-HO22)/2) #JO2
311
+ # cp7 = np.add(pt15,pt015)/2
312
+ cp7 = (pt015[0],pt015[1]-0.5*THO1)
313
+ # cp8 = (-BO3-BO2,(-HO1-HO2)/2)
314
+ # cp8 = np.add(pt14,pt014)/2
315
+ cp8 = (pt014[0],pt014[1]-0.5*THO1)
316
+
317
+ cp9 = np.add(cp8,cp4)/2
318
+
319
+ cp10 = np.add(pt5,pt14)/2
320
+
321
+ cp17 = np.add(pt10,pt11)/2
322
+ cp16 = (-BI31,(-HI1-HI2-HI3-HI4+HI41-HTI)/2) #JI5
323
+ cp15 = (-BI32,(-HI1-HI2-HI3-HI4+HI42-HTI)/2) #JI4
324
+ cp14 = (-BI3,(-HI1-HI2-HI3-HTI)/2)
325
+ cp13 = np.add(pt7,pt12)/2
326
+
327
+
328
+ tpt,TJI3 = perpendicular_point(pt13,pt14,pt6)
329
+ cp11 = np.add(tpt,pt6)/2 #JI3
330
+
331
+
332
+ tpt,TJO3 = perpendicular_point(pt7,pt6,pt13)
333
+ cp12 = np.add(pt7,pt13)/2 #JO3
334
+
335
+
336
+ # if cp12[1] < cp13[1] :
337
+ # print("JO3 invalid")
338
+
339
+
340
+
341
+
342
+
343
+ TX_INT_FLANGE = (THO2+THI2)/2
344
+ tpt,THIO2 = perpendicular_point(pt13,pt14,pt5)
345
+ TY_INT_FLANGE = THIO2
346
+
347
+ TX_BOT_JUNC = hypot(*np.subtract(pt7,pt12))
348
+
349
+ tpt,TY_BOT_JUNC = perpendicular_point(pt13,pt14,pt7)
350
+ # TY_BOT_JUNC = (TY_BOT_JUNC+hypot(*np.subtract(pt7,pt12)))/2
351
+
352
+ TJO3 = max(TJO3,TY_BOT_JUNC)
353
+
354
+
355
+ top_flange_point =[]
356
+ top_flange_line = []
357
+ top_flange_thk = []
358
+ top_flange_thk_off = []
359
+ q=1
360
+ top_flange_point.append(cp1)
361
+ if JI1 :
362
+ top_flange_point.append(cp2)
363
+ top_flange_line.append([q,q+1])
364
+ top_flange_thk.append([THI1,TJI1])
365
+ top_flange_thk_off.append([0,(TJI1-THI1)*0.5])
366
+ q+=1
367
+ if JI2 :
368
+ top_flange_point.append(cp3)
369
+ top_flange_line.append([q,q+1])
370
+ q+=1
371
+ if JI1:
372
+ top_flange_thk.append([TJI1,TJI2])
373
+ top_flange_thk_off.append([(TJI1-THI1)*0.5,(TJI2-THI1)*0.5])
374
+ else :
375
+ top_flange_thk.append([THI1,TJI2])
376
+ top_flange_thk_off.append([0,(TJI2-THI1)*0.5])
377
+ top_flange_point.append(cp4)
378
+ top_flange_line.append([q,q+1])
379
+ q+=1
380
+
381
+ if JI2:
382
+ top_flange_thk.append([TJI2,THI2])
383
+ top_flange_thk_off.append([(TJI2-THI1)*0.5,(THI2-THI1)*0.5])
384
+ elif JI1:
385
+ top_flange_thk.append([TJI1,THI2])
386
+ top_flange_thk_off.append([(TJI1-THI1)*0.5,(THI2-THI1)*0.5])
387
+ else :
388
+ top_flange_thk.append([THI1,THI2])
389
+ top_flange_thk_off.append([0,(THI2-THI1)*0.5])
390
+
391
+
392
+ top_flange_line.append([q,q+1]) # TO CONNECT WITH WEB
393
+ q+=1
394
+ top_flange_thk.append([THI2,TX_INT_FLANGE])
395
+ top_flange_thk_off.append([(THI2-THI1)*0.5,(TX_INT_FLANGE-THI1)*0.5])
396
+
397
+
398
+ # print(top_flange_thk)
399
+
400
+ web_point =[]
401
+ web_line =[]
402
+ web_thk = []
403
+ web_thk_off = []
404
+
405
+ web_point.append(cp9)
406
+ web_point.append(cp10)
407
+ web_line.append([q,q+1])
408
+ q+=1
409
+ web_thk.append([TY_INT_FLANGE,THIO2])
410
+ web_thk_off.append([0,0])
411
+ if JI3 :
412
+ web_point.append(cp11)
413
+ web_line.append([q,q+1])
414
+ q+=1
415
+ web_thk.append([THIO2,TJI3])
416
+ web_thk_off.append([0,0])
417
+ if JO3 : #JO3 and cp12[0] < cp13[0]:
418
+ web_point.append(cp12)
419
+ web_line.append([q,q+1])
420
+ if JI3 :
421
+ web_thk.append([TJI3,TJO3])
422
+ web_thk_off.append([0,0])
423
+ else:
424
+ web_thk.append([THIO2,TJO3])
425
+ web_thk_off.append([0,0])
426
+ q+=1
427
+
428
+ web_point.append(cp13)
429
+ web_line.append([q,q+1])
430
+ if JO3:
431
+ web_thk.append([TJO3,TY_BOT_JUNC])
432
+ web_thk_off.append([0,0])
433
+ elif JI3:
434
+ web_thk.append([TJI3,TY_BOT_JUNC])
435
+ web_thk_off.append([0,0])
436
+ else:
437
+ web_thk.append([THIO2,TY_BOT_JUNC])
438
+ web_thk_off.append([0,0])
439
+ q+=1
440
+
441
+
442
+ bottom_flange_point =[]
443
+ bottom_flange_line =[]
444
+ bottom_flange_thk = []
445
+ bottom_flange_thk_off = []
446
+
447
+ bottom_flange_line.append([q,q+1]) # TO CONNECT WITH WEB
448
+ bottom_flange_thk.append([TY_BOT_JUNC,THI3])
449
+ bottom_flange_thk_off.append([0,0])
450
+ q+=1
451
+ bottom_flange_point.append(cp14)
452
+ if JI4 :
453
+ bottom_flange_point.append(cp15)
454
+ bottom_flange_line.append([q,q+1])
455
+ q+=1
456
+ bottom_flange_thk.append([THI3,TJI4])
457
+ bottom_flange_thk_off.append([0,0])
458
+ if JI5 :
459
+ bottom_flange_point.append(cp16)
460
+ bottom_flange_line.append([q,q+1])
461
+ q+=1
462
+ if JI4:
463
+ bottom_flange_thk.append([TJI4,TJI5])
464
+ bottom_flange_thk_off.append([0,0])
465
+ else:
466
+ bottom_flange_thk.append([THI3,TJI5])
467
+ bottom_flange_thk_off.append([0,0])
468
+ bottom_flange_point.append(cp17)
469
+ bottom_flange_line.append([q,q+1])
470
+ n_cp17 = q+1
471
+ if JI5:
472
+ bottom_flange_thk.append([TJI5,THI5])
473
+ bottom_flange_thk_off.append([0,0])
474
+ elif JI4:
475
+ bottom_flange_thk.append([TJI4,THI5])
476
+ bottom_flange_thk_off.append([0,0])
477
+ else:
478
+ bottom_flange_thk.append([THI3,THI5])
479
+ bottom_flange_thk_off.append([0,0])
480
+ q+=1
481
+
482
+
483
+ top_cantelever_point =[]
484
+ top_cantelever_line =[]
485
+ top_cantelever_thk =[]
486
+ top_cantelever_thk_off =[]
487
+
488
+ top_cantelever_line.append([len(top_flange_point)+1,q+1]) # TO CONNECT WITH WEB
489
+ top_cantelever_thk.append([TX_INT_FLANGE,THO2])
490
+ top_cantelever_thk_off.append([(TX_INT_FLANGE-THO1)*0.5,(THO2-THO1)*0.5])
491
+ q+=1
492
+ top_cantelever_point.append(cp8)
493
+ if JO2 :
494
+ top_cantelever_point.append(cp7)
495
+ top_cantelever_line.append([q,q+1])
496
+ q+=1
497
+ top_cantelever_thk.append([THO2,TJO2])
498
+ top_cantelever_thk_off.append([(THO2-THO1)*0.5,(TJO2-THO1)*0.5])
499
+ if JO1 :
500
+ top_cantelever_point.append(cp6)
501
+ top_cantelever_line.append([q,q+1])
502
+ q+=1
503
+ if JO2:
504
+ top_cantelever_thk.append([TJO2,TJO1])
505
+ top_cantelever_thk_off.append([(TJO2-THO1)*0.5,(TJO1-THO1)*0.5])
506
+ else:
507
+ top_cantelever_thk.append([THO2,TJO1])
508
+ top_cantelever_thk_off.append([(THO2-THO1)*0.5,(TJO1-THO1)*0.5])
509
+ top_cantelever_point.append(cp5)
510
+ top_cantelever_line.append([q,q+1])
511
+ if JO1:
512
+ top_cantelever_thk.append([TJO1,THO1])
513
+ top_cantelever_thk_off.append([(TJO1-THO1)*0.5,0])
514
+ elif JO2:
515
+ top_cantelever_thk.append([TJO2,THO1])
516
+ top_cantelever_thk_off.append([(TJO2-THO1)*0.5,0])
517
+ else:
518
+ top_cantelever_thk.append([THO2,THO1])
519
+ top_cantelever_thk_off.append([(THO2-THO1)*0.5,0])
520
+
521
+
522
+ final_points = top_flange_point+web_point+bottom_flange_point+top_cantelever_point
523
+ final_line = top_flange_line+web_line+bottom_flange_line+top_cantelever_line
524
+ final_thk = top_flange_thk+web_thk+bottom_flange_thk+top_cantelever_thk
525
+ final_thk_off = top_flange_thk_off+web_thk_off+bottom_flange_thk_off+top_cantelever_thk_off
526
+
527
+ n_points = len(final_points)
528
+
529
+ # print(final_points)
530
+
531
+ sect_shape = final_points # SYMMETRY
532
+ for i in range(n_points):
533
+ sect_shape.append((-final_points[i][0],final_points[i][1]))
534
+
535
+
536
+ sect_lin_con = final_line
537
+ sect_thk = final_thk
538
+ sect_thk_off = final_thk_off
539
+
540
+
541
+ for q in range(len(final_line)): # SYMMETRY
542
+ sect_thk.append([final_thk[q][1],final_thk[q][0]])
543
+ sect_thk_off.append([final_thk_off[q][1],final_thk_off[q][0]])
544
+ sect_lin_con.append([final_line[q][1]+n_points,final_line[q][0]+n_points])
545
+
546
+
547
+ if shape.SHAPE == '2CEL':
548
+ sect_lin_con.append([1,n_cp17])
549
+ sect_thk.append([2*BI4,2*BI4])
550
+ sect_thk_off.append([0,0])
551
+
552
+ # sect_thk_off = [0 for _ in sect_thk]
553
+
554
+
555
+
556
+ sect_cg = (sect_cg_LT,sect_cg_CC,sect_cg_RB)
557
+ return sect_shape, sect_thk ,sect_thk_off, sect_cg , sect_lin_con
558
+
559
+
560
+
561
+
562
+
563
+
564
+
565
+
@@ -0,0 +1,58 @@
1
+ from ._offsetSS import _common
2
+
3
+
4
+ class _SS_UNSUPP(_common):
5
+
6
+ """ Store Unsupported section"""
7
+
8
+ def __init__(self,id,name,type,shape,offset,uShear,u7DOF,js):
9
+ """ Shape = 'SB' 'SR' for rectangle \n For cylinder"""
10
+ self.ID = id
11
+ self.NAME = name
12
+ self.TYPE = type
13
+ self.SHAPE = shape
14
+ self.OFFSET = offset
15
+ self.USESHEAR = uShear
16
+ self.USE7DOF = u7DOF
17
+ self.DATATYPE = 2
18
+ self.JS = js
19
+
20
+ def __str__(self):
21
+ return f' > ID = {self.ID} | Unsupported Section \nJSON = {self.JS}\n'
22
+
23
+
24
+ def toJSON(sect):
25
+ js = sect.JS
26
+ js['SECT_NAME'] = sect.NAME
27
+ js['SECT_BEFORE'].update(sect.OFFSET.JS)
28
+ js['SECT_BEFORE']['USE_SHEAR_DEFORM'] = sect.USESHEAR
29
+ js['SECT_BEFORE']['USE_WARPING_EFFECT'] = sect.USE7DOF
30
+ return js
31
+
32
+ class _SS_STD_DB(_common):
33
+
34
+ """ Store Unsupported section"""
35
+
36
+ def __init__(self,id,name,type,shape,offset,uShear,u7DOF,js):
37
+ """ Shape = 'SB' 'SR' for rectangle \n For cylinder"""
38
+ self.ID = id
39
+ self.NAME = name
40
+ self.TYPE = type
41
+ self.SHAPE = shape
42
+ self.OFFSET = offset
43
+ self.USESHEAR = uShear
44
+ self.USE7DOF = u7DOF
45
+ self.DATATYPE = 2
46
+ self.JS = js
47
+
48
+ def __str__(self):
49
+ return f' > ID = {self.ID} | STANDARD CODAL SECTION \nJSON = {self.JS}\n'
50
+
51
+
52
+ def toJSON(sect):
53
+ js = sect.JS
54
+ js['SECT_NAME'] = sect.NAME
55
+ js['SECT_BEFORE'].update(sect.OFFSET.JS)
56
+ js['SECT_BEFORE']['USE_SHEAR_DEFORM'] = sect.USESHEAR
57
+ js['SECT_BEFORE']['USE_WARPING_EFFECT'] = sect.USE7DOF
58
+ return js