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/)
-   -   UDS gradient ?? (https://www.cfd-online.com/Forums/fluent-udf/100299-uds-gradient.html)

akm April 23, 2012 14:49

UDS gradient ??
 
Previously i was trying to compute gradient of a UDM, but as i understand UDS gradients are pre-calculated by Fluent. And for post-processing, I want to store this gradient value in a UDM.

C_UDSI(c,t,RK) = SQRT(C_UDSI(c,t,K);

C_UDMI(c,t,DE) = SQR(C_UDSI_G(c,t,RK)[1]);

here, 'k' is the scalar for which transport eqns are being solved, and i need to compute the y-direction gradient of sqrt(k). 'de' is the UDM which i have created to store the square of this gradient value.

On compiling the UDF, I am getting an error in the second line
error C2109: subscript requires array or pointer type
Kindly tell me what i may be doing incorrectly, or alternatively any other method of computing gradient of a UDS...

Thanks a lot in advance..


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