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

Calculation of norms and convergence tests

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 7, 2013, 15:45
Default Calculation of norms and convergence tests
  #1
Member
 
Tony Ladd
Join Date: Aug 2013
Posts: 48
Rep Power: 12
tladd is on a distinguished road
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 1e-3) and a much smaller one on the U field (say 1e-6) it terminates when the p-field residual is less than 1e-3, 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.
tladd is offline   Reply With Quote

Old   September 8, 2013, 21:18
Post
  #2
New Member
 
胡长旭
Join Date: Aug 2013
Posts: 26
Rep Power: 12
hcx552362 is on a distinguished road
Quote:
Originally Posted by tladd View Post
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 1e-3) and a much smaller one on the U field (say 1e-6) it terminates when the p-field residual is less than 1e-3, 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.
Hi
actually, I have the same question.
best wishes
hcx552362 is offline   Reply With Quote

Old   March 19, 2017, 12:27
Default
  #3
Senior Member
 
khedar
Join Date: Oct 2016
Posts: 111
Rep Power: 9
khedar is on a distinguished road
Hey guys,
did you find anything for this issue? It's troubling me as well.
khedar is offline   Reply With Quote

Old   August 28, 2017, 01:39
Default
  #4
New Member
 
Harrison Nobis
Join Date: May 2017
Location: Sydney, Australia
Posts: 3
Rep Power: 8
Harrison Nobis is on a distinguished road
I'm having the same problem!

anyone have an idea for a solution?
Harrison Nobis is offline   Reply With Quote

Old   August 28, 2017, 15:03
Default
  #5
Member
 
Tony Ladd
Join Date: Aug 2013
Posts: 48
Rep Power: 12
tladd is on a distinguished road
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
tladd is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Convergence criteria srinath Main CFD Forum 0 May 12, 2003 05:19


All times are GMT -4. The time now is 20:53.