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: 18 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: 13
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.