-
Notifications
You must be signed in to change notification settings - Fork 117
FAQ: How do I use GID with Fluidity?
Interoperability with GID (see http://gid.cimne.upc.es/ ) is accomplished by using the gmsh problem-type (see http://www.gid-usa.com/support/gid_15.subst problem-type) (hyphenated to emphasis that this is used as a noun in GiD lingo). This problem-type specification is maintained under tools/ in the Fluidity source. If you have your own local instillation of GiD you can download http://amcg.ese.ic.ac.uk/~ggorman/gmsh.gid.tar.gz and untar it within the directory problemtypes/ of your GiD instillation. Once you have loaded the gmsh problem type, assigned boundary conditions, generated mesh mesh; you then export the "calculation file" to get a gmsh formated file. Note that the default extension is .dat - this should be changed to .msh before saving.
For first time users of GiD and/or those unfamiliar with mesh generation and CAD, the tutorials located under the Help-button are excellent and should be gone through before you start asking any questions. The rest of this guide assumes you have a geometry for which you can create a volume mesh.
After you have set up your geometry the next thing you need is to load a problem-type. A GiD problem-type is a directory of files which specifies what boundary conditions you can set for a particular problem and a template for how the data should be exported for your application. Assuming that you are using the gmsh problem-type described above; the steps to getting a mesh with boundary labels are:
- Generate a preliminary mesh just to make sure the geometry is ok: mesh->generate mesh.
- From the toolbar use: data->problem type->load, in order to load the problem-type.
- From the toolbar use: data->conditions to prescribe the boundary conditions. The maximum number of distinct boundary conditions that can be defined is currently hard coded to 21; it's trivial to increase this but it's not clear from the documentation how to make it dynamic (feel free to pursue this on the GiD mailing list and let me know the answer). These names are boundary labels used to tell the preprocessor where boundary conditions are to be applied (note that GiD supports string labels but integer labels are used here to maintain interoperability with other components).
After assigning boundaries the volume mesh much be re-created. From the toolbar select file->export->calculation file, and choose a sensible file name (remember to set the extension to .msh if using the gmsh problem type).