PyFluent postproc - assign report value to a float variable
Hi All,
I'm new to Ansys PyFluent and I'd like to have an surface-average temperature report value assigned to a numerical (float) variable in PyFluent. Doing this TUI command within Fluent Console: /report/surface-integrals/mass-weighted-avg/ycut_1 temperature no Gave the following output: Mass-Weighted Average Static Temperature [K] -------------------------------- -------------------- ycut_1 345.40113 When I run the PyFluent-equivalent command of the above code in Jupyter Notebook, some strange 'False' boolean is given as output: Commands: t_bulk = solver.results.report.surface_integrals(report_typ e = "area-weighted-avg", surface_id = ["ycut_1"], cell_report = "temperature", write_to_file = False) print(t_bulk) Result: Area-Weighted Average Static Temperature [K] -------------------------------- -------------------- ycut_1 342.32108 False Assigning this command to a variable results in a 'bool' type variable but this is weird as it seems a string to me: Command: type(t_bulk) Output: bool My question is: do you know any trick on how to get just the numerical value of this report (in above example, 342.32108)? Many thanks in advance. |
I have encountered similar issues, but what I want to store the text, and I use: message_ Session. tui. mesh. manage. list(),the i get all the information about the mesh of all fluid. I want to save it as a string type into a variable, but I failed. I am unable to save some values and text in pyfluent. Have you made any progress on this issue recently? Can you help me?
|
Same question
Has anyone figured this out already? I'm finding the same issue
Quote:
|
All times are GMT -4. The time now is 01:01. |