midas-civil 0.1.9__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of midas-civil might be problematic. Click here for more details.
- {midas_civil-0.1.9 → midas_civil-0.2.1}/PKG-INFO +1 -1
- {midas_civil-0.1.9 → midas_civil-0.2.1}/midas_civil/_element.py +21 -4
- {midas_civil-0.1.9 → midas_civil-0.2.1}/midas_civil/_movingload.py +2 -2
- {midas_civil-0.1.9 → midas_civil-0.2.1}/midas_civil/_section.py +121 -0
- {midas_civil-0.1.9 → midas_civil-0.2.1}/midas_civil/_tendon.py +9 -10
- {midas_civil-0.1.9 → midas_civil-0.2.1}/midas_civil.egg-info/PKG-INFO +1 -1
- {midas_civil-0.1.9 → midas_civil-0.2.1}/setup.py +1 -1
- {midas_civil-0.1.9 → midas_civil-0.2.1}/LICENSE +0 -0
- {midas_civil-0.1.9 → midas_civil-0.2.1}/README.md +0 -0
- {midas_civil-0.1.9 → midas_civil-0.2.1}/midas_civil/__init__.py +0 -0
- {midas_civil-0.1.9 → midas_civil-0.2.1}/midas_civil/_boundary.py +0 -0
- {midas_civil-0.1.9 → midas_civil-0.2.1}/midas_civil/_construction.py +0 -0
- {midas_civil-0.1.9 → midas_civil-0.2.1}/midas_civil/_construction_backup.py +0 -0
- {midas_civil-0.1.9 → midas_civil-0.2.1}/midas_civil/_group.py +0 -0
- {midas_civil-0.1.9 → midas_civil-0.2.1}/midas_civil/_load.py +0 -0
- {midas_civil-0.1.9 → midas_civil-0.2.1}/midas_civil/_mapi.py +0 -0
- {midas_civil-0.1.9 → midas_civil-0.2.1}/midas_civil/_material.py +0 -0
- {midas_civil-0.1.9 → midas_civil-0.2.1}/midas_civil/_model.py +0 -0
- {midas_civil-0.1.9 → midas_civil-0.2.1}/midas_civil/_node.py +0 -0
- {midas_civil-0.1.9 → midas_civil-0.2.1}/midas_civil/_result copy.py +0 -0
- {midas_civil-0.1.9 → midas_civil-0.2.1}/midas_civil/_result.py +0 -0
- {midas_civil-0.1.9 → midas_civil-0.2.1}/midas_civil/_result_extract.py +0 -0
- {midas_civil-0.1.9 → midas_civil-0.2.1}/midas_civil/_settlement.py +0 -0
- {midas_civil-0.1.9 → midas_civil-0.2.1}/midas_civil/_temperature.py +0 -0
- {midas_civil-0.1.9 → midas_civil-0.2.1}/midas_civil/_thickness.py +0 -0
- {midas_civil-0.1.9 → midas_civil-0.2.1}/midas_civil/_utils.py +0 -0
- {midas_civil-0.1.9 → midas_civil-0.2.1}/midas_civil/_view.py +0 -0
- {midas_civil-0.1.9 → midas_civil-0.2.1}/midas_civil.egg-info/SOURCES.txt +0 -0
- {midas_civil-0.1.9 → midas_civil-0.2.1}/midas_civil.egg-info/dependency_links.txt +0 -0
- {midas_civil-0.1.9 → midas_civil-0.2.1}/midas_civil.egg-info/requires.txt +0 -0
- {midas_civil-0.1.9 → midas_civil-0.2.1}/midas_civil.egg-info/top_level.txt +0 -0
- {midas_civil-0.1.9 → midas_civil-0.2.1}/setup.cfg +0 -0
|
@@ -231,7 +231,10 @@ class Element:
|
|
|
231
231
|
_ADD(self)
|
|
232
232
|
|
|
233
233
|
@staticmethod
|
|
234
|
-
def SDL(s_loc:list,dir:list,l:float,n:int=1,mat:int=1,sect:int=1,angle:float=0, group = "" , id: int = 0): #CHANGE TO TUPLE
|
|
234
|
+
def SDL(s_loc:list|Node,dir:list,l:float,n:int=1,mat:int=1,sect:int=1,angle:float=0, group = "" , id: int = 0): #CHANGE TO TUPLE
|
|
235
|
+
if isinstance(s_loc,Node):
|
|
236
|
+
s_loc = (s_loc.X,s_loc.Y,s_loc.Z)
|
|
237
|
+
|
|
235
238
|
beam_nodes =[]
|
|
236
239
|
beam_obj = []
|
|
237
240
|
s_locc = np.array(s_loc)
|
|
@@ -251,7 +254,12 @@ class Element:
|
|
|
251
254
|
|
|
252
255
|
|
|
253
256
|
@staticmethod
|
|
254
|
-
def SE(s_loc:list,e_loc:list,n:int=1,mat:int=1,sect:int=1,angle:float=0, group = "" , id: int = 0):
|
|
257
|
+
def SE(s_loc:list|Node,e_loc:list|Node,n:int=1,mat:int=1,sect:int=1,angle:float=0, group = "" , id: int = 0):
|
|
258
|
+
if isinstance(s_loc,Node):
|
|
259
|
+
s_loc = (s_loc.X,s_loc.Y,s_loc.Z)
|
|
260
|
+
if isinstance(e_loc,Node):
|
|
261
|
+
s_loc = (e_loc.X,e_loc.Y,e_loc.Z)
|
|
262
|
+
|
|
255
263
|
beam_nodes =[]
|
|
256
264
|
beam_obj = []
|
|
257
265
|
i_loc = np.linspace(s_loc,e_loc,n+1)
|
|
@@ -302,7 +310,10 @@ class Element:
|
|
|
302
310
|
_ADD(self)
|
|
303
311
|
|
|
304
312
|
@staticmethod
|
|
305
|
-
def SDL(s_loc:list,dir:list,l:float,n:int=1,mat:int=1,sect:int=1,angle:float=0, group = "" , id: int = 0):
|
|
313
|
+
def SDL(s_loc:list|Node,dir:list,l:float,n:int=1,mat:int=1,sect:int=1,angle:float=0, group = "" , id: int = 0):
|
|
314
|
+
if isinstance(s_loc,Node):
|
|
315
|
+
s_loc = (s_loc.X,s_loc.Y,s_loc.Z)
|
|
316
|
+
|
|
306
317
|
beam_nodes =[]
|
|
307
318
|
beam_obj =[]
|
|
308
319
|
s_locc = np.array(s_loc)
|
|
@@ -322,7 +333,13 @@ class Element:
|
|
|
322
333
|
|
|
323
334
|
|
|
324
335
|
@staticmethod
|
|
325
|
-
def SE(s_loc:list,e_loc:list,n:int=1,mat:int=1,sect:int=1,angle:float=0, group = "" , id: int = 0):
|
|
336
|
+
def SE(s_loc:list|Node,e_loc:list|Node,n:int=1,mat:int=1,sect:int=1,angle:float=0, group = "" , id: int = 0):
|
|
337
|
+
|
|
338
|
+
if isinstance(s_loc,Node):
|
|
339
|
+
s_loc = (s_loc.X,s_loc.Y,s_loc.Z)
|
|
340
|
+
if isinstance(e_loc,Node):
|
|
341
|
+
s_loc = (e_loc.X,e_loc.Y,e_loc.Z)
|
|
342
|
+
|
|
326
343
|
beam_nodes =[]
|
|
327
344
|
beam_obj = []
|
|
328
345
|
i_loc = np.linspace(s_loc,e_loc,n+1)
|
|
@@ -4,7 +4,7 @@ from ._model import *
|
|
|
4
4
|
|
|
5
5
|
# ----------------------------------------------------------------------------------------------------------------
|
|
6
6
|
|
|
7
|
-
def
|
|
7
|
+
def _El_list(Start_id: int, End_id: int) -> list:
|
|
8
8
|
|
|
9
9
|
return list(range(Start_id, End_id + 1))
|
|
10
10
|
|
|
@@ -330,7 +330,7 @@ class MovingLoad:
|
|
|
330
330
|
|
|
331
331
|
data = {"Assign": {}}
|
|
332
332
|
for lane in lanes_list:
|
|
333
|
-
E_list =
|
|
333
|
+
E_list = _El_list(lane.Elment_start, lane.Elemnt_end)
|
|
334
334
|
Load_Dist = "CROSS" if lane.Group_Name else "LANE"
|
|
335
335
|
opt_auto_lane = lane.width > 0 or lane.opt_width > 0
|
|
336
336
|
|
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
from ._mapi import *
|
|
2
|
+
import numpy as np
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def _poly_dir(poly,rot='CCW'):
|
|
6
|
+
outer_cg = np.mean(poly,axis=0)
|
|
7
|
+
outer_t = np.subtract(poly,outer_cg)
|
|
8
|
+
dir = 0
|
|
9
|
+
for i in range(len(poly)-1):
|
|
10
|
+
dir+=outer_t[i][0]*outer_t[i+1][1]-outer_t[i][1]*outer_t[i+1][0]
|
|
11
|
+
if dir < 0:
|
|
12
|
+
poly.reverse()
|
|
13
|
+
|
|
14
|
+
if rot == 'CW':
|
|
15
|
+
poly.reverse()
|
|
16
|
+
|
|
17
|
+
return poly
|
|
2
18
|
|
|
3
19
|
|
|
4
20
|
|
|
@@ -104,6 +120,66 @@ def _Obj2JS(sect):
|
|
|
104
120
|
"JOINT": [sect.J1,sect.JL1,sect.JL2,sect.JL3,sect.JL4,sect.JR1,sect.JR2,sect.JR3,sect.JR4]
|
|
105
121
|
}
|
|
106
122
|
}
|
|
123
|
+
elif sect.SHAPE in ['VALUE']:
|
|
124
|
+
js = {
|
|
125
|
+
"SECTTYPE": "PSC",
|
|
126
|
+
"SECT_NAME": sect.NAME,
|
|
127
|
+
"CALC_OPT": True,
|
|
128
|
+
"SECT_BEFORE": {
|
|
129
|
+
"SHAPE": "VALU",
|
|
130
|
+
"SECT_I": {
|
|
131
|
+
"SECT_NAME": "",
|
|
132
|
+
"vSIZE": [0.1, 0.1, 0.1, 0.1],
|
|
133
|
+
"OUTER_POLYGON": [
|
|
134
|
+
{
|
|
135
|
+
"VERTEX": [
|
|
136
|
+
{"X": 5, "Y": 5},
|
|
137
|
+
{"X": -5, "Y": 5}
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
"SHEAR_CHK": True,
|
|
143
|
+
"SHEAR_CHK_POS": [[0.1, 0, 0.1], [0, 0, 0]],
|
|
144
|
+
"USE_AUTO_QY": [[True, True, True], [False, False, False]],
|
|
145
|
+
"WEB_THICK": [0, 0],
|
|
146
|
+
"USE_WEB_THICK_SHEAR": [[True, True, True], [False, False, False]]
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
v_list = []
|
|
151
|
+
for i in sect.OUTER_POLYGON:
|
|
152
|
+
v_list.append({"X":i[0],"Y":i[1]})
|
|
153
|
+
js["SECT_BEFORE"]["SECT_I"]["OUTER_POLYGON"][0]["VERTEX"] =v_list
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
if sect.N_INNER_POLYGON > 0 :
|
|
158
|
+
|
|
159
|
+
js["SECT_BEFORE"]["SECT_I"]["INNER_POLYGON"]= []
|
|
160
|
+
|
|
161
|
+
mult_ver = []
|
|
162
|
+
for n in range(sect.N_INNER_POLYGON):
|
|
163
|
+
vi_list = []
|
|
164
|
+
|
|
165
|
+
js["SECT_BEFORE"]["SECT_I"]["INNER_POLYGON"]= [
|
|
166
|
+
{
|
|
167
|
+
"VERTEX": []
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
for i in sect.INNER_POLYGON[n]:
|
|
171
|
+
vi_list.append({"X":i[0],"Y":i[1]})
|
|
172
|
+
|
|
173
|
+
ver_json = {"VERTEX": vi_list}
|
|
174
|
+
mult_ver.append(ver_json)
|
|
175
|
+
|
|
176
|
+
js["SECT_BEFORE"]["SECT_I"]["INNER_POLYGON"] = mult_ver
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
107
183
|
|
|
108
184
|
elif sect.TYPE == 'COMPOSITE':
|
|
109
185
|
if sect.SHAPE in ['CI']:
|
|
@@ -573,6 +649,51 @@ class Section:
|
|
|
573
649
|
|
|
574
650
|
_SectionADD(self)
|
|
575
651
|
|
|
652
|
+
class Value(_common):
|
|
653
|
+
def __init__(self,Name:str,
|
|
654
|
+
OuterPolygon:list,InnerPolygon:list=[],
|
|
655
|
+
Offset:Offset=Offset.CC(),useShear=True,use7Dof=False,id:int=0):
|
|
656
|
+
|
|
657
|
+
'''
|
|
658
|
+
Outer Polygon -> List of points ; Last input is different from first
|
|
659
|
+
[(0,0),(1,0),(1,1),(0,1)]
|
|
660
|
+
Inner Polygon -> List of points ; Last input is different from first
|
|
661
|
+
Only one inner polygon
|
|
662
|
+
'''
|
|
663
|
+
|
|
664
|
+
self.ID = id
|
|
665
|
+
self.NAME = Name
|
|
666
|
+
self.SHAPE = 'VALUE'
|
|
667
|
+
self.TYPE = 'PSC'
|
|
668
|
+
|
|
669
|
+
self.OFFSET = Offset
|
|
670
|
+
self.USESHEAR = bool(useShear)
|
|
671
|
+
self.USE7DOF = bool(use7Dof)
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
self.OUTER_POLYGON = _poly_dir(OuterPolygon)
|
|
675
|
+
self.INNER_POLYGON = []
|
|
676
|
+
self.N_INNER_POLYGON = 0
|
|
677
|
+
|
|
678
|
+
temp_arr = []
|
|
679
|
+
|
|
680
|
+
# Finding no. of internal polygons
|
|
681
|
+
if InnerPolygon != []:
|
|
682
|
+
if not isinstance(InnerPolygon[0][0],(int,float)):
|
|
683
|
+
self.N_INNER_POLYGON = len(InnerPolygon)
|
|
684
|
+
temp_arr = InnerPolygon
|
|
685
|
+
|
|
686
|
+
else:
|
|
687
|
+
temp_arr.append(InnerPolygon) #Convert to list
|
|
688
|
+
self.N_INNER_POLYGON = 1
|
|
689
|
+
|
|
690
|
+
for i in range(len(temp_arr)):
|
|
691
|
+
self.INNER_POLYGON.append(_poly_dir(temp_arr[i],'CW'))
|
|
692
|
+
|
|
693
|
+
|
|
694
|
+
_SectionADD(self)
|
|
695
|
+
|
|
696
|
+
|
|
576
697
|
class Composite:
|
|
577
698
|
class PSCI(_common):
|
|
578
699
|
|
|
@@ -201,7 +201,7 @@ class Tendon:
|
|
|
201
201
|
Tendon.Property.create()
|
|
202
202
|
if Tendon.Profile.profiles !=[]:
|
|
203
203
|
Tendon.Profile.create()
|
|
204
|
-
if Tendon.Prestress.
|
|
204
|
+
if Tendon.Prestress.loads !=[]:
|
|
205
205
|
Tendon.Prestress.create()
|
|
206
206
|
|
|
207
207
|
class Relaxation:
|
|
@@ -880,10 +880,9 @@ class Tendon:
|
|
|
880
880
|
|
|
881
881
|
|
|
882
882
|
class Prestress:
|
|
883
|
-
"""
|
|
884
|
-
Example: Load_Node(101, "LC1", "Group1", FZ = 10)
|
|
883
|
+
"""Prestress Loading for Tendons.
|
|
885
884
|
"""
|
|
886
|
-
|
|
885
|
+
loads = []
|
|
887
886
|
ids = []
|
|
888
887
|
def __init__(self, profile_name, load_case, load_group = "", prestress_type = "STRESS", jack_step = "BEGIN", jack_begin = 0, jack_end=0, grouting_stage = 0, id = 0):
|
|
889
888
|
|
|
@@ -904,7 +903,7 @@ class Tendon:
|
|
|
904
903
|
if jack_step not in ['BEGIN' , 'END' , 'BOTH']: jack_step = 'BEGIN'
|
|
905
904
|
|
|
906
905
|
self.TDN_ID = 0
|
|
907
|
-
if id == 0: id = len(Tendon.Prestress.
|
|
906
|
+
if id == 0: id = len(Tendon.Prestress.loads) + 1
|
|
908
907
|
self.ID = id
|
|
909
908
|
else:
|
|
910
909
|
self.TDN_ID = -id//100000
|
|
@@ -924,14 +923,14 @@ class Tendon:
|
|
|
924
923
|
|
|
925
924
|
|
|
926
925
|
|
|
927
|
-
Tendon.Prestress.
|
|
926
|
+
Tendon.Prestress.loads.append(self)
|
|
928
927
|
Tendon.Prestress.ids.append(self.ID)
|
|
929
928
|
|
|
930
929
|
|
|
931
930
|
@classmethod
|
|
932
931
|
def json(cls):
|
|
933
932
|
json = {"Assign": {}}
|
|
934
|
-
for self in cls.
|
|
933
|
+
for self in cls.loads:
|
|
935
934
|
|
|
936
935
|
# Finding Tendon ID
|
|
937
936
|
tdn_id = self.TDN_ID
|
|
@@ -943,7 +942,7 @@ class Tendon:
|
|
|
943
942
|
tdn_check=1
|
|
944
943
|
break
|
|
945
944
|
if not tdn_check:
|
|
946
|
-
print(f'⚠️ "{self.TDN_NAME}"
|
|
945
|
+
print(f'⚠️ "{self.TDN_NAME}" Tendon name is not found for Prestress load application. Prestress load skipped.\n📑 Try Tendon.Profile.sync() to retrieve Profile Names first')
|
|
947
946
|
continue
|
|
948
947
|
|
|
949
948
|
|
|
@@ -973,12 +972,12 @@ class Tendon:
|
|
|
973
972
|
|
|
974
973
|
@classmethod
|
|
975
974
|
def delete(cls):
|
|
976
|
-
cls.
|
|
975
|
+
cls.loads=[]
|
|
977
976
|
return MidasAPI("DELETE", "/db/TDPL")
|
|
978
977
|
|
|
979
978
|
@classmethod
|
|
980
979
|
def sync(cls):
|
|
981
|
-
cls.
|
|
980
|
+
cls.loads = []
|
|
982
981
|
a = cls.get()
|
|
983
982
|
if a != {'message': ''}:
|
|
984
983
|
for i in a['TDPL'].keys():
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|