Jack001 |
May 21, 2016 08:00 |
Possible bug with stitchMesh and cyclics in OpenFoam
I am attempting to simulate the flow through a number of axial rotor passages in OpenFoam. I import the mesh for a single rotor passage, and then use the OpenFoam utilities to create a mesh for multiple rotor passages. To do this I
1) first use with the option to create consecutively adjacent rotor passages.
2) Then I use recursively until I have a single mesh.
3) After that I need to remove the periodic boundaries of my original single passage mesh that have now become internal to my final mesh. This I do easily with .
4) The final thing that remains is to run so that the outer boundaries of my final mesh become cyclic. But this is where the problem lies. I get the error that
Code:
--> FOAM FATAL ERROR:
face 0 area does not match neighbour by 21.3209% -- possible face ordering problem.
patch:PER_1 my area:1.79826e-07 neighbour area:2.22742e-07 matching tolerance:0.0001
Mesh face:406473 fc:(-0.0100134 0.0276069 0.04761)
Neighbour fc:(-0.0286241 -0.00656206 0.0405168)
If you are certain your matching is correct you can increase the 'matchTolerance' setting in the patch dictionary in the boundary file.
Rerun with cyclic debug flag set for more information.
From function cyclicPolyPatch::calcTransforms()
in file meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C at line 221.
FOAM exiting
This is strange because when I just set up a single passage (without doing all the copying and merging and stitching ), I have no problem, and my simulation runs as expected. So im wondering if there could be some sort of bug introduced in the stitching process of OpenFoam. For example I had to remove
Code:
constant/polyMesh/meshModifiers
for the subsequent stitching calls to work. Maybe there is some contamination of the mesh definition that is making createPatch not work?
Another thing I tried to get to the root of the problem is the following: In my createPatchDict I also create cyclicAMI patches for a pair of faces in each passage (this is because for each passage blade, my mesh is nonconformal at the tip so I need technically a GGI interface but cyclicAMI seems to do the job...). If I comment out the cyclics that I run for the periodicity (the patches that are causing the problem) then createPatch runs fine! This is further suggesting that something is happening to the patches ordering when I rotate and stitch the mesh together.
My createPatchDict: (this is for a simulation with three rotor passages)
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 3.0.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object createPatchDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
pointSync true;
// Patches to create.
patches
(
{
// Name of new patch
name PER_1;
// Dictionary to construct new patch from
patchInfo
{
type cyclic;
neighbourPatch PER_2;
transform rotational;
rotationAxis (0 0 1);
rotationCentre (0 0 0);
//matchTolerance 1E-2;
}
// How to construct: either from 'patches' or 'set'
constructFrom patches;
// If constructFrom = patches : names of patches. Wildcards allowed.
patches (PER1);
// If constructFrom = set : name of faceSet
set f0;
}
{
// Name of new patch
name PER_2;
// Dictionary to construct new patch from
patchInfo
{
type cyclic;
neighbourPatch PER_1;
transform rotational;
rotationAxis (0 0 1);
rotationCentre (0 0 0);
// transform translational;
// separationVector (0 -22.63 0);
}
// How to construct: either from 'patches' or 'set'
constructFrom patches;
// If constructFrom = patches : names of patches. Wildcards allowed.
patches (PER2);
// If constructFrom = set : name of faceSet
set f0;
}
{
// Name of new patch
name SHROUD_TIP_GGI_SIDE_11_0;
// Dictionary to construct new patch from
patchInfo
{
type cyclicAMI;
neighbourPatch SHROUD_TIP_GGI_SIDE_22_0;
// Optional: explicitly set transformation tensor.
// Used when matching and synchronising points.
transform rotational;
rotationAxis (0 0 1);
rotationCentre (0 0 0);
matchTolerance 1E-2;
}
// How to construct: either from 'patches' or 'set'
constructFrom patches;
// If constructFrom = patches : names of patches. Wildcards allowed.
patches (SHROUD_TIP_GGI_SIDE_1_0);
// If constructFrom = set : name of faceSet
set f0;
}
{
// Name of new patch
name SHROUD_TIP_GGI_SIDE_22_0;
// Dictionary to construct new patch from
patchInfo
{
type cyclicAMI;
neighbourPatch SHROUD_TIP_GGI_SIDE_11_0;
transform rotational;
rotationAxis (0 0 1);
rotationCentre (0 0 0);
matchTolerance 1E-2;
}
// How to construct: either from 'patches' or 'set'
constructFrom patches;
// If constructFrom = patches : names of patches. Wildcards allowed.
patches (SHROUD_TIP_GGI_SIDE_2_0);
// If constructFrom = set : name of faceSet
set f0;
}
{
// Name of new patch
name SHROUD_TIP_GGI_SIDE_11_1;
// Dictionary to construct new patch from
patchInfo
{
type cyclicAMI;
neighbourPatch SHROUD_TIP_GGI_SIDE_22_1;
transform rotational;
rotationAxis (0 0 1);
rotationCentre (0 0 0);
matchTolerance 1E-2;
}
// How to construct: either from 'patches' or 'set'
constructFrom patches;
// If constructFrom = patches : names of patches. Wildcards allowed.
patches (SHROUD_TIP_GGI_SIDE_1_1);
// If constructFrom = set : name of faceSet
set f0;
}
{
// Name of new patch
name SHROUD_TIP_GGI_SIDE_22_1;
// Dictionary to construct new patch from
patchInfo
{
type cyclicAMI;
neighbourPatch SHROUD_TIP_GGI_SIDE_11_1;
transform rotational;
rotationAxis (0 0 1);
rotationCentre (0 0 0);
matchTolerance 1E-2;
}
// How to construct: either from 'patches' or 'set'
constructFrom patches;
// If constructFrom = patches : names of patches. Wildcards allowed.
patches (SHROUD_TIP_GGI_SIDE_2_1);
// If constructFrom = set : name of faceSet
set f0;
}
{
// Name of new patch
name SHROUD_TIP_GGI_SIDE_11_2;
// Dictionary to construct new patch from
patchInfo
{
type cyclicAMI;
neighbourPatch SHROUD_TIP_GGI_SIDE_22_2;
transform rotational;
rotationAxis (0 0 1);
rotationCentre (0 0 0);
matchTolerance 1E-2;
}
// How to construct: either from 'patches' or 'set'
constructFrom patches;
// If constructFrom = patches : names of patches. Wildcards allowed.
patches (SHROUD_TIP_GGI_SIDE_1_2);
// If constructFrom = set : name of faceSet
set f0;
}
{
// Name of new patch
name SHROUD_TIP_GGI_SIDE_22_2;
// Dictionary to construct new patch from
patchInfo
{
type cyclicAMI;
neighbourPatch SHROUD_TIP_GGI_SIDE_11_2;
transform rotational;
rotationAxis (0 0 1);
rotationCentre (0 0 0);
matchTolerance 1E-2;
}
// How to construct: either from 'patches' or 'set'
constructFrom patches;
// If constructFrom = patches : names of patches. Wildcards allowed.
patches (SHROUD_TIP_GGI_SIDE_2_2);
// If constructFrom = set : name of faceSet
set f0;
}
);
// ************************************************************************* //
My polyMesh/boundary:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 3.0.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class polyBoundaryMesh;
location "1/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
19
(
HUB
{
type wall;
inGroups 1(wall);
nFaces 5727;
startFace 381141;
}
SHROUD
{
type wall;
inGroups 1(wall);
nFaces 8658;
startFace 386868;
}
INFLOW
{
type wall;
inGroups 1(wall);
nFaces 1260;
startFace 395526;
}
OUTFLOW
{
type patch;
nFaces 1197;
startFace 396786;
}
BLADE0
{
type wall;
inGroups 1(wall);
nFaces 2830;
startFace 397983;
}
SHROUD_TIP_GGI_SIDE_1_0
{
type wall;
inGroups 1(wall);
nFaces 268;
startFace 400813;
}
SHROUD_TIP_GGI_SIDE_2_0
{
type wall;
inGroups 1(wall);
nFaces 280;
startFace 401081;
}
PER10
{
type wall;
inGroups 1(wall);
nFaces 0;
startFace 401361;
}
PER2
{
type wall;
inGroups 1(wall);
nFaces 1344;
startFace 401361;
}
BLADE1
{
type wall;
inGroups 1(wall);
nFaces 2830;
startFace 402705;
}
SHROUD_TIP_GGI_SIDE_1_1
{
type wall;
inGroups 1(wall);
nFaces 268;
startFace 405535;
}
SHROUD_TIP_GGI_SIDE_2_1
{
type wall;
inGroups 1(wall);
nFaces 280;
startFace 405803;
}
PER11
{
type wall;
inGroups 1(wall);
nFaces 0;
startFace 406083;
}
PER21
{
type wall;
inGroups 1(wall);
nFaces 0;
startFace 406083;
}
BLADE2
{
type wall;
inGroups 1(wall);
nFaces 2830;
startFace 406083;
}
SHROUD_TIP_GGI_SIDE_1_2
{
type wall;
inGroups 1(wall);
nFaces 268;
startFace 408913;
}
SHROUD_TIP_GGI_SIDE_2_2
{
type wall;
inGroups 1(wall);
nFaces 280;
startFace 409181;
}
PER1
{
type wall;
inGroups 1(wall);
nFaces 1344;
startFace 409461;
}
PER22
{
type wall;
inGroups 1(wall);
nFaces 0;
startFace 410805;
}
)
// ************************************************************************* //
As you can see the faces that were originally supposed to be periodic in the original single passage have nFaces = 0 in the final merged and stitched mesh. PER1 and PER2 are the remaining patches that are supposed to be made cyclic. BTW im running OF/3.0.0
|