Is it possible to set up a simulation in CFX-Pre entirely from the command line in batch mode?


This is possible using the cfx5pre command and the '-e' switch, which allows command language (CCL) to be specified on the command line. For example:

cfx5pre -batch-mode -e ">quit"

The above example illustrates the method but is rather useless as it simply causes CFX-Pre to quit. A complete working example for use with CFX-11.0 is provided. This loads a mesh from a .gtm file and applies some command language from a .ccl file, finally writing out a definition file.


Running the examples.

The following files are provided:

README : This file
StaticMixer.gtm : GTM (mesh) file to import
import.ccl : CCL file to import
runscript : Example script 1 (Bourne shell script, hard coded)
runscript.bat : Example script 1 (Windows batch file, hard coded)
runprescript : Example script 2 (Bourne shell script, takes arguments)

runscript and runscript.bat are hard coded examples for use with UNIX/Linux and Windows systems respectively and are completely equivalent. These may simply be run from the command line by typing the name of the file in the usual way and will use the StaticMixer.gtm and import.ccl files to create test1.cfx and test1.def. If running on a Windows system, always use a command prompt obtained from the CFX launcher (Tools > Command Line).

runscript2 is a more generalised version which takes the input and output files as arguments. Using the supplied example, this may be run as follows:

runprescript StaticMixer.gtm import.ccl test2.cfx test2.def
**** Entered By: dsclarke @ 12/29/2007 10:46 AM ****





Show Form
No comments yet. Be the first to add a comment!