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

wall moving on the cylinder

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

Reply
 
LinkBack Thread Tools Display Modes
Old   May 29, 2012, 12:55
Default wall moving on the cylinder
  #1
CKW
New Member
 
Kecin Chang
Join Date: May 2012
Posts: 1
Rep Power: 0
CKW is on a distinguished road
Dear all,
I write a velocity profile into the wall moving condition for cylinder rotate

but my UDF had something problem
the velocity vetor on the cylinder will be wrong in the quadrant 2(x<0,y>0)
my cylinder center point is (0,0)

Quote:
DEFINE_PROFILE(rotate_x, thread, index)
{

real x[ND_ND];
real y;
real k;
face_t f;
real t = RP_Get_Real("flow-time");

begin_f_loop(f, thread)
{

F_CENTROID(x,f,thread);
y=x[1];
k=x[0];
if(t<=1)
{
if(y*k<0)
{
F_PROFILE(f, thread, index) = (0.2)*sin(pi*t)*(k/NV_MAG(x));
}

else
{
F_PROFILE(f, thread, index) = (-0.2)*sin(pi*t)*(k/NV_MAG(x));
}

}

else
{
F_PROFILE(f, thread, index) = 0;
}
end_f_loop(f, thread)
}
}

DEFINE_PROFILE(rotate_y, thread, index)
{

real x[ND_ND];
real y;
real k;
face_t f;
real t = RP_Get_Real("flow-time");

begin_f_loop(f, thread)
{

F_CENTROID(x,f,thread);
y=x[1];
k=x[0];
if(t<=1)
{
if(k*y<0)
{
F_PROFILE(f, thread, index) = (-0.2)*sin(pi*t)*(y/NV_MAG(x));
}

else
{
F_PROFILE(f, thread, index) = (0.2)*sin(pi*t)*(y/NV_MAG(x));
}

}

else
{
F_PROFILE(f, thread, index) = 0;
}

end_f_loop(f, thread)
}
}

I don't know where is the problem in my code
thank everyone!!
CKW 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
Water subcooled boiling Attesz CFX 7 January 5, 2013 04:32
UDF for wall slipping HFLUENT Fluent UDF and Scheme Programming 0 April 27, 2011 12:03
Deal with wall boundary with moving mesh by FVM? aiya Main CFD Forum 6 May 10, 2007 11:33
moving wall settings Nikolaos FLUENT 0 September 20, 2006 06:18
moving wall BC problem Sourabh Main CFD Forum 1 August 8, 2006 07:47


All times are GMT -4. The time now is 07:28.