Initialization of Turbulence

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
s marco
Posts: 11
Joined: Fri Feb 14, 2020 3:59 pm

Initialization of Turbulence

Post by s marco »

Hi,
I am working with version 6 and I want to inizialize the turbulence by formula but also with default expression I get this:

‘r11’ undeclared (first use in this function)
cs_real_t _k = 0.5 * (r11 + r22 + r33) ;

Do you have any suggestions?

Best regards,
Marco
Yvan Fournier
Posts: 4077
Joined: Mon Feb 20, 2012 3:25 pm

Re: Initialization of Turbulence

Post by Yvan Fournier »

Hello,

This will be improved in 6.1, but in version 6.0, the changes to MEI (replaced by generated, compiled code, which is much faster) lead to not being able to use predefined values such as r11, r22, etc. on the right-hand sides of expressions:

So for the defaul expression/example, a workaround would be:

Code: Select all

trii   = (0.02*uref)^2;
cmu = 0.09;
_r11 = trii;
_r22 = trii;
_r33 = trii;
r11 = trii;
r22 = trii;
r33 = trii;
r12 = 0.;
r13 = 0.;
r23 = 0.;
_k = 0.5*(_r11+_r22+_r33);
k = _k;
epsilon = _k^1.5*cmu/almax;
Some examples were fixed in 6.0.2, but apparently not all, so we'll update them for 6.0.3.
Thanks for the feedback, and sorry for the bug.

Best regards,

Yvan
Post Reply