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

UDF looping over nodes of a Face

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 10, 2019, 06:58
Default UDF looping over nodes of a Face
  #1
New Member
 
nguyenhoa
Join Date: Apr 2019
Posts: 9
Rep Power: 7
nguyenhoa is on a distinguished road
Hi everyone!
I have a question about macros looping over nodes of a face.
I knew the function is F_NODE (f,t,n) where f is face, t is thread, and n is local node index number.
my question is how can i point a node, which have a local index number is knew (n=0). For example, i have node A(x0,y0). How i can assign NODE A = F_NODE(f,t,0)?


Best regards!
nguyenhoa is offline   Reply With Quote

Old   June 10, 2019, 21:12
Default
  #2
Senior Member
 
Join Date: Feb 2010
Posts: 164
Rep Power: 17
gearboy is on a distinguished road
Quote:
Originally Posted by nguyenhoa View Post
Hi everyone!
I have a question about macros looping over nodes of a face.
I knew the function is F_NODE (f,t,n) where f is face, t is thread, and n is local node index number.
my question is how can i point a node, which have a local index number is knew (n=0). For example, i have node A(x0,y0). How i can assign NODE A = F_NODE(f,t,0)?


Best regards!
Mesh structure is fixed in Fluent. You can only get the node index number of a face. You can't change it.
gearboy is offline   Reply With Quote

Old   June 10, 2019, 21:14
Default
  #3
New Member
 
nguyenhoa
Join Date: Apr 2019
Posts: 9
Rep Power: 7
nguyenhoa is on a distinguished road
Quote:
Originally Posted by gearboy View Post
Mesh structure is fixed in Fluent. You can only get the node index number of a face. You can't change it.
thank you so much!
i even have a question, how i can get the node index number of a face?

Best regards!
nguyenhoa is offline   Reply With Quote

Old   June 11, 2019, 04:55
Default
  #4
Senior Member
 
Join Date: Feb 2010
Posts: 164
Rep Power: 17
gearboy is on a distinguished road
Quote:
Originally Posted by nguyenhoa View Post
thank you so much!
i even have a question, how i can get the node index number of a face?

Best regards!
int n;
Node *v;

f_node_loop(f,tf,n) // n will change from 0 to NodeCount-1 of face f
{
v = F_NODE(f,tf,n); // v is the node corresponding to Node index n
// now you can operate something for node v

}
gearboy is offline   Reply With Quote

Old   June 11, 2019, 05:01
Default
  #5
New Member
 
nguyenhoa
Join Date: Apr 2019
Posts: 9
Rep Power: 7
nguyenhoa is on a distinguished road
Quote:
Originally Posted by gearboy View Post
int n;
Node *v;

f_node_loop(f,tf,n) // n will change from 0 to NodeCount-1 of face f
{
v = F_NODE(f,tf,n); // v is the node corresponding to Node index n
// now you can operate something for node v

}
well, so if v=F_NODE(f,tf,n) and I also have NODE_X (v) = x0, and NODE_Y (v) = y0 so how can i find "n"?

Thanks!
nguyenhoa is offline   Reply With Quote

Reply


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
Fluent UDF wrong number of cells in parallel - correct in serial dralexpe Fluent UDF and Scheme Programming 7 May 17, 2018 08:26
face looping.. water hammer.. dynamic mesh alian FLUENT 2 November 21, 2015 07:36
UDF for Heat Exchanger model francois louw FLUENT 2 July 16, 2010 02:21
I want to use pressure of 1 face in udf that compiled on other face iman_1844 Fluent UDF and Scheme Programming 3 June 10, 2010 12:55
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 11:55


All times are GMT -4. The time now is 10:56.