|
[Sponsors] |
Replicating Scalable Wall Function with a UDF |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 4, 2017, 03:30 |
Replicating Scalable Wall Function with a UDF
|
#1 |
New Member
Yousef
Join Date: Dec 2015
Posts: 14
Rep Power: 11 |
Hi,
I am having trouble replicating the Scalable Wall Function in Fluent using a UDF. The theory seems straightforward: basically the Standard Wall Function implemented a minimum limit on y* > 11.225. My starting point is the standard WF UDF provided in the Fluent UDF manual, which I have verified to be an accurate implementation of the SWF in Fluent code (for ks = 0). The next step where I am having trouble is implementing the y* limiter to achieve the Scalable Wall Function. I am using an If condition to impose a lower limit of 11.225 on the terms F_STORAGE_R(f,t,SV_WALL_YPLUS) and yPlus (i.e. y*) as shown in the UDF below. The problem is that this does not seem sufficient to replicate the results from the Scalable WF in Fluent (more details below code). Code:
#include "udf.h" DEFINE_WALL_FUNCTIONS(scalable, f, t, c0, t0, wf_ret, yPlus, Emod) { real wf_value; //Limiters for Scalable wall function if(F_STORAGE_R(f,t,SV_WALL_YPLUS) < 11.225) F_STORAGE_R(f,t,SV_WALL_YPLUS) = 11.225; if(yPlus < 11.225) yPlus = 11.225; //standard wall function (Zero roughness) switch (wf_ret) { case UPLUS_LAM: wf_value = yPlus; break; case UPLUS_TRB: wf_value = log(Emod*yPlus)/KAPPA; break; case DUPLUS_LAM: wf_value = 1.0; break; case DUPLUS_TRB: wf_value = 1./(KAPPA*yPlus); break; case D2UPLUS_TRB: wf_value = -1./(KAPPA*yPlus*yPlus); break; default: printf("Wall function return value unavailable\n"); } return wf_value; } Comparing flow variables at the wall from the above UDF with the Scalable WF in Fluent, Ystar (y*) is identical for both cases. This is expected as it is manually limited to 11.225. However, Yplus (y+) is significantly lower in the UDF compared to scalable WF (approx 11.3). The variation in y+ is very odd considering that the wall shear (tau-w) and consequently wall shear velocity (u-tau) are almost identical from the UDF and scalable WF. My understanding is that the wall functions first and foremost calculate the wall shear, and then based on the that the other flow variables are calculated. Considering the equation y+ = (rho/mu)*u-tau*Yp, it seems the only way to account for the differences in y+ is by altering the first cell centroid height Yp? Any thoughts or comments are greatly appreciated. Thanks. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Enhanced Wall Treatment | paduchev | FLUENT | 24 | January 8, 2018 12:55 |
Running UDF with Supercomputer | roi247 | FLUENT | 4 | October 15, 2015 14:41 |
Scalable Wall Function | junz | FLUENT | 0 | April 18, 2015 22:32 |
Radiation interface | hinca | CFX | 15 | January 26, 2014 18:11 |
ParaView for OF-1.6-ext | Chrisi1984 | OpenFOAM Installation | 0 | December 31, 2010 07:42 |