CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Problems using reconstructPar on a case involving AMI (http://www.cfd-online.com/Forums/openfoam/100325-problems-using-reconstructpar-case-involving-ami.html)

Kaskade April 24, 2012 02:46

Problems using reconstructPar on a case involving AMI
 
Hello.

I've set up a case using 3 AMIs and MRFSimpleFOAM. It runs fine on one processor, it even runs fine on multiple processors. But I am running into trouble when I try to piece it back together after a parrallel run.

Code:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 100

Time = 100

Reconstructing FV fields

    Reconstructing volScalarFields

        p
AMI: Creating addressing and weights between 1628 source faces and 1071 target faces
--> FOAM Warning :
    From function AMIInterpolation<SourcePatch, TargetPatch>::checkPatches(const primitivePatch&, const primitivePatch&)
    in file lnInclude/AMIInterpolation.C at line 146
    Source and target patch bounding boxes are not similar
    source box span    : (8.5e-10 0.55 0.55)
    target box span    : (1.07e-09 0.0576107 0.238538)
    source box          : (0.0423665 -0.275 -0.275) (0.0423665 0.275 0.275)
    target box          : (0.042366 0.217361 -0.136582) (0.042366 0.274972 0.101956)
    inflated target box : (0.0300962 0.205091 -0.148852) (0.0546358 0.287242 0.114226)


--> FOAM FATAL ERROR:
Unable to set source and target faces

    From function void Foam::cyclicAMIPolyPatch::setNextFaces(label&, label&, const primitivePatch&, const primitivePatch&, const boolList&, labelList&, const DynamicList<label>&) const
    in file lnInclude/AMIInterpolation.C at line 878.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) in "/software/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::error::abort() in "/software/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2  at cyclicAMIPolyPatch.C:0
#3  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> > >::update(Foam::PrimitivePatch<Foam::face, Foam::SubList, Foam::Field<Foam::Vector<double> > const&, Foam::Vector<double> > const&, Foam::PrimitivePatch<Foam::face, Foam::SubList, Foam::Field<Foam::Vector<double> > const&, Foam::Vector<double> > const&) in "/software/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libmeshTools.so"
#4  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> > >::AMIInterpolation(Foam::PrimitivePatch<Foam::face, Foam::SubList, Foam::Field<Foam::Vector<double> > const&, Foam::Vector<double> > const&, Foam::PrimitivePatch<Foam::face, Foam::SubList, Foam::Field<Foam::Vector<double> > const&, Foam::Vector<double> > const&, Foam::autoPtr<Foam::searchableSurface> const&, Foam::faceAreaIntersect::triangulationMode const&, bool) in "/software/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libmeshTools.so"
#5  Foam::cyclicAMIPolyPatch::resetAMI() const in "/software/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libmeshTools.so"
#6  Foam::cyclicAMIPolyPatch::AMI() const in "/software/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libmeshTools.so"
#7  Foam::tmp<Foam::Field<double> > Foam::cyclicAMIPolyPatch::interpolate<double>(Foam::tmp<Foam::Field<double> > const&) const in "/software/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#8  Foam::cyclicAMIFvPatch::makeWeights(Foam::Field<double>&) const in "/software/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#9  Foam::surfaceInterpolation::makeWeights() const in "/software/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#10  Foam::surfaceInterpolation::weights() const in "/software/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#11  Foam::fvPatch::weights() const in "/software/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#12  Foam::coupledFvPatchField<double>::evaluate(Foam::UPstream::commsTypes) in "/software/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#13  Foam::cyclicFvPatchField<double>::cyclicFvPatchField(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) in "/software/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#14  Foam::fvPatchField<double>::adddictionaryConstructorToTable<Foam::cyclicFvPatchField<double> >::New(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) in "/software/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#15  Foam::fvPatchField<double>::New(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) in "/software/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/bin/reconstructPar"
#16  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::GeometricBoundaryField(Foam::fvBoundaryMesh const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) in "/software/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/bin/reconstructPar"
#17  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::readField(Foam::dictionary const&) in "/software/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/bin/reconstructPar"
#18  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::readField(Foam::Istream&) in "/software/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/bin/reconstructPar"
#19  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject const&, Foam::fvMesh const&) in "/software/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/bin/reconstructPar"
#20 
 in "/software/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/bin/reconstructPar"
