-
-
October 28, 2024 at 6:34 pm
wheeler.ky
SubscriberHi all,
I am writing a script using TUI commands to run Fluent in batch mode, and am looking for a way to save the actual value of a report to a variable in the script. I want the value of a mass flow rate report so that I can perform some logic based off of the value, so I want to write something like this:
(define mass_flow_rate 0)
; initialize and solve
(set! mass_flow_rate (report/surface-integrals/mass-flow-rate outlet , ,))
but the command:
report/surface-integrals/mass-flow-rate outlet , ,
only prints the value to the console, so the above doesn't work to get the value. Is there a simple way to access the value of the report to save to the variable?
I have also tried creating an expression, but I ran into the same issue and can't figure out how to access an expression's value either. Similarly, I can also export both the report and expression to an output text file, but can't figure out if there's a way to load that value from the file into a variable either.Any help would be greatly appreciated!
Thanks,
Kyle
-
October 29, 2024 at 8:30 am
SRP
Ansys EmployeeHi,
You can write the value to a file using TUI command:
/report/surface-integrals> area
(inlet)
Surface Id :(1) ["inlet"]
Surface Id :(2) [()]
Write to file? [no] yes
filename (*.srp) [""] test
-
October 29, 2024 at 9:48 pm
wheeler.ky
SubscriberHi, thank you for the response!
I am able to write the value to a file, but I'm looking to save the value of the report to a variable that I have defined in the script so I can perform some logic based off of the value. Do you know if there is a way to do that?
Thanks,
Kyle
-
-
- You must be logged in to reply to this topic.
-
3492
-
1057
-
1051
-
965
-
942
© 2025 Copyright ANSYS, Inc. All rights reserved.