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

How to create a batch file

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 4, 2005, 07:28
Default How to create a batch file
  #1
Liam
Guest
 
Posts: n/a
Hi there,

I have a queue of jobs that need to be solved one after the other while I am away from my pc for a period of time. I am trying to set up a batch job. I have all the .def file saved in a working directory. I am aware that I need to create a batch.bat file in which I will enter the .def files that I want to be solved.

My problem is this; I am unsure how I would go about creating a batch.bat file. I have look in the manual and tried the help tool in the command line.

Please help.

Kind Regards
  Reply With Quote

Old   May 4, 2005, 10:31
Default Re: How to create a batch file
  #2
Aziz
Guest
 
Posts: n/a
You need to save all your def file in the same directory with gtm file, infact you can have def file in different directory but the res file will the store from where you have started you batch file. Here is a small example i can recommend to you. Save these line into a file name file.bat

C:\Programme\CFX\CFX-5.7\bin\cfx5solve -def cfx1.def C:\Programme\CFX\CFX-5.7\bin\cfx5solve -def cfx2.def C:\Programme\CFX\CFX-5.7\bin\cfx5solve -def cfx3.def

If you have already a initial file you can write it after wards like

C:\Programme\CFX\CFX-5.7\bin\cfx5solve -def cfx1.def -initial out.res

Regards,

Aziz
  Reply With Quote

Old   May 4, 2005, 11:04
Default Re: How to create a batch file
  #3
Liam
Guest
 
Posts: n/a
Aziz,

Thank you very much for your reply, this was very helpful.

Kind Regards
  Reply With Quote

Old   May 4, 2005, 20:12
Default Re: How to create a batch file
  #4
Glenn Horrocks
Guest
 
Posts: n/a
Hi,

If you generate the command line window using the CFX-Launcher (Tools/Command Line) then it knows the path to the executables and the command can be reduced to "cfx5solve -def cfx1.def -initial out.res".

Regards, Glenn Horrocks
  Reply With Quote

Old   May 5, 2005, 12:07
Default Re: How to create a batch file
  #5
Liam
Guest
 
Posts: n/a
Hi there,

This is true provided that you select the correct working directory in the cfx launcher before opening the command line from the tools menu.

Does anyone know what the command is for running a batch job using a parallel set-up (pvm). In serial mode it is:

cfx5solve -batch -def {name of def file}.def

But what does this become in order to run the job in parallel?

Any help would be greatly appreciated.

Kind Regards
  Reply With Quote

Old   May 5, 2005, 19:44
Default Re: How to create a batch file
  #6
Kiddo
Guest
 
Posts: n/a
cfx5solve -def Name.def -par-dist HostA,ClientB,ClientC *note :no space between "-par-dist" *But the Clients PCs should have been described in hosts.ccl
  Reply With Quote

Old   May 5, 2005, 19:58
Default Re: How to create a batch file
  #7
Glenn Horrocks
Guest
 
Posts: n/a
Hi Liam,

Once you have created the command window from the launcher you can cd to any directory you like and it still finds the executables. You do not have to have the launcher in the correct directory before creating the command window.

Glenn Horrocks
  Reply With Quote

Old   May 9, 2005, 07:38
Default Re: How to create a batch file
  #8
Liam
Guest
 
Posts: n/a
The command to run a job in batch that already has an initial results file is:

C:\Programme\CFX\CFX-5.7\bin\cfx5solve -def cfx1.def -initial out.res

Is 'initial out' replaced by the name of the initial results file? I know this might seem obvious but I just want to be sure.

Also, want command do you put in the batch file at the end in order to quit the batch file once all the models have been simulated? Is it:

quit>

or

end>

Thank you very much for your help.
  Reply With Quote

Old   May 9, 2005, 08:43
Default Re: How to create a batch file
  #9
Aziz
Guest
 
Posts: n/a
out.res should be replaced by the result file of your last simulation, -initial is the key word and must be written before the name of result file

C:\Programme\CFX\CFX-5.7\bin\cfx5solve -def cfx1.def -initial lastsimulation.res

After the completion of simulation it will automatically exit from the batch mode so you dont need to specify any extra command.

Just an extra tip:

If you have many simulation in your batch mode and you want to stop before completion, start new dos mode, go to the working directory and write C:\Programme\CFX\CFX-5.7\bin\cfx5stop -directory cfx1_001.dir

This will stop your simulation in a proper way

best luck with your work

Aziz
  Reply With Quote

Reply


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
paraview installation woes vex OpenFOAM Installation 15 January 30, 2011 08:11
OpenFOAM 1.7.1 installation problem on OpenSUSE 11.3 flakid OpenFOAM Installation 16 December 28, 2010 09:48
[Gmsh] Compiling gmshFoam with OpenFOAM-1.5 BlGene OpenFOAM Meshing & Mesh Conversion 10 August 6, 2009 05:26
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 02:24
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 18:51


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