|
[Sponsors] |
June 30, 2016, 19:14 |
Node Data usage in UDF
|
#1 |
New Member
Tiago Fonseca Costa
Join Date: Jun 2015
Posts: 9
Rep Power: 11 |
Does anyone know how to get any of these variables from a node?
- Node Pressure - Node Position at any given time (like, node position at previous time step, or something like that) - Node Velocity or Node Aceleration (if this even exist, I believe it does not, but it is worth giving a try ) Thank you! |
|
July 3, 2016, 16:46 |
|
#2 |
Member
Davoud Malekian
Join Date: Jan 2016
Posts: 53
Rep Power: 10 |
Hi
i dont know how much you are familiar with udf and ... but if u want to use node datas in any udfs u should follow these steps: 1.you need to define dynamic node pointer 2.then u need too loop over the nodes of a faces or cells 3.you should access the global node datas like: .... Thread *t; Node *node; cell_t c; int n; real x, y; thread_loop_c(t,d) { begin_c_loop(c,t) { c_Node_loop(c,t,n) { node = C_NODE(c,t,n); x = NODE_X(node); y = NODE_Y(node); ...... } end_c_loop(c,t) } } i dont know if u can access the node's velocity or pressure directly but you can definitly calculate them by interpolation between face centers. but x,y and z coordinates of the nodes are accessible as described in udf. |
|
July 3, 2016, 22:40 |
|
#3 |
New Member
Tiago Fonseca Costa
Join Date: Jun 2015
Posts: 9
Rep Power: 11 |
Thank you, I'll try this!
|
|
July 14, 2016, 23:36 |
|
#4 | |
Senior Member
Join Date: Feb 2010
Posts: 164
Rep Power: 17 |
Quote:
Thread*tc; Node*node; cell_t c; int n; real NodeP; domain=Get_Domain(1); Node_Function_Values(domain, "pressure"); //---------------------------------------------------------- thread_loop_c(tc,domain) { begin_c_loop(c,tc) { c_node_loop(c,tc,n) { node=C_NODE(c,tc,n); NodeP=NODE_VALUE(node); } } end_c_loop(c,tc) } |
||
July 18, 2016, 22:16 |
|
#5 |
New Member
Tiago Fonseca Costa
Join Date: Jun 2015
Posts: 9
Rep Power: 11 |
Thank you so much!!
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ICEM] Error in mesh writing | helios | ANSYS Meshing & Geometry | 21 | August 19, 2021 15:18 |
CFD by anderson, chp 10.... supersonic flow over flat plate | varunjain89 | Main CFD Forum | 18 | May 11, 2018 08:31 |
Problem running fluent with udf on supercomputer(batch system) | Sept24 | Fluent UDF and Scheme Programming | 3 | October 15, 2015 13:50 |
【Help】"Error: Update_Time_Level: invalid data" | Chen | FLUENT | 2 | August 24, 2014 08:51 |
999999 (../../src/mpsystem.c@1123):mpt_read: failed:errno = 11 | UDS_rambler | FLUENT | 2 | November 22, 2011 10:46 |