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

dyn. mesh refinement + urf in PIMPLE = NaN residuals?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 1, 2017, 11:18
Default dyn. mesh refinement + urf in PIMPLE = NaN residuals?
  #1
Senior Member
 
floquation's Avatar
 
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 20
floquation will become famous soon enough
Problem:
While simulating a case with dynamic mesh refinement, I have come across something peculiar. The solver was interDyMFoam.

The problem is that directly after the first dynamic mesh refinement, in the first PIMPLE iteration, the alpha field is calculated, U is calculated, p_rgh is calculated, phi is corrected and then when p_rgh is calculated in the second innerIteration, its initial residual is NaN. (The case crashes after this iteration output is shown.)
This is not a convergence issue.

Reproducibility:
The problem, in its most basic form, occurs with >1 outerIteration (at least 2 PIMPLE loops), presumably >1 innerIteration, and with relaxationFactors specified, e.g.:
Code:
relaxationFactors
{
    fields
    {
        p_rgh   1e-1;
        p_rghFinal 1;
    }
    equations
    {
        ".*" 1;
    }
}
The precise values do not matter: even "without underRelaxation" with urf=1, the problem occurs.
EDIT: under-relaxation for "equations" does not matter either. Only "fields" matter.

(I have only tried the simulation in parallel, but that cannot matter, right?)

Solution:
I have tried changing the solver/preconditioner for p_rgh: PCG+DIC, PCG+DILU, PCG+none, GAMG, ... It doesn't matter.
The problem disappears when nOuterIterations=1, and/or when the entry "relaxationFactors" is removed from fvSolution.
Therefore, the problem must be a combination between under-relaxation and OpenFoam treating the nonfinal PIMPLE loop differently than the final one.


Question: why?
I already "solved" my problem by eliminating the cause (i.e. by removing the relaxationFactors entry), but I'd like to understand why?
I know that "no under-relexation" (urf=1) still does something in OpenFoam; According to the user guide:
Quote:
  • : guaranteed matrix diagonal equality/dominance.

Does anyone know how this might affect a case with dynamic mesh refinement? Might it be a bug?

I should mention that dynamicRefineFvMesh cuts hexahedrons up in 8 smaller
hexahedrons, which causes some hexahedrons to have more than 6 neighbours. This might affect the symmetry of the matrices?


Thanks in advance.

Last edited by floquation; March 2, 2017 at 03:20.
floquation 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
Need Help Here! nan value error mgkid3310 OpenFOAM Running, Solving & CFD 1 October 6, 2016 00:59
[snappyHexMesh] Propeller mesh not smooth nortanapura OpenFOAM Meshing & Mesh Conversion 0 May 16, 2014 03:26
[snappyHexMesh] Layers:problem with curvature giulio.topazio OpenFOAM Meshing & Mesh Conversion 10 August 22, 2012 09:03
killed "snappyHexMesh" parkh32 OpenFOAM Pre-Processing 2 April 8, 2012 17:12
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! sc298 OpenFOAM Meshing & Mesh Conversion 2 March 27, 2011 21:11


All times are GMT -4. The time now is 19:34.