CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Laplacian

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 16, 2019, 08:11
Default Laplacian
  #1
New Member
 
Join Date: May 2019
Posts: 2
Rep Power: 0
grubi is on a distinguished road
Hi everyone

I am trying to create an UDF in which I want to determine the second derivative of an UDS that I applied. The first derivative gave no problems!

And then I assign the derivative of the first UDS to a new UDS and I do the gradient again on this new UDS, and the second derivative is zero...

Can someone help me?



#include "udf.h"



DEFINE_ON_DEMAND(store_gradient)

{

Domain *domain;

cell_t c;

Thread *t;

domain=Get_Domain(1);



thread_loop_c (t,domain)

{

begin_c_loop (c,t)

{

C_UDMI(c,t,0) = 0-C_UDSI_G(c,t,0)[0];

C_UDMI(c,t,1) = 0-C_UDSI_G(c,t,0)[1];

C_UDMI(c,t,2) = NV_MAG(C_UDSI_G(c,t,0)); /*UNTIL HERE IS RIGHT*/



C_UDSI(c,t,1)=0-C_UDSI_G(c,t,0)[0];

C_UDSI(c,t,2)=0-C_UDSI_G(c,t,0)[1];

C_UDMI(c,t,3)=C_UDSI_G(c,t,1)[0]+C_UDSI_G(c,t,2)[1]; /*this line gives me 0*/

}

end_c_loop (c,t)

}

}
grubi is offline   Reply With Quote

Reply

Tags
laplacian


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why Laplacian is used instead of a combination of divergence and gradient operators? HakikiCanakkaleli OpenFOAM Programming & Development 3 September 26, 2019 08:40
Modifying the laplacian operator mlawson OpenFOAM Running, Solving & CFD 22 July 16, 2018 05:56
Solve double laplacian (laplacian of laplacian) equation t.oliveira OpenFOAM Programming & Development 2 February 1, 2016 10:49
Laplacian of U vector Field at Boudary AshwaniAssam OpenFOAM Programming & Development 0 May 7, 2015 08:36
Laplacian containing an implicit and an explicit variable voingiappone OpenFOAM Programming & Development 0 July 1, 2013 03:40


All times are GMT -4. The time now is 22:41.