Go to the first, previous, next, last section, table of contents.

# Export files

#### How can GiD export the mesh and the boundary conditions, materials and so on?

It is possible to export the mesh and the boundary conditions just by pressing one button (Files->Export->Write ascii). The problem is the output format. Every calculations program has its own input format and GiD is not prepared to know all these formats. The solution is one of:

- Output from GiD in one format and make external conversion to another one.
- Define or modify one GiD 'problemtype' to suit your needs. In this way, GiD will know what information should the user enter (boundary conditions, materials, ...), and GiD would write the calculations file in the exact format you need. We include several examples of problemtypes with the GiD instalation, to help people to develop their owns.
- Wait until we define one standard output for the most importants FEM analysis codes (LS-DYNA3D, ANSYS, SYSNOISE, NASTRAN ...). This can take several months.
- There are already interfaces with SAP90/2000 and a basic one to ANSYS and NASTRAN. Contact CIMNE for further information.

The second solution is the recommended one. Many times, a slight modification in the 'problemtype' code by the user, can be made in minutes and obtain very easily the desired files. To do so, check the customization part in the help and check the 'problemtypes' given as a example.

To export only the mesh (not condions, etc), it exist a standard directory /templates with some simple templates *.bas (see customization)to write the mesh in several formats: STL, VRML, NASTRAN, DXF. A user can add more user-defined templates to this directory.

#### Export to SAP90-SAP2000

There is one especial 'problemtype' to connect GiD and SAP90-2000. It is not included in the GiD distribution. It can be obtained as a technical publication (one book). Contact CIMNE cimne@cimne.upc.es for more information.

#### What is a 'problem type'?

To write data from GiD to a calculations program, it is necessary to create a 'problem type' for it. It is quite easy to do. The first step is to check one of the 'problem type' examples that are included in the GiD distribution like 'problem_type_solid1.gid'. Studying it and modifying accordingly to suit your needs you will get a GiD that can write the files that your calculations code can read. Check also the Help chapter: 'Customization' and the 'Problemtype tutorial' from the web page.

#### Does GiD works for finite volumes?

Yes, It can work with either finite differences, finite elements, finite volumes, meshless methods and others. In fact, as GiD only deals with the geometric and mesh part, it does not mind the type of analysis that will be made as long as it needs a mesh.

#### How I could print in the calc file the number of the layer which an element belongs to?

Now, it is available inside the bas file the layer information: *ElemsLayerNum *NodesLayerNum, *Loop Layers, *LayerNum, *LayerName, *LayerColorRGB, etc

In old versions, the layers information cannot be directly dumped into the output file. Tipicallly, it is necessary to assign a material or a condition to the elements that reflects this property. There are bassically two options:

- User assigns a condition or material to the elements with a field that reflects the property that you are working with.
- Perform the last step automatically.

To do it automatically use the following:

TCL function 'BeforeWriteCalcFileGIDProject', is executed just before writing the calculations file. You can define this function in your 'problemtype'.tcl file and make it assign a condition to the entities depending on the layers.

TCL function 'AfterWriteCalcFileGIDProject' is executed just after writing the calculations file. You can clean up this condition if you wish.

TCL command '.central.s info layers' gives you the layers of the project. TCL command '.central.s info layers -entities Elements' returns the elements belonging to a layer.

.central.s process escape escape data conditions assign cond CND change VALUE layer:LAYER1

would assign to condition CND with value VALUE all the entities belonging to layer LAYER1.

Go to the first, previous, next, last section, table of contents.