midas-civil 0.0.7__py3-none-any.whl → 0.0.9__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.

Potentially problematic release.


This version of midas-civil might be problematic. Click here for more details.

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