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
|All times are GMT -4. The time now is 02:44.|