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

Grid-rotation with UDF Files

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 27, 2010, 13:21
Default Grid-rotation with UDF Files
  #1
New Member
 
Maxime
Join Date: Apr 2010
Posts: 19
Rep Power: 16
Titasse is on a distinguished road
Hi,

I need to simulate a sort of grid-rotation with UDF Files. To simplify, just imagine a circle with a radius equal to 1.1m and its origin on (-1.5, 0, 0) which have to turn around the origin (0, 0, 0) in z-direction. In real, there is two parts of fluid separate by a sliding mesh interface.

This is my UDF File :

#include"udf.h"

DEFINE_GRID_MOTION(motion,domain,dt,time,dtime)
{
Thread *tf = DT_THREAD(dt);
face_t f;
Node *v;
real NV_VEC(axis_1);
real NV_VEC(axis_2);
real displx;
real disply;
int n;

displx=-1.5*(cos(10.47*(time+dtime))-cos(10.47*(time)));
disply=-1.5*(sin(10.47*(time+dtime))-sin(10.47*(time)));
NV_D(axis_1, =, 1.0, 0.0, 0.0);
NV_D(axis_2, =, 0.0, 1.0, 0.0);


begin_f_loop(f,tf)
{
f_node_loop(f,tf,n)
{
v = F_NODE(f,tf,n);
/* update node if the current node has not been previously
visited when looping through previous faces */
if ( NODE_POS_NEED_UPDATE (v))
{
/* indicate that node position has been update
so that it's not updated more than once */
NODE_POS_UPDATED(v);
NV_V_VS(NODE_COORD(v), =, NODE_COORD(v), +, axis_1,*,displx);
NV_V_VS(NODE_COORD(v), =, NODE_COORD(v), +, axis_2,*,disply);
}
}
}
end_f_loop(f,tf);
}

The number 10.47 represents the angular velocity (100 rpm = 10.47 rad/s)

I am pretty close to fix this problem. I just don't know how inplement that on Fluent.

I try with Define -> Dynamic Mesh -> Zones and under type i choose User-defined. The thing is i don't know if i have to choose the fluid, the interface or the both of them. All the test i did create en Error on Fluent :

Error : Update dynamic mesh failed. Negative cell volume detected.

or

Note : zone-surface : cannot create surface from sliding interface zone. Creating empty surface.

If someone could help me,

Thank you,

Regards,

Titasse,
Titasse is offline   Reply With Quote

Old   May 27, 2010, 14:23
Default
  #2
New Member
 
Maxime
Join Date: Apr 2010
Posts: 19
Rep Power: 16
Titasse is on a distinguished road
That works now, but i only have the translation in the y-direction. I need the translation in x-direction too. If someone see where i made a mistake on my UDF File.

Cheers,

Titasse
Titasse is offline   Reply With Quote

Old   July 15, 2010, 11:59
Default
  #3
Senior Member
 
aerospain
Join Date: Sep 2009
Location: Madrid, Spain
Posts: 149
Rep Power: 17
aerospain is on a distinguished road
Send a message via Skype™ to aerospain
Hi Titasse,

did you sort your problem out? Could you tell me how? I have been using a UDF for a single rotating domain but using the velocity as the sinusoidal function, but your way of using displacement every time-step may work better for me.

Do you have PDF files with infor about UDF? Besides the ANSYS "official" ones.

cheers!
aerospain 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
Grid motion with UDF fivos Fluent UDF and Scheme Programming 5 June 30, 2018 09:50
tutorial mesh files and UDF abhishukla FLUENT 0 April 8, 2010 03:08
How to get the grid size using UDF macro? Miao FLUENT 0 November 2, 2008 19:59
UDF for a sinusoidal rotation of an airfoil Lorenzo FLUENT 2 October 10, 2008 11:37
Open files in a UDF Riccardo FLUENT 2 June 26, 2002 11:45


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