CFD Online Discussion Forums

CFD Online Discussion Forums (
-   CFX (
-   -   Automatisation (

Deb April 2, 2003 08:19


I'd like to run successively and automatically several calculations with different inlet velocities. How can I do that ?


Louwrens April 2, 2003 08:51

Re: Automatisation
Hi Deb

If you're using CFX 5.5 its done like this:

You can write a batch file to run different *.def files. First you have to create all you def files with the different inlet velocities.

next you create a DOS batch file with the following structure:

cfx5solve -def 1stdeffile.def cfx5solve -def 2nddeffile.def

and so on. This of course assumes that the grid is contained in the def file. If you want to use the results of a previous calculation as initial conditions, the structure command structure is:

cfx5solve -def newdeffile.def -ini oldresults.res

To run the def files, you click on "Command line" under the Tools menu of the CFX 5.5 launcher. This pops up a DOS window, from which you can just run your batch file.

You can of course include all the standard DSO commands in the batch file as well, if you want the different runs in their own directories for instance.



Bart Prast April 3, 2003 11:25

Re: Automatisation
Do it with ccl files

create different ccl files and do: cfx5cmds.exe -write -def yourdeffile.def -text newcclfile.ccl

saves you a couple of def files which you do not need instead of using the def files you can do it on the latest res file as well. So create as many ccl files as you have inlet velocities.

Deborah April 4, 2003 10:07

Re: Automatisation
Hi Louwrens !

Thanks for advice but the command : cfx5solve -def first.def cfx5solve -def second.def doesn't work on CFX 5.5.1. I have also tried cfx5solve -def first.def -def second.def and only second.def is executed. And there is no answer for this problem in cfx5solve -help.

Louwrens April 4, 2003 10:38

Re: Automatisation
Hey Deborah

That should be:

cfx5solve -def first.def THEN NEXT LINE

cfx5solve -def second.def THEN NEXT LINE

Each of these are separate DOS commands. Hope that clears it up. It does work with 5.5.1 cos thats what I'm using... ;-)


Robin April 5, 2003 16:23

Re: Automatisation
Hi Deb,

Here's a tip in addition to the suggestions below. If all you need to do is change the value of a parameter, the pressure at a boundary for instance, you can do so by simply creating an additional file with the appropriate CCL and telling the solver to read the CCL from that file using the '-ccl' option.

For instance, to change the ralative pressure at the boundary named "Inflow" within the Domain "Domain 1" you would save a file (let's call it inflow.ccl) with the following CCL:

DOMAIN: Domain 1
Option = Stationary Frame Total Pressure
Relative Pressure = 1.325E3 [Pa]
END # DOMAIN: Domain 1

The following command would use your new boundary condition:

cfx5solve -def myRun.def -ccl inflow.ccl

Alternatively, you could restart from the existing solution:

cfx5solve -def myRun_001.res -ccl inflow

This can all be put together into a fairly simple perl script or batch file.


Louwrens April 6, 2003 03:44

Re: Automatisation
This seems way less trouble than my solution... I suppose you can use the same thing to change advection schemes, turbulence models etc..? One question, does the file contain JUST the part of the CCL that is different from that in the *def file??

Robin April 7, 2003 14:07

Re: Automatisation
Yes. Any CCL objects in the file will overwrite the existing ones. Only the CCL parameters you are changing need to be included.

If you think this is cool, just wait until you get your hands on CFX-Pre. You can do all this within Pre. And with Power Syntax (Perl) you can put it in a loop, firing off multiple runs one after the other!

Regards, Robin

Louwrens April 8, 2003 03:21

Wanted to ask about that: From the website I gather the pre-processor is not going to be Patran-based any more... Where should we expect major differences?

Robin April 8, 2003 13:14

Re: CFX-Pre
Hi Louwrens,

As of 5.6, CFX-Build will be reduced to geometry and mesh generation. CFX-Pre will take over from the point where you have a mesh (coming from many sources, not just build).

CFX-Pre has been built off the same foundation classes as CFX-Post and looks very much like CFX-Post, there is no resemblance to Build. The interface is faster, more intuitive, and more flexible than Build was and makes pre-processing much simpler.

In addition, the underlying language is CCL, making CFX-Pre much easier to automate. As with CFX-Post, the entire Perl programming language is available through Power Syntax, making CFX-Pre a very flexible pre-processor.

There are a few others on the forum who have been running the beta version. They may be willing to add their comments.

Best regards, Robin

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