#21 
 in "/software/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/bin/reconstructPar"
#22 
 in "/software/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/bin/reconstructPar"
#23  __libc_start_main in "/lib64/libc.so.6"
#24 
 in "/software/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/bin/reconstructPar"

I used scotch to decompose it, which worked on a previous case, set up analogous to the propeller-tutorial. This mesh however has been generated using ICEM and CFX. My first guess was that OF210 can't handle multiple AMIs, but fusing them using createPatch led to the pretty much the same error. Can anyone point me in the right direction?

nimasam April 30, 2012 03:27

maybe you need first use reconstructParMesh for each time step then using reconstructPar

Kaskade April 30, 2012 04:23

I'll try but I didn't need to use it before.

I used createPatch to make some patches periodic, which created a polyMesh-Directory in timestep 0. Does this maybe cause problems?

Kaskade June 23, 2012 05:32

Update to OF211 fixed the issue.

dhruv June 29, 2012 10:50

Quote:

Originally Posted by Kaskade (Post 367927)
Update to OF211 fixed the issue.

Hi,

Did you manage to solve the problem? I am having the same issue in my Geometry.

As suggested by Kaskade, I updated my OF version to 2.1.1, but it is still giving me the same message.

Code:

AMI: Creating addressing and weights between 11909 source faces and 12860 target faces
--> FOAM Warning :
    From function AMIInterpolation<SourcePatch, TargetPatch>::checkPatches(const primitivePatch&, const primitivePatch&)
    in file lnInclude/AMIInterpolation.C at line 146
    Source and target patch bounding boxes are not similar
    source box span    : (9.4 0 2.729063)
    target box span    : (9.4 0 2.729063)
    source box          : (2.35 3 -2.753594) (11.75 3 -0.02453125)
    target box          : (2.3594 60.6 -2.753594) (11.7594 60.6 -0.02453125)
    inflated target box : (1.869993 60.11059 -3.243001) (12.24881 61.08941 0.464876)


--> FOAM FATAL ERROR:
Unable to find initial target face

    From function void Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcAddressing(const primitivePatch&, const primitivePatch&, label, label)
    in file lnInclude/AMIInterpolation.C at line 1009.

In the boundary mesh, the number of faces for the patches which are in cyclic AMI are different. It is strange because, it works for one another case I have, which also has a difference between the number of faces.

Could anyone help me in this regard. I have to have cyclic boundary condition on these patches.

Thanks,
Dhruv.

Kaskade June 29, 2012 12:51

The difference in the number of faces should not be a problem, since part of an AMIs job is to mediate between meshes with different levels refinement.

Are you sure everything else is set up correctly? CofG, Rotational Axis? Are the meshes really correctly positioned or is there a gap or an overlap?

What did you use to create the mesh?

dhruv July 2, 2012 06:32

Quote:

Originally Posted by Kaskade (Post 368942)
The difference in the number of faces should not be a problem, since part of an AMIs job is to mediate between meshes with different levels refinement.

Are you sure everything else is set up correctly? CofG, Rotational Axis? Are the meshes really correctly positioned or is there a gap or an overlap?

What did you use to create the mesh?


Yes, the number of faces should not be a problem, since this is what AMI is used for. For your questions:

1. Where can I find the information regarding the CofG, Rotational Axis, etc.?
2. The two faces in the mesh are at a distance of 9.4 units from each other in the x direction. So, the patches which have cyclic AMI in the boundary file looks like this

Code:

