|
[Sponsors] |
Possible bug with stitchMesh and cyclics in OpenFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 21, 2016, 09:00 |
Possible bug with stitchMesh and cyclics in OpenFoam
|
#1 |
Member
Jack
Join Date: May 2015
Posts: 98
Rep Power: 11 |
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 Code:
transformPoints Code:
-rotate 2) Then I use Code:
mergeMeshes 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 Code:
stitchMesh 4) The final thing that remains is to run Code:
createPatch 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 Code:
constant/polyMesh/meshModifiers 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; } ); // ************************************************************************* // 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; } ) // ************************************************************************* // Last edited by Jack001; May 21, 2016 at 10:58. |
|
Tags |
cyclics, openfoam, preprocessing |
|
|