Local:Mesh generation with gmshFrom AMCGMediagmsh is a versatile 1-, 2- and 3- dimensional mesh generator which may be used to generate meshes for use with fluidity. Gmsh is particularly suitable for setting up idealised test cases and industrial type problems in which the domain is composed of flat surfaces and simple curves.
Installing and running gmshInstalling gmshGmsh is included in both Debian and Ubuntu and can be installed on any amcg workstation using: wajig install gmsh Invoking gmshUnsurprisingly, gmsh is run on the command line by typing "gmsh". It is also possible to run gmsh on a previously output .geo file. Generating meshesBefore reading this section you may wish to look at the gmsh tutorial Gmsh filesGmsh outputs two sorts of files:
Converting msh files to triangle formatThe gmsh2triangle script in the tools directory converts msh files to triangle format, which is supported by Fluidity. If you are generating a 2 dimensional mesh, the default behaviour is to still output 3 dimensional positions. If you require 2d positions in this case (most people will) then you need to supply the --2d option to gmsh2triangle. Elementary entities and physical groupsElementary entities are the geometric building blocks of the domain: points, lines, surfaces, volumes and so on. These are used by gmsh and are reported in the .msh file but are not used by fluidity. In contrast, physical groups attach labels to groups of elementary entities. It is important that all the boundaries in your mesh as well as the whole interior of the domain are assigned to physical groups. The physical group numbers are transmitted via the .msh and triangle files to fluidity. In fluidity the entries in the boundary surface_id lists correspond to these numbers. They are therefore essential for prescribing boundary conditions to the problem. If any part of the domain or boundary does not belong to a physical group then the relevant elements will not be output to the mesh file and your problem will almost certainly crash. Further informationThe gmsh website and reference manual. |