stem.IO.kratos_material_io module

class stem.IO.kratos_material_io.KratosMaterialIO(ndim: int, domain: str)

Bases: object

Class containing methods to write materials to Kratos

Attributes:
  • ndim (int): number of dimensions of the mesh

Constructor of KratosMaterialIO class

Args:
  • ndim (int): number of dimensions of the mesh

create_material_dict(part_name: str, material: SoilMaterial | StructuralMaterial, material_id: int) Dict[str, Any]

Creates a dictionary containing the material parameters

Args:
  • part_name (str): name of the body model part for the material

  • material (Union[stem.soil_material.SoilMaterial, stem.soil_material.StructuralMaterial]): material object

  • material_id (int): material id

Raises:
  • ValueError: if material is not of either SoilMaterial or StructuralMaterial type

Returns:
  • Dict[str, Any]: dictionary containing the material parameters