CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Relaxation (https://www.cfd-online.com/Forums/openfoam-solving/64677-relaxation.html)

titio May 19, 2009 15:22

Relaxation
 
Hi all,

I have a small question concerning relaxation. Is there any difference between the two formulations in terms of relative position of relax():

H1: fvVectorMatrix UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
- fvm::laplacian(, U)

);
UEqn.relax();
solve(UEqn ==
- fvc::grad(p)
);

H2: H1: fvVectorMatrix UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
- fvm::laplacian(, U)

);
solve(UEqn ==
- fvc::grad(p)
);
UEqn.relax();

Are H1 and H2 equivalent or different?

António Martins

jurich May 20, 2009 12:11

Antonio,

Your second arrangement will have no effect.

Using relax() with an OpenFoam matrix class enlarges the diagonal terms in the matrix, to increase diagonal dominance. So it must be applied before you call solve().

Once you call solve(), OpenFoam solves the matrix for U, therefore changes to the matrix after that will have no effect on U.

I hope that helps,

Joe Urich


All times are GMT -4. The time now is 11:44.