CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   cyclicAMI (https://www.cfd-online.com/Forums/openfoam-solving/185165-cyclicami.html)

rvilum March 20, 2017 09:48

cyclicAMI
 
When using 'moveDynamicMesh -checkAMI', I found the next problem:

Calculating AMI weights between owner patch: AMI1 and neighbour patch: AMI2
AMI: Creating addressing and weights between 46919 source faces and 47636 target faces


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

From function void Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::setNextFaces(Foam::label&, Foam::label&, Foam::label&, const boolList&, Foam::labelList&, const Foam::DynamicList<int>&, bool) 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> >&>; Foam::label = int; Foam::boolList = Foam::List<bool>; Foam::labelList = Foam::List<int>]
in file lnInclude/faceAreaWeightAMI.C at line 287.

FOAM aborting

#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::error::abort() at ??:?
#2 Foam::faceAreaWeightAMI<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> > >::calcAddressing(Foam::List<Foam::DynamicList<int , 0u, 2u, 1u> >&, Foam::List<Foam::DynamicList<double, 0u, 2u, 1u> >&, Foam::List<Foam::DynamicList<int, 0u, 2u, 1u> >&, Foam::List<Foam::DynamicList<double, 0u, 2u, 1u> >&, int, int) at ??:?
#3 Foam::faceAreaWeightAMI<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> > >::calculate(Foam::List<Foam::List<int> >&, Foam::List<Foam::List<double> >&, Foam::List<Foam::List<int> >&, Foam::List<Foam::List<double> >&, int, int) at ??:?
#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> > >::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&) at ??:?
#5 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> > >::constructFromSurface(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&) at ??:?
#6 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::fac e, 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, 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> > >::interpolationMethod const&, double, bool) at ??:?
#7 Foam::cyclicAMIPolyPatch::resetAMI(Foam::AMIInterp olation<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> > >::interpolationMethod const&) const at ??:?
#8 Foam::cyclicAMIPolyPatch::AMI() const at ??:?
#9 ? at ??:?
#10 ? at ??:?
#11 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#12 ? at ??:?


Somebody knows why?

Thanks a lot

dupeng May 12, 2017 09:44

Hello Rvilum,
Have you solved this problem? I intend to simulate a rotational propeller. I made the static and rotational mesh separately and then merged together. Cell zones for the rotational part is also created. But When I used movedynamimesh -checkAMI command, this error shows up. The message is similar with yours as the following. How did you solve the problem? Thanks



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

Create mesh for time = 0

Selecting dynamicFvMesh solidBodyMotionFvMesh
Selecting solid-body motion function rotatingMotion
Applying solid body motion to cellZone region0
Writing VTK files with weights of AMI patches.

forces forces:
Not including porosity effects

Time = 0.001
solidBodyMotionFunctions::rotatingMotion::transfor mation(): Time = 0.001 transformation: ((-7.65989679097365e-05 -0.0123718033951339 -0.000361315886366675) (0.999554671044406 (0.0291917815378812 0 -0.00618865768603081)))
--> FOAM Warning :
From function solidBodyMotionFvMesh::update()
in file solidBodyMotionFvMesh/solidBodyMotionFvMesh.C at line 237
Did not find volVectorField U Not updating Uboundary conditions.
solidBodyMotionFunctions::rotatingMotion::transfor mation(): Time = 0.001 transformation: ((-7.65989679097365e-05 -0.0123718033951339 -0.000361315886366675) (0.999554671044406 (0.0291917815378812 0 -0.00618865768603081)))
Point usage OK.
Upper triangular ordering OK.
Topological cell zip-up check OK.
Face vertices OK.
<<Number of duplicate (not baffle) faces found: 8. This might indicate a problem.
<<Number of faces with non-consecutive shared points: 12. This might indicate a problem.
Mesh topology OK.
Boundary openness (4.55149570188063e-17 1.68228195227532e-16 -4.07866813090012e-16) OK.
Max cell openness = 7.79650890720028e-16 OK.
Max aspect ratio = 57.7159210203143 OK.
Minimum face area = 1.47864610164646e-09. Maximum face area = 0.821492952870123. Face area magnitudes OK.
Min volume = 7.07466805571213e-13. Max volume = 0.167727098125986. Total volume = 2219.84335159937. Cell volumes OK.
Mesh non-orthogonality Max: 64.9999413605067 average: 8.21859506319915
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 3.99991817396795 OK.
Mesh geometry OK.
Mesh OK.
Calculating AMI weights between owner patch: AMI1 and neighbour patch: AMI2
AMI: Creating addressing and weights between 247847 source faces and 400199 target faces


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

