Description
🔍 Before submitting the issue
- I have searched among the existing issues
- I am using a Python virtual environment
🐞 Description of the bug
We developed a postprocessing script via pyfluent using the GPU solver.
In general, I directly load the script in a running solver-session as journal-file.
The script works fine with 25R1, but I´m seeing issues now in 25R2:
When trying to create a xy-plot, fluent claims that it does not know a specific expression (AV_TRN_pt), see error message.
But this expression has been defined in a previous step, though, and should be available.
When running the script again afterwards, everything´s working fine.
When doing the steps manually also no issues occur.
I tried to narrow down the error (as the script is quite big), but I really don´t know what´s going wrong here.
I think the issues is related to the xy_plot function which is not recognizing that the expression "AV_TRN_pt" used as "y_axis_function" has already been defined when creating the plot via "solver.settings.results.plot.xy_plot"
What could be the problem here?
What changed from 251 to 252?
📝 Steps to reproduce
The script and test-data are quite big, I can provide them if needed.
Here the function which I use to create the xy-plot:
def create_xy_plot(solver, plot_name: str, variable: str, surfaces_list: list, direction_vector, filename=None):
solver.settings.results.plot.xy_plot[plot_name] = {}
solver.settings.results.plot.xy_plot[plot_name] = {
"surfaces_list": surfaces_list,
"y_axis_function": variable,
"plot_direction": {
"option": "direction-vector",
"direction_vector": {
"x_component": direction_vector[0],
"y_component": direction_vector[1],
"z_component": direction_vector[2],
},
},
}
if filename:
solver.settings.results.plot.xy_plot[plot_name].write_to_file(filename=filename)
💻 Which operating system are you using?
Linux
📀 Which ANSYS version are you using?
25R2
🐍 Which Python version are you using?
3.9
📦 Installed packages
running the script as journal inside a 25R2 fluent-session