CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT

Grid-rotation with UDF Files

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

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

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 :


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;

NV_D(axis_1, =, 1.0, 0.0, 0.0);
NV_D(axis_2, =, 0.0, 1.0, 0.0);

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

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.


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

If someone could help me,

Thank you,


Titasse is offline   Reply With Quote

Old   May 27, 2010, 13:23
New Member
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.


Titasse is offline   Reply With Quote

Old   July 15, 2010, 10:59
Senior Member
Join Date: Sep 2009
Location: Madrid, Spain
Posts: 149
Rep Power: 16
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.

aerospain is offline   Reply With Quote


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 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 08:50
tutorial mesh files and UDF abhishukla FLUENT 0 April 8, 2010 02:08
How to get the grid size using UDF macro? Miao FLUENT 0 November 2, 2008 18:59
UDF for a sinusoidal rotation of an airfoil Lorenzo FLUENT 2 October 10, 2008 10:37
Open files in a UDF Riccardo FLUENT 2 June 26, 2002 10:45

All times are GMT -4. The time now is 04:50.