From function void Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::setNextFaces(label&, label&, label&, const boolList&, labelList&, const DynamicList<label>&, bool) const
in file lnInclude/faceAreaWeightAMI.C at line 300.

FOAM aborting

#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::error::abort() at ??:?
#2 Foam::faceAreaWeightAMI<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> > >::calcAddressing(Foam::List<Foam::DynamicList<int , 0u, 2u, 1u> >&, Foam::List<Foam::DynamicList<double, 0u, 2u, 1u> >&, Foam::List<Foam::DynamicList<int, 0u, 2u, 1u> >&, Foam::List<Foam::DynamicList<double, 0u, 2u, 1u> >&, int, int) at ??:?
#3 Foam::faceAreaWeightAMI<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> > >::calculate(Foam::List<Foam::List<int> >&, Foam::List<Foam::List<double> >&, Foam::List<Foam::List<int> >&, Foam::List<Foam::List<double> >&, int, int) at ??:?
#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> > >::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&) at ??:?
#5 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> > >::constructFromSurface(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&) at ??:?
#6 Foam::cyclicAMIPolyPatch::resetAMI(Foam::AMIInterp olation<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> > >::interpolationMethod const&) const at ??:?
#7 Foam::cyclicAMIPolyPatch::AMI() const at ??:?
#8 ? at ??:?
#9 ? at ??:?
#10 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#11 ? at ??:?
Aborted (core dumped)
//************************************************** ********************

dupeng May 12, 2017 17:08

Never mind Rvilum,
I just found that the wrong setting of the rotating origin and axis in the dynamicMeshDict would cause this problem. Hope this information helps for others. Thanks.

drinkWater July 16, 2017 05:01

Hi Dupeng
 
I have got a same problem like yours. I just want to use the cyclicAMI B.C to preform like interface B.C in the fluent. and there is no moving mesh, just two parts. I create the mesh using ICEM, simulate using pisoFoam solver. but the error below:
ps:Could you help me please? I have been confused by this problem almost one week.:(

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 4.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

8
(
SUSPENDER
{
type wall;
inGroups 1(wall);
nFaces 552;
startFace 255268;
}
IN_INTERFACE
{
type cyclicAMI;
inGroups 1(cyclicAMI);
nFaces 552;
startFace 255820;
matchTolerance 0.002;
transform noOrdering;
neighbourPatch OUT_INTERFACE;
}
OUT_INTERFACE
{
type cyclicAMI;
inGroups 1(cyclicAMI);
nFaces 556;
startFace 256372;
matchTolerance 0.002;
transform noOrdering;
neighbourPatch IN_INTERFACE;
}
INLET
{
type patch;
nFaces 139;
startFace 256928;
}
OUTLET
{
type patch;
nFaces 139;
startFace 257067;
}
UP
{
type symmetry;
inGroups 1(wall);
nFaces 155;
startFace 257206;
}
DOWN
{
type symmetry;
inGroups 1(wall);
nFaces 155;
startFace 257361;
}
frontAndBackPlanes
{
type empty;
inGroups 1(empty);
nFaces 256392;
startFace 257516;
}
)

// ************************************************** *********************** //

dupeng July 16, 2017 05:32

Hi,
I don't quite understand your question. You said you want to use cyclicAMI bc and your mesh doesn't move. Do you mean SRF or MRF simulation? If so, you can check this link:

https://www.slideshare.net/fumiyanoz...using-openfoam

there are also many other tutorials you can find on the internet. But first check if pisoFoam has this function, or you can change the code by yourself.

drinkWater July 16, 2017 05:39

Thank you so much for your reply. i really don't understand SRF or MRF because i never use it. so Could you tell me your email? So that i could send my CASE files to you. the mesh was created by ICEM software, So i edit the boundary file to change the patch to cyclicAMI.


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