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

Node Data usage in UDF

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By D.M
  • 2 Post By gearboy

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 30, 2016, 19:14
Default Node Data usage in UDF
  #1
New Member
 
Tiago Fonseca Costa
Join Date: Jun 2015
Posts: 9
Rep Power: 11
TiagoFC is on a distinguished road
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!
TiagoFC is offline   Reply With Quote

Old   July 3, 2016, 16:46
Default
  #2
D.M
Member
 
Davoud Malekian
Join Date: Jan 2016
Posts: 53
Rep Power: 10
D.M is on a distinguished road
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.
eagle_001 likes this.
D.M is offline   Reply With Quote

Old   July 3, 2016, 22:40
Default
  #3
New Member
 
Tiago Fonseca Costa
Join Date: Jun 2015
Posts: 9
Rep Power: 11
TiagoFC is on a distinguished road
Thank you, I'll try this!
TiagoFC is offline   Reply With Quote

Old   July 14, 2016, 23:36
Default
  #4
Senior Member
 
Join Date: Feb 2010
Posts: 164
Rep Power: 17
gearboy is on a distinguished road
Quote:
Originally Posted by TiagoFC View Post
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!
Domain*domain;
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)
}
TiagoFC and T.Nagata like this.
gearboy is offline   Reply With Quote

Old   July 18, 2016, 22:16
Default
  #5
New Member
 
Tiago Fonseca Costa
Join Date: Jun 2015
Posts: 9
Rep Power: 11
TiagoFC is on a distinguished road
Thank you so much!!
TiagoFC 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
[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


All times are GMT -4. The time now is 22:41.