stem.model_part module
- class stem.model_part.BodyModelPart(name: str)
Bases:
ModelPartThis 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 partmesh (Optional[
stem.mesh.Mesh]): mesh of the model partparameters (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:
Material: Union[
stem.soil_material.SoilMaterial,stem.structural_material.StructuralMaterial]
alias of
SoilMaterial|StructuralMaterial
- class stem.model_part.ModelPart(name: str)
Bases:
objectOne 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 partparameters (Optional[
ProcessParameters]): process parameters containing the model part parameters.mesh (Optional[
stem.mesh.Mesh]): mesh of the model partid (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
- 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:
MovingLoadTypes: Tuple[
stem.load.MovingLoad,stem.load.UvecLoad]
- stem.model_part.ProcessParameters
- TypeAlias:
ProcessParameters: Union[
stem.load.LoadParametersABC,stem.boundary.BoundaryParametersABC,stem.additional_processes.AdditionalProcessesParametersABC,stem.water_boundaries.WaterBoundaryParametersABC,stem.output.OutputParametersABC]
alias of
LoadParametersABC|BoundaryParametersABC|AdditionalProcessesParametersABC|WaterProcessParametersABC|OutputParametersABC