stem.additional_processes module

class stem.additional_processes.AdditionalProcessPart(parameters: AdditionalProcessesParametersABC, model_part_name: str = '')

Bases: object

Class containing the parameters for an additional process to be applied to an existing model part. If the model_part_name is left empty, the additional process will be applied to the whole model.

Attributes:
  • parameters (AdditionalProcessesParametersABC): The parameters of the additional process

  • model_part_name (str): The name of the model part to which the additional process will be applied. Default is

    an empty string, meaning the whole model.

model_part_name: str = ''
parameters: AdditionalProcessesParametersABC
class stem.additional_processes.AdditionalProcessesParametersABC

Bases: ABC

Abstract base class to describe the parameters required for additional processes (e.g. excavations and parameter fields)

class stem.additional_processes.Excavation(deactivate_body_model_part: bool)

Bases: AdditionalProcessesParametersABC

Class containing the parameters for an excavation process

Inheritance:
Attributes:
  • deactivate_body_model_part (bool): Deactivate or not the body model part

deactivate_body_model_part: bool
class stem.additional_processes.ExtrapolateIntegrationPointToNodesParameters(list_of_variables: List[str])

Bases: AdditionalProcessesParametersABC

Class containing the parameters for extrapolating integration point values to nodes

Inheritance:
Attributes:
  • list_of_variables (List[str]): list of variable names to be extrapolated from integration points to nodes

list_of_variables: List[str]
class stem.additional_processes.HingeParameters(ROTATIONAL_STIFFNESS_AXIS_2: float, ROTATIONAL_STIFFNESS_AXIS_3: float)

Bases: AdditionalProcessesParametersABC

Class containing the parameters for a hinge process

Inheritance:
Attributes:
  • ROTATIONAL_STIFFNESS_AXIS_2 (float): Rotational stiffness ratio local axis 2

  • ROTATIONAL_STIFFNESS_AXIS_3 (float): Rotational stiffness ratio local axis 3

ROTATIONAL_STIFFNESS_AXIS_2: float
ROTATIONAL_STIFFNESS_AXIS_3: float
class stem.additional_processes.ParameterFieldParameters(property_names: List[str], function_type: str, field_file_names: List[str] | None = None, field_generator: FieldGeneratorABC | None = None, tiny_expr_function: str | None = None)

Bases: AdditionalProcessesParametersABC

For the changing a parameter field, 3 options are available to se the parameter field:
  • json: an additional json file should be provided that contains a values field. The number length of the values must match with the number of elements of the part to be updated.

  • input: In this case, the function is explicitly defined as function of coordinates (x, y and z) and time (t).

  • python: A python script needs to be provided for the purpose. This is currently not supported in STEM.

Attributes:
  • property_names (List[str]): the names of the (material) properties that needs to be changed

    (e.g. [YOUNG_MODULUS])

  • function_type (str): the type of function to be provided. It can be either json_file or input,

    as provided in the function documentation.

  • field_file_names (Optional[List[str]]): Name for the json file where the field parameters will be stored.

    This is optional for json function_type.

  • field_generator (Optional[stem.field_generator.FieldGeneratorABC]): the field generator to produce

    the values in the json file. Currently only random fields is supported but will be in the future implemented as custom functions that take in input X, Y, Z coordinates. Not required for python and input function types. This is optional for json function_type.

  • tiny_expr_function (Optional[str]): is a tiny expression string with dependency on coordinates (x, y, z)

    and time (e.g. x + y^2 + 2*cos(t)). For more info check tinyexpr on GitHub. This is optional for input function_type.

field_file_names: List[str] | None = None
field_generator: FieldGeneratorABC | None = None
function_type: str
property_names: List[str]
tiny_expr_function: str | None = None