CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   epsilon as implicit term in kEqn's (https://www.cfd-online.com/Forums/openfoam-programming-development/234350-epsilon-implicit-term-keqns.html)

agustinvo March 3, 2021 11:06

epsilon as implicit term in kEqn's
 
I have remarked that in several turbulence models where the turbulent kinetic energy is solved, the dissipation term appears as:


Code:

- fvm::Sp(alpha*rho*epsilon_/k_, k_)

and I was wondering the reason behind this piece of code. żDoes it give some stability? As far as I see, if all the left input is constant, it means that the contribution of epsilon on the equation will be affected by the factor k_calculated/k.


ĦThank you for your answers!

Tobermory March 3, 2021 12:02

Yes, stability is the reason I believe. Remember that for the source term linearisation, you must ensure that Su is positive and Sp negative in order to preserve stability (check out Patankar's book, for example). Here we have a -\epsilon term, and so we cannot put it into Su, but instead put it into Sp ... but that means that the Sp coefficient must be -\epsilon/k since the linearised source is S = S_p k + S_u.

agustinvo March 3, 2021 12:52

So, do you think this is the best way to introduce the dissipation rates on turbulence models?

Tobermory March 3, 2021 13:01

Yes. Indeed, I think it is the only way to do it without risking instability.

Okay, well strictly speaking if you have other Su source terms with positive coefficients you could try implement a scheme where you put part of the dissipation term in Su (making sure that Su stayed positive) and put the rest in Sp ... but I don't see any benefit from doing that, and it's certainly a lot of work.

agustinvo March 3, 2021 13:21

What disturbs me in this approach is that in the k equation you should the dissipation term as \epsilon\frac{k}{k_{init}}, where the k on the numerator changes as solving the equation. It means that in certain regions this dissipation term might be larger than the existing epsilon value (as it is multiplied by a factor k_{new}/k_{init}).


This method helps to ensure stability but I find it not so physical because of this factor.

Tobermory March 3, 2021 13:28

Yes, understood and agreed, it is an approximation. However, it will only matter in parts of the flow where \partial k / \partial t is large; for most flows k^{n+1}/k^n \approx 1 and a good approximation to the solution is better than no solution!

agustinvo March 4, 2021 06:34

Quote:

Originally Posted by Tobermory (Post 797804)
Yes, understood and agreed, it is an approximation. However, it will only matter in parts of the flow where \partial k / \partial t is large; for most flows k^{n+1}/k^n \approx 1 and a good approximation to the solution is better than no solution!


Indeed, specially when running steady state simulations as me... I had a look on Patankar's book and I found what you meant about the source terms... I will revise my implementations! I actually had some other divergence problems, and they might be caused by this... Thank you!

Tobermory March 4, 2021 06:54

My pleasure! Glad to be of help.


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