Difference between revisions of "Using Netgen Mesh Generation in ICE"
(Created page with "Note: This page is supported by the Eclipse ICE project's Geometry and Meshing initiative and is in no way affiliated or supported by the Netgen Project. == Attributes a...")
Latest revision as of 14:01, 2 June 2016
Note: This page is supported by the Eclipse ICE project's Geometry and Meshing initiative and is in no way affiliated or supported by the Netgen Project.
Attributes and Installation
Netgen is a mesh generator and geometry editor and is fairly easy to download and compile, but does have certain dependencies. Netgen will need a c++ compiler like g++ along with the Tcl/Tk libraries with Tix and the Togl library. There is a executable for Windows that takes care of dependencies (except for Visual C++ and Python). If downloading on Windows it is possible to see "***.dll is missing from you computer" error when opening Netgen. You must download the right dll file and install it in the system library files, likely in both the 64 bit and 32 bit system library folders. On Mac, Netgen comes as an application install package, just double click the download and open the compressed file. Ubuntu/Fedora users can use apt-get install or dnf install, installing the netgen-mesher libraries. Then launch Netgen using the bash command netgen-mesher.
The editor is simple to use, and has good visualization of the geometries and meshes. It will be mostly useful as a mesh generator tool.
Netgen can read in CSG or BRep Geometries and generate corresponding tetrahedral meshes. It can also read IGES and STEP formats when compiled with Open Cascade. Here is a more complete list of input file formats:
|.iges||IGES format *|
|.stp/.step||STEP format *|
|.dlo||3ds MAX format|
|.nam||Office name file|
|.vol||Volume image data|
|.frd||Frequency response data|
|.inp||Abaqus input File|
|.geo||Geometry file (CSG) **|
* Needs OpenCascade kernel to read ** Custom CSG file format specification.
File Format Specification
Netgen accepts Constructive Solid Geometry (CSG) files with its own specifications, using the extension .geo (standing for Geometry). This is not to be confused with the image specification file type or the geographical location data (both also having .geo as a file extension). The format is a ASCII file. From http://netgen-mesher.sourceforge.net/docs/ng4.pdf, Netgen uses a CSG file format as such:
algebraic3d solid cube = orthobrick ( ax, ay, az; bx, by, bz ) tlo cube;
The file must begin with "algebraic3d". Define solids using the "solid" keyword, and orthobrick is a primitive block, orthogonal to the primary axes, with one corner located at (ax, ay, az) and the opposite corner located at (bx, by, bz). The line "tlo cube" makes the solid cube a top level object- necessary for meshing. The available primitive types are: Plane with point and normal vector
- plane (px, py, pz; nx, ny, nz)
Cylinder with points on central axis and radius
- cylinder (ax, ay, az; bx, by, bz; r)
Sphere with central point and radius
- sphere (cx, cy, cz; r)
Elliptical Cylinder with center point, larger vector, and smaller vector
- ellipticcylinder (cx, cy, cz; vx, vy, vz; wx, wy, wz)
Ellipsoid with center point and three vectors describing the ellipsoid
- ellipsoid (cx, cy, cz; ux, uy, uz; vx, vy, vz; wx, wy, wz)
Cone with center points along the central axis, with radius at each end point
- cone (ax, ay, az; ra; bx, by, bz; rb)
Rectangular prism, orthogonal to coordinate axes, with smallest point and largest point.
- orthobrick ( ax, ay, az; bx, by, bz )
Polygons can be represented with : poly(x1, y1, z1; x2, y2, z2; x3, 3y, z3; ... ;; 1, 4, 3; 2, 3, 5; ...) where 1 is the point (x1, y1, z1) and the triplets after the ;; define triangles using the points 1, 2, 3, .. and so on. The polygon must be closed.
Ease of Use
Netgen is simple and light to use, although there is little documentation on importing geometries from file formats other than STEP and IGES, both of which require Open Cascade to be installed. There are a lot of meshing options, and meshing exactly how a user wants requires some digging into the many toolbars and sub-menus Netgen has to offer. In all, however, Netgen is a useful tool and has strong potential to be a meshing tool that is launched from ICE.