In this article I would like to share my experience with one little-known commercial
CAE program.
The name of this program is
GiD , and before proceeding to the description, I would like to briefly describe how I came to use it.
Prologue
I am a student of one of the technical faculties, one of the Siberian universities. As unnecessary (and just out of harm's way) I will not specify. At the faculty a course in computational mechanics is taught to students of some departments. Of course, with the qualitative study of such a discipline, it is impossible to do without the appropriate software, and there was such a department. Moreover, it was developed at the same department, successfully fulfilled its functions (over the years) and at the time of its creation was quite relevant.
')
More specifically, it was a set from the program for creating finite element meshes and pre / postprocessing (Pascal using DOS graphics), a calculation program based on the finite element method (fortran 75) and the mesh optimizer (also fortran). The interaction between these programs was carried out with the help of an armed knowledge and command line student.
The process of creating grids was not quite convenient and very time consuming, as in general, and the rest of the problem solving process using this software package. Against the background of the ever-growing diversity of various modern CAE systems, this complex began to look obsolete, and the question arose of replacing it. The search began ...
I will not describe the searches in detail, this is not about that. I note only that such a combine as ANSYS was not suitable for these purposes (especially for him at the faculty a whole one separate course of lectures was allocated). Among the numerous open source projects, there was also no obvious challenger satisfying our requirements. In the end, after listening to the advice of my supervisor, I began to look closely at GiD.
Personal pre / postprocessor
As a result, it turned out that this complex is:
- graphic preprocessor with a fairly powerful apparatus of geometric modeling, sampling of geometric models and good import capabilities of geometry and grids from other CAE / CAD programs
- quite good and quite simple graphical postprocessor that allows you to analyze the results of the calculations
Immediately I will note one of the features of GiD, which subsequently pushed to use it for the purposes described in the introduction. Included with GiD is not supplied a single calculation program that solves certain problems, but it is possible to use
any third-party program for these purposes. It would be more correct to call it not a feature, but the main idea.
Thus, the considered program is a universal pre / postprocessor, which can be used to solve a wide variety of tasks.Most likely, this is not the only program that performs such functions, and I will be very grateful to those who give examples. But it just so happened that I began to work with her further. Moreover, the demo version did not impose any restrictions on the period of work with the program and its functionality, except for the limit on the number of nodes used in the grid (no more than 1010 nodes).
That is, for educational purposes, it could be used, generally speaking, for free .
The price of the product, by the way, is also quite acceptable (if you don’t need to take this information as an advertisement). On top of that, the developers provide versions for various platforms, which was very convenient, since I use Ubuntu, and the faculty machines are either XP or Seven.
We decided to replace the outdated pre / postprocessor of the GiD software used by us, leaving the same calculation program.
How it works?
In order to organize the connection between GiD pre / post-processor and some
solver (forgive me if anyone harps his ears, but in my vocabulary there is no Russian equivalent to the word
solver ), flexible and fairly simple mechanisms are used, which I will briefly describe in examples.
So, we have:- own calculation program for calculating the VAT plates on the basis of FEM
- commercial pre / postprocessor
And we
need to figure out from this a working, simple and convenient CAE system suitable for those or other purposes (in my case, training in working with similar systems)
Detailed instructions for this process, as well as a guide to working in pre / postprocessor, are described in detail in the manuals from the developers. At the
offsite of the product in general, you can find a lot of available and useful information, from the FAQ to the conference materials on working with GiD.A thanks to the efforts of
Irene Grigorieva from University of Kemerovo
The user manual
is available in Russian (although, in my opinion, the developers themselves could have done this).
I will only touch on the main aspects.
Template system
GiD communicates between its preprocessor and solver by exchanging data files (ANSI type). If you want to use it for working with a program that uses some unformatted (or closed format) files as input data for its calculations, then most likely it will not work for you. Although it is possible to appear, or maybe already appeared, some module / addition.
In order to transfer information about the built (or imported) model in the preprocessor to the input solver file, a
template system is used. The template is a file with the .bas extension, written in accordance with the rules invented by developers, which tells the preprocessor how to write the grid data to a file.

A template consists of a set of any characters in which GiD perceives all characters, except for the keywords following the “
* ” symbol, as plain text, and in the same form transmits to the input file.
Below, as an explanation, a few examples of "pattern - result"
Example 1. Displaying the total number of elements and grid nodes
myproblem.basMyprogram datafile NumberOfNode = *NPoin NumberOfElements = *NElems
projectname.dat Myprogram datafile NumberOfNode = 12 NumberOfElements = 10
Example 2. List of elements
myproblem.bas ElemsList Elem Node1 Node2 Node3 Material Elemtype *Loop elems *ElemsNum *ElemsConec *ElemsMat *ElemsTypeName *End elems
projectname.dat ElemsList Elem /Node1 Node2 Node3 / Material 1 / 1 2 12 / 1 2 / 2 11 12 / 2 3 / 2 3 11 / 2 4 / 3 10 11 / 2 5 / 3 4 10 / 2 6 / 4 9 10 / 1 7 / 4 5 9 / 1 8 / 5 8 9 / 1 9 / 5 6 8 / 2 10 / 6 7 8 / 2
Example 3. Creating variables. Formatted output.
myproblem.bas *Set var pi= 3.1415926535897 *Set var circlelength *Set var radius=15 *format(IRadius=15, CircleLength=%5.3f) *operation(2*radius*pi)
projectname.dat Radius=15, CircleLength=94.245
I think for a visual explanation, these examples should be enough. In my opinion, everything is simple and does not require the knowledge of any programming language from the user. In order to master the basic set of tokens used in the template, a few hours will suffice.
In this set there are standard cycles, and conditions, and cycles on elements, and
mess-box-s, for error notifications, and much more. If the standard set is not enough, due to the complex format of the input file, or the need to implement some tricky features, then the template can use procedures written in Tcl (both from the bundled library and written by the user). The Tcl interpreter is bundled, so you don’t have to worry about installing it.
Problematics of a specific task
With grids and patterns, everything is clear. But for solving a specific task this is not enough, because each task has its own problems, and hence the presence of various types (and methods for describing them) of materials, boundary conditions and other features.
In order to be able to handle this data set, again, you need to create text files with the appropriate extensions.
- .cnd - to describe the boundary conditions you use
- .mat - to describe the materials, and the third
- .prb - for other parameters.
Creating these files is still easier than creating templates. Here is an example of a file that describes two boundary conditions (load in the node, and the initial movement of the node)
myproblem.cnd CONDITION: Point-Move CONDTYPE: over points CONDMESHTYPE: over nodes QUESTION: X-Move VALUE: 0 QUESTION: Y-Move VALUE: 0 HELP:{} END CONDITION CONDITION: Point-Force-Load CONDTYPE: over points CONDMESHTYPE: over nodes QUESTION: X-Force VALUE: 0.0 QUESTION: Y-Force VALUE: 0.0 HELP: {} END CONDITION
After creating all the above files, you need to “add” them into a folder with any name that suits you (which will later be used in the program interface as an identifier for your task) and “extension”
.gid . This folder should be placed one of the subdirectories of the program GiD, the next time you start your type of task will be available to work.
Projects are stored in folders with the same “extension”
.gid . Data files received using templates are also placed there, as well as files with boundary conditions and materials are duplicated (in order to be able to change them for only one project). There can be as many templates as you like, and each of them will have its own data file.
Done! How to start?
When the model is built, the grid is generated, the boundary conditions are set - you need to run the solver. To do this directly from the preprocessor, you need to write a simple script. When you click the “Caclulate” button in GiD, the program will simply run this script with three parameters (the name of the project, the path to the project folder, the path to the folder with the task type definition). In the script, you can implement everything that you lacked, on CMD in Windows or on bash / sh in Linux.
And what about the postprocessor?
With the postprocessor, unfortunately, everything is not so flexible. It requires from the settlement program, data output in files, in a format that suits him. A more convenient system has not yet been invented.
In my case, this problem was solved by creating a “converter”, which, on the basis of the output files of our calculation program, created the files necessary for the postprocessor. The format of these files is described in detail in the manuals, and the creation of such a “converter” is not difficult if there are minimal skills in working with files in any programming language.
Summarizing
GiD may be useful to those who are looking for a simple and convenient pre / postprocessor to solve a wide variety of tasks, but at the same time does not want to acquire such giants as ANSYS (even the most basic set of which includes many, sometimes unnecessary and unnecessary functions for engineers / researchers for which, you want you do not want to have to pay).
This program can also be a way out for those who cannot find a CAE that can do what they need, but at the same time has its own solver (or plans to create it).
I hope this material will be useful to someone.