|
[Sponsors] |
September 17, 2011, 04:31 |
Udf DEFINE_WALL_FUNCTION
|
#1 |
New Member
Join Date: May 2011
Posts: 3
Rep Power: 15 |
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 |
|
Tags |
define macro, epsilon, user defined function, wall function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dynamic Mesh UDF | Qureshi | FLUENT | 7 | March 23, 2017 08:37 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 23:14 |
How to add a UDF to a compiled UDF library | kim | FLUENT | 3 | October 26, 2011 22:38 |
UDF...UDF...UDF...UDF | Luc SEMINEL | FLUENT | 0 | November 25, 2002 05:03 |
UDF, UDF, UDF, UDF | Luc SEMINEL | Main CFD Forum | 0 | November 25, 2002 05:01 |