@@ -383,6 +383,24 @@ def set_em_resistive_heating_2d(self, material_type=EMMATTYPE.CONDUCTOR, initial
383
383
self .em_material_type = material_type .value
384
384
self .em_initial_conductivity = initial_conductivity
385
385
386
+ def set_em_randles_batmac (
387
+ self , positive_current_collector_conductivity = 0 , negative_current_collector_conductivity = 0
388
+ ):
389
+ """Define two conductivities per EM node for special applications (Randles Batmac).
390
+
391
+ Parameters
392
+ ----------
393
+ positive_current_collector_conductivity : float
394
+ conductivities of the positive current collector materials
395
+ negative_current_collector_conductivity : float
396
+ conductivities of the negative current collector materials
397
+
398
+ """
399
+ self .em_mat_type = 6
400
+ self .em_material_type = 5
401
+ self .sigp = positive_current_collector_conductivity
402
+ self .sign = negative_current_collector_conductivity
403
+
386
404
def set_thermal_isotropic (
387
405
self , density = 0 , generation_rate = 0 , generation_rate_multiplier = 0 , specific_heat = 0 , conductivity = 0
388
406
):
@@ -436,6 +454,10 @@ def create(self, stub, matid):
436
454
stub .CreateEMMat004 (
437
455
EMMat004Request (mid = matid , mtype = self .em_material_type , sigma = self .em_initial_conductivity )
438
456
)
457
+ elif self .em_mat_type == 6 :
458
+ stub .CreateEMMat006 (
459
+ EMMat006Request (mid = matid , mtype = self .em_material_type , sigp = self .sigp , sign = self .sign )
460
+ )
439
461
if self .em :
440
462
if self .em_eos is not None :
441
463
eosid = self .em_eos .create (stub )
@@ -477,6 +499,29 @@ def create(self, stub):
477
499
logging .info (f"Material { self .name } Created..." )
478
500
479
501
502
+ class MatPlasticKinematic :
503
+ """Define material of modelling isotropic and kinematic hardening plasticity."""
504
+
505
+ def __init__ (
506
+ self , mass_density = 0 , young_modulus = 0 , poisson_ratio = 0.3 , yield_stress = 0 , tangent_modulus = 0 , hardening = 0
507
+ ):
508
+ self .ro = mass_density
509
+ self .e = young_modulus
510
+ self .pr = poisson_ratio
511
+ self .sigy = yield_stress
512
+ self .etan = tangent_modulus
513
+ self .beta = hardening
514
+
515
+ def create (self , stub ):
516
+ """Create plastic kinematic material."""
517
+ ret = stub .CreateMatPlasticKinematic (
518
+ MatPlasticKinematicRequest (ro = self .ro , e = self .e , pr = self .pr , sigy = self .sigy , etan = self .etan , beta = self .beta )
519
+ )
520
+ self .material_id = ret .mid
521
+ self .name = "Plastic Kinematic"
522
+ logging .info (f"Material { self .name } Created..." )
523
+
524
+
480
525
class MatElasticPlasticThermal (MatAdditional ):
481
526
"""Defines temperature-dependent material coefficients."""
482
527
@@ -555,6 +600,32 @@ def create(self, stub):
555
600
logging .info (f"Material { self .name } Created..." )
556
601
557
602
603
+ class MatCrushableFoam :
604
+ """Define material of modelling crushable foam."""
605
+
606
+ def __init__ (
607
+ self , mass_density = 0 , young_modulus = 0 , poisson_ratio = 0.3 , yield_stress_curve = None , tensile_stress_cutoff = 0
608
+ ):
609
+ self .ro = mass_density
610
+ self .e = young_modulus
611
+ self .pr = poisson_ratio
612
+ self .lcid = yield_stress_curve
613
+ self .tsl = tensile_stress_cutoff
614
+
615
+ def create (self , stub ):
616
+ """Create crushable foam material."""
617
+ if self .lcid is not None :
618
+ cid = self .lcid .create (stub )
619
+ else :
620
+ cid = 0
621
+ ret = stub .CreateMatCrushableFoam (
622
+ MatCrushableFoamRequest (ro = self .ro , e = self .e , pr = self .pr , lcid = cid , tsl = self .tsl )
623
+ )
624
+ self .material_id = ret .mid
625
+ self .name = "Crushable Foam"
626
+ logging .info (f"Material { self .name } Created..." )
627
+
628
+
558
629
class MatThermalIsotropic :
559
630
"""Defines isotropic thermal properties."""
560
631
@@ -581,6 +652,30 @@ def create(self, stub):
581
652
logging .info (f"Material { self .name } Created..." )
582
653
583
654
655
+ class MatThermalOrthotropic :
656
+ """Defines orthotropic thermal properties."""
657
+
658
+ def __init__ (self , specific_heat = 0 , conductivity_x = 0 , conductivity_y = 0 , conductivity_z = 0 ):
659
+ self .hc = specific_heat
660
+ self .k1 = conductivity_x
661
+ self .k2 = conductivity_y
662
+ self .k3 = conductivity_z
663
+
664
+ def create (self , stub ):
665
+ """Create orthotropic thermal material."""
666
+ ret = stub .CreateMatThermalOrthotropic (
667
+ MatThermalOrthotropicRequest (
668
+ hc = self .hc ,
669
+ k1 = self .k1 ,
670
+ k2 = self .k2 ,
671
+ k3 = self .k3 ,
672
+ )
673
+ )
674
+ self .material_id = ret .mid
675
+ self .name = "Orthotropic thermal"
676
+ logging .info (f"Material { self .name } Created..." )
677
+
678
+
584
679
class MatRigidDiscrete :
585
680
"""Defines a rigid material for shells or solids.
586
681
0 commit comments