CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

BUG?: compressibleInterDyMFoam fails at depthCharge3D with dynamicRefineFvMesh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 23, 2020, 07:12
Default BUG?: compressibleInterDyMFoam fails at depthCharge3D with dynamicRefineFvMesh
  #1
Member
 
Join Date: Sep 2013
Posts: 46
Rep Power: 12
ma-tri-x is on a distinguished road
Hi!


Since long I try to make AMR (adaptive mesh refinement) work with my two-phase, compressible bubble.


When I try the depthCharge3D tutorial with the compressibleInterFoam, it works with any OpenFOAM or Foam-Extend-version.


However, when I try depthCharge3D with compressibleInterDyMFoam (foam-extend-4.0 as well as foam-extend-4.1), it fails with floating point error either when setting up the UEqn or when solving the pEqn with a reduced UEqn.
My dynamicMeshDict looks as follows:
Code:
dynamicFvMesh   dynamicRefineFvMesh;
dynamicRefineFvMeshCoeffs
{
    refineInterval  1;
    field           alpha1;
    lowerRefineLevel .001;
    upperRefineLevel .999;
    unrefineLevel   10;
    nBufferLayers   1;
    maxRefinement   1;
    maxCells        140000;
    correctFluxes
    (
        (phi U)
        (nHatf none) //thought might be necessary?
        (rhoPhi none) //thought might be necessary?
        (alpha1 none) //thought might be necessary?
    );
    dumpLevel       true;
}
if I unset the necessity to refine by setting
Code:
    lowerRefineLevel 1.001;
    upperRefineLevel 1.999;
The code runs fine.



Actually, the 2D code from Luca Cornolti #750894

2D adaptive Mesh Refinement
works perfectly with AMR, so there is some bug still in the 3D native code of (at least!) foam-extend! The interFoam DamBreak tutorial works fine, however. So I suppose, some compressible fluxes are handled incorrectly? I don't have the knowledge to dig through the hex-cutter-code :-( Anyone has the same problem?


Best regards,
Ma-tr-ix


--------------------


Hi,


I ran the code in debug mode and it seems that polyMeshInitMesh.C doesn't tell the solver to update the cell indices:
Quote:
Selected 400 cells for refinement out of 54000.

From function void polyMesh::initMesh()
in file meshes/polyMesh/polyMeshInitMesh.C at line 81
Truncating neighbour list at 166476 for backward compatibility
Refined from 54000 to 56800 cells.
Selected 0 split points out of a possible 400.
time step continuity errors : sum local = 0.0011473583, global = -3.1287473e-19, cumulative = -3.1287473e-19
GAMGPCG: Solving for pcorr, Initial residual = 1, Final residual = 2.9710917e-06, No Iterations 24
PCG: Solving for pcorr, Initial residual = 1.4856334e-06, Final residual = 1.4856334e-06, No Iterations 0
PCG: Solving for pcorr, Initial residual = 1.4856334e-06, Final residual = 1.4856334e-06, No Iterations 0
time step continuity errors : sum local = 0.00012217958, global = -3.7530916e-19, cumulative = -6.8818388e-19
PIMPLE: iteration 1
MULES: Solving for alpha1


--> FOAM FATAL ERROR:
index 54000 out of range 0 ... 53999

From function UList<T>::checkIndex(const label)
in file /home/koch/foam/foam-extend-4.0/src/foam/lnInclude/UListI.H at line 124.

FOAM aborting

Aborted (core dumped)

it seems

Last edited by ma-tri-x; January 29, 2020 at 08:07. Reason: new insights
ma-tri-x is offline   Reply With Quote

Old   February 11, 2020, 09:04
Default
  #2
Member
 
Join Date: Sep 2013
Posts: 46
Rep Power: 12
ma-tri-x is on a distinguished road
Found the solution:


I created my Mesh with stitchMesh.
StitchMesh destroys AMR compatibility


----
with depthCharge3D it works
ma-tri-x is offline   Reply With Quote

Old   February 11, 2020, 16:13
Default
  #3
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12
HPE is on a distinguished road
Hi Neo,

The thing I dont understand is how stitchmesh can affect the solution? if the final mesh is valid, how come the meshing procedure would have an impact on the solution? curious.
HPE is offline   Reply With Quote

Old   February 17, 2020, 08:09
Default
  #4
Member
 
Join Date: Sep 2013
Posts: 46
Rep Power: 12
ma-tri-x is on a distinguished road
Quote:
Originally Posted by HPE View Post
Hi Neo,

The thing I dont understand is how stitchmesh can affect the solution? if the final mesh is valid, how come the meshing procedure would have an impact on the solution? curious.

Yep, I'd like to know, too. We've found many mysterious things like this also with snappyHexMesh destroying somehow symmetries of the solution of a two-phase calculation...


Fortunately, Luca Cornolti's dynamicRefineFvMesh2D library is robust so far against using stitchMesh or snappyHexMesh. Still, to my mind, he wrote the best AMR library.
ma-tri-x is offline   Reply With Quote

Old   February 17, 2020, 15:42
Default
  #5
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12
HPE is on a distinguished road
Ah, I really wish the world would be full of mysteries. Sooner or later, really boring reasons appear behind each mysterious event in this f.ckng world.

I will pursue ur interesting observation in my free time though. Curious. Thank you.
HPE 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
mapFields major bug alchem OpenFOAM Bugs 14 September 15, 2023 12:48
cyclicGgi + Finite Area Method fails to run in parallel (foam-extend 4.1). Bug?) Santiago OpenFOAM Bugs 0 June 12, 2018 09:32
Bug in Workbench CFX Pierre1 CFX 6 August 2, 2017 00:18
a bug when correctting the flux in dynamicRefineFvMesh? cctv OpenFOAM Programming & Development 1 January 12, 2016 04:16
InterDyMFoam dynamic meshing in parallel fails under nonquiescent conditions adona058 OpenFOAM Bugs 7 November 18, 2008 14:58


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