load_solution#

ansys.dpf.post.load_solution(data_sources, physics_type=None, analysis_type=None)#

Loads a solution and returns a ansys.dpf.post.Result object.

Deprecated since version 3.0: Use load_simulation() instead.

This class provides information on a given set on a given scoping.

Parameters:
  • data_sources (str, ansys.dpf.core.DataSources) – Path to the file to open or the ansys.dpf.core.DataSources class.

  • physics_type (common._PhysicsType, str, optional) – Type of physics described in the specified data sources. Options are "mecanic" or "thermal". The default is None, in which case the data sources are read to determine the physics type.

  • analysis_type (common._AnalysisType, str, optional) – Type of analysis described in the specified data sources. Options are "static", "modal", "harmonic", and "transient". The default is None, in which case the data sources are read to determine the analysis type.

Examples

Load the example static result.

>>> from ansys.dpf import post
>>> from ansys.dpf.post import examples
>>> solution = post.load_solution(examples.static_rst)