stem.model_part module

class stem.model_part.BodyModelPart(name: str)

Bases: ModelPart

This class contains model parts which are part of the body, e.g. a soil layer or track components.

Inheritance:
Attributes:
  • __name (str): name of the model part

  • geometry (Optional[stem.geometry.Geometry]): geometry of the model part

  • mesh (Optional[stem.mesh.Mesh]): mesh of the model part

  • parameters (Dict[str, Any]): dictionary containing the model part parameters

  • material (Material): material of the model part

Initialize the body model part

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

get_element_name(n_dim_model: int, n_nodes_element: int, analysis_type: AnalysisType) str | None

Get the element name of the elements within the model part

Args:
  • n_dim_model (int): The number of dimensions of the model (2 or 3)

  • n_nodes_element (int): The number of nodes per element

  • analysis_type (stem.solver.AnalysisType): The analysis type of the model

Returns:
  • Optional[str]: element name of the model part

stem.model_part.Material
TypeAlias:

alias of SoilMaterial | StructuralMaterial

class stem.model_part.ModelPart(name: str)

Bases: object

One part of the complete model, this can be a boundary condition, a loading or another special process like excavation.

Attributes:
  • __name (str): name of the model part

  • geometry (Optional[stem.geometry.Geometry]): geometry of the model part

  • parameters (Optional[ProcessParameters]): process parameters containing the model part parameters.

  • mesh (Optional[stem.mesh.Mesh]): mesh of the model part

  • id (Optional[int]): the id of the model part

Initialize the model part

Args:
  • name (str): name of the model part

get_element_name(n_dim_model: int, n_nodes_element: int, analysis_type: AnalysisType) str | None

Get the element name of the model part. Only loads and boundary conditions currently may have an element name.

Args:
  • n_dim_model (int): The number of dimensions of the model (2 or 3)

  • n_nodes_element (int): The number of nodes per element

  • analysis_type (stem.solver.AnalysisType): The analysis type of the model

Returns:
  • Optional[str]: element name of the model part

get_geometry_from_geo_data(geo_data: Dict[str, Any], name: str)

Get the geometry from the geo_data and set the nodes and elements attributes.

Args:
  • geo_data (Dict[str, Any]): dictionary containing the geometry data as generated by the gmsh_io

property name: str

Get the name of the model part

Returns:
  • str: name of the model part

validate_input()

Validate the input of the model part

Raises:
  • ValueError: if the geometry of the model part is not defined

  • ValueError: if the parameters of the model part is not defined

  • ValueError: if the origin of the moving load is not aligned with the lines of the geometry

  • ValueError: if the lines of the geometry are not aligned on a path, i.e. there are loops or branching points

stem.model_part.MovingLoadTypes = (<class 'stem.load.MovingLoad'>, <class 'stem.load.UvecLoad'>)
TypeAlias:
stem.model_part.ProcessParameters
TypeAlias:

alias of LoadParametersABC | BoundaryParametersABC | AdditionalProcessesParametersABC | WaterProcessParametersABC | OutputParametersABC