CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

Working directory via command line

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 7, 2008, 19:55
Default Working directory via command line
  #1
Luiz
Guest
 
Posts: n/a
Hi,

I am running CFX-Solver in Windows using a script. How to specify the working directory via command line, without using CFX launcher?

Thanks, Luiz
  Reply With Quote

Old   April 7, 2008, 20:43
Default Re: Working directory via command line
  #2
Rogerio Fernandes Brito
Guest
 
Posts: n/a
Starting the CFX-5 Solver from the Command Line The CFX-5 Solver is a separate module of CFX-5 which has no graphical user interface. You can start it in three ways: using the icon, selecting File>Define Run in the CFX-5 Solver Manager (see Define Run (p. 11)) or directly from the command line. If you use the CFX-5 Solver Manager to start the CFX-5 Solver, then you will be able to see some details of your solution as it emerges. The graphical user interface of the CFX-5 Solver Manager allows you to set various options and to control the process more easily. However, if you want to run the CFX-5 Solver in batch mode, you can start it from the command line, as described in this section. To start the CFX-5 Solver from the command line, you will need to type cfx5solve -def <file> (where <file> is the name of your Definition File) in a UNIX terminal or a suitable Windows command line and press the Return key. (Windows command lines are discussed in Command line (p. 216 in Installation & Introduction to CFX-5).) You can also start the CFX-5 Solver Manager from the command line To do this, you also need to use the cfx5solve command. You will need to type cfx5solve and press Return. However, there are also various other options which you can use with the cfx5solve command. The full command is given below. There are two alternative forms: one which starts the CFX-5 Solver and one which starts the CFX-5 Solver Manager (you are advised to check these for the latest changes by typing cfx5solve -help): cfx5solve -definition <file> [-help] [-initial <file>] [-double] [-single] [-nosave|-save] [-name <name>] [-size #] [-solver <executable>] [-partition <#partitions>] [-parallel] [-hstfile <file>] [-parfile <file>] [-serial] [-verbose] or cfx5solve [-interactive [-definition <file>]] [-display <display>] [-help] [-noautohelp] [-solver <executable>] [-verbose]

where [] denotes an optional argument, | separates mutually exclusive arguments and < > denotes that substitution of a suitable value is required. All other arguments are keywords, some of which have a short form. Some of the various arguments are briefly described in the table below; execute cfx5solve -help to view a full list of available arguments.

Argument Alternative form Usage -batch Run the CFX-5 Solver in batch mode (i.e. without starting the CFX-5 Solver Manager). This is the default mode. -bg-ccl <file> Reads Command Language from the named file, and uses it to provide defaults for the current run. If the file specifies a Definition File for the run, the command language contained in that Definition File will take precedence over that supplied. See also -ccl. -ccl <file> j Reads additional Command Language from the named file. This will override any CFX Command Language specified in the Definition File. -check-only When running in batch mode, this will cause cfx5solve to verify its arguments, but exit before starting any processes, and is mostly for use by the CFX-5 Solver Manager. -database <file> -db <file> -adapt-db <file> -refiner-db <file> Identify the CFX-Build database file that is required when adapting to the geometry. If the database file is not identified, mesh adaption will occur using the existing mesh, regardless of the settings in the Definition File. -definition <file> -def <file> Use <file> as the input file, which may be a CFX-5 Definition File or a Results File for a restart. The file specified is used in the same way as the Input File on the Define Run form; see Define Run (p. 11) for more details. -display <display> Use the X11 server <display> instead of the X11 server defined by the DISPLAY environment variable. (UNIX only) -double Runs the double precision version of the CFX-5 Solver. See -single. -example <file> -eg <file> Runs the CFX-5 Solver on one of the CFX-5 Example Definition Files provided with the product. The option static_mixer is currently available. -help -h Prints a message containing the information -hstfile <file> Use <file> as the host file for a parallel run

Line CFX-5.6 Master Retrace Contents Master Index Help On Help -initial <file> -ini <file> Use the initial values in the CFX-5 Results File <file>. This option may only be used together with a CFX-5 Definition File which was created with the "Automatic" or "Automatic with Value" initialisation settings. The file specified is used in the same way as the Initial Values File on the Define Run form, see Define Run (p. 11) for more details. -interactive -int -manager Run the interactive CFX-5 Solver Manager to start a new run and/or manage or monitor an existing run. -monitor <file> When starting the Solver Manager, monitor the run represented by <file>, which may be a CFX-5 Results File or Output File. -name <name> Choose names for the exported files and temporary directory based on the problem name <name> instead of the Definition File name unless other names are explicitly defined. (Note: This name cannot be set when using the CFX-5 Solver Manager to start the CFX-5 Solver.) -noautohelp By default the server for the online help system is started automatically at the same time as the CFX-5 Solver Manager, to reduce the time taken for the help text to appear when you first request help. If you know you are unlikely to use the online help and you want to reduce memory usage you can set this option, in which case the server will be started when you choose an item on the Help menu. (UNIX only) -parallel -par Runs the solver in parallel mode. This option can be combined with the -partition option for a partitioning run. -parallel-mode Uses the named parallel mode. Currently valid modes are pvm and mpi. -par-local Allows fast setup of a parallel run on the local host only. -par-dist Allows fast setup of a distributed parallel run. See the examples below.

...............

Some examples of command line options are given below. 1. To start the CFX-5 Solver running from the Definition File model.def, type: cfx5solve -def model.def 2. To start the CFX-5 Solver Manager, passing it the name of the Definition File, type: cfx5solve -interactive -def model.def

3. To produce a partition file model.par with the MeTiS partitioning method and 7 partitions, but NOT to run the CFX-5 Solver to solve for the solution, make sure that no file model.par exists in the working directory and type: cfx5solve -def model.def -partition 7 Note: If the file model.par exists in the working directory, then the Partition Type (MeTiS, RecCoordBis or SpecDir) is read from this file, even if you haven't specified the file model.par. Because this could potentially be confusing, you are advised to use the CFX-5 Solver Manager to set up a partitioning run, unless you are certain that either there is no file model.par, or that the partitioning method specified in the model.par file is what you require. 4. To run the CFX-5 Solver in distributed parallel, starting from the Definition File model.def, and using 1 processor on host1, 1 processor on host2 and 2 processors on host3, type: cfx5solve -def model.def -par-dist 'host1,host2,host3*2' -partition The hosts host1, host2 and host3 must be defined in the central hosts.ccl file. 5. To run the CFX-5 Solver in parallel, starting from the Definition File model.def and running only on the local machine with 2 partitions, type: cfx5solve -def model.def -par-local -partition 2 Note that this method does not require you to create a hst file. 6. If you have already created a file model.par (for instance, by using the command cfx5solve -def model.def -partition 7), then you can run the parallel CFX-5 Solver by typing: cfx5solve -def model.def -parallel -parfile model.par

After the CFX-5 Solver is running, you can stop it by typing cfx5stop at the command line. Suppose that your Run is called mixer_001 in the current directory. Then there will be a temporary directory called mixer_001.dir in the current directory while that Run is actually running. To stop the Run, you need to enter the following command line: cfx5stop -directory mixer_001.dir

  Reply With Quote

Old   March 31, 2009, 06:13
Default
  #3
New Member
 
JVicario
Join Date: Mar 2009
Posts: 1
Rep Power: 0
JVicario is on a distinguished road
Hi Luiz,
There are some undocumented parameters in cfx5solve.exe
Try this: cfx5solve.exe -chdir <path>

Jorge Vicario
JVicario is offline   Reply With Quote

Old   March 31, 2009, 17:52
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,697
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Hi,

What about the simple approach:

cd dir1
cfx5solve ....
cd dir2
cfx5solve ...
cd dir3
cfx5solve ...

This is what I do in batch/script files.

Glenn Horrocks
ghorrocks is offline   Reply With Quote

Old   March 6, 2011, 20:02
Exclamation viewing cfx post while working on cfx solver manager
  #5
HMR
Member
 
HMR
Join Date: Jan 2011
Posts: 31
Rep Power: 15
HMR is on a distinguished road
Hi,

Can anybody advice me is it possible to view animation or any results on cfx post while cfx solver manager is working, I mean simultaneously I want to have a look the results while cfx solver manager is working, because some time some transient simulation takes long time say 10-12 day to fully finished its test, but by this time I want to have look fluids behavior.

If its possible could you please tell me how?

Thanks in advances
HMR is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
OpenFoam install script Error during paraFoam installation SePe OpenFOAM Installation 10 June 19, 2010 15:15
critical error during installation of openfoam Fabio88 OpenFOAM Installation 21 June 2, 2010 03:01
Re : Problem Installing OpenFOAM on Centos -5.3 mohanphy OpenFOAM Installation 1 February 7, 2010 19:09
Problem installing on Ubuntu 9.10 -> 'Cannot open : No such file or directory' mfiandor OpenFOAM Installation 2 January 25, 2010 09:50
Compiling OpenFOAM13 on AMD64 with Redhat Enterprise mbeaudoin OpenFOAM Installation 20 June 17, 2008 06:43


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