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

UDF dynamic mesh problem

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   December 21, 2012, 03:46
Default UDF dynamic mesh problem
  #1
New Member
 
Gao
Join Date: Sep 2012
Posts: 13
Rep Power: 4
gaozhengyu is on a distinguished road
These 2 udf codes are both for the model I uploaded(one for membrane one for axis), and the membrane oscillated successfully.

The problem is the stretching of the axis.I want the point of the axis at (0,0) fixed. How should I do?
Attached Images
File Type: jpg ~6%5N06V90~C9)U9]{(}_LS.jpg (35.4 KB, 13 views)
File Type: jpg Q}1_0HM[O2XM~9J6@)$I6VL.jpg (83.8 KB, 11 views)
File Type: jpg X6QCKJ18CNN)V%HVXYGHRZT.jpg (85.7 KB, 6 views)
gaozhengyu is offline   Reply With Quote

Old   December 27, 2012, 02:18
Default
  #2
New Member
 
Gao
Join Date: Sep 2012
Posts: 13
Rep Power: 4
gaozhengyu is on a distinguished road
I have solved the problem, the code is changed as below.
And the model is not the one I uploaded before so the number in the code is different.


DEFINE_GRID_MOTION(oscilliation,domain,dt,time,dti me)
{
#if PARALLEL

Thread *tf = DT_THREAD(dt);
face_t f;
Node *v;
real NV_VEC(vel);
real NV_VEC(del);

real xx;
real yy;
real width;
real period;

int n;
/* set deforming flag on adjacent cell zone */
SET_DEFORMING_THREAD_FLAG(THREAD_T0(tf));
//Message ("time = %f, omega = %f\n", time, sign);

NV_D(vel, =, 0.0,0.0,0.0);

width = 0.095776 / 2.0;
period = 0.05;


begin_f_loop(f,tf)
{
f_node_loop(f,tf,n)
{
v = F_NODE(f,tf,n);

xx = NODE_X(v);

if(xx>0.058)

{

if (NODE_POS_NEED_UPDATE (v))
{

NODE_POS_UPDATED(v);

yy = (NODE_Y(v)) / width;

vel[1] = 0;
vel[0] = - 2 * 3.14159 / period * 0.005 * (1 - pow(yy,2)) * cos(2 * 3.14159 / period * time);

NV_VS(del,=,vel,*,dtime);
NV_VV(NODE_COORD(v),=,NODE_COORD(v),+,del);
}
}
}
}
end_f_loop(f,tf);
#endif
}
gaozhengyu is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic mesh & Negative volume in 3D mahzironrazak FLUENT 72 June 5, 2014 15:14
Dynamic Mesh UDF Jkl FLUENT 9 September 6, 2011 23:43
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55
Problem related with UDF for dynamic mesh Ryan FLUENT 6 April 29, 2004 09:29
Problem related with UDF for dynamic mesh Ryan FLUENT 1 April 16, 2004 06:05


All times are GMT -4. The time now is 03:49.