stem.output module
- class stem.output.GaussPointOutput(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
EnumEnum class for variables at the Gauss Point
- BIOT_COEFFICIENT = 20
- BULK_MODULUS_FLUID = 26
- BULK_MODULUS_SOLID = 19
- CAUCHY_STRESS_TENSOR = 9
- CAUCHY_STRESS_VECTOR = 8
- DENSITY_FLUID = 24
- DENSITY_SOLID = 14
- DYNAMIC_VISCOSITY = 25
- ENGINEERING_STRAIN_TENSOR = 7
- ENGINEERING_STRAIN_VECTOR = 6
- FLUID_FLUX_VECTOR = 2
- FORCE = 28
- GREEN_LAGRANGE_STRAIN_TENSOR = 5
- GREEN_LAGRANGE_STRAIN_VECTOR = 4
- HYDRAULIC_HEAD = 3
- MOMENT = 29
- PERMEABILITY_XX = 16
- PERMEABILITY_XY = 18
- PERMEABILITY_YY = 17
- PERMEABILITY_YZ = 21
- PERMEABILITY_ZX = 22
- PERMEABILITY_ZZ = 23
- POISSON_RATIO = 13
- POROSITY = 15
- TOTAL_STRESS_TENSOR = 11
- TOTAL_STRESS_VECTOR = 10
- UMAT_PARAMETERS = 27
- VON_MISES_STRESS = 1
- YOUNG_MODULUS = 12
- class stem.output.GiDOutputParameters(output_interval: float, output_control_type: str = 'step', file_format: str = 'binary', nodal_results: ~typing.Sequence[~stem.output.NodalOutput | str] = <factory>, gauss_point_results: ~typing.Sequence[~stem.output.GaussPointOutput | str] = <factory>, file_label: str = 'step')
Bases:
OutputParametersABCClass containing the output parameters for GiD output
- Inheritance:
- Attributes:
output_interval (float): frequency of the output, either step interval if output_control_type is step or time interval in seconds if output_control_type is time.
output_control_type (str): type of output control, either step or time.
file_format (str): format of output (binary,`ascii` or hdf5) for the gid_post_mode flag
nodal_results (Sequence[Union[
NodalOutput, str]]): list of nodal outputs as defined inNodalOutput.gauss_point_results (Sequence[Union[
GaussPointOutput, str]]): list of gauss point outputs as defined inGaussPointOutput.file_label (str): labelling format for the files (step or time)
- gauss_point_results: Sequence[GaussPointOutput | str]
- nodal_results: Sequence[NodalOutput | str]
- class stem.output.JsonOutputParameters(output_interval: float, nodal_results: ~typing.Sequence[~stem.output.NodalOutput | str] = <factory>, gauss_point_results: ~typing.Sequence[~stem.output.GaussPointOutput | str] = <factory>)
Bases:
OutputParametersABCClass containing the output parameters for JSON output
- Inheritance:
- Attributes:
output_interval (float): time frequency of the output [s].
nodal_results (Sequence[Union[
NodalOutput, str]]): list of nodal outputs as defined inNodalOutput.gauss_point_results (Sequence[Union[
GaussPointOutput, str]]): list of gauss point outputs as defined inGaussPointOutput.
- gauss_point_results: Sequence[GaussPointOutput | str]
- nodal_results: Sequence[NodalOutput | str]
- class stem.output.NodalOutput(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
EnumEnum class for variables at the nodes
- ACCELERATION = 9
- ACCELERATION_X = 10
- ACCELERATION_Y = 11
- ACCELERATION_Z = 12
- CAUCHY_STRESS_VECTOR = 22
- DISPLACEMENT = 1
- DISPLACEMENT_X = 2
- DISPLACEMENT_Y = 3
- DISPLACEMENT_Z = 4
- TOTAL_DISPLACEMENT = 13
- TOTAL_DISPLACEMENT_X = 14
- TOTAL_DISPLACEMENT_Y = 15
- TOTAL_DISPLACEMENT_Z = 16
- VELOCITY = 5
- VELOCITY_X = 6
- VELOCITY_Y = 7
- VELOCITY_Z = 8
- VOLUME_ACCELERATION = 18
- VOLUME_ACCELERATION_X = 19
- VOLUME_ACCELERATION_Y = 20
- VOLUME_ACCELERATION_Z = 21
- WATER_PRESSURE = 17
- class stem.output.Output(output_parameters: OutputParametersABC, part_name: str | None = None, output_dir: str = './', output_name: str | None = None)
Bases:
objectClass containing output information for postprocessing
- Attributes:
output_parameters (
OutputParametersABC): class containing output parameterspart_name (Optional[str]): name of the model part
output_dir (str): path to the output files
output_name (Optional[str]): name for the output file
Constructor of the output process class
- Args:
output_parameters (
OutputParametersABC): class containing the output parameters- part_name (Optional[str]): name of the submodelpart to be given in output. If None, all the model is
provided in output.
output_dir (Optional[str]): output directory for the relative or absolute path to the output file. The path will be created if it does not exist yet.
example1=’test1’ results in the test1 output folder relative to current folder as ‘./test1’ example2=’path1/path2/test2’ saves the outputs in ‘./path1/path2/test2’ example3=’C:/Documents/yourproject/test3’ saves the outputs in ‘C:/Documents/yourproject/test3’.
if output_dir is None, then the current directory is assumed.
[NOTE]: for VTK file type, the content of the target directory will be deleted. Therefore a subfolder is always appended to the specified output directory to avoid erasing important memory content. The appended folder is defined based on the submodelpart name specified.
output_name (Optional[str]): Name for the output file. This parameter is used by GiD and JSON outputs while is ignored in VTK. If the name is not given, the part_name is used instead.
- class stem.output.OutputParametersABC
Bases:
ABCAbstract class for the definition of user output parameters (GiD, VTK, json).
- class stem.output.VtkOutputParameters(output_interval: float, output_control_type: str = 'step', file_format: str = 'binary', nodal_results: ~typing.Sequence[~stem.output.NodalOutput | str] = <factory>, gauss_point_results: ~typing.Sequence[~stem.output.GaussPointOutput | str] = <factory>, output_precision: int = 7)
Bases:
OutputParametersABCClass containing the output parameters for GiD output
- Inheritance:
- Attributes:
output_interval (float): frequency of the output, either step interval if output_control_type is step or time interval in seconds if output_control_type is time.
output_control_type (str): type of output control, either step or time.
file_format (str): file format for VTK, either binary or ascii are allowed.
nodal_results (Sequence[Union[
NodalOutput, str]]): list of nodal outputs as defined inNodalOutput.gauss_point_results (Sequence[Union[
GaussPointOutput, str]]): list of gauss point outputs as defined inGaussPointOutput. output_precision (int): precision of the output for ascii. Default is 7.
- gauss_point_results: Sequence[GaussPointOutput | str]
- nodal_results: Sequence[NodalOutput | str]
- stem.output.detect_tensor_outputs(requested_outputs: Sequence[GaussPointOutput | str])
Detects whether gauss point outputs are requested for specific gauss point outputs and warns the user if some cause problems. In VTK and JSON output types the vector output are rendered incorrectly.
If such output types are detected the script merely warns the user since the simulation can still run correctly.
- Args:
requested_outputs (List[
GaussPointOutput]): list of requested outputs (gauss point)
- stem.output.detect_vector_in_tensor_outputs(requested_outputs: Sequence[GaussPointOutput | str])
Detects whether tensor gauss point outputs are requested as vector output instead and warns the user if some cause problems. In GiD the vector output for tensors is incorrectly rendered. For example, for 2D tensor with 3 components, given the symmetry of the tensor, 6 component are expected when vector output is considered. In GiD, this is rendered with 4 components.
If such output types are detected the script merely warns the user since the simulation can still run correctly.
- Args:
requested_outputs (Sequence[Union[
GaussPointOutput, str]]): list of requested outputs (gauss point)
- stem.output.validate_gauss_point_output(gauss_point_results: Sequence[GaussPointOutput | str])
Validates that the specified string requested for gauss point outputs are compatible with the ones defined in the corresponding enumeration.
- Args:
gauss_point_results (Sequence[Union[
GaussPointOutput, str]]): the requested gauss point outputs.
- Raises:
ValueError: when incorrect outputs are found
- stem.output.validate_nodal_point_output(nodal_results: Sequence[NodalOutput | str])
Validates that the specified string requested for nodal outputs are compatible with the ones defined in the corresponding enumeration.
- Args:
nodal_results (Sequence[Union[
NodalOutput, str]]): the requested nodal outputs.
- Raises:
ValueError: when incorrect outputs are found