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#
Result provider helper wrapping the regular displacement operator. |
|
Result provider helper wrapping the regular elastic strain operator. |
|
Result provider helper wrapping the regular stress operator. |
|
Result provider helper wrapping the regular structural_temperature operator. |
|
Result provider helper wrapping the regular temperature operator. |
|
Result provider helper wrapping the regular electric_potential operator. |
Create and return a result of the specified type. |
|
Return a string representation of the Results object. |
|
Iterate over the available results. |
|
Access a result by index. |
|
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:
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:
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:
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:
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:
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:
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:
- 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:
- CommonResults.__len__()#
Return the number of results available.
- Returns:
The number of results.
- Return type:
int