# How to compute UDS fourth order gradient

 Register Blogs Members List Search Today's Posts Mark Forums Read December 23, 2009, 04:32 How to compute UDS fourth order gradient #1 New Member   emma Join Date: Dec 2009 Posts: 4 Rep Power: 15 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), C_UDSI_G(c,t,GRAD_1), C_UDSI_G(c,t,GRAD_1),*,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), C_UDSI_G(c,t,GRAD_1), C_UDSI_G(c,t,GRAD_1),*,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: 15 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), C_UDSI_G(c,t,GRAD_1), C_UDSI_G(c,t,GRAD_1),*,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  Thread Tools Search this Thread Show Printable Version Email this Page Search this Thread: Advanced Search Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are Off Pingbacks are On Refbacks are On Forum Rules Similar Threads Thread Thread Starter Forum Replies Last Post gemini Fluent UDF and Scheme Programming 2 December 24, 2013 01:24 gemini Fluent UDF and Scheme Programming 0 June 7, 2009 17:03 adona058 OpenFOAM Running, Solving & CFD 8 September 24, 2007 16:12 tom FLUENT 1 April 28, 2006 04:46 Paul Hsieh Main CFD Forum 3 November 11, 2003 05:52

All times are GMT -4. The time now is 18:49.