CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   Creating many def files for parametric study (http://www.cfd-online.com/Forums/cfx/99376-creating-many-def-files-parametric-study.html)

Chander April 2, 2012 07:08

Creating many def files for parametric study
 
Hi,

I want to do a parametric study where I want to vary one or two parameters in my simulation over a large number of values.
I found that one can generate a .pre session file to record the change in parameter value.
I think I can edit this session file in text editor and create multiple commands to edit and create multiple def files (like a loop).
This way I would be able to create the large number of def files I need without any tedious work and error.
I just need a confirmation whether this is the right way to create multiple def files for a simulation where only one or two variables have to be changed.
Or is their any better and safer (from point of view of error in setting up the simulations) way to do this?

Thanks for your inputs!
Chander

mvoss April 2, 2012 07:39

you can also try to script the batch process with the -ccl option (search the manual) when starting from command line. This way you won´t have multiple def-files but multiple res files with different "inputs" and one "master"-def.

neewbie

lffabiani April 2, 2012 08:34

Chander,

I think that the Ansys Workbech can do some parametrization, you should take a look into it.

Best regards

mvoss April 2, 2012 08:49

Quote:

Originally Posted by lffabiani (Post 352670)
Chander,

I think that the Ansys Workbech can do some parametrization, you should take a look into it.

Best regards

and yes ... ofcourse you can also use the parameter study within the workbench schematic .. but i guessed that the topic was about creating several def-files.

olegmang April 2, 2012 09:15

Quote:

Originally Posted by neewbie (Post 352675)
and yes ... ofcourse you can also use the parameter study within the workbench schematic .. but i guessed that the topic was about creating several def-files.

As far as i know when parametrization is applied in workbench and the option "Exported" is checked you can do parametric study and it creates separate folder for each design point. In this folder it saves .cfx, .def, .res for each design point. files. You can output values that you are interested right to workbench and then just copy results as a table.

Lance April 2, 2012 10:48

Instead of creating several .def files I would only use one .def and append a ccl command to each run instead. Create a file called ccl_input with the contents you want to change (in this case convergence criteria for an additional variable):

FLOW: Flow Analysis 1
SOLVER CONTROL:
EQUATION CLASS: av
CONVERGENCE CRITERIA:
Residual Target = 1.E-4
Residual Type = RMS
END
END
END

and then in the batch file just add -ccl "filename", as:

cfx5solve -def deffile.def -ccl ccl_input

In this way you only need to create a text file for each simulation, instead of a .def file. Should be easy to script the text files as well.


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