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

ANSYS CFD-Post scripting - Extract Results

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools 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: 10,951
Rep Power: 85
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
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
E S is offline   Reply With Quote

Reply

Tags
cfd, cfx, python, script, scripting

Thread Tools
Display Modes

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 On
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 10:13
Impact of Humidity on CFD Results Jerry Main CFD Forum 2 January 26, 2004 15:39


All times are GMT -4. The time now is 12:16.