|
[Sponsors] |
PyFluent postproc - assign report value to a float variable |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 15, 2023, 09:19 |
PyFluent postproc - assign report value to a float variable
|
#1 |
New Member
Zalan Zsigmond
Join Date: May 2018
Posts: 1
Rep Power: 0 |
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. Last edited by Zalan; August 15, 2023 at 09:28. Reason: Text editing disappeared |
|
August 28, 2023, 12:14 |
|
#2 |
New Member
wuhaibin
Join Date: Aug 2023
Posts: 8
Rep Power: 3 |
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?
|
|
September 4, 2023, 16:53 |
Same question
|
#3 | |
New Member
Quique Dios
Join Date: Sep 2023
Posts: 1
Rep Power: 0 |
Has anyone figured this out already? I'm finding the same issue
Quote:
|
||
Tags |
pyfluent, pyfluent core, reporting, tui |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
generating report definition shows Unbound variable | Shamoon Jamshed | FLUENT | 7 | September 21, 2021 03:40 |
Report Output Filename - variable | Jiricbeng | CFX | 0 | August 15, 2014 08:44 |
Assign new variable in CFX Post | Ben | CFX | 1 | August 25, 2008 15:59 |
error in COMSOL:'ERROR:6164 Duplicate Variable' | bhushas | COMSOL | 1 | May 30, 2008 05:35 |
Replace periodic by inlet-outlet pair | lego | CFX | 3 | November 5, 2002 21:09 |