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

NODE_X(v) Co-ordinates sequence aren't right (end coordinate at the middle)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 10, 2018, 16:32
Default NODE_X(v) Co-ordinates sequence aren't right (end coordinate at the middle)
  #1
New Member
 
Asif Shahriar Nafi
Join Date: Dec 2015
Location: Conway, SC, USA
Posts: 8
Rep Power: 10
asifnafi is on a distinguished road
Hi,
I was just printing the values of X-coordinates of a line of a rectangle using udf. but the coordinates are printed like this (for a straight line from the origin):
0.1
0.2
0.5
0.4
0.6
0.3


I'm using define_grid_motion macro to print the co-ordinates (NODE_X(node)). I don't understand why it's like this. Does Ansys macro loops work like this?
Attached Files
File Type: zip fluentxxxx.zip (73.8 KB, 1 views)

Last edited by asifnafi; August 12, 2018 at 22:37.
asifnafi is offline   Reply With Quote

Old   August 13, 2018, 19:43
Default
  #2
Senior Member
 
Join Date: Sep 2017
Posts: 246
Rep Power: 11
obscureed is on a distinguished road
Hi Asifnafi,


There are no guarantees (in principle or in practice) about the order in which faces are visited by a begin_f_loop, or the order in which nodes are visited by f_node_loop. (OK, there are some constraints on how the nodes appear in practice -- they will be in cyclic order, probably with some kind of anticlockwise-around-the-normal convention -- but I don't remember whether this is officially guaranteed.)


You should not need a specific order for a typical UDF. If you were doing some kind of specialist thing that required a specific order, you would need to arrange it yourself.


Best regards,
Ed
obscureed is offline   Reply With Quote

Old   August 13, 2018, 22:15
Default Solved
  #3
New Member
 
Asif Shahriar Nafi
Join Date: Dec 2015
Location: Conway, SC, USA
Posts: 8
Rep Power: 10
asifnafi is on a distinguished road
Hi obsecureed,
Thanks for getting back so quickly. I've solved it today. I had to create a pointer and an array to copy the nodes pointers and node values to rearrange them at ascending order. Then everything was easy.
Thanks,
Asif
asifnafi is offline   Reply With Quote

Reply

Tags
ansys 18.1, fluent - udf, udf


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
Radiation in semi-transparent media with surface-to-surface model? mpeppels CFX 11 August 22, 2019 07:30
Centrifugal fan-reverse flow in outlet lesds to a mass in flow field xiexing CFX 3 March 29, 2017 10:00
Simple piston movement in cylinder- fluid models arun1994 CFX 4 July 8, 2016 02:54
Waterwheel shaped turbine inside a pipe simulation problem mshahed91 CFX 3 January 10, 2015 11:19
particle tracking sakurabogoda CFX 7 December 4, 2013 23:12


All times are GMT -4. The time now is 20:23.