# UDF: Have 3 dynamic mesh regions working well in 2D, but not in 3D

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

October 16, 2015, 21:45
UDF: Have 3 dynamic mesh regions working well in 2D, but not in 3D
#1
New Member

Gabriel Naccache
Join Date: Oct 2015
Location: Montreal
Posts: 1
Rep Power: 0
Hello everyone,

So I have done a simulation in 2D where I prescribed the motion of two domains using a UDF. The purpose of this simulation was to analyse the performance of a vertical axis wind turbine with one blade in a non circular path. The entire mesh is composed of an outer deforming stationary mesh, and an inner moving mesh that translates in a vertically oscillating motion. Inside this translating mesh, is another rotating sliding mesh.

I have completed the simulation in 2D and everything works fine. So I am testing this design in 3D, but it is not working correctly. The UDF is compiled correctly without any errors. When I launch the simulation, I can see that the mesh does indeed move; however, when I monitor the velocity of the blade, Fluent gives me zero velocity value. So I decided to make a dummy simulation and test each domain motion individually with the UDF and they both worked and fluent gave me the correct velocity on the blade.

I have attached the UDF to look at.

If anyone could help me with this problem, I would greatly appreciate it. Thanks everyone.
Attached Files
 Mesh_Motion.c (1.6 KB, 41 views)

Last edited by gabriel09; October 17, 2015 at 17:22.

May 12, 2016, 07:06
Dragon fly motion
#2
Senior Member

Arun raj.S
Join Date: Jul 2011
Posts: 186
Rep Power: 12
Hi Gabriel,

I am simualting dragonfly motion. I want to use sliding mesh as I want to create structured mesh around the aerfoil. What changes I have to make in this udf. I have attached my domain. Could you tell me?. I have attached the udf which i have prepared but i am not sure whether it is proper or not

x(t),y)(t) = (Ao/2)*(1+cos(2*pi*f*t)*(cos(beta),sin(beta))
alpha(t) = alphao+B sin(2*pi*f*t)
Ao=2.5 cm
B=pi/4
alphao=pi/4
f=40 Hz
beta = 60 degree

I have differentiated the above function and applied in the udf

vel[0] = - A0/2 * 2*pi*f*cos(beta)*sin(2*pi*f*t)
vel[1] = - A0/2 * 2*pi*f*sin(beta)*sin(2*pi*f*t)
omega[2]= B *2*pi*f*cos(2*pi*f)
Attached Images
 Error.jpg (63.3 KB, 18 views)
Attached Files
 Mesh_Motion - Copy.c (738 Bytes, 15 views)

 Tags 3d analysis, fluent, udf cg motion