Você está na página 1de 3

OpenFOAM: Using GGI for rotating objects

Pal Schmitt
February 3, 2009
1 Concept
The GGI interface allows for general mesh movements avoiding the complicated task of topological mesh
changes by a special interpolation algorithm. Instead of creating a new connected mesh for every timestep,
data is mapped from one patch to the other. The two patches dening the border between rotating and xed
part of the mesh may not interfere but the necessary gap between the two can cause inaccuracies. The GGI
interface in OpenFOAM needs only a correctly dened patch for the standing and the rotating patch, the
point and axis of rotation and a point inside the moving mesh. With this information OpenFOAM collects
the moving mesh in a zone and takes care of the motion at every time step. This manual tries to be helpful
when setting up a case utilizing the GGI feature of OpenFOAM. The les should be edited in the order they
are named in the sections. As the GGI is under heavy development this tutorial may very soon be out of
date, make sure to check the OpenFOAM discussion site when running into problems.
2 Mesh generation
Creating a mesh for a GGI case requires the user to create two submeshes with two patches dening the
boundary of the moving region. These may never overlap when rotating but are otherwise not constrained.
The gap between the two regions should be as small as possible to avoid inaccurate results. Make sure to
note the coordinates of a point inside the moving region and it is recommended to remember the number of
cells in each of the two regions.
3 boundary
As always the patch types need to be dened in the boundary le. The two patches dening the boundary
must be set as ggi type, specifying the corresponding as its shadowPatch as shown below. If simulating a
solid in the moving region remember to initialize its velocity eld as type movingWallVelocity, otherwise You
will have ux through the body.
OUTSIDESLIDER
{
type ggi; shadowPatch INSIDESLIDER;
nFaces 160;
startFace 7072;
}
INSIDESLIDER
{
type ggi; shadowPatch OUTSIDESLIDER;
nFaces 160;
1
Figure 1: Mesh for a rotating box. The gap is exaggerated to illustrate the setup.
2
startFace 7392;
}
4 dynamicMeshDict
The dynamicMeshDict is the place to dene velocity and direction. The entries selecting the FvMeshLib are
as follows for rotating movements and shouldnt be changed. The origin entry must be inside the moving
region! Check the axis and orientation, and adjust the angular velocity. When running the case, OpenFoam
will print on the screen some information on the selected moving mesh region. Check the number of cells to
make sure the right region is moving.
// * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMeshLib "libtopoChangerFvMesh.so";
dynamicFvMesh mixerGgiFvMesh;
mixerGgiFvMeshCoeffs
{
coordinateSystem
{
type cylindrical;
origin (0 0 0.1);
axis (0 0 1);
direction (1 0 0);
}
rpm 50;
}
// ***************************************************** //
The mixerGgiFvMesh method will create the following les in the polymesh directory: cellZones.gz
faceZones.gz meshModiers.gz pointZones.gz. Before running a case make sure data from previous runs has
been deleted, otherwise meshmodiers wont be added and calculation might fail or produce unexpected
results. Check for the corresponding message when executing the solver.
Have fun!
3

Você também pode gostar