You need to convert your geometry into a set of triangulated surfaces and be able to export it in the GTS format (very simple, described here) or alternatively in the STL format (which can be converted to GTS using the stl2gts program).
The tricky bit is that the surfaces you export must represent proper solid objects i.e. they must be orientable, closed, manifold and non self-intersecting surfaces.
Blender can do that and is open-source, also have a look at ac3d, k3d and Pro/Engineer, Rhino. There are plenty of others.
If your solid boundary is exactly defined using a few triangles, there is no need to use more. In short, the mesh size generated by Gerris is completely independent from the ``triangle size'' of the input surface (in contrast to what happens in ``classical'' unstructured mesh solvers).
If for example, you want to resolve the boundary layers around your solid, you could tell Gerris to use a ``fine enough'' mesh like this:
GfsRefineSolid 10which tells Gerris to use 10 levels of refinement near the solid surface. ``Fine enough'' is going to depend on the details of the physics (most importantly Reynolds number) and on the constraints in term of computational time, memory size etc...
The position of the solid object is defined (obviously) through the coordinates of its vertices. If you created it using a CAD or similar program, you can translate, rotate etc...the object using this same program.
Alternatively, you can use the transform program which comes with GTS.
% transform -hwill give you a summary of the transformations you can make, currently
Usage: transform [OPTION] < file.gts Apply geometric transformations to the input. -r ANGLE --rx=ANGLE rotate around x-axis -m ANGLE --ry=ANGLE rotate around y-axis -n ANGLE --rz=ANGLE rotate around z-axis -s FACTOR --scale=FACTOR scale by FACTOR -R FACTOR --sx=FACTOR scale x-axis by FACTOR -M FACTOR --sy=FACTOR scale y-axis by FACTOR -N FACTOR --sz=FACTOR scale z-axis by FACTOR -t V --tx=V translate of V along x-axis -u V --ty=V translate of V along y-axis -w V --tz=V translate of V along z-axis -i --revert turn surface inside out -o --normalize fit the resulting surface in a cube of size 1 centered at the origin -v --verbose print statistics about the surface -h --help display this help and exit Reports bugs to popinet@users.sourceforge.netThe resulting (transformed) object is written on the standard output.
For example, if you want the half-cylinder in the second cell do:
% transform -t 1 < half-cylinder.gts > half-cylinder1.gtsand use half-cylinder1.gts in the parameter file.
The GTS file format is described here. It is very simple. You should be able to write your own filter using your favourite scripting language. You might want to have a look at the cleanup utility which comes with GTS (in the examples/ directory) It will allow you to link unlinked faces, remove duplicate vertices etc...
No, there is no limitation on the number and/or complexity of solid bodies (as long as they are properly oriented, manifold geometrical surfaces). Multiple bodies are possible, either as a single GTS file containing multiple separate bodies or as multiple calls to GtsSurface in the parameter file with several non-intersecting GTS surfaces.
GtsSurfaceFile box_1.gts GtsSurfaceFile box_2.gtsNote however that the solids cannot intersect.
The orientation of the faces of your solid defines where the fluid side is (by convention the counter-clockwise (CCW) normal direction to a face points toward the solid side). If your solid is not oriented properly you can use the -revert or -i option of transform to turn it ``inside out''.
It is just a matter of different conventions. The program you use has chosen to orient the CCW face normals toward the ``outside'' of the solid object.
No, you first need to use the ``boolean operations'' or ``constructive solid geometry'' operations of your solid modeller to generate the union of your solids.
This may change in the future.
The samples files on the GTS site are not necessarily describing consistent geometric surfaces (i.e. they can be open, non-manifold etc...)