CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   How to use UDF to define a moving wall (http://www.cfd-online.com/Forums/fluent/33078-how-use-udf-define-moving-wall.html)

Big Stone February 20, 2004 17:54

How to use UDF to define a moving wall
 
Hi,Guys

Can anyone help me to use UDF to define a moving wall? Thanks


Andrew Garrard February 21, 2004 21:58

Re: How to use UDF to define a moving wall
 
Yes, if you know how to do a UDF it is easy - You use a DEFINE_PROFILE(name, thread, i)

If you don't it will be something like this:

DEFINE_PROFILE(moving_wall, thread, i) {

face_t f;

begin_f_loop(f, thread)

{

F_PROFILE = 10; /* insert speed of wall here, I have used 10 */

}

end_f_loop(f, thread)

}

I haven't compiled it, but it will be pretty similar to that.

ccc February 22, 2004 11:18

Re: How to use UDF to define a moving wall
 
hi Big Stone,

Can you make your problem more clear? Does the wall move in the direction parallel or perpendicular to itself? For different cases, the method is totally different.

good luck.


Big Stone February 22, 2004 22:27

Re: How to use UDF to define a moving wall
 
Thanks for Andrew and ccc advice, Actually I want a wall move as sin(t), but I could not find a Macro for wall moving. Andrew and ccc, can you give me more details. Thanks


ccc February 22, 2004 23:12

Re: How to use UDF to define a moving wall
 
hi big stone,

which direction does the wall move in, parallel or perpendicular to itself?

if parallel, Andrew's method is ok. However, if perpendicular, you have to refer to the dynamic mesh module in fluent6.1. If it's your case, i would like to tell you more.

good luck.

Big Stone February 22, 2004 23:56

Re: How to use UDF to define a moving wall
 
Hi, Ccc

thank you very much. my case is that the wall move perpendicularly to itself, the wall move sinusoidally with time like sine function. the magnitude of the wall moving is small. Could you give me more details? I know little about UDF. Thanks.

BTW, Andrew method can only be used to define a boundary not for a moving wall? can you try it. Thanks

Andrew Garrard February 23, 2004 05:23

Re: How to use UDF to define a moving wall
 
You can use the UDF I suggested and hook it into the momentum part of the define -> wall boundary condition panel. Select moving wall, absolute and traslational and you can specify how the wall moves in the X, Y and Z directions. This will not chage the flow geometry, it will simply impart momentum onto the fluid adjcent to the wall, so if the magnitude of the movement is small compared to the flow gap this method may should work fine.

ccc February 23, 2004 05:52

Re: How to use UDF to define a moving wall
 
hi big stone,

Andrew is right. Since the magnitude of moving is samll, Andrew method applies and may be more effective comparing to dynamic mesh.

good luck.


Big Stone February 23, 2004 09:47

Re: How to use UDF to define a moving wall
 
Hi,

Maybe I mislead you guys. I want to define a specific velocity for the wall. the problem is that I can not find a macro for defining wall velocity as I said to you in last poster. Thanks

Big Stone.

Andrew Garrard February 23, 2004 10:51

Re: How to use UDF to define a moving wall
 
I am struggling the think of a way of making the expanation clearer. Have you made a UDF before? There is no define function for wall velocity, just as there is no define function for, say, inlet velocity or wall temperature, which are created using UDF's very easily. You have to use a DEFINE_PROFILE and hook it into the wall velocity section in boundary conditions in the fluent GUI.

Big Stone February 23, 2004 11:03

Re: How to use UDF to define a moving wall
 
Hi, Andrew

Thanks I got it.


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