|
[Sponsors] |
December 23, 2009, 04:32 |
How to compute UDS fourth order gradient
|
#1 |
New Member
emma
Join Date: Dec 2009
Posts: 4
Rep Power: 17 |
Hi! 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, |
|
April 27, 2010, 06:44 |
Gradients
|
#2 |
New Member
A
Join Date: Sep 2009
Posts: 14
Rep Power: 17 |
Hi 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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Gradient of UDS | gemini | Fluent UDF and Scheme Programming | 2 | December 24, 2013 01:24 |
reconstruction gradient of a UDS | gemini | Fluent UDF and Scheme Programming | 0 | June 7, 2009 17:03 |
Fourth order surface normal gradient interpolation | adona058 | OpenFOAM Running, Solving & CFD | 8 | September 24, 2007 16:12 |
Gradient UDS | tom | FLUENT | 1 | April 28, 2006 04:46 |
How to compute gradient for non-orthogonal grids? | Paul Hsieh | Main CFD Forum | 3 | November 11, 2003 05:52 |