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

[swak4Foam] reconstructPar error in MRFsimpleFoam (ami apprach) using GroovyBC velocity inlet

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By gschaider

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 13, 2019, 12:07
Default reconstructPar error in MRFsimpleFoam (ami apprach) using GroovyBC velocity inlet
  #1
Senior Member
 
Kmeti Rao
Join Date: May 2019
Posts: 145
Rep Power: 8
Krao is on a distinguished road
Hi Dear Foam users,

I am simulating propeller with MRFSimpleFoam using AMI. So far the simulation results and convergence are satisfactory and the forces are close to the analytical results.

I wanted to simulate a second propeller in the slipstream of the first propeller. Since changing MRF region size affected the results significantly, I was forced to simulate the two propellers separately. As I have to reproduce the slipstream of first propeller at the inlet of the second propeller, I have used groovyBC from swak4foam to generate the inlet swirl. Again the simulation went very well and the convergence of forces was great. But when I started to reconstruct the result to start these simulation with more powerful PC I got the following error

Quote:
Reconstructing fields for mesh region0

Time = 0.02

Reconstructing FV fields

Reconstructing volScalarFields

p
nut
k
omega

Reconstructing volVectorFields

U
AMI: Creating addressing and weights between 3544 source faces and 4276 target faces
AMI: Patch source sum(weights) min/max/average = 0.883736, 1.0012, 0.99758
AMI: Patch target sum(weights) min/max/average = 0, 1.00088, 0.870331
AMI: Creating addressing and weights between 388 source faces and 3245 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 292.

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&, bool) 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&, bool) at ??:?
#6 Foam::cyclicAMIPolyPatch::resetAMI() const at ??:?
#7 Foam::cyclicAMIPolyPatch::AMIs() const at ??:?
#8 Foam::tmp<Foam::Field<double> > Foam::cyclicAMIPolyPatch::interpolate<double>(Foam ::Field<double> const&, Foam::UList<double> const&) const at ??:?
#9 Foam::cyclicAMIFvPatch::nbrDeltan() const at ??:?
#10 Foam::cyclicAMIFvPatch::makeWeights(Foam::Field<do uble>&) const at ??:?
#11 Foam::surfaceInterpolation::makeWeights() const at ??:?
#12 Foam::surfaceInterpolation::weights() const at ??:?
#13 Foam::surfaceInterpolation::makeDeltaCoeffs() const at ??:?
#14 Foam::surfaceInterpolation::deltaCoeffs() const at ??:?
#15 Foam::fvPatch::deltaCoeffs() const at ??:?
#16 Foam::groovyBCFvPatchField<Foam::Vector<double> >::groovyBCFvPatchField(Foam::fvPatch const&, Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::dictionary const&) at ??:?
#17 Foam::fvPatchField<Foam::Vector<double> >::adddictionaryConstructorToTable<Foam::groovyBCF vPatchField<Foam::Vector<double> > >::New(Foam::fvPatch const&, Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::dictionary const&) at ??:?
#18 Foam::fvPatchField<Foam::Vector<double> >::New(Foam::fvPatch const&, Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::dictionary const&) in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/reconstructPar"
#19 Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::Boundary::readField(Foam::Dimensio nedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::dictionary const&) in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/reconstructPar"
#20 Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::readFields(Foam::dictionary const&) in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/reconstructPar"
#21 Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::readFields() in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/reconstructPar"
#22 Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject const&, Foam::fvMesh const&) in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/reconstructPar"
#23 ? in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/reconstructPar"
#24 ? in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/reconstructPar"
#25 ? in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/reconstructPar"
#26 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#27 ? in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/reconstructPar"
Aborted (core dumped)
As it can be clearly observed, as per my understanding the error is stating that the AMI weights are going to zero. But I have double checked during decomposition and solving the AMI weights are normal as shown below

Quote:
AMI: Creating addressing and weights between 151942 source faces and 9229 target faces
AMI: Patch source sum(weights) min/max/average = 0.967284, 1.33993, 0.999878
AMI: Patch target sum(weights) min/max/average = 0.989309, 1.07397, 1.00007
AMI: Creating addressing and weights between 7129 source faces and 7521 target faces
AMI: Patch source sum(weights) min/max/average = 0.999682, 1.00121, 1
AMI: Patch target sum(weights) min/max/average = 0.984372, 1.00089, 0.999992
AMI: Creating addressing and weights between 18870 source faces and 19132 target faces
AMI: Patch source sum(weights) min/max/average = 0.999615, 1, 1
AMI: Patch target sum(weights) min/max/average = 0.9995, 1, 1
Reading/calculating face flux field phi
The error is occurring only during the simulation with groovyBC. In all other cases the simulation is running fine. Should I considering other decomposition approach than scotch? It would be very great if anyone can give me some useful insight to avoid these errors. Also, I would be open for other ideas as well regarding MRF region size also and how to overcome that difficulty also. Thank you in advance.

