Automating geometry creation process

Moderator: GiD Team

Post Reply
awa5114
Posts: 43
Joined: Thu Jan 26, 2017 5:10 pm

Automating geometry creation process

Post by awa5114 »

In GiD 12 and 13, is it possible to 'automate' the following process:

1) creating geometries,
2) assigning conditions,
3) generating mesh
4) generating calculation file

For example, I have one problem where I would like to generate 10 prisms with varying thickness and mesh size, and generate the .dat files for them automatically then batch calculate. I am only talking about pre-processing. How can I do this in GiD?
User avatar
escolano
Posts: 1922
Joined: Sun Sep 05, 1982 10:51 pm

Re: Automating geometry creation process

Post by escolano »

You can create a 'batch' file with the keywords of GiD to do what you want, and run GiD following the commands of this file
e.g.
gid.exe -b <batchfile>
(there are more flags to run without any window, etc.)
or from the GUI could run the batch from the menu Files->Import->Batch file...
(and also a little more interactive, allowingn set stops, etc. with Utilities->Tools->Read batch window...)

About the 'keywords' of the batch file, to know them do you have several approaches,
for example,
1) you can do an action as user and then open the 'Undo window' (Utilities->Undo) . Unfortunatelly this window don't allow to copy its text.
2) all actions are automatically recorded (for the Undo) in a temporary .batch file, you can open this file with an editor and copy text.
Note: you can know what is this temporary folder with the Tcl command "GiD_Info project TmpDirectory"
e.g. writting this in the lower entry:
-np- W [GiD_Info project TmpDirectory]
3) you can use the tool that record a macro (top icon of the macros toolbar), and see its code after be recorded.
4) you can show the 'right buttons' (Utilities->Tools->Toolbars... set 'Right buttons' inside). These buttons show the keywords available on each state.

The bath file is only a flat collection of keywords, it not a programming language.
For more complicated cases is is possible to do is with Tcl scripting language, that send keywords to be processed by GiD with 'GiD_Process' and ask data with GiD_Info and other GiD special Tcl commands.
awa5114
Posts: 43
Joined: Thu Jan 26, 2017 5:10 pm

Re: Automating geometry creation process

Post by awa5114 »

Thank you very much
Post Reply