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

About equation relaxation

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 18, 2015, 12:57
Lightbulb About equation relaxation
  #1
Senior Member
 
Join Date: Oct 2013
Posts: 397
Rep Power: 18
chriss85 will become famous soon enough
I'm currently looking into equation relaxation as I'm having some equations which converge very badly.

Some observations:
  • Equation relaxation is implemented in fvMatrix.C
  • It ensures that the matrix is diagonally dominant, which leads to better convergence properties (see Wikipedia)
  • It uses the following transformation: D_0*Psi=B => D*Psi=B+(D-D_0)*Psi, where D is the relaxed matrix, Psi is the solution vector, and B is the source term.
  • After solving the equation, the relaxation is irreversible because Psi was changed. This means that the solution is not exact anymore.
  • Since this is commonly used in some iterative solvers, I expect that subsequent solving and equation relaxing can lead to a correct result. Is this correct
  • Since even with Eqn.relax(1) the function makes the matrix diagonally dominant, no relaxation at all is only possible with Eqn.relax(0) because the function immediately returns. This means that equation relaxation factors for final loops should be 0 instead of 1, like it is often shown. I suspect that most times the matrix is already diagonally dominant so this does not show. Is this correct
  • What leads to a matrix not being diagonally dominant
  • What is the reasoning for applying velocity equation relaxation vs. pressure field relaxation in simple foam examples (for example this tutorial)? Is the velocity equation more difficult to solve but the iteration can become unstable without relaxing the pressure field
I would like to have some discussion about these and similar topics, so please give me some comments!
chriss85 is offline   Reply With Quote

Old   May 2, 2017, 20:52
Default
  #2
Senior Member
 
Yuehan
Join Date: Nov 2012
Posts: 142
Rep Power: 13
wc34071209 is on a distinguished road
Quote:
Originally Posted by chriss85 View Post
I'm currently looking into equation relaxation as I'm having some equations which converge very badly.

Some observations:
  • Equation relaxation is implemented in fvMatrix.C
  • It ensures that the matrix is diagonally dominant, which leads to better convergence properties (see Wikipedia)
  • It uses the following transformation: D_0*Psi=B => D*Psi=B+(D-D_0)*Psi, where D is the relaxed matrix, Psi is the solution vector, and B is the source term.
  • After solving the equation, the relaxation is irreversible because Psi was changed. This means that the solution is not exact anymore.
  • Since this is commonly used in some iterative solvers, I expect that subsequent solving and equation relaxing can lead to a correct result. Is this correct
  • Since even with Eqn.relax(1) the function makes the matrix diagonally dominant, no relaxation at all is only possible with Eqn.relax(0) because the function immediately returns. This means that equation relaxation factors for final loops should be 0 instead of 1, like it is often shown. I suspect that most times the matrix is already diagonally dominant so this does not show. Is this correct
  • What leads to a matrix not being diagonally dominant
  • What is the reasoning for applying velocity equation relaxation vs. pressure field relaxation in simple foam examples (for example this tutorial)? Is the velocity equation more difficult to solve but the iteration can become unstable without relaxing the pressure field
I would like to have some discussion about these and similar topics, so please give me some comments!
I have been looking into this problem recently. This book "The Finite Volume Method in Computational Fluid Dynamics - An Advanced Introduction with OpenFOAMŪ and Matlab" gives a good explaination of the field and equation relaxation.

As far as I understand the book, the field relaxation is the 'explicit relaxation', whereas the equation relaxation is 'impliciat' relaxation. The book says that for SIMPLE algorithm in steady state simulation, pressure field is under-relaxed by explicit relaxation (field relaxation), and implicit under-relaxation helps increase the diagonal dominance and therefore promote stability.

But I am also confused that fvMatrix.C seems to do some manipulation on the diagonal matrix D to ensure diagonal dominance.

Code:
    
// Ensure the matrix is diagonally dominant...                           
// Assumes that the central coefficient is positive and ensures it is                           
forAll(D, celli)                           
{                               
   D[celli] = max(mag(D[celli]), sumOff[celli]);                          
}
I have no idea how these lines will change D.

If these lines do not change D, then Eqn.relax(1) will not do relaxation, since D is equal to D0.
wc34071209 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
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 06:21
How to? Extra term in k-e equation. Implicit-Explicit be_inspired OpenFOAM Programming & Development 1 March 19, 2013 11:50
Derivation of Momentum Equation in Integral Form Demonwolf Main CFD Forum 2 October 29, 2009 20:53
Need help:about energy equation in CFX Stein CFX 4 July 2, 2009 23:31
Relaxation and convergence sammi Phoenics 0 March 20, 2008 04:32


All times are GMT -4. The time now is 18:36.