ResultInfo#

enum ansys.dpf.core.result_info.physics_types(value)#

'Physics_types' enumerates the different types of physics that an analysis can have.

Valid values are as follows:

mechanical = <physics_types.mechanical: 0>#
thermal = <physics_types.thermal: 1>#
magnetic = <physics_types.magnetic: 2>#
electric = <physics_types.electric: 3>#
unknown_physics = <physics_types.unknown_physics: 4>#
fluid = <physics_types.fluid: 5>#
enum ansys.dpf.core.result_info.analysis_types(value)#

'Analysis_types' enumerates the different types of analysis.

Valid values are as follows:

static = <analysis_types.static: 0>#
buckling = <analysis_types.buckling: 1>#
modal = <analysis_types.modal: 2>#
harmonic = <analysis_types.harmonic: 3>#
cms = <analysis_types.cms: 4>#
transient = <analysis_types.transient: 5>#
msup = <analysis_types.msup: 6>#
substruct = <analysis_types.substruct: 7>#
spectrum = <analysis_types.spectrum: 8>#
unknown_analysis = <analysis_types.unknown_analysis: 9>#
class ansys.dpf.core.result_info.ResultInfo(result_info=None, server=None, analysis_type: ansys.dpf.core.result_info.analysis_types | None = None, physics_type: ansys.dpf.core.result_info.physics_types | None = None)#

Represents the result information.

This class describes the metadata of the analysis and the available results.

Note

Creating a new ResultInfo from an analysis type and physics type is currently only available InProcess.

Parameters:
  • result_info (ctypes.c_void_p, ansys.grpc.dpf.result_info_pb2.ResultInfo) – Existing ResultInfo internal object

  • server (ansys.dpf.core.server, optional) – Server with the channel connected to the remote or local instance. The default is None, in which case an attempt is made to use the global server.

  • analysis_type (analysis_types) – Type of the analysis for a new ResultInfo.

  • physics_type (physics_types) – Type of physics for the new ResultInfo.

Examples

Explore the result info from the model

>>> from ansys.dpf import core as dpf
>>> from ansys.dpf.core import examples
>>> transient = examples.download_transient_result()
>>> model = dpf.Model(transient)
>>> result_info = model.metadata.result_info # printable result_info
>>> result_info.available_results[0].name
'displacement'
>>> result_info.available_results[0].homogeneity
'length'
add_result(operator_name: str, scripting_name: str, homogeneity: ansys.dpf.core.available_result.Homogeneity, location: ansys.dpf.gate.common.locations, nature: ansys.dpf.core.common.natures, dimensions: List[int] | None = None, description: str = '')#

Add an available result to the ResultInfo.

Note

Adding a new result to a ResultInfo is currently only available InProcess.

Parameters:
  • operator_name (str) – Name of the DPF operator to use for result extraction.

  • scripting_name (str) – Name to use when requesting the result.

  • homogeneity (Homogeneity) – Homogeneity of the result.

  • location (locations) – Location of the result.

  • nature (natures) – Mathematical nature of the result (scalar, vector…).

  • dimensions (Optional[List[int]], default: None) – List of dimensions of the result when vector or matrix. Enter [N] for an N-size vector result. Enter [N, M] for a rank-2, NxM matrix result. For example: * [3]: 3d vector * [3, 3]: 3 x 3 matrix

  • description (str, default: '') – Description of the result.

property analysis_type#

Retrieves the analysis type.

Returns:

analysis_type – Type of the analysis, such as static or transient.

Return type:

str

Examples

>>> from ansys.dpf import core as dpf
>>> from ansys.dpf.core import examples
>>> transient = examples.download_transient_result()
>>> model = dpf.Model(transient)
>>> result_info = model.metadata.result_info
>>> result_info.analysis_type
'static'
property physics_type#

Type of the physics.

Examples

Mechanical result

>>> from ansys.dpf import core as dpf
>>> from ansys.dpf.core import examples
>>> transient = examples.download_transient_result()
>>> model = dpf.Model(transient)
>>> result_info = model.metadata.result_info
>>> result_info.physics_type
'mechanical'
property n_results#

Number of results.

property unit_system#

Unit system of the result.

property cyclic_symmetry_type#

Cyclic symmetry type of the result.

Returns:

cyclic_symmetry_type – Cyclic symmetry type of the results. Options are "single_stage", "multi_stage", and "not_cyclic".

Return type:

str

property has_cyclic#

Check the result file for cyclic symmetry.

Returns:

has_cyclic – Returns True if the result file has cyclic symmetry or is multistage.

Return type:

bool

property cyclic_support#

Cyclic expansion information for a result file that has cyclic symmetry or is multistage.

Returns:

cyclic_support

Return type:

CyclicSupport

Examples

Get a cyclic support from a model.

>>> from ansys.dpf.core import Model
>>> from ansys.dpf.core import examples
>>> multi_stage = examples.download_multi_stage_cyclic_result()
>>> model = Model(multi_stage)
>>> result_info = model.metadata.result_info
>>> cyc_support = result_info.cyclic_support
property unit_system_name#

Name of the unit system.

property solver_version#

Version of the solver.

property solver_date#

Date of the solver.

property solver_time#

Time of the solver.

property user_name#

Name of the user.

property job_name#

Name of the job.

property product_name#

Name of the product.

property main_title#

Main title.

property available_results#

Available results, containing all information about results present in the result files.

Returns:

available_result

Return type:

list[AvailableResult]

property available_qualifier_labels#

Returns a list of labels defining result qualifiers

Return type:

list[str]

Notes

Available with server’s version starting at 5.0.

qualifier_label_support(label)#

Returns what supports an available qualifier label.

Parameters:

label (str) –

Return type:

Support

Notes

Available with server’s version starting at 5.0.