CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Under-Relaxation for Temperature Equartion (https://www.cfd-online.com/Forums/openfoam/82373-under-relaxation-temperature-equartion.html)

Hagen November 24, 2010 14:12

Under-Relaxation for Temperature Equartion
 
Hello Everybody,

I try to run a calculation for the straight channel on different Reynolds numbers with a modified simpleFoam solver. It solves the energy equation and models the scalar flux with a differential approach. The part where the equation is solved looks like this:

//Energy equation ---------------------------------------------------------------------------------------------------------------------------
fvScalarMatrix TEqn
(
fvm::div(phi, T)
- fvm::Sp(fvc::div(phi), T)
- fvm::laplacian(kappaEff, T)
- fvc::div(Dp & fvc::grad(p))
);

TEqn.relax();

eqnResidual = TEqn.solve().initialResidual();
maxResidual = max(eqnResidual, maxResidual);

Unfortunately the solver becomes unstable for Reynolds numbers higher than 25000. I guess under-relaxation for T would solve the problem.
When I define for example T=0.7 in the fvSolutions dictionary, the solver makes only one iteration every timestep.
Does anybody know where the bug is? Do you have different suggestions to make the calculation stable?
Thank you for your help

Hagen

idrama November 25, 2010 03:54

When you have modified something then it is hard to recognize it without seeing the code. However, instead of using relaxation factors, you can reduce the bound of the maxCo number. According to theory, see Versteeg p. 265 (I think), has it the same effect as using RF.


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