Krao
Krao is offline   Reply With Quote

Old   August 16, 2019, 06:32
Default Update
  #2
Senior Member
 
Kmeti Rao
Join Date: May 2019
Posts: 145
Rep Power: 8
Krao is on a distinguished road
my groovyBC as follows for the swirly inlet with linearly varying flow. It would be great if I can get any expert advise on the following logic also, thank you.

boundaryField
{
inlet
{
type groovyBC;
variables
(
"yp=pos().y;"
"xp=pos().x;"
"r=sqrt(pow(xp,2)+pow(yp,2));"
"theta=atan(yp/xp);"
"omegaa=466;"
"U_t=(r<0.226)?(omegaa*r):0;"
"U_tx=U_t*sin(theta);"
"U_ty=U_t*cos(theta);"
"R=0.225;"
"U1=-5.99;"
"U_az=(r<0.226)?((r>0.208)?(U1*(4.413-3.413*(r/R))):-7.44):0;"
);
valueExpression "vector ( U_tx, U_ty, U_az )";
value uniform (0 0 0);
}
}

Krao

Last edited by Krao; August 19, 2019 at 04:41.
Krao is offline   Reply With Quote

Old   August 19, 2019, 05:56
Default
  #3
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by Krao View Post
Hi Dear Foam users,

I am simulating propeller with MRFSimpleFoam using AMI. So far the simulation results and convergence are satisfactory and the forces are close to the analytical results.

I wanted to simulate a second propeller in the slipstream of the first propeller. Since changing MRF region size affected the results significantly, I was forced to simulate the two propellers separately. As I have to reproduce the slipstream of first propeller at the inlet of the second propeller, I have used groovyBC from swak4foam to generate the inlet swirl. Again the simulation went very well and the convergence of forces was great. But when I started to reconstruct the result to start these simulation with more powerful PC I got the following error



As it can be clearly observed, as per my understanding the error is stating that the AMI weights are going to zero. But I have double checked during decomposition and solving the AMI weights are normal as shown below



The error is occurring only during the simulation with groovyBC. In all other cases the simulation is running fine. Should I considering other decomposition approach than scotch? It would be very great if anyone can give me some useful insight to avoid these errors. Also, I would be open for other ideas as well regarding MRF region size also and how to overcome that difficulty also. Thank you in advance.

Krao
Mixing AMI and a boundary condition that tries to manipulate a value there can be challenging


The problem here seems to be that groovyBC tries to compute deltaCoeffs to apply a potential gradient value and AMI does not know how to compute the deltaCoeffs because it usually doesn't know it. You might be able to work around this by replacing groovyBC with groovyBCFixedValue but I can't guarantee that it will work


Good luck
Krao likes this.
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   August 19, 2019, 06:40
Default
  #4
Senior Member
 
Kmeti Rao
Join Date: May 2019
Posts: 145
Rep Power: 8
Krao is on a distinguished road
Dear Mr. Bernhard Gschaider,

Quote:
Originally Posted by gschaider View Post
Mixing AMI and a boundary condition that tries to manipulate a value there can be challenging


The problem here seems to be that groovyBC tries to compute deltaCoeffs to apply a potential gradient value and AMI does not know how to compute the deltaCoeffs because it usually doesn't know it. You might be able to work around this by replacing groovyBC with groovyBCFixedValue but I can't guarantee that it will work


Good luck
Thank you very much for your detailed answer and inputs. I will implement the new value and I will update my findings in the thread.

Kind regards,

Krao


The problem is solved with the above mentioned procedure

Last edited by Krao; August 28, 2019 at 05:36. Reason: Update
Krao is offline   Reply With Quote

Reply

Tags
ami, groovybc, mrfsimplefoam, reconstructpar, swak4faom


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
Multiphase flow - incorrect velocity on inlet Mike_Tom CFX 6 September 29, 2016 02:27
Pressure problems with inlet variable velocity jaimesdiegop CFX 2 September 1, 2016 03:31
Compressor Simulation using rhoPimpleDyMFoam Jetfire OpenFOAM Running, Solving & CFD 107 December 9, 2014 14:38
mixerVesselAMI2D's mass is not balancing sharonyue OpenFOAM Running, Solving & CFD 6 June 10, 2013 10:34
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 10:11


All times are GMT -4. The time now is 13:14.