Skip to content

Unable to extract most results from .rst file using DPF — DPFServerException #2331

Open
@Saivellampati

Description

@Saivellampati

Before submitting the issue

  • I have checked for Compatibility issues
  • I have searched among the existing issues
  • I am using a Python virtual environment

Description of the bug

I'm encountering an issue with DPF where only the displacement result is extractable from a large .rst file. Attempting to extract any other result (e.g., contact_total_stress) throws a DPFServerException, even though the results are listed in available_results.

Steps To Reproduce

Code to reproduce

import os
from ansys.dpf import core as dpf


# Path to the .rst file
filepath = r"L421_break_in_rst_2.rst"

# Set up the DataSources object and load the .rst file
ds = dpf.DataSources()
ds.set_result_file_path(filepath, key="rst")

# Create a model from the DataSources
model = dpf.Model(data_sources=ds)

# Retrieve and print available results
available_results = model.metadata.result_info.available_results
print(available_results)
model.results.contact_total_stress().eval()

The file is of bigger size(around 5gb).

The output of the above code is

[AvailableResult<name=displacement>,
 AvailableResult<name=reaction_force>,
 AvailableResult<name=elemental_summable_miscellaneous_data>,
 AvailableResult<name=element_nodal_forces>,
 AvailableResult<name=stress>,
 AvailableResult<name=stress_1>,
 AvailableResult<name=stress_2>,
 AvailableResult<name=stress_3>,
 AvailableResult<name=stress_intensity>,
 AvailableResult<name=stress_eqv>,
 AvailableResult<name=elemental_volume>,
 AvailableResult<name=stiffness_matrix_energy>,
 AvailableResult<name=artificial_hourglass_energy>,
 AvailableResult<name=thermal_dissipation_energy>,
 AvailableResult<name=kinetic_energy>,
 AvailableResult<name=co_energy>,
 AvailableResult<name=incremental_energy>,
 AvailableResult<name=elastic_strain>,
 AvailableResult<name=plastic_strain>,
 AvailableResult<name=thermal_strain>,
 AvailableResult<name=thermal_strains_eqv>,
 AvailableResult<name=swelling_strains>,
 AvailableResult<name=element_euler_angles>,
 AvailableResult<name=elemental_non_summable_miscellaneous_data>,
 AvailableResult<name=structural_temperature>,
 AvailableResult<name=contact_status>,
 AvailableResult<name=contact_penetration>,
 AvailableResult<name=contact_pressure>,
 AvailableResult<name=contact_friction_stress>,
 AvailableResult<name=contact_total_stress>,
 AvailableResult<name=contact_sliding_distance>,
 AvailableResult<name=contact_gap_distance>,
 AvailableResult<name=total_heat_flux_at_contact_surface>,
 AvailableResult<name=contact_status_changes>,
 AvailableResult<name=fluid_penetration_pressure>]

DPF throws exceptions when extracting all results except for displacement.

model.results.stress().eval()

Output of the above line

Traceback (most recent call last):
  File "c:\Users\sandeep\Documents\PyDPF\scripts\DpftoCax\user\results_extraction.py", line 21, in <module>
    model.results.stress().eval()
  File "c:\Users\sandeep\Documents\PyDPF\py312\Lib\site-packages\ansys\dpf\core\dpf_operator.py", line 809, in eval
    return self.outputs._outputs[0]()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\sandeep\Documents\PyDPF\py312\Lib\site-packages\ansys\dpf\core\outputs.py", line 103, in __call__
    return self.get_data()
           ^^^^^^^^^^^^^^^
  File "c:\Users\sandeep\Documents\PyDPF\py312\Lib\site-packages\ansys\dpf\core\outputs.py", line 82, in get_data
    output = self._operator.get_output(self._pin, type_output)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\sandeep\Documents\PyDPF\py312\Lib\site-packages\ansys\dpf\core\dpf_operator.py", line 591, in get_output
    internal_obj = type_tuple[1](self, pin)
                   ^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\sandeep\Documents\PyDPF\py312\Lib\site-packages\ansys\dpf\gate\generated\operator_capi.py", line 422, in operator_getoutput_fields_container   
    raise errors.DPFServerException(sError.value)
ansys.dpf.gate.errors.DPFServerException: S:44<-mapdl::rst::S:67<-, failed to read stressesfrom rst file.

Which Operating System causes the issue?

Windows

Which DPF/Ansys version are you using?

DPF Server 2025.1.pre0

Which Python version causes the issue?

3.12

Installed packages

annotated-types==0.7.0
ansys-dpf-core==0.13.8

Editable install with no version control (ansys-dpf-server_2025_1_pre0==2025.1rc0)

-e c:\users\sandeep\documents\pydpf\ansys_dpf_server_win_v2025.1.pre0
certifi==2025.4.26
charset-normalizer==3.4.2
colorama==0.4.6
contourpy==1.3.2
cycler==0.12.1
fonttools==4.58.1
grpcio==1.72.1
idna==3.10
importlib_metadata==8.7.0
Jinja2==3.1.6
kiwisolver==1.4.8
llvmlite==0.44.0
MarkupSafe==3.0.2
matplotlib==3.10.3
numba==0.61.2
numpy==2.2.6
packaging==25.0
pillow==11.2.1
platformdirs==4.3.8
pooch==1.8.2
protobuf==6.31.1
psutil==7.0.0
pydantic==2.11.5
pydantic-settings==2.9.1
pydantic_core==2.33.2
pyparsing==3.2.3
python-dateutil==2.9.0.post0
python-dotenv==1.1.0
pyvista==0.45.2
requests==2.32.3
scooby==0.10.1
setuptools==80.9.0
six==1.17.0
tqdm==4.67.1
typing-inspection==0.4.1
typing_extensions==4.14.0
urllib3==2.4.0
vtk==9.4.2
wheel==0.45.1
zipp==3.22.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions