CommonResults#

class ansys.dpf.core.results.CommonResults(connector, mesh_by_default, result_info, server)#

Bases: Results

Default implementation of the class:’Results’.

Is created by default by the ‘Model’ with the method:’results’. Create default result instances for common result types.

Notes

Used to allow type hints and auto completion for the method:’results’ of the class:’Results’.

Overview#

displacement

Result provider helper wrapping the regular displacement operator.

elastic_strain

Result provider helper wrapping the regular elastic strain operator.

stress

Result provider helper wrapping the regular stress operator.

structural_temperature

Result provider helper wrapping the regular structural_temperature operator.

temperature

Result provider helper wrapping the regular temperature operator.

electric_potential

Result provider helper wrapping the regular electric_potential operator.

__result__

Create and return a result of the specified type.

__str__

Return a string representation of the Results object.

__iter__

Iterate over the available results.

__getitem__

Access a result by index.

__len__

Return the number of results available.

Import detail#

from ansys.dpf.core.results import CommonResults

Property detail#

property CommonResults.displacement#

Result provider helper wrapping the regular displacement operator.

With this wrapper, time and mesh scopings can easily be customized.

Return type:

Result

Examples

Create a displacement result from the model and choose its time and mesh scopings.

>>> from ansys.dpf import core as dpf
>>> from ansys.dpf.core import examples
>>> model = dpf.Model(examples.find_msup_transient())
>>> disp = model.results.displacement
>>> disp = disp.on_last_time_freq.on_named_selection("_CONSTRAINEDNODES")
>>> last_time_disp = disp.eval()
property CommonResults.elastic_strain#

Result provider helper wrapping the regular elastic strain operator.

With this wrapper, time and mesh scopings can easily be customized.

Return type:

Result

Examples

Create an elastic strain result from the model and choose its time and mesh scopings.

>>> from ansys.dpf import core as dpf
>>> from ansys.dpf.core import examples
>>> model = dpf.Model(examples.find_msup_transient())
>>> strain = model.results.elastic_strain
>>> strain = strain.on_last_time_freq.on_named_selection("_CONSTRAINEDNODES")
>>> last_time_disp = strain.eval()
property CommonResults.stress#

Result provider helper wrapping the regular stress operator.

With this wrapper, time and mesh scopings can easily be customized.

Return type:

Result

Examples

Create a stress result from the model and choose its time and mesh scopings.

>>> from ansys.dpf import core as dpf
>>> from ansys.dpf.core import examples
>>> model = dpf.Model(examples.find_msup_transient())
>>> stress = model.results.stress
>>> stress = stress.on_last_time_freq.on_named_selection("_CONSTRAINEDNODES")
>>> last_time_disp = stress.eval()
property CommonResults.structural_temperature#

Result provider helper wrapping the regular structural_temperature operator.

With this wrapper, time and mesh scopings can easily be customized.

Return type:

Result

Examples

Create a structural_temperature result from the model and choose its time and mesh scopings.

>>> from ansys.dpf import core as dpf
>>> from ansys.dpf.core import examples
>>> model = dpf.Model(examples.find_complex_rst())
>>> structural_temperature = model.results.structural_temperature
>>> structural_temperature = structural_temperature.on_last_time_freq()
>>> last_time_disp = structural_temperature.eval()
property CommonResults.temperature#

Result provider helper wrapping the regular temperature operator.

With this wrapper, time and mesh scopings can easily be customized.

Return type:

Result

Examples

Create a temperature result from the model and choose its time and mesh scopings.

>>> from ansys.dpf import core as dpf
>>> from ansys.dpf.core import examples
>>> model = dpf.Model(examples.find_steady_therm())
>>> temperature = model.results.temperature.on_last_time_freq()
>>> last_time_disp = temperature.eval()
property CommonResults.electric_potential#

Result provider helper wrapping the regular electric_potential operator.

With this wrapper, time and mesh scopings can easily be customized.

Return type:

Result

Examples

Create a electric_potential result from the model and choose its time and mesh scopings.

>>> from ansys.dpf import core as dpf
>>> from ansys.dpf.core import examples
>>> model = dpf.Model(examples.find_electric_therm())
>>> electric_potential = model.results.electric_potential.on_first_time_freq()
>>> last_time_disp = electric_potential.eval()

Method detail#

CommonResults.__result__(result_type, *args)#

Create and return a result of the specified type.

Parameters:
  • result_type (any) – The type of the result to generate.

  • *args (tuple) – Additional arguments required for creating the result.

Returns:

An instance of the Result class, providing access to the specified result.

Return type:

Result

CommonResults.__str__()#

Return a string representation of the Results object.

Returns:

String description of the Results object.

Return type:

str

CommonResults.__iter__()#

Iterate over the available results.

Yields:

Result – Each result dynamically added to the Results object.

CommonResults.__getitem__(val)#

Access a result by index.

Parameters:

val (int) – The index of the result to retrieve.

Returns:

The result at the specified index.

Return type:

Result

CommonResults.__len__()#

Return the number of results available.

Returns:

The number of results.

Return type:

int