CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   creating cyclicAMI patches (https://www.cfd-online.com/Forums/openfoam/103119-creating-cyclicami-patches.html)

dhruv June 11, 2012 11:12

creating cyclicAMI patches
 
Hello Foamers,

I am trying to create cyclic AMI patch in my geometry but everytime I am running into the following error, when I run snappyHexMesh.

Code:


Shell refinement iteration 0
----------------------------

Marked for refinement due to refinement shells    : 0 cells.
AMI: Creating addressing and weights between 16749 source faces and 15519 target faces
AMI: Patch source weights min/max/average = 1, 1, 1
AMI: Patch target weights min/max/average = 1, 1, 1
Determined cells to refine in = 14.14 s
Selected for internal refinement : 6244 cells (out of 2263421)
Edge intersection testing:
    Number of edges            : 7465844
    Number of edges to retest  : 480681
    Number of intersected edges : 1081842
Refined mesh in = 14.84 s
After refinement shell refinement iteration 0 : cells:2307129  faces:7465844  points:2851079
Cells per refinement level:
    0    52964
    1    290877
    2    1963288

Shell refinement iteration 1
----------------------------

Marked for refinement due to refinement shells    : 0 cells.


--> FOAM FATAL ERROR:
Supplied field size is not equal to target patch size
    source patch  = 16749
    target patch  = 15519
    supplied field = 16164


    From function AMIInterpolation::interpolateToSource(const Field<Type>) const
    in file /soft/OpenFOAM/OpenFOAM-2.1.x_20120419/src/meshTools/lnInclude/AMIInterpolation.C at line 1931.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) in "/soft/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::error::abort() in "/soft/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2  void Foam::AMIInterpolation<Foam::PrimitivePatch<Foam::face, Foam::SubList, Foam::Field<Foam::Vector<double> > const&, Foam::Vector<double> >, Foam::PrimitivePatch<Foam::face, Foam::SubList, Foam::Field<Foam::Vector<double> > const&, Foam::Vector<double> > >::interpolateToSource<Foam::refinementDistanceData, Foam::combine<Foam::refinementDistanceData, int> >(Foam::UList<Foam::refinementDistanceData> const&, Foam::combine<Foam::refinementDistanceData, int> const&, Foam::List<Foam::refinementDistanceData>&) const in "/soft/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libdynamicMesh.so"
#3  Foam::FaceCellWave<Foam::refinementDistanceData, int>::handleAMICyclicPatches() in "/soft/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libdynamicMesh.so"
#4  Foam::FaceCellWave<Foam::refinementDistanceData, int>::iterate(int) in "/soft/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libdynamicMesh.so"
#5  Foam::FaceCellWave<Foam::refinementDistanceData, int>::FaceCellWave(Foam::polyMesh const&, Foam::List<int> const&, Foam::List<Foam::refinementDistanceData> const&, Foam::UList<Foam::refinementDistanceData>&, Foam::UList<Foam::refinementDistanceData>&, int, int&) in "/soft/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libdynamicMesh.so"
#6  Foam::hexRef8::consistentSlowRefinement2(int, Foam::List<int> const&, Foam::List<int> const&) const in "/soft/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libdynamicMesh.so"
#7  Foam::autoRefineDriver::shellRefine(Foam::refinementParameters const&, int) in "/soft/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libautoMesh.so"
#8  Foam::autoRefineDriver::doRefine(Foam::dictionary const&, Foam::refinementParameters const&, bool, Foam::dictionary const&) in "/soft/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libautoMesh.so"
#9 
 in "/soft/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/bin/snappyHexMesh"
#10  __libc_start_main in "/lib/libc.so.6"
#11 
 in "/soft/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/bin/snappyHexMesh"
Aborted

I have the following patches for AMI, generated after running blockMesh.

Code:

AMI1
    {
        type            cyclicAMI;
        nFaces          3000;
        startFace      357000;
        matchTolerance  0.0001;
        neighbourPatch  AMI2;
        transform      translational;
        separationVector (14.3 0 0);
    }
    AMI2
    {
        type            cyclicAMI;
        nFaces          3000;
        startFace      360000;
        matchTolerance  0.0001;
        neighbourPatch  AMI1;
        transform      translational;
        separationVector (-14.3 0 0);
    }

The separation vector is the distance between the two patches in the x-direction. Can some one explain where I am going wrong. Any help will be much appreciated.

Thanks,
Dhruv

louisgag June 18, 2012 10:03

Hello Dhruv,

It might be easier for you to create the AMI patches without snappyHexMesh knowing that they are such patches. It is done that way in the tutorials/incompressible/pimpleDyMFoam/propeller tutorial, using a featureEdge condition in snappyHexMeshDict and then creating the AMI patches.

-Louis


All times are GMT -4. The time now is 06:43.