CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Pre-Processing

CyclicAMI issues

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Display Modes
Old   November 16, 2015, 16:59
Default CyclicAMI issues
  #1
Member
 
VA
Join Date: Mar 2015
Location: IN, USA
Posts: 30
Rep Power: 3
vabishek is on a distinguished road
Hello FOAMers,

I am trying to set-up a very simple geometry ( a rectangular channel) that has cyclic boundary conditions on the side walls. The createPatch works perfectly when the rectangular channel is perfectly straight. The blockMeshDict file looks like:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;

vertices
(
  (-0.040 0.5 0.0)       //1
  (0.0400 0.5 0.0)       //2
  (0.04 1 0.0)   //3
  (-0.04 1 0.0)       //4
  (-0.040 0.5 0.05)    //5
  (0.0400 0.5 0.05)    //6
  (0.04 1 0.05)          //7
  (-0.04 1 0.05)    //8
);

blocks
(
    hex (0 1 2 3 4 5 6 7) (20 20 20) simpleGrading (1 1 1)
   
); 

edges
(
);

boundary
(
  topWall
  {
   type symmetry;
   faces
   (
    //top
    (4 5 6 7)
   );
  }

  bottomWall
  {
   type symmetry;
   faces
   (
    //Bottom
    (0 1 2 3)
   );
  } 

  Inlet
  {
   type patch;
   faces
   (
    (0 1 5 4)
   );
  }
  
  leftWall_1
  {
   type patch;
   faces
   (
    (0 4 7 3)
   );
  }


  rightWall_1
  {
   type patch;
   faces
   (
    (1 5 6 2)
    );
  }
   
  Outlet
  {
   type patch;
   faces
   (
    (3 2 6 7)
   );
  }
);

mergeMatchPairs();
// ************************************************************************* //
And, my createPatchDict

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      createPatchDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

// Do a synchronisation of coupled points after creation of any patches.
// Note: this does not work with points that are on multiple coupled patches
//       with transformations (i.e. cyclicAMIAMI;s).
pointSync false;

// Patches to create.
patches
(
    {
        //- Master side patch
        name            leftWall;
        patchInfo
        {
            type            cyclicAMI;
            neighbourPatch  rightWall;
            transform       rotational;
        rotationAxis    (0 0 1);
        rotationCentre   (0 0 0);
        matchTolerance 1e-7;
        }
        constructFrom patches;
        patches (leftWall_1);
    }

    {
        //- Slave side patch
        name            rightWall;
        patchInfo
        {
            type            cyclicAMI;
            neighbourPatch  leftWall;
            transform       rotational;
            rotationAxis    (0 0 1);
            rotationCentre   (0 0 0);
         matchTolerance 1e-7;
        }
        constructFrom patches;
        patches (rightWall_1);
    }
);

// ************************************************************************* //
The result from createPatch -overwrite is

Code:
Doing topology modification to order faces.

AMI: Creating addressing and weights between 400 source faces and 400 target faces
AMI: Patch source sum(weights) min/max/average = 1, 1, 1
AMI: Patch target sum(weights) min/max/average = 1, 1, 1
Not synchronising points.
However, when I make the channel inclined, the patches do not match perfectly. The blockMeshDict for this case looks like:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;

vertices
(
   //inclined
   (-0.04 0.5 0.0)       //1
   (0.04 0.5 0.0)       //2
   (0.54 1 0.0)      //3
   (0.46 1 0.0)       //4
   (-0.04 0.5 0.05)    //5
   (0.04 0.5 0.05)    //6
   (0.54 1 0.05)      //7
   (0.46 1 0.05)    //8
);

blocks
(
    hex (0 1 2 3 4 5 6 7) (20 20 20) simpleGrading (1 1 1)
   
); 

edges
(
);

boundary
(
  topWall
  {
   type symmetry;
   faces
   (
    //top
    (4 5 6 7)
   );
  }

  bottomWall
  {
   type symmetry;
   faces
   (
    //Bottom
    (0 1 2 3)
   );
  } 

  Inlet
  {
   type patch;
   faces
   (
    (0 1 5 4)
   );
  }
  
  leftWall_1
  {
   type patch;
   faces
   (
    (0 4 7 3)
   );
  }


  rightWall_1
  {
   type patch;
   faces
   (
    (1 5 6 2)
    );
  }
   
  Outlet
  {
   type patch;
   faces
   (
    (3 2 6 7)
   );
  }
);

