Page 1 of 1

Initialization of Turbulence

Posted: Mon Mar 09, 2020 3:23 pm
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

Re: Initialization of Turbulence

Posted: Mon Mar 09, 2020 11:12 pm
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