CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Rotating Mesh, errors in Cyclic AMI interface (https://www.cfd-online.com/Forums/openfoam/177980-rotating-mesh-errors-cyclic-ami-interface.html)

WhiteW September 26, 2016 05:46

Rotating Mesh, errors in Cyclic AMI interface
 
1 Attachment(s)
Hi Foamers, I’m trying to simulate a 2D Vertical Axis Wind Turbine analysis in OpenFoam 4.0, but I’m having some troubles with cyclic AMI interface.

I have created two different meshes with Salome (Rotor and WindTunnel) and exported to OpenfOAM in *.unv format. (I have also exported them directly to OpenFOAM using the python script salomeToOpenFOAM, however the described situation is the same.)
For both these meshes I specified the surface of rotating cylinder as a face patch.
I created two OpenFAOAM folders (for rotor and WindTunnel) and in each of them I run:
Code:

ideasUnvToFoam Mesh_1.unv
ideasUnvToFoam WinTunnel.unv

Then I merge the meshes in the master case using:
Code:

mergeMeshes OpenFOAM-2D-VAWT-RO/ OpenFOAM-2D-VAWT-WT/  > log.mergeMeshes
And I use createPatch to couple the interfaces:
Code:

createPatch -overwrite > log.createPatch
Everything seems to work fine, the simulation starts, the rotor zone rotates correctly, however I notice strange results, as in the attached picture.
In the complete case, the interfaces seem to be walls and the interpolation is not correct since the streamlines in the rotating part are completely different than the outside streamlines.

I have also tried another setting:
If, in the meshes generation, I split the cylindrical interface in two half (upper part and lower part) and then I couple them with two cyclicAMI interfaces, I noticed that in OpenFOAM the renumberMesh command does not work and it gives an error about the matching of the source and target surfaces.. But they are perfectly identical, if check the mesh in Salome or if I open the mesh in Paraview. I can’t explain this..


Code:

From function void Foam::AMIMethod<SourcePatch, TargetPatch>::checkPatches() const [with SourcePatch = Foam::PrimitivePatch<Foam::face, Foam::SubList, const Foam::Field<Foam::Vector<double> >&>; TargetPatch = Foam::PrimitivePatch<Foam::face, Foam::SubList, const Foam::Field<Foam::Vector<double> >&>]
    in file lnInclude/AMIMethod.C at line 57
    Source and target patch bounding boxes are not similar
    source box span    : (1.6 0.8 0.01)
    target box span    : (0.961359 1.58354 0.01)
    source box          : (-0.8 7.34788e-17 0) (0.8 0.8 0.01)
    target box          : (-0.799999 -0.799984 0) (0.16136 0.783558 0.01)
    inflated target box : (-0.892626 -0.892611 -0.0926271) (0.253987 0.876185 0.102627)

Anyone can help me? Is my procedure correct?
Thanks,
WhiteW

Tobi September 26, 2016 09:05

Please provide the necessary files:
  • createPatchDict
  • boundary
  • U file
Otherwise we are not able to help you. I never used mergeMesh (maybe I should) but if you merge the meshes, are the boundaries of both still there or not? If they are there, you do not need to execute createPatch. If you mesh is moving with moveDynamicMesh and everything is fine, you should only have a problem with the correct boundary conditions.

WhiteW September 26, 2016 09:12

1 Attachment(s)
Hi Tobi, thanks for replying.
I just realized that the problem was the definition of the patches in createPatchDict. The setting I was using was wrong:


Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      createPatchDict;
}

pointSync false;

patches
(
    { 
        name  per_int_E;
        patchInfo
        { 
            type cyclicAMI;
            neighbourPatch per_int_I;
            transform rotational;
            rotationAxis (0 0 1);
            rotationCentre (0 0 0);
            matchTolerance 1E-1;
        }
        constructFrom patches;
        patches (IntCirc_extruded);
    }
    { 
        name per_int_I;
        patchInfo
        { 
            type cyclicAMI;
            neighbourPatch per_int_E;
            transform rotational;
            rotationAxis (0 0 1);
            rotationCentre (0 0 0);
            matchTolerance 1E-1;
        }
        constructFrom patches;
        patches (Internal1);
    }

    {
        name Blade_extruded_1;
        patchInfo
        {
            type            wall;
        }
        constructFrom patches;
        patches (Blade_extruded);
    }

    {
        name Blade_extruded_rotated_1;
        patchInfo
        {
            type            wall;
        }
        constructFrom patches;
        patches (Blade_extruded_rotated);
    }

    {
        name Rotor_Top_1;
        patchInfo
        {
            type            empty;
        }
        constructFrom patches;
        patches (Rotor_Top);
    }

    {
        name Rotor_Bot_1;
        patchInfo
        {
            type            empty;
        }
        constructFrom patches;
        patches (Rotor_Bot);
    }

    {
        name PiaWT_1;
        patchInfo
        {
            type            empty;
        }
        constructFrom patches;
        patches (PiaWT);
    }

    {
        name WC_PiaWT_Top_1;
        patchInfo
        {
            type            empty;
        }
        constructFrom patches;
        patches (WC_PiaWT_top);
    }

    {
        name Sides_extruded_1;
        patchInfo
        {
            type            symmetry;
        }
        constructFrom patches;
        patches (Sides_extruded);
    }


);

I was using the option "transform rotational;" for the AMIpatches, the correct option is:

Code:

            transform      noOrdering;
Now it works fine, ;)

WhiteW


All times are GMT -4. The time now is 22:40.