GiD - The personal pre and post processor

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

DESCRIPTION OF THE FORMAT
There are two versions of the <modelname>.geo GiD format: Binary (used by GiD by default) and ASCII. This chapter describes the format of the geometry ASCII file.
During the development of the program, the backward compatibility has been tried to be guaranteed as much as possible, so that, in general, any GiD version is be able to read it (some very old version of GiD can ignore some new entities).

  • The file ".geo", is written using Export->SaveAsciiProject, but by default the geometry will be saved in binary format. In order to GiD to read the file, it should be placed inside a directory named ".gid"


Document notation:

  • By default all the variables are of type integer, the variables of type float will be written underlined, and those of type double with double underlined. (data types of the "C" language)
  • A carriage return is denoted for <CR>
  • The commas written to separate the variables should not be written in the file, they only appear in this document to facilitate their reading, and the same applies for the white lines.


The file should contain the following fields, and in the described order:

Header
Problem type
Must Repair
An entry for each layer
Null entity (denotes end of layers)
An entry for each meshing data (avoid if not exits)
Null entity (denotes end of mesh data)
An entry for each point
An entry for each curve
An entry for each surface
An entry for each volume
Null entity (denotes end of geometric entities)

Header
RAMSAN-ASCII-gid-v7.6 <CR> (it is used to identify the file type and its version, in this case 7.6)
Problem Type
Problem type (variable of type string) IsQuadratic (0 for lineal elements)
(problem type name, UNKNOWN type for not loading none)
Must Repair
0 (0 if it is not necessary to apply the "Repair" function after the reading, "Repair" corrects the value of some fields like the counter of the number of higher entities to those an entity is subordinated to)
Layer
Number of layer, Name (variable of type string), isfrozen (0 or 1),ison (0 or 1), RGB_R, RGB_G, RGB_B (RGB color, values from 0 to 255) <CR>
Null entity
Code of null entity=0<CR> (used as "flag" for end of entities)
NoStructuredMeshData
Entity code= -1, number ID, NumOfEntities (number of entities than point to it), elementtype, MustBeMeshed (0 or 1, default=0), size (edge element size), <CR>
StructuredMeshData
Entity Code= -2, number ID, NumOfEntities, elementtype, MustBeMeshed, Size, <CR>
StructuredWeightedMeshData
Entity Code= -3, number ID, NumOfEntities, elementtype, MustBeMeshed, Size (number of divisions), weight (positive or negative value to a non uniform concentration of the elements)<CR>
Where ElemType={NoNe=0, Linear=1, Triangle=2, Quadrilateral=3, Tetrahedra=4, Hexahedra=5, Prism=6, OnlyPoints=7}
Point
Entity Code=1, number ID, label, selection, number of higher entities, conditions=0, material=0, number layer, mesh data=0<CR>
x, y, z <CR>
*The flag value label is only used by old GiD versions (to set on/off the visualization of the entity label), current versions use only selection for both flags (first bit for selection on/off and second bit for label on/off)
Straight segment
Entity Code=2, number GOES, labels, selection, number of higher entities, conditions=0, material=0, number layer, mesh data=0 < CR >
Number of initial point, number of final point <CR>
Arc
Entity Code=3, number ID, label, selection, number of higher entities, conditions=0, material=0, number layer, mesh data=0,<CR>
Number of initial point, number of final point, x center, y center, radius, initial angle, final angle <CR>
TransformationMatrix [0] [0], ..., TransformationMatrix [0] [3] ,<CR>
...
TransformationMatrix [3] [0], ..., TransformationMatrix [3] [3] ,<CR>
The transformation matrix maps the points from 2D to the final 3D location.
Polyline
Entity Code=4, number of ID, label, selection, number of higher entities, conditions=0, material=0, number of layer, mesh data=0,<CR >
Number of initial point, number of final point, number of parts, length, UsePointsInMeshing=0, checknum=0 < CR >
sense[1] ,..., sense[number parts] <CR > (gives the orientation of the sub line, possible values 0 or 1)
length[1], ...,length[number parts] <CR>
here the description for each one of the n sub-curves is written, with the particularity that the number is set = -1 to all of them, to mark that they are not independent entities.
NURBS curve
Entity Code=11, number ID, label, selection, number of higher entities, conditions=0, material=0, number layer, mesh data=0,<CR>
Number of initial point, number of final point, number de polygon control points, degree, length <CR>
x point[1], y point[1], z point[1] <CR>
...
x point [number points], y point [number points], z point [number points] <CR>
knots[1], ... , knots [number points+degree+1], <CR>
IsRational (0 or 1)
Weight[1] ,..., Weight [number points ] (only if rational)
The length is ignored when reading, it is recalculated (it could be set to 0.0)
Planar Surface
Entity Code=5, number ID, label, selection, number of higher entities, conditions=0, material=0, number layer, mesh data=0 <CR>
Number of boundary lines, <CR>
number of curve[1], ... , number of curve[number of lines] <CR>
(Note: if the curve is a part of a polyline it should be substituted "number of curve[i]" for "- number curve[i], relative position inside the poly-line". Note the negative sign in the polyline number, and the position in the polyline will be 0,1,...)
sense[1], ..., sense[number of lines],<CR> (set the orientation of a segment, must be 0 or 1)
x center, y center, z center, <CR>
x normal, y normal, z normal, <CR> (vector normal to the plane)
Coon Surfaces (defined by 4 sides, their interior is interpolated from the contour)
Entity Code=6, number of ID, label, selection, number of higher entities, conditions=0, material=0, number of layer, mesh data=0,<CR>
Number of boundary lines=4, <CR>
Number of curve[1], ... , number of curve[4], <CR>
(Note: if the curve is part of a polyline it should be substituted "number of curve[i]" for "- number of curve[i], relative location inside the polyline", note the negative sign in the polyline number, and the position in the polyline will be 0,1,...)
sense[1], ..., sense[4] <CR> (set the segment orientation, must be 0 or 1)
x center, y center, z center, <CR>
x normal, y normal, z normal, <CR> (vector normal to the plane)
NURBS Surface
Entity Code=14, number of ID, label, selection, number of higher entities, conditions=0, material=0, number of layer, mesh data=0,<CR >
Number of boundary lines=4, <CR>
Number of curve[1], ... , number of curve[4], <CR>
sense[1], ..., sense[4] <CR> (set the segment orientation, must be 0 or 1)
x center, y center, z center, <CR>
x normal, y normal, z normal, <CR> (vector normal to the plane)
IsTrimmed, NU (number of control points in the U direction), NV, degreeU (polynomial degree), degreeV <CR>
x point[1], y point[1], z point[1], <CR>
...
x point[NU*NV], y point[NU*NV ], z point[NU*NV ], <CR>
knotsU[1], ... , knotsU [NU+degreeU+1], <CR>
knotsV[1], ... , knotsV [NV+degreeV+1], <CR>
IsRational (0 or 1)
Weight[1] ,..., Weight [NU*NV] (only if rational)
Volume
Entity Code=9, number of ID, label, selection, number of higher entities, conditions=0, material=0, number of layer, mesh data=0 <CR>
Number of boundary surfaces <CR>
Number of surface[1], ... , number of surface[number of surfaces], <CR>
sense[1], ..., sense [number of surfaces],<CR> (segment orientation, 0 or 1)
x center, y center, z center, <CR>
Rules to follow:
There are four level types of geometrical entities: Point, Curves (straight segment, arc, polyline, Nurbs), Surface (planar, Coon, Nurbs) and Volume.

  • Geometrical entities of the same type cannot have the same ID number associated (is not valid to have two curves with same ID)
  • The numeration begins with 1 (not by 0 like in the "C" style), and it could be jumps in the numeration (e.g. when a entity is deleted).
  • The entities of a level are listed with increasing ID.
  • The center of the entities doesn't refer to the geometric center, it is simply an approximate center where its label will be drawn.
  • The higherentities number can be initialized to zero, and it will be corrected automatically if "Must Be repaired" flag was set to 1. In any case is recommended to set the righ value and avoid the reparation.
  • The lenght of NURBS curves could be set to zero, current versions ignore this value and recalculate it.
  • Parametric curves are normalized to parameter space [0.0,1.0]
  • Parametric curve must have its initial point at parameter 0.0 and end point at parameter 1.0. A closed curve must share the same start and end point.
  • Parametric surfaces are normalized to parameter space [0.0,1.0]x[0.0,1.0]
  • The boundary curves of a surface define a outer loop and some possible inner loops. The outer loop is before outer loops.
  • The curves of a loop are ordered consecutivelly. A loop finish when the starting point of the first curve (taking into account its sense for the surface) is equal to the last point of other curve.
  • The ordering and orientation of the boundary curves must agree with the surface normal (Xu^Xv) (right-hand rule). The outer loop must point to the same sense as the surface normal, and inner loops is any in the opposite sense.
  • Volumes are defined by a closed shell of surfaces: first surfaces must define the outer shell, and then the inner shells.
  • The order of surfaces on a 'volume shell' is not relevant, but the orientation must be 0 (SAME1ST) is the surface normal points inside the volume.
  • No labels