
[Sponsors] 
September 7, 2013, 14:45 
Calculation of norms and convergence tests

#1 
Member
Tony Ladd
Join Date: Aug 2013
Posts: 47
Rep Power: 10 
I am having some problems with convergence (in a simpleFoam based app). It happens when one (or more) velocity components are in reality 0 (ie uniaxial flow) but can be affected by roundoff. In this case the residual on the iterative solver for that component of the velocity is arbitrary, which prevents the solution from terminating.
I can see that in the context of a split solution the method to fix that is problematic since it would require additional information, such as other components of the velocity field. So I switched to the coupled solver PBiCCCG/DILU, which definitely improves convergence in terms of the real residual of U. However OpenFOAM still reports three residuals based on individual components rather than on the magnitude of U. It would be a useful option to have a combined norm and residual  this is v2.2.0. The other curious thing is that it seems when I use the combined solver the SIMPLE loop converges on the pressure field only. So if I set a large residual on the p field (say 1e3) and a much smaller one on the U field (say 1e6) it terminates when the pfield residual is less than 1e3, even though the U field residual(s) are not satisfied. In the older split solver it would wait until the U field norms were satisfied, which could mean waiting until the step count limit was reached. I can work around this by discovering a suitable pressure residual condition empirically, but this is a bit concerning. I am new to OpenFoam so I might be misunderstanding the output. My test case is laminar flow in a flat channel  very boring, but the boundaries dissolve and change to something more interesting eventually. 

September 8, 2013, 20:18 

#2  
New Member
胡长旭
Join Date: Aug 2013
Posts: 26
Rep Power: 10 
Quote:
actually, I have the same question. best wishes 

March 19, 2017, 11:27 

#3 
Senior Member
khedar
Join Date: Oct 2016
Posts: 111
Rep Power: 7 
Hey guys,
did you find anything for this issue? It's troubling me as well. 

August 28, 2017, 00:39 

#4 
New Member
Harrison Nobis
Join Date: May 2017
Location: Sydney, Australia
Posts: 3
Rep Power: 7 
I'm having the same problem!
anyone have an idea for a solution? 

August 28, 2017, 14:03 

#5 
Member
Tony Ladd
Join Date: Aug 2013
Posts: 47
Rep Power: 10 
The solution is to norm the residual by the "correct" vector norm  namely sqrt(U.U). Unfortunately OF norms by sqrt(Ux.Ux) etc. which is not really correct. We care about the magnitude of the component residuals in comparison to the magnitude of the vector, not its components, which can individually be small (i.e. 0)
Vitaliy Starchenko has written a modified simpleControl library which calculates the norms correctly and has no problem with 2D flows. However it also iterates the simple loop without increasing the time counter, since we want the time counter to indicate other changes. You should be able to extract the norm calculation to use in different iterators by making your own library copy (as we did from simpleControl). It uses two new functions maxResidual and maxTypeResidual Hope this helps Tony https://github.com/vitst/libsFoamAux...dyStateControl 

Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Convergence criteria  srinath  Main CFD Forum  0  May 12, 2003 04:19 