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

Udf DEFINE_WALL_FUNCTION

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 17, 2011, 03:31
Default Udf DEFINE_WALL_FUNCTION
  #1
New Member
 
Join Date: May 2011
Posts: 3
Rep Power: 14
roman10 is on a distinguished road
Good morning to everyone

I have a problem with Fluent udf Macro DEFINE_WALL_FUNCTION

I have to write a wall law where u* = ln(E y*)/VKC + Const y*

I expect (from Fluent user guide) that the values at the near wall cell of wall shear stress, production of turbulent kinetic energy and turbulent dissipation rate are computed in this way (if the computational node is in the fully turbulent region)

tau wall = rho U// uk / f(y*)

Pk = tau wall^2 / mu * du*/dy*

Eps = uk^3 / (VKC * Wall distance)

Unfortunately I noticed that the expressions for tau wall and Pk are correct, but epsilon is not computed in the way shown above. Moreover, the difference between the value extracted by Fluent and the values computed with this expression are not random, but have a trend similar to epsilon profile

Any idea about why it happens?

This is the udf I use

/************************************************** ****************
User-defined wall functions: separated into turbulent and
laminar regimes
/************************************************** ***************/
#include "udf.h"

#define VKC 0.4187

DEFINE_WALL_FUNCTIONS(swf_impl, f, t, c0, t0, wf_ret, yPlus, Emod)
{
real wf_value;

switch (wf_ret)
{
case UPLUS_LAM:

wf_value = yPlus;

break;

case UPLUS_TRB:

wf_value = log(Emod*yPlus)/(VKC) + 0.001*yPlus;

break;

case DUPLUS_LAM:

wf_value = 1.0;

break;

case DUPLUS_TRB:

wf_value = 1./(VKC*yPlus) +0.001;

break;

case D2UPLUS_TRB:

wf_value = -1./(VKC*yPlus*yPlus);

break;

default:

printf("Wall function return value unavailable\n");

}

return wf_value;

}


Another problem is that I don't know what d2uplus is used for

Thank you in advance
roman10 is offline   Reply With Quote

Reply

Tags
define macro, epsilon, user defined function, wall function


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
Dynamic Mesh UDF Qureshi FLUENT 7 March 23, 2017 07:37
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 22:14
How to add a UDF to a compiled UDF library kim FLUENT 3 October 26, 2011 21:38
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 04:03
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 04:01


All times are GMT -4. The time now is 17:26.