Out
{
        type            cyclicAMI;
        nFaces          12860;
        startFace      5101486;
        faces          ( ( 1 2 6 5 ) );
        matchTolerance  0.0001;
        neighbourPatch  In;
        transform      translational;
        separationVector (-9.4 0 0);
    }

In
    {
        type            cyclicAMI;
        nFaces          11909;
        startFace      5055469;
        faces          ( ( 0 3 7 4 ) );
        matchTolerance  0.0001;
        neighbourPatch  Out;
        transform      translational;
        separationVector (9.4 0 0);
    }

3. I am using snappyHexMesh to create the mesh. I also changed the matchTolerance to vary between 1e-05 to 1 to see, if it has to do anything with the tolerance levels, but everytime the same error pops up. Any suggestions?

Regards,
Dhruv.

Kaskade July 2, 2012 08:53

1. In the dynamicMeshDict. I thought maybe something was rotating the wrong way.

2. Why do you have 'faces', 'transform' and 'separationVector' in yours. The last two are for cyclic not cyclicAMI. Mine look like this.
Code:

   
  AMI2
    {
        type            cyclicAMI;
        nFaces          7268;
        startFace      2103511;
        matchTolerance  0.0001;
        neighbourPatch  AMI1;
        transform      noOrdering;
    }
    AMI1
    {
        type            cyclicAMI;
        nFaces          34254;
        startFace      2110779;
        matchTolerance  0.0001;
        neighbourPatch  AMI2;
        transform      noOrdering;
    }


3. In some other thread they solved some problem with their AMI by increasing the refinement of their mesh near the AMI, I think. Maybe SHM is generating a mesh that is not curved enough.

dhruv July 2, 2012 09:27

Quote:

Originally Posted by Kaskade (Post 369281)
1. In the dynamicMeshDict. I thought maybe something was rotating the wrong way.

2. Why do you have 'faces', 'transform' and 'separationVector' in yours. The last two are for cyclic not cyclicAMI. Mine look like this.
Code:

   
  AMI2
    {
        type            cyclicAMI;
        nFaces          7268;
        startFace      2103511;
        matchTolerance  0.0001;
        neighbourPatch  AMI1;
        transform      noOrdering;
    }
    AMI1
    {
        type            cyclicAMI;
        nFaces          34254;
        startFace      2110779;
        matchTolerance  0.0001;
        neighbourPatch  AMI2;
        transform      noOrdering;
    }

3. In some other thread they solved some problem with their AMI by increasing the refinement of their mesh near the AMI, I think. Maybe SHM is generating a mesh that is not curved enough.

Thanks for the reply. :)

1. The case is stationary. So, I dont have a dynamicMeshDict.
2. I tried removing the faces, and making the boundary file like you have posted above, but still I get the same error.
3. I will now try to refine the mesh better to see if it works

Thanks,

Dhruv.

Kaskade July 2, 2012 13:09

This board can be pretty annoying, since many questions remain unanswered, so I try to be of help.

Could you maybe send a picture of your mesh? What is the shape of the AMI? Just a flat face or a cylinder like in the propeller case?

dhruv July 3, 2012 04:49

AMI patches
 
Quote:

Originally Posted by Kaskade (Post 369335)
This board can be pretty annoying, since many questions remain unanswered, so I try to be of help.

Could you maybe send a picture of your mesh? What is the shape of the AMI? Just a flat face or a cylinder like in the propeller case?

Hi Kaskade,

Can you send me your mail ID. I cannot post the picture on the forum.

Thanks,
Dhruv.

sherifkadry January 27, 2013 16:56

You ever get this problem fixed? I have the same issue

Quote:

Originally Posted by dhruv (Post 369472)
Hi Kaskade,

Can you send me your mail ID. I cannot post the picture on the forum.

Thanks,
Dhruv.


zordiack March 22, 2014 08:35

cyclicAMI is broken in build 2.3.x-9d0ee4591849
 
I'm having this exactly same problem and I tried to file a bug report but it wouldn't let me (says Forbidden). I'm running the latest git version 2.3.x so this is definitely not fixed.

