ANSYS CFD-Post scripting - Extract Results
I need to run a large number of simulations based on very similar conditions, with slightly different meshes.
I have managed to create the python script that sets up each simulation and creates the solution, however, I am not sure what code to use in order to extract information from the results.
What I want, is the Mass Flow on outlet for example (which, in the GUI is obtained through Calculators --> Function Calculator)
Is there a way to extract this value without accessing the GUI?
(I don't have much experience with ANSYS Scripting / Python, so any help would be great).
Simple: put a monitor point in the simulation to return the mass flow on your outlet. Then use the cfx5mon command to get the data from the command line (or in your case a python script)
Great, thanks for that.
I have actually found an alternative which is equivalent to using the function calculator
if the following is saved as batchtest.cse in the same folder as the .res file:
! $filePath = getValue("DATA READER","Current Results File");
! $Pout = massFlow("inlet");
! print "\nPressure at inlet is $Pout\n";
it can then be executed in cmd using:
cfx5post -batch batchtest.cse runName_001.res
(ensure that cfx5post is added to the current path)
that way, any of the 'Function Calculator' options can be executed by changing the middle line
I have successfully obtained average area pressure values with areaAve("Total Pressure",$surface);
Now, I want to get the torque value on a surface. what command should i use?
I have tried Torque_X($surface); in all possible cases and without the underscore as well.
I used the variable for the surface as I have multiple surfaces to get the reading from.
The syntax is listed in http://orange.engr.ucdavis.edu/Docum.../CFX/fpref.pdf
|All times are GMT -4. The time now is 01:39.|