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

Moving a wall with UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 13, 2011, 05:26
Default Moving a wall with UDF
  #1
noa
Member
 
anonymous
Join Date: Feb 2011
Posts: 50
Rep Power: 15
noa is on a distinguished road
Can you please take a look at this????


I have a 2D channel that the upper wall has the equation of y=ax+b.

I used a udf in order to move it along Y axis.
However, when I preview my mesh it doesn't take into account the slope of the wall (a*x) :


#include"udf.h"
#include"mem.h"
#include"dynamesh_tools.h"
/* Constants */
#define b 10e-3
#define a 0.3e-3
/************************************************** ***/



DEFINE_GEOM(upper_wall_m,domain,dt,position)
{
Thread *tf = DT_THREAD (dt);
face_t f;
Node *node_p;
real x, y;
int n;

SET_DEFORMING_THREAD_FLAG (THREAD_T0 (tf));

begin_f_loop (f, tf)
{
f_node_loop (f, tf, n)
{
node_p = F_NODE (f, tf, n);
if (NODE_POS_NEED_UPDATE (node_p))
{
NODE_POS_UPDATED (node_p);
x = NODE_X (node_p);

y=-a*(x)+b)+CURRENT_TIME;
NODE_Y (node_p) = y;
}
}
}
end_f_loop (f, tf);
}

noa 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
How to use UDF to define a moving wall lingo FLUENT 9 August 19, 2014 09:14
wall boundary condition in UDF ssamton FLUENT 0 January 31, 2011 03:07
Free Stream & Wall Temp UDF jww FLUENT 0 October 2, 2009 09:37
wall conduction, UDF sudh FLUENT 0 June 28, 2004 08:09
udf: dimensionless wall coordinate Chris FLUENT 0 June 22, 2004 06:10


All times are GMT -4. The time now is 13:59.