CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Update nodes with a ON_DEMAND UDF (https://www.cfd-online.com/Forums/fluent/66370-update-nodes-on_demand-udf.html)

mrestrepo30 July 13, 2009 15:36

Update nodes with a ON_DEMAND UDF
 
Hi,
I'm calculating the displacement of the nodes by comparing two grids at different times, so the way it does it, is that it goes through the faces of a thread, and then on each face goes through all the nodes. However, as some faces "share" nodes, I end up calculating the displacement for one node several times.

I tried to use something I found in the GRID_MOTION macro:

f_node_loop (f1, t1, n1) {
node1 = F_NODE(f1, t1, n1);
if (NODE_POS_NEED_UPDATE (node1))
{
NODE_POS_UPDATED (node1);
......

However when I use this the UDF never goes inside the IF, so I get no information from the nodes. Does anyone know how to implement this function on a ON_DEMAND macro?

I appreciate any comments about it!


All times are GMT -4. The time now is 06:01.