CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

How to use UDF to define a moving wall

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 5, 2004, 06:17
Default How to use UDF to define a moving wall
  #1
lingo
Guest
 
Posts: n/a
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!
  Reply With Quote

Old   April 6, 2004, 06:42
Default Re: How to use UDF to define a moving wall
  #2
emma
Guest
 
Posts: n/a
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

  Reply With Quote

Old   April 7, 2004, 00:49
Default Re: How to use UDF to define a moving wall
  #3
Ady
Guest
 
Posts: n/a
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
  Reply With Quote

Old   April 8, 2004, 05:43
Default Re: How to use UDF to define a moving wall
  #4
lingo
Guest
 
Posts: n/a
Emma,Ady:

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

Old   April 8, 2004, 09:05
Default Re: How to use UDF to define a moving wall
  #5
Guess
Guest
 
Posts: n/a
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!
  Reply With Quote

Old   April 9, 2004, 23:24
Default Re: How to use UDF to define a moving wall
  #6
lingo
Guest
 
Posts: n/a
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!
  Reply With Quote

Old   April 9, 2004, 23:37
Default Re: How to use UDF to define a moving wall
  #7
lingo
Guest
 
Posts: n/a
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.
  Reply With Quote

Old   April 19, 2004, 04:19
Default Re: How to use UDF to define a moving wall
  #8
Guess
Guest
 
Posts: n/a
#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.
  Reply With Quote

Old   April 19, 2004, 04:21
Default Re: How to use UDF to define a moving wall
  #9
Guess
Guest
 
Posts: n/a
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...
  Reply With Quote

Old   August 19, 2014, 10:14
Default
  #10
New Member
 
Join Date: Apr 2014
Posts: 13
Rep Power: 12
Farid is on a distinguished road
Use CURRENT_TIME instead of time to get the real time of the simulation.
Farid is offline   Reply With Quote

Reply


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
How to use UDF to define a moving wall Big Stone FLUENT 14 February 13, 2021 08:24
[Commercial meshers] Fluent3DMeshToFoam simvun OpenFOAM Meshing & Mesh Conversion 50 January 19, 2020 16:33
Missing math.h header Travis FLUENT 4 January 15, 2009 12:48
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug unoder OpenFOAM Installation 11 January 30, 2008 21:30
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 15:09


All times are GMT -4. The time now is 21:33.