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.
- midas_civil/_BoundaryChangeAssignment.py +278 -0
- midas_civil/__init__.py +51 -0
- midas_civil/_analysiscontrol.py +585 -0
- midas_civil/_boundary.py +888 -0
- midas_civil/_construction.py +1004 -0
- midas_civil/_element.py +1346 -0
- midas_civil/_group.py +337 -0
- midas_civil/_load.py +967 -0
- midas_civil/_loadcomb.py +159 -0
- midas_civil/_mapi.py +249 -0
- midas_civil/_material.py +1692 -0
- midas_civil/_model.py +522 -0
- midas_civil/_movingload.py +1479 -0
- midas_civil/_node.py +532 -0
- midas_civil/_result_table.py +929 -0
- midas_civil/_result_test.py +5455 -0
- midas_civil/_section/_TapdbSecSS.py +175 -0
- midas_civil/_section/__init__.py +413 -0
- midas_civil/_section/_compositeSS.py +283 -0
- midas_civil/_section/_dbSecSS.py +164 -0
- midas_civil/_section/_offsetSS.py +53 -0
- midas_civil/_section/_pscSS copy.py +455 -0
- midas_civil/_section/_pscSS.py +822 -0
- midas_civil/_section/_tapPSC12CellSS.py +565 -0
- midas_civil/_section/_unSupp.py +58 -0
- midas_civil/_settlement.py +161 -0
- midas_civil/_temperature.py +677 -0
- midas_civil/_tendon.py +1016 -0
- midas_civil/_thickness.py +147 -0
- midas_civil/_utils.py +529 -0
- midas_civil/_utilsFunc/__init__.py +0 -0
- midas_civil/_utilsFunc/_line2plate.py +636 -0
- midas_civil/_view.py +891 -0
- midas_civil/_view_trial.py +430 -0
- midas_civil/_visualise.py +347 -0
- midas_civil-1.4.1.dist-info/METADATA +74 -0
- midas_civil-1.4.1.dist-info/RECORD +40 -0
- midas_civil-1.4.1.dist-info/WHEEL +5 -0
- midas_civil-1.4.1.dist-info/licenses/LICENSE +21 -0
- midas_civil-1.4.1.dist-info/top_level.txt +1 -0
midas_civil/_material.py
ADDED
|
@@ -0,0 +1,1692 @@
|
|
|
1
|
+
from ._mapi import MidasAPI
|
|
2
|
+
|
|
3
|
+
from typing import Literal
|
|
4
|
+
|
|
5
|
+
_dbConc = Literal["KSCE-LSD15(RC)","KS01-Civil(RC)","KS-Civil(RC)","KS19(RC)","KS01(RC)","KS(RC)","ASTM19(RC)","ASTM(RC)","U.S.C(US)(RC)","U.S.C(SI)(RC)","NMX NTC-2017(RC)","CSA(RC)","JIS(RC)","JIS-Civil(RC)","JTJ023-85(RC)","Q/CR 9300-18(RC)","GB 50917-13(RC)","GB10(RC)","GB(RC)","GB-Civil(RC)","TB10092-17(RC)","JTG3362-18(RC)","JTG04(RC)","TB05(RC)","BS(RC)","EN04(RC)","EN(RC)","NTC08(RC)","NTC12(RC)","NTC18(RC)","UNI(RC)","SS(RC)","GOST-SP(RC)","GOST-SNIP(RC)","IRC(RC)","IRS(RC)","IS(RC)","CNS560-18(RC)","CNS560(RC)","CNS(RC)","AS17(RC)","TMH7(RC)","PNS49(RC)","SNI(RC)","TIS(RC)","TIS(MKS)(RC)"]
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class Material:
|
|
9
|
+
mats = []
|
|
10
|
+
ids = []
|
|
11
|
+
def __init__(self,data,id=None):
|
|
12
|
+
if id == None: id =0
|
|
13
|
+
if Material.ids == []:
|
|
14
|
+
count = 1
|
|
15
|
+
else:
|
|
16
|
+
count = max(Material.ids)+1
|
|
17
|
+
if id == 0 or id in Material.ids: self.ID = count
|
|
18
|
+
if id!= 0 and id not in Material.ids: self.ID = id
|
|
19
|
+
|
|
20
|
+
self.DATA = data
|
|
21
|
+
|
|
22
|
+
Material.mats.append(self)
|
|
23
|
+
Material.ids.append(self.ID)
|
|
24
|
+
|
|
25
|
+
@classmethod
|
|
26
|
+
def json(cls):
|
|
27
|
+
json = {"Assign":{}}
|
|
28
|
+
for k in cls.mats:
|
|
29
|
+
json["Assign"][k.ID]=k.DATA
|
|
30
|
+
return json
|
|
31
|
+
|
|
32
|
+
@staticmethod
|
|
33
|
+
def create_only():
|
|
34
|
+
return MidasAPI("PUT","/db/MATL",Material.json())
|
|
35
|
+
|
|
36
|
+
@staticmethod
|
|
37
|
+
def get():
|
|
38
|
+
return MidasAPI("GET","/db/MATL")
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
@staticmethod
|
|
42
|
+
def delete():
|
|
43
|
+
MidasAPI("DELETE","/db/MATL")
|
|
44
|
+
Material.clear()
|
|
45
|
+
|
|
46
|
+
@staticmethod
|
|
47
|
+
def clear():
|
|
48
|
+
Material.mats=[]
|
|
49
|
+
Material.ids=[]
|
|
50
|
+
|
|
51
|
+
@staticmethod
|
|
52
|
+
def sync():
|
|
53
|
+
a = Material.get()
|
|
54
|
+
if a != {'message': ''}:
|
|
55
|
+
if list(a['MATL'].keys()) != []:
|
|
56
|
+
Material.mats = []
|
|
57
|
+
Material.ids=[]
|
|
58
|
+
for j in a['MATL'].keys():
|
|
59
|
+
Material(a['MATL'][j], int(j))
|
|
60
|
+
|
|
61
|
+
# ---------------------------------- ALL FUNCTIONS ---------------------------------------------------
|
|
62
|
+
|
|
63
|
+
@staticmethod
|
|
64
|
+
def create():
|
|
65
|
+
if Material.mats!=[] : Material.create_only()
|
|
66
|
+
if CreepShrinkage.mats!=[] : CreepShrinkage.create()
|
|
67
|
+
if CompStrength.mats!=[] : CompStrength.create()
|
|
68
|
+
if TDMatLink.json()!={'Assign':{}} : TDMatLink.create()
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
@staticmethod
|
|
72
|
+
def deleteAll():
|
|
73
|
+
Material.delete()
|
|
74
|
+
CreepShrinkage.delete()
|
|
75
|
+
CompStrength.delete()
|
|
76
|
+
|
|
77
|
+
@staticmethod
|
|
78
|
+
def clearAll():
|
|
79
|
+
Material.clear()
|
|
80
|
+
CreepShrinkage.clear()
|
|
81
|
+
CompStrength.clear()
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
# --------------------------------- CONCRETE MATERIAL --------------------------------------------------------------
|
|
86
|
+
|
|
87
|
+
class CONC:
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
# ---------------------------------- DB MATERIAL ---------------------------------------------------
|
|
91
|
+
|
|
92
|
+
def __init__(self,name='',standard:_dbConc='',db='',id:int=None,):
|
|
93
|
+
if id == None: id =0
|
|
94
|
+
js = {
|
|
95
|
+
"TYPE": "CONC",
|
|
96
|
+
"NAME": name,
|
|
97
|
+
"DAMP_RAT": 0.05,
|
|
98
|
+
"PARAM": [
|
|
99
|
+
{
|
|
100
|
+
"P_TYPE": 1,
|
|
101
|
+
"STANDARD": standard,
|
|
102
|
+
"CODE": "",
|
|
103
|
+
"DB": db,
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
temp = Material(js,id)
|
|
108
|
+
self.ID = temp.ID
|
|
109
|
+
self.DATA = js
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
# ---------------------------------- USER MATERIAL ---------------------------------------------------
|
|
113
|
+
|
|
114
|
+
class User:
|
|
115
|
+
def __init__(self,name='',E=0,pois=0,den=0,mass=0,therm=0,id:int=None,):
|
|
116
|
+
if id == None: id =0
|
|
117
|
+
js = {
|
|
118
|
+
"TYPE": "CONC",
|
|
119
|
+
"NAME": name,
|
|
120
|
+
"DAMP_RAT": 0.05,
|
|
121
|
+
"PARAM": [
|
|
122
|
+
{
|
|
123
|
+
"P_TYPE": 2,
|
|
124
|
+
"ELAST": E,
|
|
125
|
+
"POISN": pois,
|
|
126
|
+
"THERMAL": therm,
|
|
127
|
+
"DEN": den,
|
|
128
|
+
"MASS": mass
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
temp = Material(js,id)
|
|
133
|
+
self.ID = temp.ID
|
|
134
|
+
self.DATA = js
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
# --------------------------------- STEEL MATERIAL --------------------------------------------------------------
|
|
139
|
+
|
|
140
|
+
class STEEL:
|
|
141
|
+
|
|
142
|
+
# ---------------------------------- DB MATERIAL ---------------------------------------------------
|
|
143
|
+
|
|
144
|
+
def __init__(self,name='',standard='',db='',id:int=None,):
|
|
145
|
+
if id == None: id =0
|
|
146
|
+
js = {
|
|
147
|
+
"TYPE": "STEEL",
|
|
148
|
+
"NAME": name,
|
|
149
|
+
"DAMP_RAT": 0.05,
|
|
150
|
+
"PARAM": [
|
|
151
|
+
{
|
|
152
|
+
"P_TYPE": 1,
|
|
153
|
+
"STANDARD": standard,
|
|
154
|
+
"CODE": "",
|
|
155
|
+
"DB": db,
|
|
156
|
+
}
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
temp = Material(js,id)
|
|
160
|
+
self.ID = temp.ID
|
|
161
|
+
self.DATA = js
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
# ---------------------------------- USER MATERIAL ---------------------------------------------------
|
|
165
|
+
|
|
166
|
+
class User:
|
|
167
|
+
def __init__(self,name='',E=0,pois=0,den=0,mass=0,therm=0,id:int=None,):
|
|
168
|
+
if id == None: id =0
|
|
169
|
+
js = {
|
|
170
|
+
"TYPE": "STEEL",
|
|
171
|
+
"NAME": name,
|
|
172
|
+
"DAMP_RAT": 0.05,
|
|
173
|
+
"PARAM": [
|
|
174
|
+
{
|
|
175
|
+
"P_TYPE": 2,
|
|
176
|
+
"ELAST": E,
|
|
177
|
+
"POISN": pois,
|
|
178
|
+
"THERMAL": therm,
|
|
179
|
+
"DEN": den,
|
|
180
|
+
"MASS": mass
|
|
181
|
+
}
|
|
182
|
+
]
|
|
183
|
+
}
|
|
184
|
+
temp = Material(js,id)
|
|
185
|
+
self.ID = temp.ID
|
|
186
|
+
self.DATA = js
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
# --------------------------------- USER MATERIAL --------------------------------------------------------------
|
|
192
|
+
|
|
193
|
+
class USER:
|
|
194
|
+
|
|
195
|
+
def __init__(self,name='',E=0,pois=0,den=0,mass=0,therm=0,id:int=None,):
|
|
196
|
+
if id == None: id =0
|
|
197
|
+
js = {
|
|
198
|
+
"TYPE": "USER",
|
|
199
|
+
"NAME": name,
|
|
200
|
+
"DAMP_RAT": 0.05,
|
|
201
|
+
"PARAM": [
|
|
202
|
+
{
|
|
203
|
+
"P_TYPE": 2,
|
|
204
|
+
"ELAST": E,
|
|
205
|
+
"POISN": pois,
|
|
206
|
+
"THERMAL": therm,
|
|
207
|
+
"DEN": den,
|
|
208
|
+
"MASS": mass
|
|
209
|
+
}
|
|
210
|
+
]
|
|
211
|
+
}
|
|
212
|
+
temp = Material(js,id)
|
|
213
|
+
self.ID = temp.ID
|
|
214
|
+
self.DATA = js
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
# ------------------------------------------ TIME DEPENDENT - CREEP and SHRINKAGE ----------------------------------------------------
|
|
218
|
+
|
|
219
|
+
class CreepShrinkage:
|
|
220
|
+
mats = []
|
|
221
|
+
ids = []
|
|
222
|
+
def __init__(self,data,id:int=None):
|
|
223
|
+
if id == None: id =0
|
|
224
|
+
if CreepShrinkage.ids == []:
|
|
225
|
+
count = 1
|
|
226
|
+
else:
|
|
227
|
+
count = max(CreepShrinkage.ids)+1
|
|
228
|
+
if id == 0 or id in CreepShrinkage.ids: self.ID = count
|
|
229
|
+
if id!= 0 and id not in CreepShrinkage.ids: self.ID = id
|
|
230
|
+
|
|
231
|
+
self.DATA = data
|
|
232
|
+
|
|
233
|
+
CreepShrinkage.mats.append(self)
|
|
234
|
+
CreepShrinkage.ids.append(self.ID)
|
|
235
|
+
|
|
236
|
+
@classmethod
|
|
237
|
+
def json(cls):
|
|
238
|
+
json = {"Assign":{}}
|
|
239
|
+
for k in cls.mats:
|
|
240
|
+
json["Assign"][k.ID]=k.DATA
|
|
241
|
+
return json
|
|
242
|
+
|
|
243
|
+
@staticmethod
|
|
244
|
+
def create():
|
|
245
|
+
MidasAPI("PUT","/db/TDMT",CreepShrinkage.json())
|
|
246
|
+
|
|
247
|
+
@staticmethod
|
|
248
|
+
def get():
|
|
249
|
+
return MidasAPI("GET","/db/TDMT")
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
@staticmethod
|
|
253
|
+
def delete():
|
|
254
|
+
MidasAPI("DELETE","/db/TDMT")
|
|
255
|
+
CreepShrinkage.clear()
|
|
256
|
+
|
|
257
|
+
@staticmethod
|
|
258
|
+
def clear():
|
|
259
|
+
CreepShrinkage.mats=[]
|
|
260
|
+
CreepShrinkage.ids=[]
|
|
261
|
+
|
|
262
|
+
@staticmethod
|
|
263
|
+
def sync():
|
|
264
|
+
a = CreepShrinkage.get()
|
|
265
|
+
if a != {'message': ''}:
|
|
266
|
+
if list(a['TDMT'].keys()) != []:
|
|
267
|
+
CreepShrinkage.mats = []
|
|
268
|
+
CreepShrinkage.ids=[]
|
|
269
|
+
for j in a['TDMT'].keys():
|
|
270
|
+
CreepShrinkage(a['TDMT'][j], int(j))
|
|
271
|
+
|
|
272
|
+
# --------------------------------- IRC CnS --------------------------------------------------------------
|
|
273
|
+
|
|
274
|
+
class IRC:
|
|
275
|
+
def __init__(self,name: str, code_year: int = 2011, fck: float = 0, notional_size: float = 1,
|
|
276
|
+
relative_humidity: float = 70, age_shrinkage: int = 3, type_cement: str = 'NR', id: int = None):
|
|
277
|
+
"""
|
|
278
|
+
IRC Creep and Shrinkage for Indian Road Congress standards.
|
|
279
|
+
|
|
280
|
+
Parameters:
|
|
281
|
+
name (str): The name for the material property.
|
|
282
|
+
code_year (int, optional): The year of the IRC code. Can be 2000 or 2011. Defaults to 2011.
|
|
283
|
+
fck (float): 28-day characteristic compressive strength.
|
|
284
|
+
notional_size (float): The notional size of the member
|
|
285
|
+
relative_humidity (float): The relative humidity in percentage (40-99%).
|
|
286
|
+
age_shrinkage (int): The age of the concrete at the beginning of shrinkage in days.
|
|
287
|
+
type_cement (str, optional): The type of cement ('SL'= Slow Setting cement, 'NR'= Normal cement, 'RS'=Rapid hardening cement). Only for IRC:112-2011. Defaults to 'NR'.
|
|
288
|
+
id (int, optional): A specific ID for the material. Auto-generated if not provided.
|
|
289
|
+
|
|
290
|
+
Examples:
|
|
291
|
+
```python
|
|
292
|
+
# Create a material based on IRC:112-2011
|
|
293
|
+
CreepShrinkage.IRC("IRC_M30_2011", code_year=2011, fck=30000, notional_size=1, type_cement = "RS", age_shrinkage=7)
|
|
294
|
+
|
|
295
|
+
# Create a material based on IRC:18-2000
|
|
296
|
+
CreepShrinkage.IRC("IRC_M25_2000", code_year=2000, fck=25000, notional_size=1, relative_humidity=80, age_shrinkage=3)
|
|
297
|
+
```
|
|
298
|
+
"""
|
|
299
|
+
if id == None: id =0
|
|
300
|
+
code_name = ""
|
|
301
|
+
if code_year == 2011:
|
|
302
|
+
code_name = "INDIA_IRC_112_2011"
|
|
303
|
+
elif code_year == 2000:
|
|
304
|
+
code_name = "INDIA_IRC_18_2000"
|
|
305
|
+
else:
|
|
306
|
+
code_name = "INDIA_IRC_112_2011"
|
|
307
|
+
|
|
308
|
+
if type_cement == "SL":
|
|
309
|
+
type_cement = "RS"
|
|
310
|
+
elif type_cement == "RS":
|
|
311
|
+
type_cement = "SL"
|
|
312
|
+
|
|
313
|
+
js = {
|
|
314
|
+
"NAME": name,
|
|
315
|
+
"CODE": code_name,
|
|
316
|
+
"STR": fck,
|
|
317
|
+
"HU": relative_humidity,
|
|
318
|
+
"AGE": age_shrinkage,
|
|
319
|
+
"MSIZE": notional_size
|
|
320
|
+
}
|
|
321
|
+
if code_year == 2011:
|
|
322
|
+
js["CTYPE"] = type_cement
|
|
323
|
+
|
|
324
|
+
temp = CreepShrinkage(js,id)
|
|
325
|
+
self.ID = temp.ID
|
|
326
|
+
self.DATA = js
|
|
327
|
+
|
|
328
|
+
# --------------------------------- CEB-FIP CnS --------------------------------------------------------------
|
|
329
|
+
|
|
330
|
+
class CEB_FIP:
|
|
331
|
+
def __init__(self, name: str, code_year: int = 2010, fck: float = 0, notional_size: float = 1,
|
|
332
|
+
relative_humidity: float = 70, age_shrinkage: int = 3, type_cement: str = 'RS',
|
|
333
|
+
type_of_aggregate: int = 0, id: int = None):
|
|
334
|
+
"""
|
|
335
|
+
CEB-FIP Creep and Shrinkage for European concrete standards.
|
|
336
|
+
|
|
337
|
+
Parameters:
|
|
338
|
+
name (str): The name for the material property.
|
|
339
|
+
code_year (int, optional): Year of the CEB-FIP standard (2010, 1990, 1978). Defaults to 2010.
|
|
340
|
+
fck (float): 28-day characteristic compressive strength.
|
|
341
|
+
notional_size (float): The notional size of the member.
|
|
342
|
+
relative_humidity (float): The relative humidity in percentage (40-100%).
|
|
343
|
+
age_shrinkage (int): The age of the concrete at the beginning of shrinkage in days.
|
|
344
|
+
type_cement (str, optional): The type of cement ('RS', 'NR', 'SL'). Defaults to 'RS'.
|
|
345
|
+
type_of_aggregate (int, optional): Type of aggregate, only for CEB-FIP 2010. 0: Basalt, 1: Quartzite, 2: Limestone, 3: Sandstone. Defaults to 0.
|
|
346
|
+
id (int, optional): A specific ID for the material. Auto-generated if not provided.
|
|
347
|
+
|
|
348
|
+
Examples:
|
|
349
|
+
```python
|
|
350
|
+
# Create a CEB-FIP 2010 material
|
|
351
|
+
CreepShrinkage.CEB_FIP("CEB_M40", code_year=2010, fck=40000, notional_size=2, relative_humidity=65, age_shrinkage=5)
|
|
352
|
+
|
|
353
|
+
# Create a CEB-FIP 1990 material
|
|
354
|
+
CreepShrinkage.CEB_FIP("CEB_M35", code_year=1990, fck=35000, notional_size=3, relative_humidity=70, age_shrinkage=3)
|
|
355
|
+
```
|
|
356
|
+
"""
|
|
357
|
+
if id == None: id =0
|
|
358
|
+
code_name = ""
|
|
359
|
+
if code_year == 2010:
|
|
360
|
+
code_name = "CEB_FIP_2010"
|
|
361
|
+
elif code_year == 1990:
|
|
362
|
+
code_name = "CEB"
|
|
363
|
+
elif code_year == 1978:
|
|
364
|
+
code_name = "CEB_FIP_1978"
|
|
365
|
+
else:
|
|
366
|
+
code_name = "CEB_FIP_2010"
|
|
367
|
+
|
|
368
|
+
js = {
|
|
369
|
+
"NAME": name,
|
|
370
|
+
"CODE": code_name,
|
|
371
|
+
"STR": fck,
|
|
372
|
+
"HU": relative_humidity,
|
|
373
|
+
"AGE": age_shrinkage,
|
|
374
|
+
"MSIZE": notional_size,
|
|
375
|
+
"CTYPE": type_cement,
|
|
376
|
+
}
|
|
377
|
+
if code_year == 2010:
|
|
378
|
+
js["TYPEOFAFFR"] = type_of_aggregate
|
|
379
|
+
|
|
380
|
+
temp = CreepShrinkage(js, id)
|
|
381
|
+
self.ID = temp.ID
|
|
382
|
+
self.DATA = js
|
|
383
|
+
|
|
384
|
+
# --------------------------------- ACI CnS --------------------------------------------------------------
|
|
385
|
+
|
|
386
|
+
class ACI:
|
|
387
|
+
def __init__(self, name: str, fck: float = 0, relative_humidity: float = 70, age_shrinkage: int = 3,
|
|
388
|
+
vol_surface_ratio: float = 1.2, cfact_a: float = 4, cfact_b: float = 0.85,
|
|
389
|
+
curing_method: str = "MOIST", material_type: str = "CODE", cement_content: float = 24,
|
|
390
|
+
slump: float = 1.1, fine_agg_percent: float = 12, air_content: float = 13,
|
|
391
|
+
creep_coeff: float = None, shrink_strain: float = None, id: int = None):
|
|
392
|
+
"""
|
|
393
|
+
ACI Creep and Shrinkage for American Concrete Institute standards.
|
|
394
|
+
|
|
395
|
+
Parameters:
|
|
396
|
+
name (str): The name for the material property.
|
|
397
|
+
fck (float): 28-day compressive strength .
|
|
398
|
+
relative_humidity (float): The relative humidity (40-99%).
|
|
399
|
+
age_shrinkage (int): The age of the concrete at the beginning of shrinkage in days.
|
|
400
|
+
vol_surface_ratio (float): The volume to surface area ratio.
|
|
401
|
+
cfact_a (float): Concrete compressive strength factor 'a'.
|
|
402
|
+
cfact_b (float): Concrete compressive strength factor 'b'.
|
|
403
|
+
curing_method (str, optional): Curing method ('MOIST' or 'STEAM'). Defaults to 'MOIST'.
|
|
404
|
+
material_type (str, optional): Material factored ultimate value type ('CODE' or 'USER'). Defaults to 'CODE'.
|
|
405
|
+
cement_content (float, optional): Cement content (used if material_type='CODE').
|
|
406
|
+
slump (float, optional): Slump value (used if material_type='CODE').
|
|
407
|
+
fine_agg_percent (float, optional): Fine aggregate percentage (used if material_type='CODE').
|
|
408
|
+
air_content (float, optional): Air content (used if material_type='CODE').
|
|
409
|
+
creep_coeff (float, optional): Creep coefficient (used if material_type='USER').
|
|
410
|
+
shrink_strain (float, optional): Shrinkage strain in E-6 (used if material_type='USER').
|
|
411
|
+
id (int, optional): A specific ID for the material. Auto-generated if not provided.
|
|
412
|
+
|
|
413
|
+
Examples:
|
|
414
|
+
```python
|
|
415
|
+
# Create an ACI material using code-based properties
|
|
416
|
+
CreepShrinkage.ACI("ACI_C35_Code", fck=35000, relative_humidity=75, age_shrinkage=7, vol_surface_ratio=50)
|
|
417
|
+
|
|
418
|
+
# Create an ACI material using user-defined ultimate values
|
|
419
|
+
CreepShrinkage.ACI("ACI_C35_User", fck=35000, relative_humidity=75, age_shrinkage=7, vol_surface_ratio=50, material_type="USER", creep_coeff=2.5, shrink_strain=600)
|
|
420
|
+
```
|
|
421
|
+
"""
|
|
422
|
+
if id == None: id =0
|
|
423
|
+
js = {
|
|
424
|
+
"NAME": name,
|
|
425
|
+
"CODE": "ACI",
|
|
426
|
+
"STR": fck,
|
|
427
|
+
"HU": relative_humidity,
|
|
428
|
+
"AGE": age_shrinkage,
|
|
429
|
+
"VOL": vol_surface_ratio,
|
|
430
|
+
"CFACTA": cfact_a,
|
|
431
|
+
"CFACTB": cfact_b,
|
|
432
|
+
"TYPE": material_type,
|
|
433
|
+
"CMETHOD": curing_method
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
if material_type == "CODE":
|
|
437
|
+
js.update({
|
|
438
|
+
"CEMCONTENT": cement_content,
|
|
439
|
+
"SLUMP": slump,
|
|
440
|
+
"FAPERCENT": fine_agg_percent,
|
|
441
|
+
"AIRCONTENT": air_content
|
|
442
|
+
})
|
|
443
|
+
elif material_type == "USER":
|
|
444
|
+
js.update({
|
|
445
|
+
"CREEPCOEFF": creep_coeff if creep_coeff is not None else 1.4,
|
|
446
|
+
"SHRINKSTRAIN": shrink_strain if shrink_strain is not None else 500
|
|
447
|
+
})
|
|
448
|
+
|
|
449
|
+
temp = CreepShrinkage(js, id)
|
|
450
|
+
self.ID = temp.ID
|
|
451
|
+
self.DATA = js
|
|
452
|
+
|
|
453
|
+
# --------------------------------- AASHTO CnS --------------------------------------------------------------
|
|
454
|
+
|
|
455
|
+
class AASHTO:
|
|
456
|
+
def __init__(self, name: str, fck: float = 0, relative_humidity: float = 70, age_shrinkage: int = 3,
|
|
457
|
+
vol_surface_ratio: float = 1.2, b_expose: bool = False, id: int = None):
|
|
458
|
+
"""
|
|
459
|
+
AASHTO Creep and Shrinkage model.
|
|
460
|
+
|
|
461
|
+
Parameters:
|
|
462
|
+
name (str): The name for the material property.
|
|
463
|
+
fck (float): 28-day compressive strength.
|
|
464
|
+
relative_humidity (float): The relative humidity (40-99%).
|
|
465
|
+
age_shrinkage (int): The age of the concrete at the beginning of shrinkage in days.
|
|
466
|
+
vol_surface_ratio (float): The volume to surface area ratio.
|
|
467
|
+
b_expose (bool, optional): Expose to drying before 5 days of curing. Defaults to False.
|
|
468
|
+
id (int, optional): A specific ID for the material. Auto-generated if not provided.
|
|
469
|
+
|
|
470
|
+
Examples:
|
|
471
|
+
```python
|
|
472
|
+
CreepShrinkage.AASHTO("AASHTO_M30", fck=30000, relative_humidity=80, age_shrinkage=5, vol_surface_ratio=60)
|
|
473
|
+
```
|
|
474
|
+
"""
|
|
475
|
+
if id == None: id =0
|
|
476
|
+
js = {
|
|
477
|
+
"NAME": name,
|
|
478
|
+
"CODE": "AASHTO",
|
|
479
|
+
"STR": fck,
|
|
480
|
+
"HU": relative_humidity,
|
|
481
|
+
"AGE": age_shrinkage,
|
|
482
|
+
"VOL": vol_surface_ratio,
|
|
483
|
+
"bEXPOSE": b_expose
|
|
484
|
+
}
|
|
485
|
+
temp = CreepShrinkage(js, id)
|
|
486
|
+
self.ID = temp.ID
|
|
487
|
+
self.DATA = js
|
|
488
|
+
|
|
489
|
+
# --------------------------------- European CnS --------------------------------------------------------------
|
|
490
|
+
|
|
491
|
+
class European:
|
|
492
|
+
def __init__(self, name: str, fck: float = 0, relative_humidity: float = 70, age_shrinkage: int = 3,
|
|
493
|
+
notional_size: float = 1.2, type_cement: str = "Class N", t_code: int = 0, b_silica: bool = False, id: int = None):
|
|
494
|
+
"""
|
|
495
|
+
European Creep and Shrinkage model (EN 1992).
|
|
496
|
+
|
|
497
|
+
Parameters:
|
|
498
|
+
name (str): The name for the material property.
|
|
499
|
+
fck (float): 28-day characteristic compressive strength.
|
|
500
|
+
relative_humidity (float): The relative humidity in percentage (40-99%).
|
|
501
|
+
age_shrinkage (int): The age of the concrete at the beginning of shrinkage in days.
|
|
502
|
+
notional_size (float): The notional size of the member.
|
|
503
|
+
type_cement (str, optional): Cement class ('Class S', 'Class N', 'Class R'). Defaults to 'Class N'.
|
|
504
|
+
t_code (int, optional): Type of code. 0: EN 1992-1 (General), 1: EN 1992-2 (Bridge). Defaults to 0.
|
|
505
|
+
b_silica (bool, optional): Whether silica fume is used. Only applicable when t_code is 1. Defaults to False.
|
|
506
|
+
id (int, optional): A specific ID for the material. Auto-generated if not provided.
|
|
507
|
+
|
|
508
|
+
Examples:
|
|
509
|
+
```python
|
|
510
|
+
# EN 1992-1 General Structure
|
|
511
|
+
CreepShrinkage.European("Euro_General_C30", fck=30000, relative_humidity=75, age_shrinkage=7, notional_size=2)
|
|
512
|
+
|
|
513
|
+
# EN 1992-2 Concrete Bridge with Silica Fume
|
|
514
|
+
CreepShrinkage.European("Euro_Bridge_C40", fck=40000, relative_humidity=70, age_shrinkage=5, notional_size=2, t_code=1, b_silica=True)
|
|
515
|
+
```
|
|
516
|
+
"""
|
|
517
|
+
if id == None: id =0
|
|
518
|
+
js = {
|
|
519
|
+
"NAME": name,
|
|
520
|
+
"CODE": "EUROPEAN",
|
|
521
|
+
"STR": fck,
|
|
522
|
+
"HU": relative_humidity,
|
|
523
|
+
"AGE": age_shrinkage,
|
|
524
|
+
"MSIZE": notional_size,
|
|
525
|
+
"CTYPE": type_cement,
|
|
526
|
+
"TCODE": t_code,
|
|
527
|
+
}
|
|
528
|
+
if t_code == 1:
|
|
529
|
+
js["bSILICA"] = b_silica
|
|
530
|
+
|
|
531
|
+
temp = CreepShrinkage(js, id)
|
|
532
|
+
self.ID = temp.ID
|
|
533
|
+
self.DATA = js
|
|
534
|
+
|
|
535
|
+
# --------------------------------- Russian CnS --------------------------------------------------------------
|
|
536
|
+
class Russian:
|
|
537
|
+
def __init__(self, name: str, fck: float, relative_humidity: float, module_exposed_surface: float,
|
|
538
|
+
age_concrete: int, water_content: float, max_aggregate_size: float, air_content: float,
|
|
539
|
+
specific_cement_paste_content: float, curing_method: int = 0,cement_type=1, fast_accumulating_creep: bool = False,
|
|
540
|
+
concrete_type: int = 0, id: int = None):
|
|
541
|
+
"""
|
|
542
|
+
Russian Creep and Shrinkage model.
|
|
543
|
+
|
|
544
|
+
Parameters:
|
|
545
|
+
name (str): The name for the material property.
|
|
546
|
+
fck (float): 28-day compressive strength.
|
|
547
|
+
relative_humidity (float): The relative humidity in percentage.
|
|
548
|
+
module_exposed_surface (float): The module of an exposed surface.
|
|
549
|
+
age_concrete (int): The age of the concrete in days.
|
|
550
|
+
water_content (float): The water content .
|
|
551
|
+
max_aggregate_size (float): Maximum aggregate size.
|
|
552
|
+
air_content (float): Air content.
|
|
553
|
+
specific_cement_paste_content (float): Specific content of the cement paste.
|
|
554
|
+
curing_method (int, optional): Curing method. 0: Natural, 1: Steam. Defaults to 0.
|
|
555
|
+
cement_type(int ,optional) : Cement Type. 0: Normal (Default), 1: Fast-hardened , 2: Slag ,3: Pozzolan
|
|
556
|
+
fast_accumulating_creep (bool, optional): Whether to consider fast-accumulating creep. Defaults to False.
|
|
557
|
+
concrete_type (int, optional): Type of concrete. 0: Heavy, 1: Fine-grained. Defaults to 0.
|
|
558
|
+
id (int, optional): A specific ID for the material. Auto-generated if not provided.
|
|
559
|
+
|
|
560
|
+
Examples:
|
|
561
|
+
```python
|
|
562
|
+
# Standard Russian model with natural curing
|
|
563
|
+
CreepShrinkage.Russian("RU_Heavy_C30", fck=30000, relative_humidity=70, module_exposed_surface=10, age_concrete=14, water_content=180, max_aggregate_size=0.02, air_content=30, specific_cement_paste_content=0.25,cement_type=2)
|
|
564
|
+
```
|
|
565
|
+
"""
|
|
566
|
+
if id == None: id =0
|
|
567
|
+
js = {
|
|
568
|
+
"NAME": name,
|
|
569
|
+
"CODE": "RUSSIAN",
|
|
570
|
+
"STR": fck,
|
|
571
|
+
"HU": relative_humidity,
|
|
572
|
+
"M": module_exposed_surface,
|
|
573
|
+
"AGE": age_concrete,
|
|
574
|
+
"CMETH": curing_method,
|
|
575
|
+
"iCTYPE": cement_type,
|
|
576
|
+
"CREEP": fast_accumulating_creep,
|
|
577
|
+
"CONCT": concrete_type,
|
|
578
|
+
"W": water_content,
|
|
579
|
+
"MAXS": max_aggregate_size,
|
|
580
|
+
"A": air_content,
|
|
581
|
+
"PZ": specific_cement_paste_content
|
|
582
|
+
}
|
|
583
|
+
temp = CreepShrinkage(js, id)
|
|
584
|
+
self.ID = temp.ID
|
|
585
|
+
self.DATA = js
|
|
586
|
+
|
|
587
|
+
# --------------------------------- AS & NZ CnS -------------------------------------------------
|
|
588
|
+
class AS_NZ:
|
|
589
|
+
def __init__(self, name: str, standard: str, fck: float, concrete_age: int,
|
|
590
|
+
hypothetical_thickness: float, drying_shrinkage_type: int = 0,
|
|
591
|
+
user_defined_shrinkage_strain: float = 0, humidity_factor: float = 0.72,
|
|
592
|
+
exposure_environment: int = 0, id: int = None):
|
|
593
|
+
"""
|
|
594
|
+
Australian & New Zealand Standards Creep and Shrinkage model.
|
|
595
|
+
|
|
596
|
+
Parameters:
|
|
597
|
+
name (str): The name for the material property.
|
|
598
|
+
standard (str): The standard code. Valid codes are 'AS_5100_5_2017', 'AS_5100_5_2016', 'AS_RTA_5100_5_2011', 'AS_3600_2009', 'NEWZEALAND'.
|
|
599
|
+
fck (float): 28-day compressive strength
|
|
600
|
+
concrete_age (int): The age of the concrete in days
|
|
601
|
+
hypothetical_thickness (float): The hypothetical thickness of the member
|
|
602
|
+
drying_shrinkage_type (int, optional): Type of drying basic shrinkage strain,The values depend on the chosen standard.
|
|
603
|
+
- For AS Standards ('AS_5100_5_2017', 'AS_5100_5_2016', etc.):
|
|
604
|
+
- 0: 800.0 (Sydney, Brisbane)
|
|
605
|
+
- 1: 900.0 (Melbourne)
|
|
606
|
+
- 2: 1000.0 (Elsewhere)
|
|
607
|
+
- 3: User Defined Value
|
|
608
|
+
- For NZ Bridge Standard ('NEWZEALAND'):
|
|
609
|
+
- 0: 1500 (Hastings, Palmerston North, etc.)
|
|
610
|
+
- 1: 1460 (Nelson)
|
|
611
|
+
- 2: 1315 (Kaitaia, Tauranga)
|
|
612
|
+
- 3: 1080 (New Plymouth, Taranaki)
|
|
613
|
+
- 4: 1000 (Whangarei, Auckland Hunua, Hamilton)
|
|
614
|
+
- 5: 990 (Auckland)
|
|
615
|
+
- 6: 950 (Christchurch, Timaru, etc.)
|
|
616
|
+
- 7: 775 (Westport, Queenstown, etc.)
|
|
617
|
+
- 8: 735 (Dunedin)
|
|
618
|
+
- 9: 570 (Waiapu)
|
|
619
|
+
- 10: User Defined Value
|
|
620
|
+
user_defined_shrinkage_strain (float, optional): The user-defined drying basic shrinkage strain, This value is ONLY used when `drying_shrinkage_type` is set to a user-defined option (3 for AS, 10 for NZ).
|
|
621
|
+
humidity_factor (float, optional): Relative humidity thickness. This is only for the NZ Bridge standard and has a range of 0.20 to 0.72. Defaults to 0.72.
|
|
622
|
+
exposure_environment (int, optional): Exposure environment classification ("EXPOSURE") for AS standards. Defaults to 0.
|
|
623
|
+
id (int, optional): A specific ID for the material. Auto-generated if not provided.
|
|
624
|
+
|
|
625
|
+
Examples:
|
|
626
|
+
```python
|
|
627
|
+
# AS 5100.5-2017
|
|
628
|
+
CreepShrinkage.AS_NZ("AS_Melbourne_C40", standard="AS_5100_5_2017", fck=40000, hypothetical_thickness=0.3, concrete_age=7, drying_shrinkage_type=1)
|
|
629
|
+
|
|
630
|
+
# NZ Bridge standard
|
|
631
|
+
CreepShrinkage.AS_NZ("NZ_Bridge_Custom", standard="NEWZEALAND", fck=35000, hypothetical_thickness=0.25, concrete_age=14, drying_shrinkage_type=10, user_defined_shrinkage_strain=955.5)
|
|
632
|
+
```
|
|
633
|
+
"""
|
|
634
|
+
if id == None: id =0
|
|
635
|
+
js = {
|
|
636
|
+
"NAME": name,
|
|
637
|
+
"CODE": standard,
|
|
638
|
+
"STR": fck,
|
|
639
|
+
"THIK": hypothetical_thickness,
|
|
640
|
+
"AGE": concrete_age,
|
|
641
|
+
"iEPS_DRY": drying_shrinkage_type,
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
# Internal maps for predefined shrinkage values from the manual
|
|
645
|
+
as_strain_map = {0: 800.0, 1: 900.0, 2: 1000.0}
|
|
646
|
+
nz_strain_map = {0: 1500.0, 1: 1460.0, 2: 1315.0, 3: 1080.0, 4: 1000.0, 5: 990.0, 6: 950.0, 7: 775.0, 8: 735.0, 9: 570.0}
|
|
647
|
+
|
|
648
|
+
eps_dry_value = None
|
|
649
|
+
is_as_code = standard != "NEWZEALAND"
|
|
650
|
+
is_nz_code = standard == "NEWZEALAND"
|
|
651
|
+
|
|
652
|
+
# Check for user-defined cases first
|
|
653
|
+
if is_as_code and drying_shrinkage_type == 3:
|
|
654
|
+
eps_dry_value = user_defined_shrinkage_strain
|
|
655
|
+
elif is_nz_code and drying_shrinkage_type == 10:
|
|
656
|
+
eps_dry_value = user_defined_shrinkage_strain
|
|
657
|
+
# Otherwise, look up the predefined value from the appropriate map
|
|
658
|
+
elif is_as_code:
|
|
659
|
+
eps_dry_value = as_strain_map.get(drying_shrinkage_type)
|
|
660
|
+
elif is_nz_code:
|
|
661
|
+
eps_dry_value = nz_strain_map.get(drying_shrinkage_type)
|
|
662
|
+
|
|
663
|
+
js["EPS_DRY"] = eps_dry_value
|
|
664
|
+
|
|
665
|
+
# Add parameters specific to the standard
|
|
666
|
+
if is_nz_code:
|
|
667
|
+
js["FS"] = humidity_factor
|
|
668
|
+
else: # Assumes all other codes are AS standards
|
|
669
|
+
js["EXPOSURE"] = exposure_environment
|
|
670
|
+
|
|
671
|
+
temp = CreepShrinkage(js, id)
|
|
672
|
+
self.ID = temp.ID
|
|
673
|
+
self.DATA = js
|
|
674
|
+
|
|
675
|
+
# --------------------------------- Chinese Standard CnS ----------------------------------------------------
|
|
676
|
+
|
|
677
|
+
class Chinese:
|
|
678
|
+
def __init__(self, name: str, standard: str, fck: float, relative_humidity: float,
|
|
679
|
+
concrete_age: int, notional_size: float, humidity_type: str = "RH",
|
|
680
|
+
cement_coeff: float = 5, fly_ash_amount: float = 20, id: int = None):
|
|
681
|
+
"""
|
|
682
|
+
Chinese Standards Creep and Shrinkage model.
|
|
683
|
+
|
|
684
|
+
Parameters:
|
|
685
|
+
name (str): The name for the material property.
|
|
686
|
+
standard (str): The Chinese standard code ('CHINESE', 'JTG', 'CHINA_JTG3362_2018').
|
|
687
|
+
fck (float): 28-day compressive strength.
|
|
688
|
+
relative_humidity (float): The relative humidity in percentage.
|
|
689
|
+
concrete_age (int): The age of the concrete in days.
|
|
690
|
+
notional_size (float): The notional size of the member.
|
|
691
|
+
humidity_type (str, optional): Type of relative humidity ('CU' for Curing Underwater, 'RH' for Relative Humidity). Defaults to 'RH'.
|
|
692
|
+
cement_coeff (float, optional): Cement type coefficient (for JTG codes). Defaults to 5.
|
|
693
|
+
fly_ash_amount (float, optional): Amount of added fly ash (for JTG3362-2018). Range 0-30. Defaults to 20.
|
|
694
|
+
id (int, optional): A specific ID for the material. Auto-generated if not provided.
|
|
695
|
+
|
|
696
|
+
Examples:
|
|
697
|
+
```python
|
|
698
|
+
# General Chinese Standard
|
|
699
|
+
CreepShrinkage.Chinese("Chinese_C30", standard="CHINESE", fck=30000, relative_humidity=75, concrete_age=14, notional_size=2)
|
|
700
|
+
|
|
701
|
+
# JTG D62-2004 Standard
|
|
702
|
+
CreepShrinkage.Chinese("JTG_D62_C40", standard="JTG", fck=40000, relative_humidity=80, concrete_age=7, notional_size=250, cement_coeff=5)
|
|
703
|
+
```
|
|
704
|
+
"""
|
|
705
|
+
if id == None: id =0
|
|
706
|
+
js = {
|
|
707
|
+
"NAME": name,
|
|
708
|
+
"CODE": standard,
|
|
709
|
+
"STR": fck,
|
|
710
|
+
"HU": relative_humidity,
|
|
711
|
+
"AGE": concrete_age,
|
|
712
|
+
"MSIZE": notional_size,
|
|
713
|
+
"HTYPE": humidity_type
|
|
714
|
+
}
|
|
715
|
+
if "JTG" in standard:
|
|
716
|
+
js["BSC"] = cement_coeff
|
|
717
|
+
if standard == "CHINA_JTG3362_2018":
|
|
718
|
+
js["FLYASH"] = fly_ash_amount
|
|
719
|
+
|
|
720
|
+
temp = CreepShrinkage(js, id)
|
|
721
|
+
self.ID = temp.ID
|
|
722
|
+
self.DATA = js
|
|
723
|
+
|
|
724
|
+
# --------------------------------- Korean Standards CnS ----------------------------------------------------
|
|
725
|
+
|
|
726
|
+
class Korean:
|
|
727
|
+
def __init__(self, name: str, standard: str, fck: float, relative_humidity: float,
|
|
728
|
+
concrete_age: int, notional_size: float, cement_type: str = "NR",
|
|
729
|
+
density: float = 240, id: int = None):
|
|
730
|
+
"""
|
|
731
|
+
Korean Standards Creep and Shrinkage model.
|
|
732
|
+
|
|
733
|
+
Parameters:
|
|
734
|
+
name (str): The name for the material property.
|
|
735
|
+
standard (str): The Korean standard code ('KDS_2016', 'KSI_USD12', 'KSCE_2010', 'KS').
|
|
736
|
+
fck (float): 28-day compressive strength.
|
|
737
|
+
relative_humidity (float): The relative humidity in percentage.
|
|
738
|
+
concrete_age (int): The age of the concrete in days.
|
|
739
|
+
notional_size (float): The notional size of the member.
|
|
740
|
+
cement_type (str, optional): The type of cement ('SL', 'NR', 'RS'). Defaults to 'NR'.
|
|
741
|
+
density (float, optional): Weight density (Only for KDS-2016). Defaults to 240.
|
|
742
|
+
id (int, optional): A specific ID for the material. Auto-generated if not provided.
|
|
743
|
+
|
|
744
|
+
Examples:
|
|
745
|
+
```python
|
|
746
|
+
# KDS-2016 Standard
|
|
747
|
+
CreepShrinkage.Korean("KDS_C35", standard="KDS_2016", fck=35000, relative_humidity=65, concrete_age=10, notional_size=2, density=2400)
|
|
748
|
+
|
|
749
|
+
# Korea Standard (KS)
|
|
750
|
+
CreepShrinkage.Korean("KS_C30", standard="KS", fck=30000, relative_humidity=70, concrete_age=14, notional_size=2)
|
|
751
|
+
```
|
|
752
|
+
"""
|
|
753
|
+
if id == None: id =0
|
|
754
|
+
js = {
|
|
755
|
+
"NAME": name,
|
|
756
|
+
"CODE": standard,
|
|
757
|
+
"STR": fck,
|
|
758
|
+
"HU": relative_humidity,
|
|
759
|
+
"AGE": concrete_age,
|
|
760
|
+
"MSIZE": notional_size,
|
|
761
|
+
"CTYPE": cement_type
|
|
762
|
+
}
|
|
763
|
+
if standard == "KDS_2016":
|
|
764
|
+
js["DENSITY"] = density
|
|
765
|
+
|
|
766
|
+
temp = CreepShrinkage(js, id)
|
|
767
|
+
self.ID = temp.ID
|
|
768
|
+
self.DATA = js
|
|
769
|
+
|
|
770
|
+
# --------------------------------- PCA CnS -----------------------------------------------------------------
|
|
771
|
+
|
|
772
|
+
class PCA:
|
|
773
|
+
def __init__(self, name: str, fck: float, relative_humidity: float, ultimate_creep_strain: float,
|
|
774
|
+
vol_surface_ratio: float, reinforcement_ratio: float, steel_elasticity_modulus: float,
|
|
775
|
+
ultimate_shrinkage_strain: float, id: int = None):
|
|
776
|
+
"""
|
|
777
|
+
PCA Creep and Shrinkage model.
|
|
778
|
+
|
|
779
|
+
Parameters:
|
|
780
|
+
name (str): The name for the material property.
|
|
781
|
+
fc (float): Compressive strength
|
|
782
|
+
relative_humidity (float): The relative humidity in percentage. (Range : 40-99)
|
|
783
|
+
ultimate_creep_strain (float): Ultimate creep strain. (Range : 3-5)
|
|
784
|
+
vol_surface_ratio (float): The volume to surface area ratio.
|
|
785
|
+
reinforcement_ratio (float): Reinforcement ratio of the cross section.
|
|
786
|
+
steel_elasticity_modulus (float): Modulus of elasticity of steel.
|
|
787
|
+
ultimate_shrinkage_strain (float): Ultimate shrinkage strain. (Range : 500-800)
|
|
788
|
+
id (int, optional): A specific ID for the material. Auto-generated if not provided.
|
|
789
|
+
|
|
790
|
+
Examples:
|
|
791
|
+
```python
|
|
792
|
+
CreepShrinkage.PCA("PCA_Material", fck=50000, relative_humidity=70, ultimate_creep_strain=4, vol_surface_ratio=1.2, reinforcement_ratio=20, steel_elasticity_modulus=2e8, ultimate_shrinkage_strain=780)
|
|
793
|
+
```
|
|
794
|
+
"""
|
|
795
|
+
if id == None: id =0
|
|
796
|
+
js = {
|
|
797
|
+
"NAME": name,
|
|
798
|
+
"CODE": "PCA",
|
|
799
|
+
"STR": fck,
|
|
800
|
+
"HU": relative_humidity,
|
|
801
|
+
"UCS": ultimate_creep_strain,
|
|
802
|
+
"VOL": vol_surface_ratio,
|
|
803
|
+
"RR": reinforcement_ratio,
|
|
804
|
+
"MOD": steel_elasticity_modulus,
|
|
805
|
+
"USS": ultimate_shrinkage_strain
|
|
806
|
+
}
|
|
807
|
+
temp = CreepShrinkage(js, id)
|
|
808
|
+
self.ID = temp.ID
|
|
809
|
+
self.DATA = js
|
|
810
|
+
|
|
811
|
+
# --------------------------------- Japan CnS ---------------------------------------------------------------
|
|
812
|
+
|
|
813
|
+
class Japan:
|
|
814
|
+
def __init__(self, name: str, standard: str, relative_humidity: float, concrete_age: int,
|
|
815
|
+
vol_surface_ratio: float, cement_content: float, water_content: float, fck: float = 30000,
|
|
816
|
+
impact_factor: float = 1, age_of_solidification: int = 5, alpha_factor: int = 11,
|
|
817
|
+
autogenous_shrinkage: bool = True, gamma_factor: int = 1, a_factor: float = 0.1,
|
|
818
|
+
b_factor: float = 0.7, general_shrinkage: bool = True, id: int = None):
|
|
819
|
+
"""
|
|
820
|
+
Japan Creep and Shrinkage model (JSCE).
|
|
821
|
+
|
|
822
|
+
Parameters:
|
|
823
|
+
name (str): The name for the material property.
|
|
824
|
+
standard (str): The Japanese standard ('JSCE_12', 'JSCE_07', 'JSCE').
|
|
825
|
+
relative_humidity (float): The relative humidity in percentage.
|
|
826
|
+
concrete_age (int): The age of the concrete in days.
|
|
827
|
+
vol_surface_ratio (float): The volume to surface area ratio.
|
|
828
|
+
cement_content (float): Cement content.
|
|
829
|
+
water_content (float): Water content.
|
|
830
|
+
fck (float, optional): Compressive strength (not for JSCE). Defaults to 30000.
|
|
831
|
+
impact_factor (float, optional): Impact factor by cement type (JSCE 2012 only). Defaults to 1.
|
|
832
|
+
age_of_solidification (int, optional): Age at beginning of solidification (JSCE 2012 only). Defaults to 5.
|
|
833
|
+
alpha_factor (int, optional): Alpha-factor by cement type (JSCE 2007 only). Defaults to 11.
|
|
834
|
+
autogenous_shrinkage (bool, optional): Autogenous shrinkage option (JSCE 2007 only). Defaults to True.
|
|
835
|
+
gamma_factor (int, optional): Gamma-factor (JSCE 2007 only). Defaults to 1.
|
|
836
|
+
a_factor (float, optional): a-factor (JSCE 2007 only). Defaults to 0.1.
|
|
837
|
+
b_factor (float, optional): b-factor (JSCE 2007 only). Defaults to 0.7.
|
|
838
|
+
general_shrinkage (bool, optional): General shrinkage option (JSCE 2007 only). Defaults to True.
|
|
839
|
+
id (int, optional): A specific ID for the material. Auto-generated if not provided.
|
|
840
|
+
|
|
841
|
+
Examples:
|
|
842
|
+
```python
|
|
843
|
+
# JSCE 2012
|
|
844
|
+
CreepShrinkage.Japan("JSCE12_mat", "JSCE_12", 70, 3, 0.2, 30, 20, fck=30000)
|
|
845
|
+
# JSCE 2007
|
|
846
|
+
CreepShrinkage.Japan("JSCE07_mat", "JSCE_07", 70, 3, 0.2, 30, 20, fck=30000, alpha_factor=15)
|
|
847
|
+
```
|
|
848
|
+
"""
|
|
849
|
+
if id == None: id =0
|
|
850
|
+
js = {
|
|
851
|
+
"NAME": name,
|
|
852
|
+
"CODE": standard,
|
|
853
|
+
"HU": relative_humidity,
|
|
854
|
+
"AGE": concrete_age,
|
|
855
|
+
"VOL": vol_surface_ratio,
|
|
856
|
+
"CEMCONTENT": cement_content,
|
|
857
|
+
"WATERCONTENT": water_content
|
|
858
|
+
}
|
|
859
|
+
if standard != "JSCE":
|
|
860
|
+
js["STR"] = fck
|
|
861
|
+
if standard == "JSCE_12":
|
|
862
|
+
js["IPFACT"] = impact_factor
|
|
863
|
+
js["AGESOL"] = age_of_solidification
|
|
864
|
+
if standard == "JSCE_07":
|
|
865
|
+
js["ALPHAFACT"] = alpha_factor
|
|
866
|
+
js["bAUTO"] = autogenous_shrinkage
|
|
867
|
+
if autogenous_shrinkage:
|
|
868
|
+
js["GAMMAFACT"] = gamma_factor
|
|
869
|
+
js["AFACT"] = a_factor
|
|
870
|
+
js["BFACT"] = b_factor
|
|
871
|
+
js["bGEN"] = general_shrinkage
|
|
872
|
+
|
|
873
|
+
temp = CreepShrinkage(js, id)
|
|
874
|
+
self.ID = temp.ID
|
|
875
|
+
self.DATA = js
|
|
876
|
+
|
|
877
|
+
# --------------------------------- Japanese Standard CnS ---------------------------------------------
|
|
878
|
+
class JapaneseStandard:
|
|
879
|
+
def __init__(self, name: str, fck: float, relative_humidity: float, concrete_age: int, notional_size: float,
|
|
880
|
+
calculation_method: str = "JSCE", humidity_type: str = "RH", cement_type: str = "NC",
|
|
881
|
+
environmental_coeff: int = 1, id: int = None):
|
|
882
|
+
"""
|
|
883
|
+
Japanese Standard Creep and Shrinkage model.
|
|
884
|
+
|
|
885
|
+
Parameters:
|
|
886
|
+
name (str): The name for the material property.
|
|
887
|
+
fck (float): Compressive strength
|
|
888
|
+
relative_humidity (float): The relative humidity in percentage (40-90%).
|
|
889
|
+
concrete_age (int): The age of the concrete in days.
|
|
890
|
+
notional_size (float): The notional size of the member.
|
|
891
|
+
calculation_method (str, optional): Calculation method for E ('JSCE' or 'AIJ'). Defaults to 'JSCE'.
|
|
892
|
+
humidity_type (str, optional): Relative humidity type ('RH' or 'CU'). Defaults to 'RH'.
|
|
893
|
+
cement_type (str, optional): Type of cement ('RH', 'NC'). Defaults to 'NC'.
|
|
894
|
+
environmental_coeff (int, optional): Environmental coefficient. Defaults to 1.
|
|
895
|
+
id (int, optional): A specific ID for the material. Auto-generated if not provided.
|
|
896
|
+
|
|
897
|
+
Examples:
|
|
898
|
+
```python
|
|
899
|
+
CreepShrinkage.JapaneseStandard("JapanStd_C30", fck=30000, relative_humidity=70, concrete_age=3, notional_size=1.2)
|
|
900
|
+
```
|
|
901
|
+
"""
|
|
902
|
+
if id == None: id =0
|
|
903
|
+
js = {
|
|
904
|
+
"NAME": name,
|
|
905
|
+
"CODE": "JAPAN",
|
|
906
|
+
"STR": fck,
|
|
907
|
+
"HU": relative_humidity,
|
|
908
|
+
"HTYPE": humidity_type,
|
|
909
|
+
"AGE": concrete_age,
|
|
910
|
+
"MSIZE": notional_size,
|
|
911
|
+
"CTYPE": cement_type,
|
|
912
|
+
"CM": calculation_method,
|
|
913
|
+
"LAMBDA": environmental_coeff
|
|
914
|
+
}
|
|
915
|
+
temp = CreepShrinkage(js, id)
|
|
916
|
+
self.ID = temp.ID
|
|
917
|
+
self.DATA = js
|
|
918
|
+
|
|
919
|
+
# --------------------------------- User Defined CnS ----------------------------------------------------
|
|
920
|
+
|
|
921
|
+
class UserDefined:
|
|
922
|
+
def __init__(self, name: str, shrinkage_func_name: str, creep_func_name: str, creep_age: int, id: int = None):
|
|
923
|
+
"""
|
|
924
|
+
User Defined Creep and Shrinkage model.
|
|
925
|
+
|
|
926
|
+
Parameters:
|
|
927
|
+
name (str): The name for the material property.
|
|
928
|
+
shrinkage_func_name (str): The name of the user-defined shrinkage strain function.
|
|
929
|
+
creep_func_name (str): The name of the user-defined creep function.
|
|
930
|
+
creep_age (int): Concrete age for the creep function.
|
|
931
|
+
id (int, optional): A specific ID for the material. Auto-generated if not provided.
|
|
932
|
+
"""
|
|
933
|
+
if id == None: id =0
|
|
934
|
+
js = {
|
|
935
|
+
"NAME": name,
|
|
936
|
+
"CODE": "USER_DEFINED",
|
|
937
|
+
"SSFNAME": shrinkage_func_name,
|
|
938
|
+
"vCREEP_AGE": [
|
|
939
|
+
{
|
|
940
|
+
"NAME": creep_func_name,
|
|
941
|
+
"AGE": creep_age
|
|
942
|
+
}
|
|
943
|
+
]
|
|
944
|
+
}
|
|
945
|
+
temp = CreepShrinkage(js, id)
|
|
946
|
+
self.ID = temp.ID
|
|
947
|
+
self.DATA = js
|
|
948
|
+
|
|
949
|
+
#------------------------------------------ TIME DEPENDENT - COMPRESSIVE STRENGTH ----------------------------------------------------
|
|
950
|
+
|
|
951
|
+
|
|
952
|
+
|
|
953
|
+
class CompStrength:
|
|
954
|
+
mats = []
|
|
955
|
+
ids = []
|
|
956
|
+
def __init__(self,data,id=None):
|
|
957
|
+
if id == None: id =0
|
|
958
|
+
if CompStrength.ids == []:
|
|
959
|
+
count = 1
|
|
960
|
+
else:
|
|
961
|
+
count = max(CompStrength.ids)+1
|
|
962
|
+
if id == 0 or id in CompStrength.ids: self.ID = count
|
|
963
|
+
if id!= 0 and id not in CompStrength.ids: self.ID = id
|
|
964
|
+
|
|
965
|
+
self.DATA = data
|
|
966
|
+
|
|
967
|
+
CompStrength.mats.append(self)
|
|
968
|
+
CompStrength.ids.append(self.ID)
|
|
969
|
+
|
|
970
|
+
@classmethod
|
|
971
|
+
def json(cls):
|
|
972
|
+
json = {"Assign":{}}
|
|
973
|
+
for k in cls.mats:
|
|
974
|
+
json["Assign"][k.ID]=k.DATA
|
|
975
|
+
return json
|
|
976
|
+
|
|
977
|
+
@staticmethod
|
|
978
|
+
def create():
|
|
979
|
+
MidasAPI("PUT","/db/TDME",CompStrength.json())
|
|
980
|
+
|
|
981
|
+
@staticmethod
|
|
982
|
+
def get():
|
|
983
|
+
return MidasAPI("GET","/db/TDME")
|
|
984
|
+
|
|
985
|
+
@staticmethod
|
|
986
|
+
def delete():
|
|
987
|
+
MidasAPI("DELETE","/db/TDME")
|
|
988
|
+
CompStrength.clear()
|
|
989
|
+
|
|
990
|
+
@staticmethod
|
|
991
|
+
def clear():
|
|
992
|
+
CompStrength.mats=[]
|
|
993
|
+
CompStrength.ids=[]
|
|
994
|
+
|
|
995
|
+
@staticmethod
|
|
996
|
+
def sync():
|
|
997
|
+
a = CompStrength.get()
|
|
998
|
+
if a != {'message': ''}:
|
|
999
|
+
if list(a['TDME'].keys()) != []:
|
|
1000
|
+
CompStrength.mats = []
|
|
1001
|
+
CompStrength.ids=[]
|
|
1002
|
+
for j in a['TDME'].keys():
|
|
1003
|
+
CompStrength(a['TDME'][j], int(j))
|
|
1004
|
+
|
|
1005
|
+
|
|
1006
|
+
# --------------------------------- IRC Compressive Strength --------------------------------------------------------------
|
|
1007
|
+
|
|
1008
|
+
class IRC:
|
|
1009
|
+
def __init__(self, name: str, code_year: int = 2020,
|
|
1010
|
+
fck_delta: float = 0, cement_type: int = 1,
|
|
1011
|
+
aggregate_type: int = 0, id: int = None):
|
|
1012
|
+
"""
|
|
1013
|
+
IRC Compressive Strength for Indian Road Congress standards.
|
|
1014
|
+
|
|
1015
|
+
Parameters:
|
|
1016
|
+
name (str): Name
|
|
1017
|
+
code_year (int, optional): Year of the IRC standard. Can be 2020, 2011, or 2000. Defaults to 2020.
|
|
1018
|
+
fck_delta (float): 28-day characteristic compressive strength
|
|
1019
|
+
cement_type (int, optional): Type of cement used.
|
|
1020
|
+
• 1: Slow setting (default)
|
|
1021
|
+
• 2: Normal
|
|
1022
|
+
• 3: Rapid hardening
|
|
1023
|
+
aggregate_type (int, optional): Type of aggregate used (for IRC:112 only).
|
|
1024
|
+
• 0: Basalt, dense limestone (default)
|
|
1025
|
+
• 1: Quartzite
|
|
1026
|
+
• 2: Limestone
|
|
1027
|
+
• 3: Sandstone
|
|
1028
|
+
id (int, optional): Unique identifier. Auto-generated if not specified.
|
|
1029
|
+
|
|
1030
|
+
Examples:
|
|
1031
|
+
```python
|
|
1032
|
+
# IRC 112-2020 with normal cement
|
|
1033
|
+
CompStrength.IRC("C30_IRC2020", code_year=2020, fck_delta=30000, cement_type=2)
|
|
1034
|
+
|
|
1035
|
+
# IRC 18-2000 standard
|
|
1036
|
+
CompStrength.IRC("C25_IRC2000", code_year=2000, fck_delta=25000)
|
|
1037
|
+
|
|
1038
|
+
# IRC 112-2011 with rapid hardening cement and quartzite aggregate
|
|
1039
|
+
CompStrength.IRC("C40_IRC2011", code_year=2011, fck_delta=40000, cement_type=3, aggregate_type=1)
|
|
1040
|
+
```
|
|
1041
|
+
"""
|
|
1042
|
+
if id == None: id =0
|
|
1043
|
+
# Determine the code name string based on the integer year
|
|
1044
|
+
if code_year == 2011:
|
|
1045
|
+
code_name = "INDIA(IRC:112-2011)"
|
|
1046
|
+
elif code_year == 2000:
|
|
1047
|
+
code_name = "INDIA(IRC:18-2000)"
|
|
1048
|
+
else: # Default to 2020
|
|
1049
|
+
code_name = "INDIA(IRC:112-2020)"
|
|
1050
|
+
|
|
1051
|
+
js = {
|
|
1052
|
+
"NAME": name,
|
|
1053
|
+
"TYPE": "CODE",
|
|
1054
|
+
"CODENAME": code_name,
|
|
1055
|
+
"STRENGTH": fck_delta
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
# Add cement and aggregate types for IRC:112 standards
|
|
1059
|
+
if code_year in [2020, 2011]:
|
|
1060
|
+
js["iCTYPE"] = cement_type
|
|
1061
|
+
js["nAGGRE"] = aggregate_type
|
|
1062
|
+
|
|
1063
|
+
temp = CompStrength(js, id)
|
|
1064
|
+
self.ID = temp.ID
|
|
1065
|
+
self.DATA = js
|
|
1066
|
+
|
|
1067
|
+
|
|
1068
|
+
# --------------------------------- ACI Compressive Strength --------------------------------------------------------------
|
|
1069
|
+
|
|
1070
|
+
class ACI:
|
|
1071
|
+
def __init__(self, name: str, fck: float = 0, factor_a: float = 1,
|
|
1072
|
+
factor_b: float = 2, id: int = None):
|
|
1073
|
+
"""
|
|
1074
|
+
ACI Compressive Strength for American Concrete Institute standards.
|
|
1075
|
+
|
|
1076
|
+
Parameters:
|
|
1077
|
+
name: Name
|
|
1078
|
+
fck: Compression strength (number) - 28-day compressive strength
|
|
1079
|
+
factor_a: Factor a (number) - ACI model parameter A (default 1)
|
|
1080
|
+
factor_b: Factor b (number) - ACI model parameter B (default 2)
|
|
1081
|
+
id: Unique identifier (integer) - Auto-generated if not specified
|
|
1082
|
+
|
|
1083
|
+
Examples:
|
|
1084
|
+
```python
|
|
1085
|
+
# Standard ACI material
|
|
1086
|
+
CompStrength.ACI("C30_ACI", 30000, 1, 2)
|
|
1087
|
+
|
|
1088
|
+
# Custom factors
|
|
1089
|
+
CompStrength.ACI("C25_ACI_Custom", 25000, 1.2, 1.8)
|
|
1090
|
+
```
|
|
1091
|
+
"""
|
|
1092
|
+
if id == None: id =0
|
|
1093
|
+
js = {
|
|
1094
|
+
"NAME": name,
|
|
1095
|
+
"TYPE": "CODE",
|
|
1096
|
+
"CODENAME": "ACI",
|
|
1097
|
+
"STRENGTH": fck,
|
|
1098
|
+
"A": factor_a,
|
|
1099
|
+
"B": factor_b
|
|
1100
|
+
}
|
|
1101
|
+
temp = CompStrength(js, id)
|
|
1102
|
+
self.ID = temp.ID
|
|
1103
|
+
self.DATA = js
|
|
1104
|
+
|
|
1105
|
+
|
|
1106
|
+
# --------------------------------- CEB-FIP Compressive Strength --------------------------------------------------------------
|
|
1107
|
+
|
|
1108
|
+
class CEB_FIP:
|
|
1109
|
+
def __init__(self, name: str, code_year: int = 2010, fck: float = 0,
|
|
1110
|
+
cement_type: int = 1, aggregate_type: int = 0, id: int = None):
|
|
1111
|
+
"""
|
|
1112
|
+
CEB-FIP Compressive Strength for European concrete standards.
|
|
1113
|
+
|
|
1114
|
+
Parameters:
|
|
1115
|
+
name: Name
|
|
1116
|
+
code_year: Code year (integer) - Year of the CEB-FIP standard
|
|
1117
|
+
• 1978 - CEB-FIP(1978)
|
|
1118
|
+
• 1990 - CEB-FIP(1990)
|
|
1119
|
+
• 2010 - CEB-FIP(2010) (default)
|
|
1120
|
+
fck: Compression strength (number) - 28-day compressive strength
|
|
1121
|
+
cement_type: Cement type (integer) - Type of cement (for 1990 and 2010)
|
|
1122
|
+
• 1 - RS: 0.2 / 42.5 R, 52.5 N, 52.5 R: 0.20 (default)
|
|
1123
|
+
• 2 - N, R: 0.25 / 32.5 R, 42.5 N: 0.25
|
|
1124
|
+
• 3 - SL: 0.38 / 32.5 N: 0.38
|
|
1125
|
+
aggregate_type: Aggregate type (integer) - Type of aggregate (for 2010 only)
|
|
1126
|
+
• 0 - Basalt, dense limestone aggregates (1.2): 0 (default)
|
|
1127
|
+
• 1 - Quartzite aggregates: 1
|
|
1128
|
+
• 2 - Limestone aggregates: 2
|
|
1129
|
+
• 3 - Sandstone aggregates: 3
|
|
1130
|
+
id: Unique identifier (integer) - Auto-generated if not specified
|
|
1131
|
+
|
|
1132
|
+
Examples:
|
|
1133
|
+
```python
|
|
1134
|
+
# CEB-FIP 2010 with normal cement and basalt aggregate
|
|
1135
|
+
CompStrength.CEB_FIP("C30_CEBFIP2010", 2010, 30000, 1, 0)
|
|
1136
|
+
|
|
1137
|
+
# CEB-FIP 1990 with slow setting cement
|
|
1138
|
+
CompStrength.CEB_FIP("C25_CEBFIP1990", 1990, 25000, 3)
|
|
1139
|
+
|
|
1140
|
+
# CEB-FIP 1978 (no cement/aggregate type)
|
|
1141
|
+
CompStrength.CEB_FIP("C40_CEBFIP1978", 1978, 40000)
|
|
1142
|
+
```
|
|
1143
|
+
"""
|
|
1144
|
+
if id == None: id =0
|
|
1145
|
+
# Determine code name based on year
|
|
1146
|
+
if code_year == 1978:
|
|
1147
|
+
code_name = "CEB-FIP(1978)"
|
|
1148
|
+
elif code_year == 1990:
|
|
1149
|
+
code_name = "CEB-FIP(1990)"
|
|
1150
|
+
else: # Default to 2010
|
|
1151
|
+
code_name = "CEB-FIP(2010)"
|
|
1152
|
+
|
|
1153
|
+
js = {
|
|
1154
|
+
"NAME": name,
|
|
1155
|
+
"TYPE": "CODE",
|
|
1156
|
+
"CODENAME": code_name,
|
|
1157
|
+
"STRENGTH": fck
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
# Add cement type for 1990 and 2010
|
|
1161
|
+
if code_year in [1990, 2010]:
|
|
1162
|
+
js["iCTYPE"] = cement_type
|
|
1163
|
+
|
|
1164
|
+
# Add aggregate type for 2010 only
|
|
1165
|
+
if code_year == 2010:
|
|
1166
|
+
js["nAGGRE"] = aggregate_type
|
|
1167
|
+
|
|
1168
|
+
temp = CompStrength(js, id)
|
|
1169
|
+
self.ID = temp.ID
|
|
1170
|
+
self.DATA = js
|
|
1171
|
+
|
|
1172
|
+
|
|
1173
|
+
# --------------------------------- Ohzagi Compressive Strength --------------------------------------------------------------
|
|
1174
|
+
|
|
1175
|
+
class Ohzagi:
|
|
1176
|
+
def __init__(self, name: str, fck: float = 0, cement_type: int = 2, id: int = None):
|
|
1177
|
+
"""
|
|
1178
|
+
Ohzagi Compressive Strength model.
|
|
1179
|
+
|
|
1180
|
+
Parameters:
|
|
1181
|
+
name: Name
|
|
1182
|
+
fck: Compression strength (number) - 28-day compressive strength
|
|
1183
|
+
cement_type: Cement type (integer) - Type of cement used
|
|
1184
|
+
• 1 - RS
|
|
1185
|
+
• 2 - N, R (default)
|
|
1186
|
+
• 3 - SL
|
|
1187
|
+
• 4 - Fly-ash
|
|
1188
|
+
id: Unique identifier (integer) - Auto-generated if not specified
|
|
1189
|
+
|
|
1190
|
+
Examples:
|
|
1191
|
+
```python
|
|
1192
|
+
# Standard Ohzagi material with N,R cement
|
|
1193
|
+
CompStrength.Ohzagi("C30_Ohzagi", 30000, 2)
|
|
1194
|
+
|
|
1195
|
+
# Fly-ash cement type
|
|
1196
|
+
CompStrength.Ohzagi("C25_Ohzagi_FA", 25000, 4)
|
|
1197
|
+
```
|
|
1198
|
+
"""
|
|
1199
|
+
if id == None: id =0
|
|
1200
|
+
js = {
|
|
1201
|
+
"NAME": name,
|
|
1202
|
+
"TYPE": "CODE",
|
|
1203
|
+
"CODENAME": "Ohzagi",
|
|
1204
|
+
"STRENGTH": fck,
|
|
1205
|
+
"iCTYPE": cement_type
|
|
1206
|
+
}
|
|
1207
|
+
temp = CompStrength(js, id)
|
|
1208
|
+
self.ID = temp.ID
|
|
1209
|
+
self.DATA = js
|
|
1210
|
+
|
|
1211
|
+
|
|
1212
|
+
# --------------------------------- European Compressive Strength --------------------------------------------------------------
|
|
1213
|
+
|
|
1214
|
+
class European:
|
|
1215
|
+
def __init__(self, name: str, fck: float = 0, cement_type: int = 2, id: int = None):
|
|
1216
|
+
"""
|
|
1217
|
+
European Compressive Strength model.
|
|
1218
|
+
|
|
1219
|
+
Parameters:
|
|
1220
|
+
name: Name
|
|
1221
|
+
fck: Compression strength (number) - 28-day compressive strength
|
|
1222
|
+
cement_type: Cement type (integer) - Cement class type
|
|
1223
|
+
• 1 - Class R: 0.20
|
|
1224
|
+
• 2 - Class N: 0.25 (default)
|
|
1225
|
+
• 3 - Class S: 0.38
|
|
1226
|
+
id: Unique identifier (integer) - Auto-generated if not specified
|
|
1227
|
+
|
|
1228
|
+
Examples:
|
|
1229
|
+
```python
|
|
1230
|
+
# European standard with Class N cement
|
|
1231
|
+
CompStrength.European("C30_Euro", 30000, 2)
|
|
1232
|
+
|
|
1233
|
+
# High early strength with Class R cement
|
|
1234
|
+
CompStrength.European("C40_Euro_R", 40000, 1)
|
|
1235
|
+
```
|
|
1236
|
+
"""
|
|
1237
|
+
if id == None: id =0
|
|
1238
|
+
js = {
|
|
1239
|
+
"NAME": name,
|
|
1240
|
+
"TYPE": "CODE",
|
|
1241
|
+
"CODENAME": "EUROPEAN",
|
|
1242
|
+
"STRENGTH": fck,
|
|
1243
|
+
"iCTYPE": cement_type
|
|
1244
|
+
}
|
|
1245
|
+
temp = CompStrength(js, id)
|
|
1246
|
+
self.ID = temp.ID
|
|
1247
|
+
self.DATA = js
|
|
1248
|
+
|
|
1249
|
+
|
|
1250
|
+
# --------------------------------- Russian Compressive Strength --------------------------------------------------------------
|
|
1251
|
+
|
|
1252
|
+
class Russian:
|
|
1253
|
+
def __init__(self, name: str, fck: float = 0, cement_type: int = 1,
|
|
1254
|
+
curing_method: int = 1, concrete_type: int = 1,
|
|
1255
|
+
max_aggregate_size: float = 0.02, specific_cement_content: float = 0.25,
|
|
1256
|
+
id: int = None):
|
|
1257
|
+
"""
|
|
1258
|
+
Russian Compressive Strength model.
|
|
1259
|
+
|
|
1260
|
+
Parameters:
|
|
1261
|
+
name: Name
|
|
1262
|
+
fck: Compression strength (number) - 28-day compressive strength
|
|
1263
|
+
cement_type: Cement type (integer) - Type of cement
|
|
1264
|
+
• 1 - Normal (default)
|
|
1265
|
+
• 2 - Fast-hardened
|
|
1266
|
+
• 3 - Slag
|
|
1267
|
+
• 4 - Pozzolan
|
|
1268
|
+
curing_method: Curing method (integer) - Method of curing
|
|
1269
|
+
• 0 - Natural cure: 0
|
|
1270
|
+
• 1 - Steam cure: 1 (default)
|
|
1271
|
+
concrete_type: Concrete type (integer) - Type of concrete
|
|
1272
|
+
• 0 - Heavy concrete: 0
|
|
1273
|
+
• 1 - Fine-grained concrete: 1 (default)
|
|
1274
|
+
max_aggregate_size: Maximum aggregate size (number) - Maximum size in meters (default 0.02)
|
|
1275
|
+
specific_cement_content: Specific content of cement paste (number) - Content ratio (default 0)
|
|
1276
|
+
id: Unique identifier (integer) - Auto-generated if not specified
|
|
1277
|
+
|
|
1278
|
+
Examples:
|
|
1279
|
+
```python
|
|
1280
|
+
# Standard Russian concrete
|
|
1281
|
+
CompStrength.Russian("C30_RU", 30000, 1, 1, 1, 0.02, 0)
|
|
1282
|
+
|
|
1283
|
+
# Fast-hardened cement with natural curing
|
|
1284
|
+
CompStrength.Russian("C25_RU_FH", 25000, 2, 0, 0, 0.025, 0)
|
|
1285
|
+
```
|
|
1286
|
+
"""
|
|
1287
|
+
if id == None: id =0
|
|
1288
|
+
js = {
|
|
1289
|
+
"NAME": name,
|
|
1290
|
+
"TYPE": "CODE",
|
|
1291
|
+
"CODENAME": "RUSSIAN",
|
|
1292
|
+
"STRENGTH": fck,
|
|
1293
|
+
"iCTYPE": cement_type,
|
|
1294
|
+
"CMETH": curing_method,
|
|
1295
|
+
"CTYPE": concrete_type,
|
|
1296
|
+
"MAXS": max_aggregate_size,
|
|
1297
|
+
"PZ": specific_cement_content
|
|
1298
|
+
}
|
|
1299
|
+
temp = CompStrength(js, id)
|
|
1300
|
+
self.ID = temp.ID
|
|
1301
|
+
self.DATA = js
|
|
1302
|
+
|
|
1303
|
+
|
|
1304
|
+
# --------------------------------- Australian Standards Compressive Strength --------------------------------------------------------------
|
|
1305
|
+
#add EXPOSURE
|
|
1306
|
+
class AS:
|
|
1307
|
+
def __init__(self, name: str, standard: str = "AS5100.5-2017", fck: float = 0, id: int = None):
|
|
1308
|
+
"""
|
|
1309
|
+
Australian Standards Compressive Strength model.
|
|
1310
|
+
|
|
1311
|
+
Parameters:
|
|
1312
|
+
name: Name
|
|
1313
|
+
standard: Standard code (string) - Australian standard specification
|
|
1314
|
+
• "AS5100.5-2017" - AS 5100.5-2017 (default)
|
|
1315
|
+
• "AS5100.5-2016" - AS 5100.5-2016
|
|
1316
|
+
• "AS/RTA5100.5-2011" - AS/RTA 5100.5-2011
|
|
1317
|
+
• "AS3600-2009" - AS 3600-2009
|
|
1318
|
+
fck: Compression strength (number) - 28-day compressive strength
|
|
1319
|
+
id: Unique identifier (integer) - Auto-generated if not specified
|
|
1320
|
+
|
|
1321
|
+
Examples:
|
|
1322
|
+
```python
|
|
1323
|
+
# AS 5100.5-2017 standard
|
|
1324
|
+
CompStrength.AS("C30_AS2017", "AS 5100.5-2017", 30000)
|
|
1325
|
+
|
|
1326
|
+
# AS 3600-2009 standard
|
|
1327
|
+
CompStrength.AS("C25_AS3600", "AS 3600-2009", 25000)
|
|
1328
|
+
```
|
|
1329
|
+
"""
|
|
1330
|
+
if id == None: id =0
|
|
1331
|
+
js = {
|
|
1332
|
+
"NAME": name,
|
|
1333
|
+
"TYPE": "CODE",
|
|
1334
|
+
"CODENAME": standard,
|
|
1335
|
+
"STRENGTH": fck
|
|
1336
|
+
}
|
|
1337
|
+
temp = CompStrength(js, id)
|
|
1338
|
+
self.ID = temp.ID
|
|
1339
|
+
self.DATA = js
|
|
1340
|
+
|
|
1341
|
+
|
|
1342
|
+
# --------------------------------- Gilbert and Ranzi Compressive Strength --------------------------------------------------------------
|
|
1343
|
+
|
|
1344
|
+
class GilbertRanzi:
|
|
1345
|
+
def __init__(self, name: str, fck: float = 0, cement_type: int = 1,
|
|
1346
|
+
density: float = 230, id: int = None):
|
|
1347
|
+
"""
|
|
1348
|
+
Gilbert and Ranzi Compressive Strength model.
|
|
1349
|
+
|
|
1350
|
+
Parameters:
|
|
1351
|
+
name: Name
|
|
1352
|
+
fck: Compression strength (number) - 28-day compressive strength
|
|
1353
|
+
cement_type: Cement type (integer) - Type of cement
|
|
1354
|
+
• 1 - Ordinary Portland cement: 0.38 (default)
|
|
1355
|
+
• 2 - High early strength cement: 0.25
|
|
1356
|
+
density: Weight density (number) - Density in kg/m³ (default 230)
|
|
1357
|
+
id: Unique identifier (integer) - Auto-generated if not specified
|
|
1358
|
+
|
|
1359
|
+
Examples:
|
|
1360
|
+
```python
|
|
1361
|
+
# Standard Gilbert-Ranzi model
|
|
1362
|
+
CompStrength.GilbertRanzi("C30_GR", 30000, 1, 2400)
|
|
1363
|
+
|
|
1364
|
+
# High early strength cement
|
|
1365
|
+
CompStrength.GilbertRanzi("C40_GR_HES", 40000, 2, 2450)
|
|
1366
|
+
```
|
|
1367
|
+
"""
|
|
1368
|
+
if id == None: id =0
|
|
1369
|
+
js = {
|
|
1370
|
+
"NAME": name,
|
|
1371
|
+
"TYPE": "CODE",
|
|
1372
|
+
"CODENAME": "GILBERT AND RANZI",
|
|
1373
|
+
"STRENGTH": fck,
|
|
1374
|
+
"iCTYPE": cement_type,
|
|
1375
|
+
"DENSITY": density
|
|
1376
|
+
}
|
|
1377
|
+
temp = CompStrength(js, id)
|
|
1378
|
+
self.ID = temp.ID
|
|
1379
|
+
self.DATA = js
|
|
1380
|
+
|
|
1381
|
+
|
|
1382
|
+
# --------------------------------- Japan Hydration Compressive Strength --------------------------------------------------------------
|
|
1383
|
+
|
|
1384
|
+
class JapanHydration:
|
|
1385
|
+
def __init__(self, name: str, fck: float = 0, cement_type: int = 1,
|
|
1386
|
+
use_concrete_data: bool = True, tensile_strength_factor: float = 3,
|
|
1387
|
+
factor_a: float = 4.5, factor_b: float = 0.95, factor_d: float = 1.11,
|
|
1388
|
+
id: int = None):
|
|
1389
|
+
"""
|
|
1390
|
+
Japan Hydration Compressive Strength model.
|
|
1391
|
+
|
|
1392
|
+
Parameters:
|
|
1393
|
+
name: Name
|
|
1394
|
+
fck: Compression strength (number) - 28-day compressive strength
|
|
1395
|
+
cement_type: Cement type (integer) - Type of cement
|
|
1396
|
+
• 0 - Normal Portland cement
|
|
1397
|
+
• 1 - Moderate Portland cement (default)
|
|
1398
|
+
• 2 - High-early-strength Portland cement
|
|
1399
|
+
use_concrete_data: Use concrete data option (boolean) - Enable concrete data option
|
|
1400
|
+
• True - Use concrete data (default)
|
|
1401
|
+
• False - Use custom factors
|
|
1402
|
+
tensile_strength_factor: Tensile strength factor (number) - Factor for tensile strength (default 3)
|
|
1403
|
+
factor_a: Factor a (number) - Model parameter A (default 4.5, used when use_concrete_data=False)
|
|
1404
|
+
factor_b: Factor b (number) - Model parameter B (default 0.95, used when use_concrete_data=False)
|
|
1405
|
+
factor_d: Factor d (number) - Model parameter D (default 1.11, used when use_concrete_data=False)
|
|
1406
|
+
id: Unique identifier (integer) - Auto-generated if not specified
|
|
1407
|
+
|
|
1408
|
+
Examples:
|
|
1409
|
+
```python
|
|
1410
|
+
# Standard Japan hydration with concrete data
|
|
1411
|
+
CompStrength.JapanHydration("C30_JH", 30000, 1, True, 3)
|
|
1412
|
+
|
|
1413
|
+
# Custom factors without concrete data
|
|
1414
|
+
CompStrength.JapanHydration("C25_JH_Custom", 25000, 0, False, 3, 4.0, 0.9, 1.0)
|
|
1415
|
+
```
|
|
1416
|
+
"""
|
|
1417
|
+
if id == None: id =0
|
|
1418
|
+
js = {
|
|
1419
|
+
"NAME": name,
|
|
1420
|
+
"TYPE": "CODE",
|
|
1421
|
+
"CODENAME": "Japan(hydration)",
|
|
1422
|
+
"STRENGTH": fck,
|
|
1423
|
+
"iCTYPE": cement_type,
|
|
1424
|
+
"bUSE": use_concrete_data,
|
|
1425
|
+
"TENS_STRN_FACTOR": tensile_strength_factor
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
# Add custom factors if not using concrete data
|
|
1429
|
+
if not use_concrete_data:
|
|
1430
|
+
js.update({
|
|
1431
|
+
"A": factor_a,
|
|
1432
|
+
"B": factor_b,
|
|
1433
|
+
"D": factor_d
|
|
1434
|
+
})
|
|
1435
|
+
|
|
1436
|
+
temp = CompStrength(js, id)
|
|
1437
|
+
self.ID = temp.ID
|
|
1438
|
+
self.DATA = js
|
|
1439
|
+
|
|
1440
|
+
|
|
1441
|
+
# --------------------------------- Japan Elastic Compressive Strength --------------------------------------------------------------
|
|
1442
|
+
|
|
1443
|
+
class JapanElastic:
|
|
1444
|
+
def __init__(self, name: str, fck: float = 0, elastic_cement_type: int = 0, id: int = None):
|
|
1445
|
+
"""
|
|
1446
|
+
Japan Elastic Compressive Strength model.
|
|
1447
|
+
|
|
1448
|
+
Parameters:
|
|
1449
|
+
name: Name
|
|
1450
|
+
fck: Compression strength (number) - 28-day compressive strength
|
|
1451
|
+
elastic_cement_type: Elastic cement type (integer) - Type of cement for elastic model
|
|
1452
|
+
• 0 - Normal type: 0 (default)
|
|
1453
|
+
• 1 - Rapid type: 1
|
|
1454
|
+
id: Unique identifier (integer) - Auto-generated if not specified
|
|
1455
|
+
|
|
1456
|
+
Examples:
|
|
1457
|
+
```python
|
|
1458
|
+
# Normal type cement
|
|
1459
|
+
CompStrength.JapanElastic("C30_JE", 30000, 0)
|
|
1460
|
+
|
|
1461
|
+
# Rapid type cement
|
|
1462
|
+
CompStrength.JapanElastic("C40_JE_Rapid", 40000, 1)
|
|
1463
|
+
```
|
|
1464
|
+
"""
|
|
1465
|
+
if id == None: id =0
|
|
1466
|
+
js = {
|
|
1467
|
+
"NAME": name,
|
|
1468
|
+
"TYPE": "CODE",
|
|
1469
|
+
"CODENAME": "Japan(elastic)",
|
|
1470
|
+
"STRENGTH": fck,
|
|
1471
|
+
"iECTYPE": elastic_cement_type
|
|
1472
|
+
}
|
|
1473
|
+
temp = CompStrength(js, id)
|
|
1474
|
+
self.ID = temp.ID
|
|
1475
|
+
self.DATA = js
|
|
1476
|
+
|
|
1477
|
+
|
|
1478
|
+
# --------------------------------- KDS-2016 Compressive Strength --------------------------------------------------------------
|
|
1479
|
+
|
|
1480
|
+
class KDS:
|
|
1481
|
+
def __init__(self, name: str, fck: float = 0, cement_type: int = 1,
|
|
1482
|
+
density: float = 230, id: int = None):
|
|
1483
|
+
"""
|
|
1484
|
+
KDS-2016 Compressive Strength model.
|
|
1485
|
+
|
|
1486
|
+
Parameters:
|
|
1487
|
+
name: Name
|
|
1488
|
+
fck: Compression strength (number) - 28-day compressive strength
|
|
1489
|
+
cement_type: Cement type (integer) - Type of cement
|
|
1490
|
+
• 1 - N,R moist cured: 0.35 (default)
|
|
1491
|
+
• 2 - N,R steam cured: 0.15
|
|
1492
|
+
• 3 - RS moist cured: 0.25
|
|
1493
|
+
• 4 - RS steam cured: 0.12
|
|
1494
|
+
• 5 - SL: 0.40
|
|
1495
|
+
density: Weight density (number) - Density in kg/m³ (default 230)
|
|
1496
|
+
id: Unique identifier (integer) - Auto-generated if not specified
|
|
1497
|
+
|
|
1498
|
+
Examples:
|
|
1499
|
+
```python
|
|
1500
|
+
# Standard KDS with N,R moist cured cement
|
|
1501
|
+
CompStrength.KDS("C30_KDS", 30000, 1, 2400)
|
|
1502
|
+
|
|
1503
|
+
# Steam cured cement
|
|
1504
|
+
CompStrength.KDS("C25_KDS_Steam", 25000, 2, 2350)
|
|
1505
|
+
```
|
|
1506
|
+
"""
|
|
1507
|
+
if id == None: id =0
|
|
1508
|
+
js = {
|
|
1509
|
+
"NAME": name,
|
|
1510
|
+
"TYPE": "CODE",
|
|
1511
|
+
"CODENAME": "KDS-2016",
|
|
1512
|
+
"STRENGTH": fck,
|
|
1513
|
+
"iCTYPE": cement_type,
|
|
1514
|
+
"DENSITY": density
|
|
1515
|
+
}
|
|
1516
|
+
temp = CompStrength(js, id)
|
|
1517
|
+
self.ID = temp.ID
|
|
1518
|
+
self.DATA = js
|
|
1519
|
+
|
|
1520
|
+
# --------------------------------- KCI-USD12 Compressive Strength --------------------------------------------------------------
|
|
1521
|
+
|
|
1522
|
+
class KCI:
|
|
1523
|
+
def __init__(self, name: str, fck: float = 0, cement_type: int = 1,
|
|
1524
|
+
id: int = None):
|
|
1525
|
+
"""
|
|
1526
|
+
KDS-2016 Compressive Strength model.
|
|
1527
|
+
|
|
1528
|
+
Parameters:
|
|
1529
|
+
name: Name
|
|
1530
|
+
fck: Compression strength (number) - 28-day compressive strength
|
|
1531
|
+
cement_type: Cement type (integer) - Type of cement
|
|
1532
|
+
• 1 - N,R moist cured: 0.35 (default)
|
|
1533
|
+
• 2 - N,R steam cured: 0.15
|
|
1534
|
+
• 3 - RS moist cured: 0.25
|
|
1535
|
+
• 4 - RS steam cured: 0.12
|
|
1536
|
+
• 5 - SL: 0.40
|
|
1537
|
+
id: Unique identifier (integer) - Auto-generated if not specified
|
|
1538
|
+
|
|
1539
|
+
Examples:
|
|
1540
|
+
```python
|
|
1541
|
+
CompStrength.KCI("C30_KCI", 30000, 1)
|
|
1542
|
+
|
|
1543
|
+
```
|
|
1544
|
+
"""
|
|
1545
|
+
if id == None: id =0
|
|
1546
|
+
js = {
|
|
1547
|
+
"NAME": name,
|
|
1548
|
+
"TYPE": "CODE",
|
|
1549
|
+
"CODENAME": "KCI-USD12",
|
|
1550
|
+
"STRENGTH": fck,
|
|
1551
|
+
"iCTYPE": cement_type,
|
|
1552
|
+
|
|
1553
|
+
}
|
|
1554
|
+
temp = CompStrength(js, id)
|
|
1555
|
+
self.ID = temp.ID
|
|
1556
|
+
self.DATA = js
|
|
1557
|
+
# --------------------------------- Korean Standard Compressive Strength --------------------------------------------------------------
|
|
1558
|
+
|
|
1559
|
+
class KoreanStandard:
|
|
1560
|
+
def __init__(self, name: str, fck: float = 0, factor_a: float = 1,
|
|
1561
|
+
factor_b: float = 2, id: int = None):
|
|
1562
|
+
"""
|
|
1563
|
+
Korean Standard Compressive Strength model.
|
|
1564
|
+
|
|
1565
|
+
Parameters:
|
|
1566
|
+
name: Material name (string) - Name identifier for the material
|
|
1567
|
+
fck: Compression strength (number) - 28-day compressive strength
|
|
1568
|
+
factor_a: Factor a (number) - Model parameter A (default 1)
|
|
1569
|
+
factor_b: Factor b (number) - Model parameter B (default 2)
|
|
1570
|
+
id: Unique identifier (integer) - Auto-generated if not specified
|
|
1571
|
+
|
|
1572
|
+
Examples:
|
|
1573
|
+
```python
|
|
1574
|
+
# Standard Korean model
|
|
1575
|
+
CompStrength.KoreanStandard("C30_KS", 30000, 1, 2)
|
|
1576
|
+
|
|
1577
|
+
# Custom factors
|
|
1578
|
+
CompStrength.KoreanStandard("C25_KS_Custom", 25000, 1.1, 1.8)
|
|
1579
|
+
```
|
|
1580
|
+
"""
|
|
1581
|
+
if id == None: id =0
|
|
1582
|
+
js = {
|
|
1583
|
+
"NAME": name,
|
|
1584
|
+
"TYPE": "CODE",
|
|
1585
|
+
"CODENAME": "KoreanStandard",
|
|
1586
|
+
"STRENGTH": fck,
|
|
1587
|
+
"A": factor_a,
|
|
1588
|
+
"B": factor_b
|
|
1589
|
+
}
|
|
1590
|
+
temp = CompStrength(js, id)
|
|
1591
|
+
self.ID = temp.ID
|
|
1592
|
+
self.DATA = js
|
|
1593
|
+
|
|
1594
|
+
|
|
1595
|
+
# --------------------------------- User Defined Compressive Strength --------------------------------------------------------------
|
|
1596
|
+
|
|
1597
|
+
class UserDefined:
|
|
1598
|
+
def __init__(self, name: str, scale_factor: float = 1,
|
|
1599
|
+
time_data: list = None, id: int = None):
|
|
1600
|
+
"""
|
|
1601
|
+
User Defined Compressive Strength model.
|
|
1602
|
+
|
|
1603
|
+
Parameters:
|
|
1604
|
+
name: Material name (string) - Name identifier for the material
|
|
1605
|
+
scale_factor: Scale factor (number) - Scaling factor for the data (default 1)
|
|
1606
|
+
time_data: Function data (list of objects) - Time-dependent strength data
|
|
1607
|
+
Each object should contain:
|
|
1608
|
+
• TIME - Time in days (number)
|
|
1609
|
+
• COMP - Compression strength (number)
|
|
1610
|
+
• TENS - Tensile strength (number)
|
|
1611
|
+
• ELAST - Elastic modulus (number)
|
|
1612
|
+
id: Unique identifier (integer) - Auto-generated if not specified
|
|
1613
|
+
|
|
1614
|
+
Examples:
|
|
1615
|
+
```python
|
|
1616
|
+
# User defined with custom time data
|
|
1617
|
+
time_points = [
|
|
1618
|
+
{"TIME": 0, "COMP": 0, "TENS": 0, "ELAST": 0},
|
|
1619
|
+
{"TIME": 7, "COMP": 20000, "TENS": 800, "ELAST": 25000000},
|
|
1620
|
+
{"TIME": 28, "COMP": 30000, "TENS": 1000, "ELAST": 30000000},
|
|
1621
|
+
{"TIME": 90, "COMP": 35000, "TENS": 1200, "ELAST": 32000000}
|
|
1622
|
+
]
|
|
1623
|
+
CompStrength.UserDefined("C30_User", 1.0, time_points)
|
|
1624
|
+
|
|
1625
|
+
# Simple default case
|
|
1626
|
+
CompStrength.UserDefined("C25_User_Simple", 1.2)
|
|
1627
|
+
```
|
|
1628
|
+
"""
|
|
1629
|
+
if id == None: id =0
|
|
1630
|
+
if time_data is None:
|
|
1631
|
+
time_data = [
|
|
1632
|
+
{"TIME": 0, "COMP": 0, "TENS": 0, "ELAST": 0},
|
|
1633
|
+
{"TIME": 1000, "COMP": 30000, "TENS": 1000, "ELAST": 3000000}
|
|
1634
|
+
]
|
|
1635
|
+
|
|
1636
|
+
js = {
|
|
1637
|
+
"NAME": name,
|
|
1638
|
+
"TYPE": "USER",
|
|
1639
|
+
"SCALE": scale_factor,
|
|
1640
|
+
"aDATA": time_data
|
|
1641
|
+
}
|
|
1642
|
+
temp = CompStrength(js, id)
|
|
1643
|
+
self.ID = temp.ID
|
|
1644
|
+
self.DATA = js
|
|
1645
|
+
|
|
1646
|
+
#------------------------------------------ TIME DEPENDENT - MATERIAL LINK ----------------------------------------------------
|
|
1647
|
+
|
|
1648
|
+
|
|
1649
|
+
|
|
1650
|
+
class TDMatLink:
|
|
1651
|
+
mats = {}
|
|
1652
|
+
def __init__(self,matID,CnSName='',CompName=''):
|
|
1653
|
+
|
|
1654
|
+
TDMatLink.mats[str(matID)]={
|
|
1655
|
+
"TDMT_NAME": CnSName,
|
|
1656
|
+
"TDME_NAME": CompName
|
|
1657
|
+
}
|
|
1658
|
+
|
|
1659
|
+
@classmethod
|
|
1660
|
+
def json(cls):
|
|
1661
|
+
json = {"Assign": TDMatLink.mats}
|
|
1662
|
+
return json
|
|
1663
|
+
|
|
1664
|
+
@staticmethod
|
|
1665
|
+
def create():
|
|
1666
|
+
MidasAPI("PUT","/db/TMAT",TDMatLink.json())
|
|
1667
|
+
|
|
1668
|
+
@staticmethod
|
|
1669
|
+
def get():
|
|
1670
|
+
return MidasAPI("GET","/db/TMAT")
|
|
1671
|
+
|
|
1672
|
+
|
|
1673
|
+
@staticmethod
|
|
1674
|
+
def delete():
|
|
1675
|
+
MidasAPI("DELETE","/db/TMAT")
|
|
1676
|
+
TDMatLink.clear()
|
|
1677
|
+
|
|
1678
|
+
@staticmethod
|
|
1679
|
+
def clear():
|
|
1680
|
+
TDMatLink.mats={}
|
|
1681
|
+
|
|
1682
|
+
@staticmethod
|
|
1683
|
+
def sync():
|
|
1684
|
+
a = TDMatLink.get()
|
|
1685
|
+
if a != {'message': ''}:
|
|
1686
|
+
if list(a['TMAT'].keys()) != []:
|
|
1687
|
+
TDMatLink.mats = []
|
|
1688
|
+
TDMatLink.ids=[]
|
|
1689
|
+
for j in a['TMAT'].keys():
|
|
1690
|
+
TDMatLink(a['TMAT'][j], int(j))
|
|
1691
|
+
|
|
1692
|
+
#-------------------------------------------------------------------------------------------------
|