Assigning report definition scalar values to variables in python environment #3350
-
Hello, I am trying to create a pyFluent script in which i will make derivations and calculations using the reported & computed values in the domain. For example i have an pressure inlet and i want to create a variable name mass_flow_inlet and assign mass flow rate through the inlet to my variable "mass_flow_inlet", after the solution is converged or enough iterations has been performed. Required report definition is already defined in the case so all i need is a way to simple code snippet to get the value of this report definition and assign it to my user-defined variable, such as: mass_flow_inlet = .... How can i go about doing that ? Best Regards. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I had a similar issue.
Kind Regards Christian |
Beta Was this translation helpful? Give feedback.
Hi @rewol & all,
it may depend on the release you're working with, but when I do...
solver.solution.report_definitions.compute(report_defs = 'report-def-0')
...it prints comprehensive output and then returns
[{'report-def-0': [0.0, 0]}]
(...which I assume you'll be able to make further use of..[?])...