mergeMatchPairs();
// ************************************************************************* //
The corresponding createPatchDict is

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      createPatchDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

// Do a synchronisation of coupled points after creation of any patches.
// Note: this does not work with points that are on multiple coupled patches
//       with transformations (i.e. cyclicAMIAMI;s).
pointSync false;

// Patches to create.
patches
(
    {
        //- Master side patch
        name            leftWall;
        patchInfo
        {
            type            cyclicAMI;
            neighbourPatch  rightWall;
            transform       rotational;
        rotationAxis    (0 0 1);
        rotationCentre   (0.5 0 0);
        matchTolerance 1e-7;
        }
        constructFrom patches;
        patches (leftWall_1);
    }

    {
        //- Slave side patch
        name            rightWall;
        patchInfo
        {
            type            cyclicAMI;
            neighbourPatch  leftWall;
            transform       rotational;
            rotationAxis    (0 0 1);
            rotationCentre   (0.5 0 0);
         matchTolerance 1e-7;
        }
        constructFrom patches;
        patches (rightWall_1);
    }
);

// ************************************************************************* //
The result from createPatch -ovewrite for this case looks like:

Code:
Doing topology modification to order faces.

AMI: Creating addressing and weights between 400 source faces and 400 target faces
--> FOAM Warning : 
    From function AMIMethod<SourcePatch, TargetPatch>::checkPatches()
    in file lnInclude/AMIMethod.C at line 57
    Source and target patch bounding boxes are not similar
    source box span     : (0.5 0.5 0.05)
    target box span     : (0.45792892 0.53879598 0.05)
    source box          : (-0.04 0.5 0) (0.46 1 0.05)
    target box          : (0.0010730179 0.4611636 0) (0.45900194 0.99995958 0.05)
    inflated target box : (-0.034370599 0.42571998 -0.035443617) (0.49444555 1.0354032 0.085443617)
AMI: Patch source sum(weights) min/max/average = 0.98000598, 1, 0.9990003
AMI: Patch target sum(weights) min/max/average = 0.98000598, 1, 0.9990003
Not synchronising points.
It looks like there is no perfect match between the faces, and some "points' on the target face are not being captured accurately. Am I missing something here? Any comments/suggestions would help.

Thanks,

Abishek

PS: Link for test cases: https://www.dropbox.com/sh/uwj5uq6mo...v15KWIqma?dl=0
vabishek is offline   Reply With Quote

Old   December 6, 2015, 17:37
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,644
Blog Entries: 39
Rep Power: 99
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Quick answer: The transformation here cannot be rotational, it has to be translational:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      createPatchDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

// Do a synchronisation of coupled points after creation of any patches.
// Note: this does not work with points that are on multiple coupled patches
//       with transformations (i.e. cyclicAMIAMI;s).
pointSync false;

// Patches to create.
patches
(
    {
        //- Master side patch
        name            leftWall;
        patchInfo
        {
            type            cyclicAMI;
            neighbourPatch  rightWall;
            transform       translational;
            separationVector  (0.08 0.0 0.0);
            matchTolerance 1e-7;
        }
        constructFrom patches;
        patches (leftWall_1);
    }

    {
        //- Slave side patch
        name            rightWall;
        patchInfo
        {
            type            cyclicAMI;
            neighbourPatch  leftWall;
            transform       translational;
            separationVector  (-0.08 0.0 0.0);
            matchTolerance 1e-7;
        }
        constructFrom patches;
        patches (rightWall_1);
    }
);

// ************************************************************************* //
vabishek likes this.
wyldckat is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
time step continuity problem in VAWT simulation lpz_michele OpenFOAM Running, Solving & CFD 4 October 15, 2015 06:19
Time step continuity error lpz_michele OpenFOAM Running, Solving & CFD 0 October 12, 2015 06:05
Boundary Layer strange result fernexda OpenFOAM Running, Solving & CFD 14 January 15, 2015 08:21
problem with cyclicAMI and wall distance Maff OpenFOAM Bugs 5 August 14, 2014 14:41
CyclicAMI, groovyBC issues sherifkadry OpenFOAM Running, Solving & CFD 12 November 18, 2013 19:20


All times are GMT -4. The time now is 21:44.