CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   How to calculate the second-order divergence of a user-defined-scalar (http://www.cfd-online.com/Forums/fluent-udf/110518-how-calculate-second-order-divergence-user-defined-scalar.html)

legendyxg December 13, 2012 03:13

How to calculate the second-order divergence of a user-defined-scalar
 
Hi everyone. In my program, I need to add the following term into the source term of the UDS, i.e. source = ▽(D▽c), where c is a UDS in my case. Could anyone tell me how to write this term in UDF? I know we can get the gradient of a UDS through C_UDSI_G(c,t,i), but how to get the divergence of the gradient of a UDS?

Thanks very much.

msaeedsadeghi December 16, 2012 01:20

You can store divergence of c into another UDS, then divergence of this new UDS. So easy.

legendyxg December 16, 2012 02:23

Thank u very much Saeed!


All times are GMT -4. The time now is 09:02.