# Replicating Scalable Wall Function with a UDF

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 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: 12 Rep Power: 6 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; }``` The UDF is tested with with a mesh of y+ well below 11.225. In the "Viscous Model" window in Fluent, the "UDF - y+" is set to 0 to prevent triggering the laminar equations (UPLUS_LAM and DUPLUS_LAM) in the UDF. 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.

 Thread Tools Search this Thread Search this Thread: Advanced Search Display Modes Linear Mode

 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 OffTrackbacks are Off Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post paduchev FLUENT 24 January 8, 2018 12:55 roi247 FLUENT 4 October 15, 2015 14:41 junz FLUENT 0 April 18, 2015 22:32 hinca CFX 15 January 26, 2014 18:11 Chrisi1984 OpenFOAM Installation 0 December 31, 2010 07:42

All times are GMT -4. The time now is 11:25.

 Contact Us - CFD Online - Privacy Statement - Top