I tried to run reconstructPar after successful calculation but it crashes. It has worked just fine before.

I have the same case on another computer with build 2.3.x-4ef1b5eeb58d and if the case is run with this version the reconstructPar is working fine. I tried using the older reconstructPar with the case run with newer version but it gives the same error message, therefore the cyclicAMI is somehow broken in the current git version.

The strange thing is that the calculation runs just fine with the new version and based on the cuttingplanes the results also look fine. Only reconstructing the case is not working.

This is a major bug and I wish it's resolved quickly. Could this have something to do with the commit https://github.com/OpenFOAM/OpenFOAM...d2ccf500140c8?



Code:

Reconstructing volVectorFields

        U
AMI: Creating addressing and weights between 6 source faces and 6654 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.0022143419 0.00319520457 0.001766738)
    target box span    : (0.3591645372 0.04399999883 0.1611334531)
    source box          : (-0.1433046982 0.03092641575 -0.1791014874) (-0.1410903563 0.03412162032 -0.1773347494)
    target box          : (-0.2179735666 -0.00800000038 0.06686654698) (0.1411909706 0.03599999845 0.2280000001)
    inflated target box : (-0.2377788156 -0.02780524933 0.04706129803) (0.1609962196 0.0558052474 0.2478052491)


--> FOAM FATAL ERROR:
Unable to find initial target face

    From function void Foam::AMIMethod<SourcePatch, TargetPatch>::initialise(labelListList&, scalarListList&, labelListList&, scalarListList&, label&, label&)
    in file lnInclude/AMIMethod.C at line 149.


wyldckat March 22, 2014 09:55

Greetings Pekka,

Quote:

Originally Posted by zordiack (Post 481467)
I would have reported this through mantis but for some reason it keeps saying forbidden.

Try logging out - http://www.openfoam.org/mantisbt/logout_page.php - and then logging back in.

In the mean time, you can try undoing only that specific commit:
Code:

foam
git revert 8b9a35d3e261e086c5fa20b55bdd2ccf500140c8
./Allwmake

Best regards,
Bruno

dkxls March 22, 2014 11:07

Quote:

Originally Posted by zordiack (Post 481458)
I'm having this exactly same problem and I tried to file a bug report but it wouldn't let me (says Forbidden). I'm running the latest git version 2.3.x so this is definitely not fixed.

I cannot comment on your actual bug, but about reporting it. ;)
This "Forbidden" error happens sometimes. For me it occurred mostly when I copy&past larger text/errors logs. Though, I couldn't pinpoint what exactly goes wrong, but happened only 2-3 times.

wyldckat March 22, 2014 13:04

For future reference, Pekka has reported this issue here: http://www.openfoam.org/mantisbt/view.php?id=1234

wyldckat March 22, 2014 16:52

@zordiack: I've finished building the latest OpenFOAM 2.3.x, commit 9d0ee45918 and tried to run the following tutorials:
  • "incompressible/pimpleDyMFoam/mixerVesselAMI2D" - ran Allrun
  • "incompressible/pimpleDyMFoam/oscillatingInletACMI2D" - ran Allrun-parallel
  • "incompressible/pimpleDyMFoam/propeller"- ran Allrun and left it running for a while, stopped and reconstructed it.
And in all of them, everything ran just fine.
It's possible that I'm not using a particular feature that you're using, but since I'm not very familiar with AMI in OpenFOAM, it would be helpful to know which tutorial to test with, to see if the problem is reproducible.

zordiack March 24, 2014 03:38

The problem was not with AMI, it was groovyBC and swak4Foam. I'm using the development version of swak4Foam and once I commented out the libs in controlDict reconstructPar started working again.

So if you're encountering some weird errors regarding decompose/reconstruct, check your libs for any "nonstandard" libs. It still puzzles me how could it run fine and then not recontruct with the libs.


All times are GMT -4. The time now is 05:52.