CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

ANSYS CFD-Post scripting - Extract Results

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By E S

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 28, 2012, 23:37
Question ANSYS CFD-Post scripting - Extract Results
  #1
E S
New Member
 
E Swery
Join Date: Jun 2012
Posts: 2
Rep Power: 0
E S is on a distinguished road
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).

Thanks
E S is offline   Reply With Quote

Old   June 29, 2012, 07:58
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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)
ghorrocks is offline   Reply With Quote

Old   July 1, 2012, 21:13
Default
  #3
E S
New Member
 
E Swery
Join Date: Jun 2012
Posts: 2
Rep Power: 0
E S is on a distinguished road
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
Светлана likes this.
E S is offline   Reply With Quote

Old   May 13, 2016, 09:48
Default
  #4
New Member
 
Suyesh
Join Date: Mar 2016
Posts: 9
Rep Power: 10
suyesh is on a distinguished road
Hi,
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.

Cheers!
suyesh is offline   Reply With Quote

Old   May 13, 2016, 10:41
Default
  #5
New Member
 
Suyesh
Join Date: Mar 2016
Posts: 9
Rep Power: 10
suyesh is on a distinguished road
Quote:
Originally Posted by suyesh View Post
Hi,
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.

Cheers!
I got the syntax for my problem...
torque($surface, x);
worked !!!

The syntax is listed in http://orange.engr.ucdavis.edu/Docum.../CFX/fpref.pdf
suyesh is offline   Reply With Quote

Old   July 21, 2017, 11:24
Default Thanks
  #6
New Member
 
Sunil
Join Date: Aug 2016
Posts: 7
Rep Power: 9
sunilkonatham is on a distinguished road
Thank you, this command helped me big time.
Quote:
Originally Posted by E S View Post
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
sunilkonatham is offline   Reply With Quote

Reply

Tags
cfd, cfx, python, script, scripting


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
wind turbine simulation, Ansys Post results question Laions CFX 7 September 20, 2011 05:13
How to *Get results at a given location (in active coordinate system) in Ansys? Salsaddict ANSYS 0 July 18, 2010 14:23
validation of CFD results andy FLUENT 0 June 13, 2007 13:55
Free UK seminars: ANSYS CFD software Gavin Butcher CFX 0 November 23, 2004 09:13
Impact of Humidity on CFD Results Jerry Main CFD Forum 2 January 26, 2004 14:39


All times are GMT -4. The time now is 10:24.