Module containing the DpfSolution
class and its children.
Each class highlights an analysis type and provides hard-coded methods to get a result object regarding the wanted result type.
This module also contains the DpfComplexSolution
class, which is a
child of the DpfSolution
class. In addition to the classic APIs, the complex
result introduces an amplitude evaluation.
- class ansys.dpf.post.dpf_solution.DpfSolution(data_sources, model)#
Provides the main class of the DPF-Post solution.
- property mesh#
Mesh representation of the model.
Returns the
ansys.dpf.core.MeshedRegion
class.
- property time_freq_support#
Description of the temporal/frequency analysis of the model.
- get_result_info()#
Get result file information.
Examples
>>> from ansys.dpf import post >>> from ansys.dpf.post import examples >>> solution = post.load_solution(examples.static_rst) >>> print(solution.get_result_info()) Static analysis Unit system: MKS: m, kg, N, s, V, A, degC Physics Type: ... Available results: - displacement: Nodal Displacement - reaction_force: Nodal Force - stress: ElementalNodal Stress - elemental_volume: Elemental Volume - stiffness_matrix_energy: Elemental Energy-stiffness matrix - artificial_hourglass_energy: Elemental Hourglass Energy - thermal_dissipation_energy: Elemental thermal dissipation energy - kinetic_energy: Elemental Kinetic Energy - co_energy: Elemental co-energy - incremental_energy: Elemental incremental energy - elastic_strain: ElementalNodal Strain - element_euler_angles: ElementalNodal Element Euler Angles - structural_temperature: ElementalNodal Structural temperature
- class ansys.dpf.post.dpf_solution.DpfMecanicSolution(data_sources, model)#
Provides the mecanic solution.
- stress(**kwargs)#
Get a stress object, from which you can possibly get result data.
- Parameters:
**kwargs – List of keyword arguments. You can use the
print_available_keywords
method to find keyword arguments.
Examples
>>> from ansys.dpf import post >>> from ansys.dpf.post import examples >>> solution = post.load_solution(examples.static_rst) >>> stress = solution.stress(node_scoping = [1, 43])
- elastic_strain(**kwargs)#
Get an elastic strain object, from which you can possibly get result data.
- Parameters:
**kwargs – List of keyword arguments. You can use the
print_available_keywords
method to find keyword arguments.
Examples
>>> from ansys.dpf import post >>> from ansys.dpf.post import examples >>> solution = post.load_solution(examples.static_rst) >>> elastic_strain = solution.elastic_strain(node_scoping = [1, 43])
- plastic_strain(**kwargs)#
Return a plastic strain object, from which you can possibly get result data.
- Parameters:
**kwargs – List of keyword arguments. You can use the
print_available_keywords
method to find keyword arguments.
Examples
>>> from ansys.dpf import post >>> from ansys.dpf.post import examples >>> solution = post.load_solution(examples.static_rst) >>> plastic_strain = solution.plastic_strain(node_scoping = [1, 43])
- displacement(**kwargs)#
Get a displacement object, from which you can possibly get result data.
- Parameters:
**kwargs – List of keyword arguments. You can use the
print_available_keywords
method to find keyword arguments.
Examples
>>> from ansys.dpf import post >>> from ansys.dpf.post import examples >>> solution = post.load_solution(examples.static_rst) >>> displacement = solution.displacement(node_scoping = [1, 43])
- structural_temperature(**kwargs)#
Get a temperature object, from which you can possibly get result data.
- Parameters:
**kwargs – List of keyword arguments. You can use the
print_available_keywords
method to find keyword arguments.
Examples
>>> from ansys.dpf import post >>> from ansys.dpf.post import examples >>> solution = post.load_solution(examples.download_all_kinds_of_complexity()) >>> temperature = solution.structural_temperature(node_scoping = [1, 43])
- get_result_info()#
Get result file information.
Examples
>>> from ansys.dpf import post >>> from ansys.dpf.post import examples >>> solution = post.load_solution(examples.static_rst) >>> print(solution.get_result_info()) Static analysis Unit system: MKS: m, kg, N, s, V, A, degC Physics Type: ... Available results: - displacement: Nodal Displacement - reaction_force: Nodal Force - stress: ElementalNodal Stress - elemental_volume: Elemental Volume - stiffness_matrix_energy: Elemental Energy-stiffness matrix - artificial_hourglass_energy: Elemental Hourglass Energy - thermal_dissipation_energy: Elemental thermal dissipation energy - kinetic_energy: Elemental Kinetic Energy - co_energy: Elemental co-energy - incremental_energy: Elemental incremental energy - elastic_strain: ElementalNodal Strain - element_euler_angles: ElementalNodal Element Euler Angles - structural_temperature: ElementalNodal Structural temperature
- property mesh#
Mesh representation of the model.
Returns the
ansys.dpf.core.MeshedRegion
class.
- property time_freq_support#
Description of the temporal/frequency analysis of the model.
- class ansys.dpf.post.dpf_solution.DpfMecanicComplexSolution(data_sources, model)#
Provides the main class of the DPF-Post solution if the analysis gives a complex solution.
- has_complex_result()#
Check if the solution object has complex values (complex frequencies).
- Returns:
True
if the solution has complex results,False
otherwise.- Return type:
- displacement(**kwargs)#
Get a displacement object, from which you can possibly get result data.
- Parameters:
**kwargs – List of keyword arguments. You can use the
print_available_keywords
method to find keyword arguments.
Examples
>>> from ansys.dpf import post >>> from ansys.dpf.post import examples >>> solution = post.load_solution(examples.static_rst) >>> displacement = solution.displacement(node_scoping = [1, 43])
- structural_temperature(**kwargs)#
Get a temperature object, from which you can possibly get result data.
- Parameters:
**kwargs – List of keyword arguments. You can use the
print_available_keywords
method to find keyword arguments.
Examples
>>> from ansys.dpf import post >>> from ansys.dpf.post import examples >>> solution = post.load_solution(examples.download_all_kinds_of_complexity()) >>> temperature = solution.structural_temperature(node_scoping = [1, 43])
- plastic_strain(**kwargs)#
Get a plastic strain object, from which you can possibly get result data.
- Parameters:
**kwargs – List of keyword arguments. You can use the
print_available_keywords
method to find keyword arguments.
Examples
>>> from ansys.dpf import post >>> from ansys.dpf.post import examples >>> solution = post.load_solution(examples.static_rst) >>> plastic_strain = solution.plastic_strain(node_scoping = [1, 43])
- elastic_strain(**kwargs)#
Get an elastic strain object, from which you can possibly get result data.
- Parameters:
**kwargs – List of keyword arguments. You can use the
print_available_keywords
method to find keyword arguments.
Examples
>>> from ansys.dpf import post >>> from ansys.dpf.post import examples >>> solution = post.load_solution(examples.static_rst) >>> elastic_strain = solution.elastic_strain(node_scoping = [1, 43])
- stress(**kwargs)#
Get a stress object, from which you can possibly get result data.
- Parameters:
**kwargs – List of keyword arguments. You can use the
print_available_keywords
method to find keyword arguments.
Examples
>>> from ansys.dpf import post >>> from ansys.dpf.post import examples >>> solution = post.load_solution(examples.static_rst) >>> stress = solution.stress(node_scoping = [1, 43])
- get_result_info()#
Get result file information.
Examples
>>> from ansys.dpf import post >>> from ansys.dpf.post import examples >>> solution = post.load_solution(examples.static_rst) >>> print(solution.get_result_info()) Static analysis Unit system: MKS: m, kg, N, s, V, A, degC Physics Type: ... Available results: - displacement: Nodal Displacement - reaction_force: Nodal Force - stress: ElementalNodal Stress - elemental_volume: Elemental Volume - stiffness_matrix_energy: Elemental Energy-stiffness matrix - artificial_hourglass_energy: Elemental Hourglass Energy - thermal_dissipation_energy: Elemental thermal dissipation energy - kinetic_energy: Elemental Kinetic Energy - co_energy: Elemental co-energy - incremental_energy: Elemental incremental energy - elastic_strain: ElementalNodal Strain - element_euler_angles: ElementalNodal Element Euler Angles - structural_temperature: ElementalNodal Structural temperature
- property mesh#
Mesh representation of the model.
Returns the
ansys.dpf.core.MeshedRegion
class.
- property time_freq_support#
Description of the temporal/frequency analysis of the model.
- class ansys.dpf.post.dpf_solution.DpfThermalSolution(data_sources, model)#
Provides the main class of the DPF-Post solution for a thermal analysis type.
- temperature(**kwargs)#
Get a temperature object, from which you can possibly get result data.
- Parameters:
**kwargs – List of keyword arguments. You can use the
print_available_keywords
method to find keyword arguments.
Examples
>>> from ansys.dpf import post >>> from ansys.dpf.post import examples >>> solution = post.load_solution(examples.steady_therm) >>> temp = solution.temperature(node_scoping = [1, 43])
- heat_flux(**kwargs)#
Get a heat flux object, from which you can possibly get result data.
- Parameters:
**kwargs – List of keyword arguments. You can use the
print_available_keywords
method to find keyword arguments.
Examples
>>> from ansys.dpf import post >>> from ansys.dpf.post import examples >>> solution = post.load_solution(examples.steady_therm) >>> hf = solution.heat_flux(node_scoping = [1, 43])
- electric_potential(**kwargs)#
Get an electric potential object, from which you can possibly get result data.
- Parameters:
**kwargs – List of keyword arguments. You can use the
print_available_keywords
method to find keyword arguments.
Examples
>>> from ansys.dpf import post >>> from ansys.dpf.post import examples >>> solution = post.load_solution(examples.electric_therm) >>> ep = solution.electric_potential(node_scoping = [1, 43])
- electric_field(**kwargs)#
Get an electric field object from which you can possible to get result data.
- Parameters:
**kwargs – List of keyword arguments. You can use the
print_available_keywords
method to find keyword arguments.
Examples
>>> from ansys.dpf import post >>> from ansys.dpf.post import examples >>> solution = post.load_solution(examples.electric_therm) >>> ef = solution.electric_field(node_scoping = [1, 43])
- get_result_info()#
Get result file information.
Examples
>>> from ansys.dpf import post >>> from ansys.dpf.post import examples >>> solution = post.load_solution(examples.static_rst) >>> print(solution.get_result_info()) Static analysis Unit system: MKS: m, kg, N, s, V, A, degC Physics Type: ... Available results: - displacement: Nodal Displacement - reaction_force: Nodal Force - stress: ElementalNodal Stress - elemental_volume: Elemental Volume - stiffness_matrix_energy: Elemental Energy-stiffness matrix - artificial_hourglass_energy: Elemental Hourglass Energy - thermal_dissipation_energy: Elemental thermal dissipation energy - kinetic_energy: Elemental Kinetic Energy - co_energy: Elemental co-energy - incremental_energy: Elemental incremental energy - elastic_strain: ElementalNodal Strain - element_euler_angles: ElementalNodal Element Euler Angles - structural_temperature: ElementalNodal Structural temperature
- property mesh#
Mesh representation of the model.
Returns the
ansys.dpf.core.MeshedRegion
class.
- property time_freq_support#
Description of the temporal/frequency analysis of the model.