CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Reynolds Stresses' Gradients (https://www.cfd-online.com/Forums/fluent-udf/220658-reynolds-stresses-gradients.html)

FarzinD September 16, 2019 17:20

Reynolds Stresses' Gradients
 
Dear all,
While it is possible to access Reynolds Stresses C_RUU(c,t), C_RUV(c,t), ... when writing a UDF, the documentation is not clear on how we may access the gradients of RS components and the common gradient form (C_RUU_G(c,t)[0],...) does not work.
There is an undocumented array "C_RST_G(c,t,i)" which does not work as well.
I am wondeing if RS gradients are stored at all.


I would appreciate any help on this.

Thanks,
Farzin


Related Topic: https://studentcommunity.ansys.com/t...ostbadges=true

pakk September 21, 2019 06:10

The code "C_RUU_G(c,t)[0]" is conceptually a good idea, but is not correct grammar in the version of c that fluent uses. In newer versions it should (I think) work, so your attempt is not so crazy.

What to do: use a temporary intermediate variable :

Code:

float temp[ND_ND];
temp = C_RUU_G(c, t);
Whatever = temp[0] ;

Not tested, but I hope this helps anyway.


All times are GMT -4. The time now is 04:16.