Documents

Home QuickStart Guide User's Guide Commands reference

There are awnsering for some common questions:


Q5. How to get a mesh file from Gmsh ?

This part will not going to help you to create a mesh from Gmsh. For more information about this purpose, you can get from Gmsh website. Or you can view the geometry examples (mesh.geo) in the example directories. Here, we will only forcus on the declaration boundary in Gmsh program.

Fig. 1: Geometry in Gmsh can be declared as Elementary objects or Physical objects.

In order to have a correct mesh for femLego. The whole mesh volume (3D) or face (2D) need to be the physical object, see Figure 1. As same as for the boundary eddes or faces on Gmsh geometry. They should be registerd as a physical edges or physical faces. But for the boundary objects, since the name of this physical object is chosen automaticaly by Gmsh, you are requested to re-edit the name of boundaries to an integer number, start from 1 to n. In order to do soo, just click to edit button in the geometry menu. Normally a emacs program will be used to help you to edit this geometry. See figure 2.

Corresponding to each boundary named in Gmsh. The boundary condition will be set in another file (boundary.ini). For example, each boundary will be presented in file boundary.ini by following: first line is a comment line, to let you know where is this. The second line is the name of this boundary. This name have to be an integer and corresponds with the name was specified in Gmsh. Next m lines is the boundary condition declaration of m equations for this boundary.

! id; ivar qBCval bctype : inflow face
1
1 D 1.
2 D 0.
....
m N 0.

Fig. 2: Re-editing the name of the physical boundary surface






Mechanics Department, KTH
Stockholm 2005
minh@mech.kth.se

Update: 2004-12-27