
INFORMATION FOR
Prospective Students
Current Students
INFORMATION
Home
Group Members
Modelling
Devices
Downloads
Publications
PROJECTS
Funded
Undergraduate
Postgraduate
QUICK LINKS
Optical Devices
Ghent LC
Group
GID
|
 |
Creating a Simple Structure With Tetgen
The documentation and source code for TetGen can be found at the
following location:
http://tetgen.berlios.de
When compiling the program is it best to disable the gnu library
timer to avoid downloading the gnu libraries. This can be disabled
in one of the #define statements.
There are two ways of defining a structure in TetGen, using either
the .poly or .smesh file. The .poly format allows the creation of
volumes containing holes, and other more complex features. It is
usually sufficient to use the .smesh format where the surface meshes
are defined, and a mesh is generated, bound by these surfaces. Here
we describe the procedure for defining an IPS structure, including
a dielectric region between the LC and the electrodes. Neumann or
periodic boundary conditions should be applied to the sides of the
structure.
It is essential that each surface is fully defined, even if a section
of it has no boundary condition. All surfaces MUST be defined in
a clockwise fashion.
To begin with it is necessary to define each node. The definitions
can either be placed at the top of the .smesh or .poly file, or
defined separately in a .node file, as has been done here
# Cube.node
8 3 0 0 # number of nodes, dimension (always 3), …don’t
want a material number for nodes
1 0 0 0
2 0 2 0
3 2 2 0
4 2 0 0
5 0 0 10
6 0 2 10
7 2 2 10
8 2 0 10
0
0 |
Each surface is defined in the file below. Multiple surfaces may
be defined on each face, but if the .smesh format it used, the created
volumes cannot contain holes. The first number on each line gives
the number of nodes that defines the surface, which are subsequently
listed. The final number is the material number of the surface.
The final region section of the file allows a material number to
be applied to volumes by defining a point at the centre of the volume,
and providing the material number.
# Cube.smesh
0 # A zero indicates the node list should read from file *.node
6 1 # number of surfaces, 1=material numbers given
4 1 2 3 4 2112# FixLC-1_Electrode-1
4 5 6 7 8 4224 # FixLC-2_Electrode-2
4 1 2 6 5 3 # Periodic
4 4 3 7 8 3 # Periodic
4 1 5 8 4 3 # Periodic
4 2 6 7 3 3 # Periodic
0
# region
1 # Number of regions
# region number, {x,y,z} region centre, material number
1 2 2 2 4 # Domain-1 |
To generate the mesh the following command should be used:
tetgen IPS.smesh -g -A -a2 |
The number that follows the –a indicated the volume of the
elements that you want to generate. It is possible to adapt the
mesh, and details of how to do so are given in the TetGen manual.
Rename the output file IPS.1.mesh to meshin.txt and then run:
This converts the format of the output into the standard GID form,
as used by the modelling program, producing mesh.txt
This page last modified
2 June, 2006
by r.james
|
 |
|