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

CyclicAMI issues

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 16, 2015, 15:59
Default CyclicAMI issues
  #1
Member
 
VA
Join Date: Mar 2015
Location: ON, Canada
Posts: 30
Rep Power: 11
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, 16:37
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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);
    }
);

// ************************************************************************* //
wolfindark and vabishek like this.
wyldckat is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[swak4Foam] CyclicAMI, groovyBC issues sherifkadry OpenFOAM Community Contributions 21 January 14, 2021 11:43
time step continuity problem in VAWT simulation lpz_michele OpenFOAM Running, Solving & CFD 5 February 22, 2018 19:50
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 07:21
problem with cyclicAMI and wall distance Maff OpenFOAM Bugs 5 August 14, 2014 14:41


All times are GMT -4. The time now is 02:23.