|
[Sponsors] |
Setting up a parametric simulation with UDF variables |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 13, 2014, 11:09 |
Setting up a parametric simulation with UDF variables
|
#1 |
New Member
Rohini Bala Chandran
Join Date: Apr 2012
Posts: 8
Rep Power: 14 |
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. |
|
November 13, 2014, 20:59 |
|
#2 |
Senior Member
François Grégoire
Join Date: Jan 2010
Location: Canada
Posts: 392
Rep Power: 17 |
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. |
|
November 14, 2014, 11:24 |
|
#3 |
Senior Member
Andrew Kokemoor
Join Date: Aug 2013
Posts: 122
Rep Power: 14 |
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.
|
|
November 18, 2014, 19:13 |
|
#4 |
New Member
Rohini Bala Chandran
Join Date: Apr 2012
Posts: 8
Rep Power: 14 |
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. |
|
November 19, 2014, 11:52 |
|
#5 |
Senior Member
Andrew Kokemoor
Join Date: Aug 2013
Posts: 122
Rep Power: 14 |
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.
|
|
Tags |
batch simulations, parametric study, udf variables |
|
|
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 |