- **FLUENT**
(*https://www.cfd-online.com/Forums/fluent/*)

- - **How to compute UDS fourth order gradient**
(*https://www.cfd-online.com/Forums/fluent/71282-how-compute-uds-fourth-order-gradient.html*)

How to compute UDS fourth order gradientHi! Guys!
I computate fourth order derivative with UDS through Gauss's divergence theorem. We can obtain second order derivative of Φ through integrating Laplacian of Φ at cell c0. For computing fourth order derivative, the idea is that using Gauss's divergence theorem again and let the second order derivative to be the UDS. i was confusing that seconder order gradient is a vector here, and not like the original Φ, which is a scalar. how to solve this problem? I directly use C_face_loop to present second order derivative first. c_face_loop(c,t,n) { F_AREA(A,C_FACE(c,t,n), C_FACE_THREAD(c,t,n)); At = NV_MAG(A); Aterm = At/C_VOLUME(c,t); NV_DS( Grad2, +=, C_UDSI_G(c,t,GRAD_1)[0], C_UDSI_G(c,t,GRAD_1)[1], C_UDSI_G(c,t,GRAD_1)[2],*,Aterm);} For computing fourth order derivative, I use magnitude of second order gradient to define a UDS. C_UDSI(c,t,GRAD_1) =NV_MAG(Grad2) The fourth gradient is then be, c_face_loop(c,t,n) { F_AREA(A,C_FACE(c,t,n), C_FACE_THREAD(c,t,n)); At = NV_MAG(A); Aterm = At/C_VOLUME(c,t); NV_DS(Grad4, +=, C_UDSI_G(c,t,GRAD_1)[0], C_UDSI_G(c,t,GRAD_1)[1], C_UDSI_G(c,t,GRAD_1)[2],*,Aterm); } I was wondering if this is correct to slove it. Could you please give me some advise? Expecting your early reply!! Many thanks, |

GradientsHi Emma,
I read your post but I cannot help you, sorry. But maybe you can help me with a problem that I had for months. I program a UDF and I need the second order gradient of temperature or any UDSI. I see that you caluculate it by: "integrating Laplacian of Φ at cell c0" The code is:"c_face_loop(c,t,n) { F_AREA(A,C_FACE(c,t,n), C_FACE_THREAD(c,t,n)); At = NV_MAG(A); Aterm = At/C_VOLUME(c,t); NV_DS( Grad2, +=, C_UDSI_G(c,t,GRAD_1)[0], C_UDSI_G(c,t,GRAD_1)[1], C_UDSI_G(c,t,GRAD_1)[2],*,Aterm);} " The problem is that I dont fully understand the operation. Is there any reference to this operation? I would be very happy if you could help me, this problem starts to be hopeless! Thank you! /Andreas |

All times are GMT -4. The time now is 00:44. |