Contact Us
 

Contact CIMNE

    International Center for Numerical Methods in Engineering
    Edificio C-1, Campus Norte UPC
    C/ Gran Capitán s/n.
    08034 Barcelona - Spain

 
 
Support Manuals Customization Manual
Online Customization Manual
GiD 10 Customization Manual
Pre and post processing system for Numerical Simulations.
International Center For
Numerical Methods In Engineering (CIMNE)

                  FEATURES

FEATURES

GiD offers the following customization features:

  • Complete menu´s can be customised and created to suit the specific needs of the user´s simulation software.
  • Simple interfaces can be developed between the data definition and the simulation software.
  • Simple interfaces based on scalar, vector and matrix quantities can be developed for the results visualisation.
  • Menus for the results visualisation can be customised and created according to the needs of the application or analysis.

The customization in GiD is done by creating a ...

Read More

                  INTRODUCTION

INTRODUCTION

When GiD is to be used for a particular type of analysis, it is necessary to predefine all the information required from the user and to define the way the final information is given to the solver module. To do so, some files are used to describe conditions, materials, general data, units systems, symbols and the format of the input file for the solver. We give the name Problem Type to this collection of files used to configure GiD for a particular type of analysis.

Note: You can also learn how to configure GiD for a particular type of analysis by following the ...

Read More

                  CONFIGURATION FILES

CONFIGURATION FILES

These files generate the conditions and material properties, as well as the general problem and intervals data to be transferred to the mesh, at the same time giving you the chance to define geometrical drawings or symbols to represent some conditions on the screen.

Problem Type Files

CONFIGURATION FILES

Read More

                        XML file

XML file

The file problem_type.xml contains information related to the configuration of the problem type, such as file browser, icon, password validation or message catalog location. Besides this, the file can be used to store assorted structured infomation such as version number, news added from the last version, and whatever the developer decides to include. This file can be read using the Tcl extension tcom which is provided with GiD.

The data included inside the xml file should observe the following structure:

<Infoproblemtype version="1.0">...

Read More

                              ValidatePassword node

ValidatePassword node

The default action taken by GiD when validating a problem type password is verifying that it is not empty. When a password is considered as valid, this information is written in the file 'password.txt' which is located in the problem type directory. In order to override this behaviour, two nodes are provided in the .xml file

  • PasswordPath: The value of this node specifies a relative or absolute path describing where to locate/create the file password.txt. If the value is a relative path it is taken with respect to the problem type path.
      ...

Read More

                        Conditions file (.cnd)

Conditions file (.cnd)

Files with extension .cnd contain all the information about the conditions that can be applied to different entities. The condition can adopt different field values for every entity. This type of information includes, for instance, all the displacement constraints and applied loads in a structural problem or all the prescribed and initial temperatures in a thermial analysis.

An important characteristic of the conditions is that they must define what kind of entity they are going to be applied over, i.e. over points, lines, surfaces, volumes or layers, and what kind of entity they will be transferred over, i.e. over nodes, over face elements or over body elements....

Read More

                              Example: Creating the conditions file

Example: Creating the conditions file

