CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (http://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   Problems with rotational cyclic boundaries (http://www.cfd-online.com/Forums/openfoam-meshing/98543-problems-rotational-cyclic-boundaries.html)

TReviol March 13, 2012 10:42

Problems with rotational cyclic boundaries
 
Dear Foamers,

I am using OpenFOAM 1.6-ext and 2.1.0. In 1.6-ext I created a rotational cyclic BC without any Problems. In Version 2.1.0, I can't create these BC without any errors.
I also tried translational cyclicys with another Case. These are running without any Problems in both Versions. So, I think there is no mistake in my proceeding. The Problem occurs only for rotating problems.


Here the createPatchDict I am using for OF2.1.0:

Code:

pointSync false;

patches
(
    {
        name TRANS_PER1;

        patchInfo
        {
            type cyclic;
            neighbourPatch TRANS_PER2;

            transform rotational;
            rotationAxis (1 0 0);
            rotationCentre (0 0 0);

            matchTolerance 1E-04;
        }

        constructFrom patches;
        patches ("PERIODIC1");
    }
    {
        name TRANS_PER2;

        patchInfo
        {
            type cyclic;
            neighbourPatch TRANS_PER1;

            transform rotational;
            rotationAxis (0 0 1);
            rotationCentre (0 0 0);

            matchTolerance 1E-04;
        }

        constructFrom patches;
        patches ("periodic_sh");
    }
);

and the boundary-file is:

Code:

7
(
    SHROUD
    {
        type            wall;
        nFaces          1179;
        startFace      168915;
    }
    HUB
    {
        type            wall;
        nFaces          1025;
        startFace      170094;
    }
    AIRFOIL
    {
        type            wall;
        nFaces          8118;
        startFace      171119;
    }
    IN
    {
        type            patch;
        nFaces          534;
        startFace      179237;
    }
    OUT
    {
        type            patch;
        nFaces          248;
        startFace      179771;
    }
    PERIODIC1
    {
        type            patch;
        nFaces          762;
        startFace      180019;
    }
    periodic_sh
    {
        type            patch;
        nFaces          762;
        startFace      180781;
    }
)

When I run createPatch, the following error occurs:

Code:

...
Cannot find point in pts1 matching point 9164 coord:(67.6458 1.53543e-14 67.5526) in pts0 when using tolerance 0.000339588
Searching started from:9163 in pts1
    Compared coord:(-63.1278 -1.43289e-14 67.5526) with difference to point 130.774
    Compared coord:(-67.6458 -1.53543e-14 67.5526) with difference to point 135.292
cyclicPolyPatch::order : Writing neighbour faces to OBJ file "/scratch/reviol/Vorlesung/Sphere/TRANS_PER1_faces.obj"
cyclicPolyPatch::order : Writing my faces to OBJ file "/scratch/reviol/Vorlesung/Sphere/TRANS_PER2_faces.obj"
cyclicPolyPatch::order : Dumping currently found cyclic match as lines between corresponding face centres to file "/scratch/reviol/Vorlesung/Sphere/TRANS_PER2_faceCentres.obj"
--> FOAM Serious Error :
    From function cyclicPolyPatch::order(const primitivePatch&, labelList&, labelList&) const
    in file meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C at line 1381
    Patch:TRANS_PER2 : Cannot match vectors to faces on both sides of patch
    Perhaps your faces do not match? The obj files written contain the current match.
    Continuing with incorrect face ordering from now on!

It is possible to start the case with simpleFoam, but after a few iteration-steps, the run is crashing (continuity diverges) and it seems to be a singularity point in the rotational-BCs. In CFX the run will complete normally.

Does anyone find a mistake in my proceedings?

Regards

Thomas Reviol

stevenvanharen March 13, 2012 11:25

Hi Thomas,

If you post the case (without cyclics) I can take a look.
It is difficult to judge the case like this.

Regards,

Steven

vishalsacharya March 25, 2012 01:08

Im facing the exact same issue. Direct specification of cyclic type in blockmeshdict and then running a blockmesh gives no errors. but when i do a checkmesh, it says that the 0th vertex has issues..

What did you do in 1.6-ext that makes it work there? Can you share the method in which you did this? did you directly do this in blockmeshdict? or did you make it a patch first and then try createpatch?

~Vishal

TReviol March 25, 2012 06:24

Hi Vishal,

in OF16ext, the Problem I solved was with planar cyclic-faces. The problem I asked for above is with planar and non-planar cyclic-faces. The problem seems to be the non-planar faces. I found in many threads the same Problem: e.g http://www.cfd-online.com/Forums/ope...ferrerid=39754. The cyclic-periodic of non-planar, rotational interfaces is only working when a face in the first interface Partner is indexed with i and the corresponding face of the second interface Partner is indexed with i+n/2 where n is the total number of the interface-elements. (Please correct me if I missunderstood how createPatch works). The only way to use such faces for cyclic boundarys is to renumber the mesh. Up to now I didn't find a way for a correct renumbering.
I just rerun the case with planar faces in OF210 an OF16ext, so I didn't realize the difference. And furthermore with the knowledge about the renumbering I am not sure about the correctness of the solution with planar faces.

So I didn't find a reliable way to solve these problems. I created all meshes in ICEMCFD. I guess it is possible to create a correct numbered mesh with blockMesh, but I'm not sure.

When I find the solution I will tell you how it works. Perhaps someone else knows the solution for this problem?

Regards

Thomas

PS: here is the createPatchDict I used in OF16ext:

Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM Extend Project: Open source CFD        |
|  \\    /  O peration    | Version:  1.6-ext                              |
|  \\  /    A nd          | Web:      www.extend-project.de                |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      createPatchDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

matchTolerance 1E-3;

pointSync true;

patchInfo
(
    {
        name CYCLIC;

        dictionary
        {
            type cyclic;

            transform rotational;
            rotationAngle 90;
            rotationAxis (0 0 1);
            rotationCentre (0 0 0);
        }

        constructFrom patches;

        patches ("PERIODIC1" "PERIODIC2");
    }
);

// ************************************************************************* //


vishalsacharya March 25, 2012 22:51

I do understand. My simulation uses rotationally cyclic BC. some faces are flat and some have a profile.

In OF16ext, what you said is true. Any version of OF before 2.x uses the old cyclic specification which is to have 1 to n/2 mapping onto n/2+1 to n. This is what createPatch creates. In OF 2.x and later, the separate cyclic faces are specified separately and use the neighborPatch to know their mapping. In case you use OF16ext case in OF2.x, you can take the 16ext case and run "foamUpgradeCyclics" to make it 2.x compatible.
One more thing, if you use 2.1.0 then that is the problem. It has a bug with the rotational cyclic creation using blockmesh.... use 2.1.x and install OF using git and run git pull often to make sure you have latest files. I am using 2.1.x and my same case which gave errors in 2.1.0 now works in 2.1.x without errors and no changes made.

If your case works in 16ext, just create it there and convert it to 2.1.x using the foamUpgradeCyclics utility.

alquimista May 24, 2012 10:40

Maybe you can try with cyclic GGI.

There's more information here:

https://cmg.soton.ac.uk/community/at...LloydAug11.pdf
http://www.tfd.chalmers.se/~hani/kur...dy_2010_OP.pdf

TReviol May 6, 2013 05:32

Hi sam1364,

since OF 2.1.1., my problems with cyclics are solved. Perhaps you could also try a newer version.
I never tried the latest version, but I assume that OF 2.2.0. will also be able to handle cyclics.

Regards

Thomas

henrik July 15, 2013 10:57

Please note that the transformation in the original post (#1) is incorrect as the rotationAxis is not identical.

Henrik

Villo July 11, 2014 03:45

Hi guys,
working on OpenFoam 2.2.0 i`m having a similar problem.
Thomas, unfortunately the newest version is not solving my problem.
Is a channel with 6 inclined lateral surfaces. I need to make 4 of these boundaries cyclic (2by2).
Please check my post
http://www.cfd-online.com/Forums/ope...l-patches.html
I tried applying a rotation, renumbering mesh, modifying way to export mesh from Gambit (exported as fluent 5/6 and then imported in OpenFoam via fluent3DMeshToFoam), no way to let it work.


All times are GMT -4. The time now is 17:35.