|
[Sponsors] |
May 16, 2019, 08:11 |
Laplacian
|
#1 |
New Member
Join Date: May 2019
Posts: 2
Rep Power: 0 |
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) } } |
|
Tags |
laplacian |
|
|
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 |