Here is an example of how to create a conditions file, explained step by step:

  • First, you have to create the folder or directory where all the problem type files are located, problem_type_name.gid in this case.
  • Then create and edit the file (problem_type_name.cnd in this example) inside the recently created directory (where all your problem type files are located). As you can see, except for the extension, the names of the file and the directory are the same....
  • Read More

                            Materials file (.mat)

    Materials file (.mat)

    Files with the extension .mat include the definition of different materials through their properties. These are base materials as they can be used as templates during the Preprocessing step for the creation of newer ones.

    You can define as many materials as you wish, with a variable number of fields. None of the unused materials will be taken into consideration when writing the data input files for the solver. Alternatively, they can be useful for generating a materials library.

    Conversely to the case of conditions, the same material can be assigned to different levels of geometrical entity (lines, surfaces or volumes) and can even be assigned directly to the mesh elements....

    Read More

                                  Example: Creating the materials file

    Example: Creating the materials file

    Here is an example of how to create a materials file, explained step by step:

  • Create and edit the file (problem_type_name.mat in this example) inside the problem_type_name directory (where all your problem type files are located). As you can see, except for the extension, the names of the file and the directory are the same.
  • Create the first material, which starts with the line:
  •       ...

    Read More

                            Problem and intervals data file (.prb)

    Problem and intervals data file (.prb)

    Files with the extension .prb contain all the information about general problem and intervals data. The general problem data is all the information required for performing the analysis and it does not concern any particular geometrical entity. This differs from the previous definitions of conditions and materials properties, which are assigned to different entities. An example of general problem data is the type of solution algorithm used by the solver, the value of the various time steps, convergence conditions and so on.

    Within this data, one may consider the definition of specific problem data (for the whole process) and intervals data (variable values along the different solution intervals). An interval would be the subdivision of a general problem that contains its own particular data. Typically, one can define a different load case for every interval or, in dynamic problems, not only variable loads, but also variation in time steps, convergence conditions and so on....

    Read More

                                  Example: Creating the PRB data file

    Example: Creating the PRB data file

    Here is an example of how to create a problem data file, explained step by step:

  • Create and edit the file (problem_type_name.prb in this example) inside the problem_type_name directory (where all your problem type files are located). Except for the extension, the names of the file and the directory must be the same.
  • Start the file with the line:
  •       ...

    Read More

                            Conditions symbols file (.sim)

    Conditions symbols file (.sim)

    Files with the extension .sim comprise different symbols to represent some conditions during the preprocessing stage. You can define these symbols by creating ad hoc geometrical drawings and the appropriate symbol will appear over the entity with the applied condition every time you ask for it.

    One or more symbols can be defined for every condition and the selection will depend on the specified values in the file, which may be obtained through mathematical conditions.

    The spatial orientation can also be defined in this file, depending on the values taken by the required data. For global definitions, you have to input the three components of a vector to express its spatial direction. GiD takes these values from the corresponding conditions window. The orientation of the vector can be understood as the rotation from the vector (1,0,0) towards the new vector defined in the file....

    Read More

                                  Example: Creating the Symbols file

    Example: Creating the Symbols file

    Here is an example of how to create a symbols file. Create and edit the file (problem_type_name.sim in this example) inside the problem_type_name directory (where all your problem type files are located). Except for the extension, the names of the file and the directory must be the same.

    The contents of the problem_type_name.sim example should be the following:

    cond Point-Constraints

    3

    global

    cond(int,5)...

    Read More

                            Unit System file (.uni)

    Unit System file (.uni)

    When GiD is installed, the file units.gid is copied within the GiD directory. In this file a table of magnitudes is defined. For each magnitude there is a set of units and a conversion factor between the unit and the reference unit. The units systems are also defined. A unit system is a set of mangnitudes and the corresponding unit.

    BEGIN TABLE

    LENGTH : m, 100 cm, 1e+3 mm

    ...

    STRENGTH : kg*m/s^2, N, 1.0e-1 kp

    ...

    Read More

                            Special fields

    Special fields

    These fields are useful for organizing the information within data files. They make the information shown in the data windows more readable. In this way you can better concentrate on the data properties relevant to the current context.

    • Book: With the Book field it is possible to split the data windows into other windows. For example, we can have two windows for the materials, one for the steels and another for the concretes:
          

    BOOK: Steels

          ...

    Read More

                      TEMPLATE FILES

    TEMPLATE FILES

    Once you have generated the mesh, and assigned the conditions and the materials properties, as well as the general problem and intervals data for the solver, it is necessary to produce the data input files to be processed by that program.

    To manage this reading, GiD is able to interpret a file called problem_type_name.bas (where problem_type_name is the name of the working directory of the problem type without the .bas extension).

    This file (template file) describes the format and structure of the required data input file for the solver that is used for a particular case. This file must remain in the problem_type_name.gid directory, as well as the other files already described - problem_type_name.cnd, problem_type_name.mat, problem_type_name.prb and also problem_type_name.sim and ***.geo, if desired....

    Read More

                            General description

    General description

    All the rules that apply to filename.bas files are also valid for other files with the .bas extension. Thus, everything in this section will refer explicitly to the file filename.bas. Any information written to this file, apart from the commands given, is reproduced exactly in the output file (the data input file for the numerical solver). The commands are words that begin with the character *. (If you want to write an asterisk in the file you should write **.) The commands are inserted among the text to be literally translated. Every one of these commands returns one (see Single value return commands...

    Read More

                            Commands used in the .bas file

    Commands used in the .bas file

    Commands used in the .bas file

    Listing of .bas commands

    Commands used in the .bas file

    Read More

                                  Single value return commands

    Single value return commands

    When writing a command, it is generally not case-sensitive (unless explicitly mentioned), and even a mixture of uppercase and lowercase will not affect the results.

    NpoinNdimeNnodeNelemNmatsNintervals

    • *npoin, *ndime, *nnode, *nelem, *nmats, *nintervals....

    Read More

                                  Multiple values return commands

    Multiple values return commands

    These commands return more than one value in a prescribed order, writing them one after the other. All of them except LocalAxesDef are able to return one single value when a numerical argument giving the order of the value is added to the command. In this way, these commands can appear within an expression. Neither LocalAxesDef nor the rest of the commands without the numerical argument can be used inside expressions. Below, a list of the commands with the appropriate description is displayed.

    NodesCoord

    • *NodesCoord....

    Read More

                                  Specific commands

    • * To avoid line-feeding you need to write *, so that the line currently being used continues on the following line of the file filename.bas.
    • *# If this is placed at the beginning of the line, it is considered as a comment and therefore is not written.
    • ** In order for an asterisk symbol to appear in the text, two asterisks ** must be written.

    Include

    • *Include. The include command allows you to include the contents of a slave file inside a master .bas file, setting a relative path from the Problem Type directory to this secondary file. ...

    Read More

                            Detailed example - Template file creation

    Detailed example - Template file creation

    Below is an example of how to create a Template file, step by step.

    Note that this is a real file and as such has been written to be compatible with a particular solver program. This means that some or all of the commands used will be non-standard or incompatible with the solver that another user may be using.

    The solver for which this example is written treats a line inside the calculation input file as a comment if it is prefixed by a $ sign. In the case of other solvers, another convention may apply.

    ...

    Read More

                                  Elements, materials and connectivities listing

    Elements, materials and connectivities listing

    Now we want to output the desired results to the output file. The first line should be a title or a label as this lets the solver know where a loop section begins and ends. The end of this block of instructions will be signalled by the line END_GEOMETRY.

    GEOMETRY

    The next two of lines give the user information about what types of commands follow.

    Firstly, a title for the first subsection, ELEMENTAL CONNECTIVITIES:

    $ ELEMENTAL CONNECTIVITIES...

    Read More

                                  Formatted nodes and coordinates listing

    Formatted nodes and coordinates listing

    As with the previous section, this block of code begins with a title for the subsection:

    $ NODAL COORDINATES

    followed by the header of the output list:

    $ NODE COORD.-X COORD.-Y COORD.-Z

    Now GiD will trace all the nodes of the model:

    *loop nodes

    For each node in the model, GiD will generate and output its number, using *NodesNum, and its coordinates, using *NodesCoord....

    Read More

                                  Nodes listing declaration

    Nodes listing declaration

    First, we set the necessary conditions, as was done in the previous section.

    *Set Cond Surface-Constraints *nodes *or(1,int) *or(3,int)

    *Add Cond Line-Constraints *nodes *or(1,int) *or(3,int)

    *Add Cond Point-Constraints *nodes *or(1,int) *or(3,int)

    NPRES=*CondNumEntities

    After the data initialization and declarations, the solver requires a list of nodes with boundary conditions and the fields that have been assigned....

    Read More

                                  Materials listing declaration

    Materials listing declaration

    This section deals with outputting a materials listing.

    As before, the first lines must be the title of the section and a commentary:

    MATERIAL PROPERTIES

    $ MATERIAL PROPERTIES FOR MULTILAMINATE

    Next there is the loop sentence, this time concerning materials:

    *loop materials

    Then comes the line where the number of the material and its different properties are output:...

    Read More

                                  Elements listing declaration

    Elements listing declaration

    First, we set the loop to the interval of the data.

    *loop intervals

    The next couple of lines indicate the starting of one section and the title of the example, taken from the first field in the interval data with an abbreviation on the label. They are followed by a comment explaining the type of data we are using.

    LOADS

    TITLE: *IntvData(Charge_case)

    $ LOAD TYPE

    We begin by setting the condition as before. If one condition is assigned twice or more to the same element without including the *CanRepeat parameter in the *Set Cond, the condition will appear once; if the *CanRepeat parameter is present then the number of conditions that will appear is the number of times it was assigned to the condition....

    Read More

                                  Nodes and its conditions listing declaration

    Nodes and its conditions listing declaration

    As for previous sections, the first thing to do set the conditions.

    *Set Cond Point-Load *nodes

    As in the previous section, the next loop will only be executed if there is a condition in the selection.

    *if(CondNumEntities(int)>0)

    Here begins the loop over the nodes.

    PUNCTUAL ON NODES

    *loop nodes *OnlyInCond...

    Read More

                      EXECUTING AN EXTERNAL PROGRAM

    EXECUTING AN EXTERNAL PROGRAM

    Once all the problem type files are finished (.cnd, .mat, .prb, .sim, .bas files), you can run the solver. You may wish to run it directly from inside GiD.

    To do so, it is necessary to create the file problem_type_name.bat in the Problem Type directory. This must be a shell script that can contain any type of information and that will be different for every operating system. When you select the Calculate option in GiD Preprocess this shell script is executed (see CALCULATE from Reference Manual).

    Because the .bat file will be different depending on the operating system, it is possible to create two files: one for Windows and another for Unix/Linux. The Windows file has to be called: ...

    Read More

                            Commands accepted by the GiD command.exe

    Commands accepted by the GiD command.exe

    The keywords are as follows:

    • %
    • Shift
    • Rem
    • Chdir (Cd)
    • Del (Delete, Erase)
    • Copy
    • Rename (Ren, Move)
    • Mkdir (Md)
    • Set
      ...

    Read More

                            Showing feedback when running the solver

    Showing feedback when running the solver

    The information about what is displayed when Output view: is pressed is also given here. To determine what will be shown, the script must include a comment line in the following form:

    For Windows :

    rem OutputFile: %1.log

    For Linux/Unix:

    # OutputFile: "$1.log"

    where "$1.log" means to display in that window a file whose name is: project_name.log. The name can also be an absolute name like output.dat. If this line is omitted, when you press Output view:, nothing will be displayed....

    Read More

                            Managing errors

    Managing errors

    A line of code like

    For Windows

    rem ErrorFile: %1.err

    For Linux/UNIX

    # ErrorFile: "$1.err"

    included in the .bat file means that the given filename is the error file. At the end of the execution of the .bat file, if the errorfile does not exist or is zero, execution is considered to be successful. If not, an error window appears and the contents of the error file are considered to be the error message. If this line exists, GiD will delete this file just before calculating to avoid errors with previous calculations....

    Read More

                            Examples

    Examples

    Here are two examples of easy scripts to do. One of them is for Unix/Linux machines and the other one is for MS-Dos or Windows.

    • UNIX/Linux example:
          

    #!/bin/bash

          

    basename = $1

          

    directory = $2

          

    ProblemDirectory = $3

          

    ...

    Read More

                      POSTPROCESS DATA FILES

    POSTPROCESS DATA FILES

    In GiD Postprocess you can study the results obtained from a solver program. The solver and GiD Postprocess communicate through the transfer of files. The solver program has to write the results to a file that must have the extension .post.res, or the old .flavia.res, and its name must be the project name.

    The solver program can also send the postprocess mesh to GiD (though this is not mandatory), where it should have the extension .post.msh, or the old version .flavia.msh. If this mesh is not provided by the solver program, GiD uses the preprocess mesh in Postprocess.

    ...

    Read More

                            Postprocess mesh format: ProjectName.post.msh

    Note: This postprocess mesh format requires GiD version 6.0 or higher.

    Comments are allowed and should begin with a '#'. Blank lines are also allowed.

    To enter the mesh names and result names in another encoding, just write # encoding your_encoding

    for example:

    # encoding utf-8

    Inside this file one or more MESHes can be defined, each of them should:

    • Begin with a header that follows this model:...

    Read More

                                  Mesh example

    Mesh example

    This example clarifies the description:

    #mesh of a table

    MESH "board" dimension 3 ElemType Triangle Nnode 3

    # color 127 127 0

    Coordinates

    # node number coordinate_x coordinate_y coordinate_z

    1 -5 3 -3

    2 -5 3 0

    3 -5 0 0...

    Read More

                                  Group of meshes

    Group of meshes

    If the same meshes are used for all the analyses, the following section can be skipped.

    A new concept has been introduced in Postprocess: Group, which allows the postprocessing of problems which require re-meshing or adaptive meshes, where the mesh change depending on the time step.

    Normal operations, such as animation, displaying results and cuts, can be done over these meshes, and they will be actualized when the selected analysis/step is changed, for example by means of View results -> Default analysis/step

    ...

    Read More

                            Postprocess results format: ProjectName.post.res

    Note: The new postprocess results format requires GiD version 6.1.4b or higher.

    Note: Code developers can download the GiDpost tool from the GiD web page (http://www.gidhome.com/gid-plus/tools/gidpost/); this is a C/C++/Fortran library for creating postprocess files for GiD in both ASCII and compressed binary format.

    This is the ASCII format description:

    The first line of the files with results written in this new postprocess format should be:...

    Read More

                                  Gauss Points

    Gauss Points

    If Gauss points are to be included, they must be defined before the Result which uses them. Each Gauss points block is defined between the lines GaussPoints and End GaussPoints.

    The structure is as follows, and should:

    • Begin with a header that follows this model:
          

    GaussPoints "gauss_points_name" Elemtype my_type "mesh_name"

          

    where

                ...

    Read More

                                  Result Range Table

    Result Range Table

    If a Result Range Table is to be included, it must be defined before the Result which uses it.

    Each Result Range Table is defined between the lines ResultRangesTable and End ResultRangesTable.

    The structure is as follows and should:

    • Begin with a header that follows this model:
          

    ResultRangesTable "ResultsRangeTableName"

          

    where ResultRangesTable: is not case-sensitive; "ResultsRangeTableName": is a name for the Result Ranges Table, which will be used as a reference by the results that use this Result Ranges Table....

    Read More

                                  Result

    Result

    Each Result block is identified by a Result header, followed by several optional properties: component names, ranges table, and the result values, defined by the lines Values and End Values.

    The structure is as follows and should:

    • Begin with a header that follows this model:

    Result "result name" "analysis name" step_value my_result_type my_location "location name"

    where

          
    • Result: is not case-sensitive;
          
    • "result name...

    Read More

                                  Result group

    Result group

    Results can be grouped into one block. These results belong to the same time step of the same analysis and are located in the same place. So all the results in the group are nodal results or are defined over the same gauss points set.

    Each Result group is identified by a ResultGroup header, followed by the results descriptions and its optional properties - such as components names and ranges tables, and the results values - all between the lines Values and End values.

    The structure is as follows and should:

    • Begin with a header that follows this model...

    Read More

                                  Results example

    Results example

    Here is an example of results for the table in the previous example (see Mesh example):

    GiD Post Results File 1.0

    GaussPoints "Board gauss internal" ElemType Triangle "board"

    Number Of Gauss Points: 3

    Natural Coordinates: internal

    end gausspoints

    ...

    Read More

                            Postprocess graphs file: ProjectName.post.grf

    Postprocess graphs file: ProjectName.post.grf

    The graph file that GiD uses is a standard ASCII file.

    Every line of the file is a point on the graph with X and Y coordinates separated by a space.

    Comment lines are also allowed and should begin with a '#'.

    The title of the graph and the labels for the X and Y axes can also be configured with some 'special' comments:

    • Title: If a comment line contains the Keyword 'Graph:' the string between quotes that follows this keyword will be used as the title of the graph.
    ...

    Read More

                            Postprocess list file: ProjectName.post.lst

    Postprocess list file: ProjectName.post.lst

    New file *.post.lst can be read into GiD, postprocess. This file is automatically read when the user works in a GiD project and changes from pre to postprocess.

    This file can also be read with File-->Open

    The file contains a list of the files to be read by the postprocess:

    • The first line should contain one of these words: Single / Merge / Multiple to read a single file, merge the list of files or handle them as several meshes (for diferent time steps);
    • rest of lines: the files to be read, with one filename per line;...

    Read More

                            Old postprocess results format

    Old postprocess results format

    This file is a complete list of the dumped results, where each result will be organized as follows:

    Set 1: Header. Results description

    The total number of lines in this set is 1, composed of 1 character string, 1 integer, 1 real, 1 optional character string, which depends on the first integer, plus 3 integers:

    descr_menu load_typestep_val [load_desc] data_typedata_locdesc_comp ["gauss_points_name"]

    where:

    • descr_menu = results title that will appear on the menus (maximum 15 characters without any blank spaces)....

    Read More

                                  Gauss Points (Old format)

    Note: Here is a description of the old Gauss Points file format for the old results file format. However, the new Gauss Points file format (see Gauss Points) is also compatible with the old results format.

    Gauss Points: For the Gauss points to be included in the results, they must be treated as if they were a type of result, but:

    - they must be inserted at the beginning of the file; and

    - the header structure is the same as that of the results files, but the meaning changes....

    Read More

                            Old postprocess mesh format

    Old postprocess mesh format

    The old postprocess mesh format is still compatible with this version of GiD. The files containing the postprocess mesh (in the old file format) can be separated into two categories:

    • 3D Data Files: ProjectName.post.msh, or the old ProjectName.flavia.msh, for volume mesh information and ProjectName.post.bon, or the old ProjectName.flavia.bon, for surface mesh information; and
    • 2D Data Files: ProjectName.post.dat, or the old ProjectName.flavia.dat, for 2D mesh information.

    Postprocessing data files are ASCII files and must be in a specific format, which is explained below. Each mesh information file can only handle one type of element....

    Read More

                                  Old file format: ProjectName.flavia.msh

    Set 1: Header

    This set contains six lines which are included so that information about the project can be included. They can be left blank, but it is suggested to use them for the project name and current version, as well as any extra comments, e.g. the type of project, the kinds of equations used, the conditions and materials involved, etc.

    Note: As the seventh line of the file (i.e. Set 2) contains a series of numbers, it is advisable to use the sixth line to explain what these figures represent.

    ...

    Read More

                                  Old file format: ProjectName.flavia.bon

    Set 1: Header

    This set contains six lines which are included so that information about the project can be included. They can be left blank, but it is suggested to use them for the project name and current version, as well as any extra comments, e.g. the type of project, the kinds of equations used, the conditions and materials involved, etc.

    Note: As the seventh line of the file (i.e. Set 2) contains a series of numbers, it is advisable to use the sixth line to explain what these figures represent.

    ...

    Read More

                                  Old file format: ProjectName.flavia.dat

    Set 1: Header

    This set contains six lines which are included so that information about the project can be included. They can be left blank, but it is suggested to use them for the project name and current version, as well as any extra comments, e.g. the type of project, the kinds of equations used, the conditions and materials involved, etc.

    Note: As the seventh line of the file (i.e. Set 2) contains a series of numbers, it is advisable to use the sixth line to explain what these figures represent.

    ...

    Read More

                      TCL AND TK EXTENSION

    TCL AND TK EXTENSION

    This chapter looks at the advanced features of GiD in terms of expandability and total control. Using the Tcl/Tk extension you can create script files to automatize any process created with GiD. With this language new windows and functionalities can be added to the program.

    For more information about the Tcl/Tk programming language itself, look at www.scriptics.com http://www.scriptics.com.

    If you are going to use a Tcl file, it must be located in the Problem Type directory and be called problem_type_name.tcl....

    Read More

                            Event procedures

    Event procedures

    The structure of problem_type_name.tcl can optionally implement some of these Tcl prototype procedures (and other user-defined procedures). The procedures listed below are automatically called by GiD. Their syntax corresponds to standard Tcl/Tk language:

    proc InitGIDProject { dir } {

    }

    proc BeforeInitGIDPostProcess {} {

    }

    proc InitGIDPostProcess {} { ...

    Read More

                            Control functions

    Control functions

    GiD offers the following Tcl functions:

    • GiD_Process command_1 command_2 ...: used to execute GiD commands;
    • GiD_Info option: used to obtain information about the current GiD project.

    Tcl Functions

    Control functions

    Control functions

    Read More

                                  Process function

    GiD_Process command_1 command_2 ...

    This is a simple function, but a very powerful one. It is used to enter commands directly inside the central event manager. The commands have the same form as those typed in the command line within GiD.

    You have to enter exactly the same sequence as you would do interactively, including the escape sequences (using the word escape) and selecting the menus and operations used.

    You can obtain the exact commands that GiD needs by checking the Right buttons...

    Read More

                                  Info function

    GiD_Info option

    This function provides any information about GiD, the current data or the state of any task inside the application. Depending on the arguments introduced after the GiD_Info sentence, GiD will output different information:

    • GiD_Info materials

    This command returns a list of the materials in the project.

    These options are also available:

          
    • ["material_name"]: If a material name is given, its properties are returned. It is also possible to add the option ...

    Read More

                                  Special functions

    Special functions

    Special functions

    Tcl Special functions

    Special functions

    Read More

                                        Geometry

    GiD_Geometry create|delete|get|list point|line|surface|volume <num>|append <data>

          

    To create, delete, get data or list the identifiers of geometric entities:

          
    • <num>|append: <num> is the entity identifier (integer > 0). You can use the word 'append' to set a new number automatically.
          
    • <data>: is all the geometric definition data (create) or a selection specification (delete...

    Read More

                                        Mesh

    GiD_Mesh create|delete|edit|get node|element <num>|append <elemtype> <nnode> <N1 ... Nnnode> <radius> <nx ny nz> ?<matname>? | <x y z>

    To create, delete, modify or know information about mesh nodes or elements of the preprocess:

          
    • <num>|append: <num> is the identifier (integer > 0) for the node or element. You can use the word 'append' to set a new number automatically. The number of the created, deleted or modified entity is returned as the result. When deleting, it is possible to use a list of entities;...

    Read More

                                        Data

    Data

    GiD-Tcl special commands to manage materials, conditions, intervals, general data or local axes:

    GiD_CreateData create|delete material ?<basename>? <name> ?<values>?

    To create or delete materials:

    • <basename> this only applies to the create operation, and is the base material from which the new material is derived;
    • <name> is the name of material itself;
    • <values> is a list of all field values for the new material....

    Read More

                                        Results

    GiD_Result create|delete|get|get_nodes|gauss_point|result_ranges_table ?-array? <data>

          

    To create, delete or get postprocess results:

          
    • GiD_Result create ?-array? {Result header} ?{Unit <unit_name>}? ?{componentNames name1 ...}? {entity_id scalar|vector|matrix_values} {...} {...} : these creation parameters are the same as for the postprocess results format (see Result of Postprocess results format: ProjectName.post.res...

    Read More

                                        Graphs

    GiD_Graph list|show|hide|clear|get|delete|create

    To create, delete or get postprocess graphs:

    • list : gets a list of the existent graphs, an empty list if there is no graph;
    • show : switches the graphic view and shows the graphs;
    • hide : hides the graphs and switches back to mesh view;
    • clear : delete all graphs in GiD;
    • get <graph_name> : gets a list with the values of the graph with name "graph_name", the values are the same used to create a graph: <label_x> <label_y> <x_values> <y_values>...

    Read More

                                        OpenGL

    GiD_OpenGL

          

    It is possible to use OpenGL commands directly from GiD-Tcl by using the command "GiD_OpenGL draw". For example, for C/C++ use:

          

    glBegin(GL_LINES);

          

    glVertex(x1,y1,z1);

          

    glVertex(x2,y2,z2);

          

    glEnd();

          

          ...

    Read More

                                        Other

    GiD_Set <varname> ?<value>?

          

    This command is used to set or get GiD variables. GiD variables can be found through the Right buttons menu under the option Utilities -> Variables:

                
    • <varname> is the name of the variable;
                
    • <value> if this is omitted, the current variable value is returned (analogous with 'GiD_Info variables <varname>')....

    Read More

                            Managing menus

    GiD offers you the opportunity to customize the pull-down menus. You can add new menus or to change the existing ones. If you are creating a problem type, these functions should be called from the InitGIDProject or InitGIDPostProcess functions (see TCL AND TK EXTENSION).

    Note: Menus and option menus are identified by their names.

    Note:...

    Read More

                            HTML support

    HTML support

    Problem type developers can take advantage of the internal HTML browser if they wish to provide online help.

    HTML support

    Help

    HTML support

    Read More

                                  HelpWindow

    HelpWindow

  • Create a directory named html inside your Problem Type directory
  • Call HelpWindow "CUSTOM_HELP" "problem_type_name", where problem_type_name is the name of your problem type with the .gid extension (e.g. Examples/cmas2d.gid).
  • The function HelpWindow opens the file "index.html" which must be inside the html folder.
  • ...

    Read More

                                  GiDCustomHelp

    GiDCustomHelp

    With GiD version 7.4 and later, problem type developers can take advantage of the new help format. It is essentially the same html content, but now with an enhanced look and structure. The GiDCustomHelp procedure below is how you can show help using the new format:

    GiDCustomHelp ?args?

    where args is a list of pairs option value. The valid options are:

    • -title : specifies the title of the help window. By default it is "Help on <problem_type_name>"....

    Read More

                                        Structure of the help content

    Structure of the help content

    Assuming that html has been chosen as the base directory for the multilingual help content, the following structure is possible:

    html

    \__ en - English content

    \__ es - Spanish content

    Each content will probably have a directory structure to organize the information. By default the help system builds a tree resembling the directory structure of the help content. In this way there will be an internal node for each subdirectory, and the html documents will be the terminal nodes of the tree....

    Read More

                                        HelpDirs

    HelpDirs

    With HelpDirs we can specify which of the subdirectories will be internal nodes of the help tree. Moreover, we can specify labels for the nodes and a link to load when a particular node is clicked. The link is relative the node. For instance:

    HelpDirs {html-version "GiD Help" "intro/intro.html"}

    {html-customization "GiD Customization"}

    {html-faq "Frequently Asked Questions"}

    {html-tutorials "GiD Tutorials" "tutorials_toc.html"} ...

    Read More

                                        TocPage

    TocPage

    TocPage defines an html page as a table of contents for the current node (current directory). We have considered two ways of specifying a table of contents:

          

    <UL> <LI> ... </UL> (default)

          

    <DT> <DL> ... </DT>

          

    The first is the one generated by texinfo.

    For instance:

          ...

    Read More

                                        IndexPage

    IndexPage

    If we specify a topic index by IndexPage, we can take advantage of the search index. In IndexPage we can provide a set of html index pages along with the structure type of the index. The type of the index could be:

          

    <DIR> <LI> ... </DIR> (default)

          

    <UL> <LI> ... </UL> (only one level of <UL>)

          

    The first is the one generated by texinfo.

    ...

    Read More

                            Custom Data Windows

    Custom Data Windows

    In this section the Tcl/Tk (scripted) customization of the look and feel of the data windows is shown. The layout of the properties drawn in the interior of any of the data windows - either Conditions, Materials, Interval Data or Problem Data - can be customized by a feature called TkWidget; moreover, the common behaviour of two specific data windows, Conditions and Materials, can be modified by a Tcl procedure provided for that purpose. This common behaviour includes, in the case of Materials for example, assigning/unassigning, drawing, geometry types, where to assign materials, creating/deleting materials, etc....

    Read More

                                  TkWidget

    TkWidget

    The problem type developer can change the way a QUESTION is displayed and if he wishes he can also change the whole contents of a window, while maintaining the basic behavior of the data set, i.e. in the Condition window: assign, unassign, draw; in the Material window: create material, delete material; and so on.

    With the default layout for the data windows, the questions are placed one after another in one column inside a container frame, the QUESTION's label in column zero and the VALUE in column one. For an example see picture below....

    Read More

                                  Data Windows Behavior

    Data Windows Behavior

    In this subsection we explain a Tcl procedure used to configure the common behaviour of Materials. We are working on providing a similar functionality for Conditions using the same interface.

    GiD_DataBehaviour controls properties of data windows for Materials and Conditions (not currently implemented). For Materials we can modify the behaviour of assign, draw, unassign, impexp (import/export), new, modify and delete. We can also specify the entity type list with the assign option throught the subcommands geomlist and meshlist.

    The syntax of the procedure is as follows:...

    Read More

                            GiD version

    GiD version

    Normally, a problem type requires a minimum version of GiD to run. Because the problem type can be distributed or sold separately from GiD, it is important to check the GiD version before continuing with the execution of the problem type. GiD offers a function, GidUtils::VersionCmp, which compares the version of the GiD currently being run with a given version.

    GidUtils::VersionCmp { Version }

    This returns a negative integer if Version is greater than the currently executed GiD version; zero if the two versions are identical; and a positive integer if Version is less than the GiD version....

    Read More

                            Using EXEC in GiD

    Using EXEC in GiD

    The Tcl language has the exec command used to invoke a subprocess. This command treats its arguments as the specification of one or more subprocesses to execute. It is possible to invoke a subprocess from GiD using this option.

    Example: invoking a process in the background

    exec netscape http://www.gidhome.com &

    Note: In Windows, instead of & it is necessary to put >& NUL: & to run the process in the background. ...

    Read More

                            Detailed example - Tcl and Tk extension creation

    Detailed example - Tcl and Tk extension creation

    Here is a step by step example of how to create a Tcl/Tk extension. In this example we will create the file cmas2d.tcl, so we will be extending the capabilities of the cmas2d problem type. The file cmas2d.tcl has to be placed inside the cdmas2d Problem Type directory.

    Note: The cmas2d problem type calculates the center of mass of a 2D surface. This problem type is located inside the Problem Types directory, in the GiD directory.

    In this example, the cmas2d.tcl creates a window which appears when the problem type is selected....

    Read More

                      Plug-in extension

    Plug-in extension

    This section explains a new way to expand GiD capabilities: the plug-in mechanism.

    Plug-ins which should be used by GiD shoud be present inside the $GID/plugins directory.

    There are two possible plugin mechanisms:

    - the .tcl plug-in and

    - the dynamic library plug-in ( look into $GID/plugins/Import/Docs for the PostImportPluginManual which describes this mechanism and the provided examples)

    By GiD version 10.1.2d following plug-ins are provided:

    ...

    Read More

                      APPENDIX: PRACTICAL EXAMPLES

    APPENDIX: PRACTICAL EXAMPLES

    To learn how to configure GiD for a particular type of analysis, you can find some practical examples:

    • By following the Problem Type Tutorial; this tutorial is included with the GiD package you've bought. You can also download the tutorial from support area of the GiD web page [http://www.gidhome.com]

    • By studing and modifing some Problem Type

          

    Problem types included in GiD by default as example:...

    Read More