|
[Sponsors] |
January 22, 2009, 02:13 |
UDF velocity profile at nodes
|
#1 |
Guest
Posts: n/a
|
Dear All How apply the fuction for velocity profile in nodes not face_t or centroed for face. I need aply this fuction at nodes. can any one to help me many thanks emad
|
|
January 28, 2009, 09:17 |
Re: UDF velocity profile at nodes
|
#2 |
Guest
Posts: n/a
|
Hello Emad
As I guess this profile is on a plane you want to change the nodal values of certain faces. There is an example of Looping over Nodes of a Face (f_node_loop) (also Cell separately) in the UDF Manual: face_t f; Thread *t; int n; Node *node; f_node_loop(f,t,n) { . . . node = F_NODE(f,t,n); . . . } Also NODE_X(node) returns the x co-ordinate of the node pointed to by *node. (similar macros for y and z) so the position can be found. Afraid I can't see how to change any of the node values let alone the 'i'th property. Hope this was some help. Kris |
|
January 29, 2009, 07:35 |
Re: UDF velocity profile at nodes
|
#3 |
Guest
Posts: n/a
|
Dear Mr. Kris Many thanks for reply. but if appled your advice for velocity profile in inlet 2d duct (1 * 10)m. if plot velocity at inlet duct and taking node values under options for xy plot for fluent the data appear as
vel y-coor ---- ------ 0.108 1 0.192 0.9 0.252 0.8 0.288 0.7 0.3 0.6 0.288 0.5 0.252 0.4 0.192 0.3 0.108 0.2 0 0.1 0 0 at y=1 should be velocity aqual to zero. My UDF for velocity profile as:- //--------------------------------------------------------------------------- #include "udf.h" //u=Uave*(3/2)*(1-(y-h/2)/h/2)**2) //taking h=1 and Uave=0.2 m/s DEFINE_PROFILE(vel2d_inlet_velocity,t,i) { real x[ND_ND]; real rady; real py; //real z,y; face_t f; Node *v; int n; begin_f_loop(f,t) { f_node_loop(f,t,n) { v = F_NODE(f,t,n); py=(NODE_Y(v)-0.5)/0.5; rady = (1.0-pow(py,2)); F_PROFILE(f,t,i) = 0.2*(3.0/2.0)*rady; } } end_f_loop(f,t) } Many thanks agains for help me emad |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Velocity at each nodes::: how?? | Nitin Dewangan | CFX | 3 | October 27, 2008 09:13 |
velocity profile as an velocity inlet condition | KEES | Main CFD Forum | 0 | April 15, 2008 12:26 |
Extract velocity of nodes on outlet, CCL/CEL ? | lee | CFX | 0 | January 31, 2008 23:14 |
how to get the velocity of nodes by UDF? | tony | FLUENT | 3 | November 26, 2005 07:03 |
Nodes positions + velocity and pressure values at the nodes | Lily Kabanj | FLUENT | 1 | March 13, 2000 20:21 |