Page 1 of 1

Mesh generation batch mode

Posted: Wed Dec 26, 2018 1:25 pm
by gnk
Hi,
I have just started batch mode studies and ı am using the pre-processor of the GiD to mesh generation. I use structural mesh and exported mesh as GiD mesh format. I have written the mesh generation in a batch file. I am trying to run it in batch mode at another optimization program with .bat file. But it hasn't worked. Which file do I need to use for batch mode and which file do I need to use for an input/output file?

GNK

Re: Mesh generation batch mode

Posted: Thu Dec 27, 2018 4:14 pm
by escolano
to run GiD with a batch file, you must run something like
gid -n -b <your_batchfile.bch>

Your batch file is a text file with the GiD words to be processed to do what you want (e.g. create or read a model, generate a mesh, export this mesh in some format and exit)

-n is a flag to run without GUI (then is not also valid to use any Tk scripting command)

Don't forget to end the batch with the words to exit, specially if do you want to run it automatically without user intervention and without GUI,
otherwise GiD will enter in an infinite waiting loop.

e.g. an example of a batch file:

Code: Select all

MEscape Files Read "your path/your model.gid" escape
Mescape Meshing Generate Yes 0.5 escape
MEscape Files WriteMesh "other path/your_file.msh" escape
MEscape Quit No