|
[Sponsors] |
NODE_X(v) Co-ordinates sequence aren't right (end coordinate at the middle) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 10, 2018, 17:32 |
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 |
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? Last edited by asifnafi; August 12, 2018 at 23:37. |
|
August 13, 2018, 20:43 |
|
#2 |
Senior Member
Join Date: Sep 2017
Posts: 246
Rep Power: 12 |
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 |
|
August 13, 2018, 23:15 |
Solved
|
#3 |
New Member
Asif Shahriar Nafi
Join Date: Dec 2015
Location: Conway, SC, USA
Posts: 8
Rep Power: 10 |
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 |
|
Tags |
ansys 18.1, fluent - udf, udf |
|
|
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 08:30 |
Centrifugal fan-reverse flow in outlet lesds to a mass in flow field | xiexing | CFX | 3 | March 29, 2017 11:00 |
Simple piston movement in cylinder- fluid models | arun1994 | CFX | 4 | July 8, 2016 03:54 |
Waterwheel shaped turbine inside a pipe simulation problem | mshahed91 | CFX | 3 | January 10, 2015 12:19 |
particle tracking | sakurabogoda | CFX | 7 | December 5, 2013 00:12 |