CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Setting up a parametric simulation with UDF variables

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 13, 2014, 11:09
Default Setting up a parametric simulation with UDF variables
  #1
New Member
 
Rohini Bala Chandran
Join Date: Apr 2012
Posts: 8
Rep Power: 14
rohinibc is on a distinguished road
Hi all,

I would like to know how I can set up an input file to run fluent in batch mode to perform a series of simulations. To be more specific, about my problem, here is what I have. In my UDF function, I have 2 parameters, say, a and b and they each can have upto 10 values. I would like to study the influence of these parameters, which would be 100 simulations in total, on a specifically chosen output parameter. While I am able to declare scheme variables and invoke them within my UDF file, I don't know how to set up an input file to loop over the various values for the parameters.

Or, is there another way that I can interface Fluent with some other scripting language such as Fortran /Python/Matlab and run within scripts that are setup in these languages? Any help with this would be greatly appreciated.
rohinibc is offline   Reply With Quote

Old   November 13, 2014, 20:59
Default
  #2
Senior Member
 
François Grégoire
Join Date: Jan 2010
Location: Canada
Posts: 392
Rep Power: 17
macfly is on a distinguished road
Hi,

I would go with a journal file that executes the following commands a 100 times:
- read case
- interprete or compile UDF
- solve and save

BUT, I would generate the journal file and the 100 different UDFs with Python, Matlab, etc.
macfly is offline   Reply With Quote

Old   November 14, 2014, 11:24
Default
  #3
Senior Member
 
Andrew Kokemoor
Join Date: Aug 2013
Posts: 122
Rep Power: 14
Kokemoor is on a distinguished road
Macfly's approach is probably the best, though if you've already set your UDF up to read scheme variables, you can just change the scheme variables 100 times and always use the same UDF.
Kokemoor is offline   Reply With Quote

Old   November 18, 2014, 19:13
Default
  #4
New Member
 
Rohini Bala Chandran
Join Date: Apr 2012
Posts: 8
Rep Power: 14
rohinibc is on a distinguished road
Thanks all. I did what Macfly suggested. Generated a script to produce my input file for Fluent to run in batch mode.
However, I also recently saw that in version 15.0, there is the possibility of declaring input parameters that can be read into UDF files. This I think directly syncs up with the RSM options in WorkBench too. I am yet to execute this to see how it works out.
rohinibc is offline   Reply With Quote

Old   November 19, 2014, 11:52
Default
  #5
Senior Member
 
Andrew Kokemoor
Join Date: Aug 2013
Posts: 122
Rep Power: 14
Kokemoor is on a distinguished road
DEFINE_OUTPUT_PARAMETER (2.2.10 in the UDF Manual) is a pretty straightforward macro to calculate an output parameter in the UDF. RP_Get_Input_Parameter("variable name") is the function to read input parameters, though I haven't used it myself. Section 3.6.4 of the UDF Manual has other functions to read from scheme variables as well.
Kokemoor is offline   Reply With Quote

Reply

Tags
batch simulations, parametric study, udf variables


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
[snappyHexMesh] determining displacement for added points CFDnewbie147 OpenFOAM Meshing & Mesh Conversion 1 October 22, 2013 10:53
Boundary condition setting regarding turbine simulation using CFX Lacerlacer CFX 11 March 12, 2012 10:32
Dynamic simulation for unknown variables? fatb0y CFX 4 December 8, 2010 20:26
execute udf in ss & transient simulation hosseinhgf FLUENT 0 December 1, 2010 09:41
multiphase UDF, variables for phase velocities Kerem FLUENT 4 March 27, 2006 09:20


All times are GMT -4. The time now is 23:30.