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/33397-how-use-udf-define-moving-wall.html)

lingo April 5, 2004 05:17

How to use UDF to define a moving wall
 
Hi,evryone: My problem is that:in a centrifugal pump,the impeller(wall) is rotating with sin(t),so the fluid zone is also rotating .I just know a UDF is needed to define this.But I don't know whether I define the moving wall or define the fluid zone or both?Which Macro will be needed?How to define? can you give me some advice? Thank you!

emma April 6, 2004 05:42

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

I think you can use the macro "DEFINE_CG_MOTION" to define the motion of the moving wall if you are using dynamic mesh modeling. The fluid zone is normally described as "deforming". As I remember, you can also work with MRF(multipul referance frame),mixing plane or sliding mesh model.

Please see fluent user's guide, chapter 9 and UDF manual.

Hope it helps.

Emma


Ady April 6, 2004 23:49

Re: How to use UDF to define a moving wall
 
You will need to use the Dynamic meshing model. You can not use reference frame models for this. Fluent does not have the hook for the UDf under fluid bounday conditions panel for omega as a function of time.. Use Dynamic mesh model and define wall to be rotating wall.

Use DEFINE_CG_MOTION macro for prescribing motion. Use smoothing-remeshing algo for the fluid domain to activate the remeshing tin the domain.

Best, Ady

lingo April 8, 2004 04:43

Re: How to use UDF to define a moving wall
 
Emma,Ady:

Thank you for your advice .I never thought of using the Dynamic meshing model .I'll try it. Best wishes.

Guess April 8, 2004 08:05

Re: How to use UDF to define a moving wall
 
You can define the fluid rotation using UDFs even though you don't have hook to attach the UDF

Use DEFINE_ADJUST macro and THREAD_VAR(tc).fluid.omega = your function

to define the rotation

enjoy!

lingo April 9, 2004 22:24

Re: How to use UDF to define a moving wall
 
emma,Ady:

I met a problem.When I activate the Dynamic Meshing and OK,someting as follows appears in my console window:

"Could not check out fluent-mdm-beta: No such feature exists Feature: fluent-mdm-beta License path: D:\FLUENT.INC\license\license.dat; FLEXlm error: -5,357 For further information, refer to the FLEXlm End User Manual, available at "www.globetrotter.com".

Error: unable to acquire a license for the moving/deforming mesh model.''

what's wrong ? How to solve it?

another question: I only can activate the "parameter"in "Dynamic meshing" ,how to activate "the zones" in "Dynamic meshing"?

Thank you for your help!

lingo April 9, 2004 22:37

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

I still don't catch ¡°THREAD_VAR(tc).fluid.omega = your function¡±.I know little about the variables in Macro¡°DEFILE-ADJUST¡±. I try to write a udf :

#inclue ¡°udf.h¡±

DEFILEA¡ªADJUST(my£*adjust,d) { Thread*t; cell-t c

thread -loop-c(t,d) { begin-c-loop(c,t) THREAD-VAR(tc).fluid .omega=5*sin(5*t); end-c-loop(c,t) } }

Can you check it for me? Thank you very much.

Guess April 19, 2004 03:19

Re: How to use UDF to define a moving wall
 
#include udf.h

DEFINE_ADJUST(my_adjust,d) {

Thread *tc;

cell_t c;

real time = 0.5;

thread_loop_c(tc,d)

{

if (FLUID_THREAD_P(t))

{

begin_c_loop(c,tc)

{

THREAD_VAR(tc).fluid.omega = 5*sin(5*time);

}

end_c_loop(c,tc)

}

} }

The "t" which you have used in the fn. sin(5*t), I think it should be "time". Get the time from fluent solver- I have just hard coded in the udf.

Guess April 19, 2004 03:21

Re: How to use UDF to define a moving wall
 
Use fluent v6.1.22! I think you are using V6.0.20 or 6.0.12...if you use v6.1, you don't require extra license to access the dynamic mesh functionalities...

Farid August 19, 2014 09:14

Use CURRENT_TIME instead of time to get the real time of the simulation.


All times are GMT -4. The time now is 23:36.