Register Blogs Members List Search Today's Posts Mark Forums Read March 18, 2015, 12:57 About equation relaxation #1 Senior Member   Join Date: Oct 2013 Posts: 397 Rep Power: 17 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!   May 2, 2017, 20:52 #2
Senior Member

Yuehan
Join Date: Nov 2012
Posts: 142
Rep Power: 12 Quote:
 Originally Posted by chriss85 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.  Thread Tools Search this Thread Show Printable Version Email this Page Search this Thread: Advanced Search Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 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 OffTrackbacks are Off Pingbacks are On Refbacks are On Forum Rules Similar Threads Thread Thread Starter Forum Replies Last Post saii CFX 12 March 19, 2018 06:21 be_inspired OpenFOAM Programming & Development 1 March 19, 2013 11:50 Demonwolf Main CFD Forum 2 October 29, 2009 20:53 Stein CFX 4 July 2, 2009 23:31 sammi Phoenics 0 March 20, 2008 04:32

All times are GMT -4. The time now is 08:49.