CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   moving wall by UDF (http://www.cfd-online.com/Forums/fluent/34855-moving-wall-udf.html)

lyf October 15, 2004 03:27

moving wall by UDF
 
I want to let a wall moving in the flow field by using the UDF macro DEFINE_GIRD_MOTION not using the DEFING_CG_MOTION, can everybody help me how to realize it ?

thanks a lot

lyf

stk October 15, 2004 11:09

Re: moving wall by UDF
 
I have used it. Grid motion makes sense, since you want to describe the motion of each node independently (deforming wall), otherwise use cg motion (same speed for all nodes during time motion). I t is not difficult, look at the udf manual 6.1, the example for grid motion and you will understand. good luck!

lyf October 17, 2004 22:30

Re: moving wall by UDF
 
Thank you stk. I have used the cg motion many times, but now I want to use the grid motion to relaize both the rigid motion and deform motion. I have studied the udf manual 6.1, but I can't understand it well, can you give me a simple case about the grid motion udf?

thanks a lot.

lyf

Aravind October 18, 2004 10:37

Re: moving wall by UDF
 
Hi,

I have a question regarding this topic. there are two options available to compile a UDF in Fluent viz. intrepret or compiled. In which of these cases do you require a 'C' compiler?

Thanks

lyf October 18, 2004 21:36

Re: moving wall by UDF
 
Hi

Aravind, for most of my cases, i choose the last one

lyf

almostafa67 July 30, 2010 12:01

rotation about z axis
 
hi everybody...
i am trying to simulate peristaltic pump and for this i need to write an udf file to rotate on of edges about z axis,i will be thanfull if u could help me with this problem.
thank you in advance..

navee05 August 1, 2010 03:45

rotation about z axis
 
hi almostafa67, you should use the udf "define_CG_motion, and in this use use omega[2] instead of vel[2], you have to modify the udf.

almostafa67 August 1, 2010 04:34

rotation about z axis
 
2 Attachment(s)
salamon alaikom dear naveed...
thank you for a very quick response;a friend helped me to write an udf file but when i compile it, fluent shows me this error massage

Deleted old libudf\ntx86\2ddp\libudf.dll
1 file(s) copied.
(system "copy "C:\PROGRA~1\ANSYSI~1\v120\fluent"\fluent12.0.16\s rc\makefile_nt.udf libudf\ntx86\2ddp\makefile")
1 file(s) copied.
(chdir "libudf")()
(chdir "ntx86\2ddp")()
# Generating ud_io1.h
test.c
# Generating udf_names.c because of makefile test.obj
udf_names.c
udf_names.c(7) : error C2059: syntax error : '}'
udf_names.c(8) : warning C4034: sizeof returns 0
Cannot change directory to z
Done.

i dont know what is '}' for!?
dear naveed let me explain the case that i'm working on it maybe you have an easier solution for it: i'm trying to simulate peristaltic pump,in the images that a sent u (i simulated them in gambit), i want to rotate two/one small cylinder about center of bigger circle and for this used bellow udf:

# include "udf.h"
# include "dynamesh_tools.h"

DEFINE_CG_MOTION(peristaltic,dt,cg_vel,cg_omega,ti me,dtime)
{
real omega;
NV_S(cg_vel,=,0.0);
NV_S(cg_omega,=,0.0);
if (!Data_Valid_P())
return;

omega = 4.0;
cg_vel [0] = 0.0;
cg_vel [1] = 0.0;
cg_vel [2] = 0.0;
cg_omega [0] = 0.0;
cg_omega [1] = 0.0;
cg_omega [2] = omega;
}

and faced error that mentioned befor. if u have any idea please let me know;i'm looking forward to ur help AKHI:)

mas August 4, 2010 06:39

Hi almostafa67,

I think the error was cause by 2d 3d conflict.
Your case is 2d but your udf is for 3d.
Try this:

DEFINE_CG_MOTION(peristaltic,dt,cg_vel,cg_omega,ti me,dtime)
{
real omega;
NV_S(cg_vel,=,0.0);
NV_S(cg_omega,=,0.0);
if (!Data_Valid_P())
return;

omega = 4.0;
cg_vel [0] = 0.0;
cg_vel [1] = 0.0;
cg_omega [0] = 0.0;
cg_omega [1] = omega;
}

almostafa67 August 4, 2010 12:07

rotation about z axis
 
1 Attachment(s)
dear mas thank you for ur reply:)
i solved the problem,and now i can rotate small circle for a short distance but i faced a new problem would u think about it and help me out?
the problem is: the end points of the small circle has been locked and does not move(as u see it in the image) do u know how can i solve it?and how move small circle a larger distance?
thank u in advance....

mas August 4, 2010 19:53

So, you moved the small circle. Good.
I think while moving the small circle, you also need to update the geometry of the inner diameter of the large circle.

almostafa67 August 5, 2010 01:39

how?
could u explain it more,plz...

mas August 5, 2010 03:48

The inner boundary of the large circle should be define as "deforming" type in the dynamic mesh zones panel. Faceted type might do the trick. Please refer to dynamic mesh tutorial for meshing options.

almostafa67 August 5, 2010 03:56

Quote:

Originally Posted by mas (Post 270349)
The inner boundary of the large circle should be define as "deforming" type in the dynamic mesh zones panel. Faceted type might do the trick. Please refer to dynamic mesh tutorial for meshing options.


tnx dear mas;)

gi12 December 25, 2010 11:27

Dear all
I would really appreciate your help as Iím new to UDF and moving mesh
Considering a simple cylinder with flexible walls and the elasticity of the wall is given. What is the best UDF function to go with in order to simulatae such example?
Cheers


All times are GMT -4. The time now is 05:59.