Page 1 of 1

Possible problem in Treatment of Source Terms in Turbulence Models Implementation

Posted: Sun Apr 07, 2024 12:01 am
by finzeo
Hi all,

I'm thoroughly analyzing the implementation of hybrid turbulence models, specifically regarding RANS and the k-omega SST model. I'm working with version 8.1.
While examining the code in cs_turbulence_kw.c, I've come across something that doesn't quite add up regarding the explicit/implicit treatment of certain terms in the k equation. Specifically, the source term involving fhybr (=1 in the case of using RANS; 0<fhybr<1 if a hybrid model is used). On one hand, in this part of the code, its contribution to the explicit part of the equation appears:

Code: Select all

...
smbrk[c_id] += cell_f_vol[c_id]*(prodk[c_id] - cs_turb_cmu*ro*xw*xk*fhybr);
 ...
but in this other part, it's indicated that in the case of coupling between k and omega, it is agreed to treat the previous term implicitly:

Code: Select all

...
tinstk[c_id] += cell_f_vol[c_id]*cs_turb_cmu*ro*xw*fhybr;
...
However, in this case, I don't see that the explicit contribution made previously has been removed at this point (that is, both the explicit and implicit contributions have been added in the end), which wouldn't be correct.

Is there something I'm missing?

Re: Possible problem in Treatment of Source Terms in Turbulence Models Implementation

Posted: Mon Apr 08, 2024 12:07 pm
by Martin FERRAND
Hello,

variables are solved in increments, so if a source term write



then it gives with :



Note implicite par is put on the left hand side if .

Martin

Re: Possible problem in Treatment of Source Terms in Turbulence Models Implementation

Posted: Mon Apr 08, 2024 4:28 pm
by finzeo
Thanks Martin,

Now I can clearly see then that by adding the implicit term, a term with is introduced which cancels out the explicit term.
Thanks for the explanation.