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

Moving Wall Boundary Condition

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 8, 2011, 03:43
Default Moving Wall Boundary Condition
  #1
New Member
 
Morteza
Join Date: Nov 2009
Posts: 9
Rep Power: 8
neo_mor is on a distinguished road
dear friends
Is there any udf for moving wall with time dependent velocity on the web?
i need it ASAP.

thanks,
neo_mor is offline   Reply With Quote

Old   February 8, 2011, 04:49
Default
  #2
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 739
Blog Entries: 1
Rep Power: 15
Amir is on a distinguished road
Hi Morteza,
I previously wrote a UDF for rotating wall. theta as a function of time, for other types of wall motions you can change some lines of that :
#include "udf.h"
#include "stdio.h"
#include "math.h"
// rotation theta=f(t)
DEFINE_GRID_MOTION(eye,domain,dt,time,dtime)
{
Thread *tf = DT_THREAD(dt);
face_t f;
Node *v;
real dtheta,a,b;
int n;
SET_DEFORMING_THREAD_FLAG(THREAD_T0(tf));
begin_f_loop(f,tf)
{
f_node_loop(f,tf,n)
{
v=F_NODE(f,tf,n);
if (NODE_POS_NEED_UPDATE (v))
{
NODE_POS_UPDATED(v);
dtheta=......; // compute dtheta as a function of dtime (differentiation)
a=cos(dtheta)*NODE_X(v)-sin(dtheta)*NODE_Y(v); // rotation tensor
b=sin(dtheta)*NODE_X(v)+cos(dtheta)*NODE_Y(v);
NODE_X(v)=a;
NODE_Y(v)=b;
}
}
}
end_f_loop(f,tf);
}
Amir is offline   Reply With Quote

Old   February 8, 2011, 04:56
Default Thanks
  #3
New Member
 
Morteza
Join Date: Nov 2009
Posts: 9
Rep Power: 8
neo_mor is on a distinguished road
Dear Amir
thank u for your help.can you explain differences between moving wall and grid motion?
neo_mor is offline   Reply With Quote

Old   February 11, 2011, 04:36
Default
  #4
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 739
Blog Entries: 1
Rep Power: 15
Amir is on a distinguished road
Hi Morteza,
you can hang this UDF where ever you want, obviously your wall also has grid points and they can move. but notice that you can use remeshing and smoothing options in your case.
Amir is offline   Reply With Quote

Old   February 12, 2011, 05:00
Default
  #5
New Member
 
Morteza
Join Date: Nov 2009
Posts: 9
Rep Power: 8
neo_mor is on a distinguished road
thank u Amir,
Consider a tank that contains water about its half height.
and the whole tank begins to move with time dependent velocity.
in this case i should use moving mesh or moving wall?

tanks in advance.
neo_mor is offline   Reply With Quote

Old   February 12, 2011, 09:58
Default
  #6
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 739
Blog Entries: 1
Rep Power: 15
Amir is on a distinguished road
Hi Morteza,
of course you should use moving mesh without deforming or smoothing or... .
if velocity was constant, you could easily use moving reference frame but in your case the above UDF works. just hook it to all of your zones like wall,interior,... except fluid ones.
Amir is offline   Reply With Quote

Old   February 15, 2011, 05:02
Default
  #7
New Member
 
Morteza
Join Date: Nov 2009
Posts: 9
Rep Power: 8
neo_mor is on a distinguished road
Hi Amir
Thanks for your help.i will check it and whether i have problem i will inform you.
thanks again.
neo_mor 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
Wind turbine simulation Saturn CFX 45 February 8, 2016 05:42
UDS problem with wall boundary condition Alex F. FLUENT 15 September 21, 2015 09:28
thermal boundary condition at coupled wall gokul patil FLUENT 2 June 19, 2014 05:07
External Radiation Boundary Condition (Two sided wall), Grid Interface CFD XUE FLUENT 0 July 8, 2010 06:49
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 05:05


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