|
[Sponsors] |
January 21, 2013, 13:42 |
Wall law modification
|
#1 |
Member
CC
Join Date: Jun 2011
Posts: 73
Rep Power: 14 |
Hi all,
I'm simulating a turbulent pipe flow and I need change the log law in Fluent... I tried this in an UDF: /*******************************************/ #include"udf.h" DEFINE_WALL_FUNCTIONS(wall_law,f,t,c0,t0,wf_ret,yP lus,Emod) { real wf_value; switch (wf_ret) { case UPLUS_LAM: wf_value=yPlus; break; case UPLUS_TRB: if(yPlus<=1500) { wf_value=log(yPlus)/KAPPA+log(Emod)/KAPPA; } if(yPlus>1500 && yPlus<=3000) { wf_value=11*log(yPlus)/KAPPA+log(Emod)/KAPPA-10*log(1500)/KAPPA; } if(yPlus>3000) { wf_value=0.85*log(yPlus)/KAPPA+log(Emod)/KAPPA+10.15*log(3000)-10*log(1500); } break; case DUPLUS_LAM: wf_value=1.0; break; case DUPLUS_TRB: if(yPlus<=1500) { wf_value=1./(KAPPA*yPlus); } if(yPlus>1500 && yPlus<=3000) { wf_value=11/(KAPPA*yPlus); } if(yPlus>3000) { wf_value=0.85/(KAPPA*yPlus); } break; case D2UPLUS_TRB: if(yPlus<=1500) { wf_value=-1./(KAPPA*yPlus*yPlus); } if(yPlus>1500 && yPlus<=3000) { wf_value=-11/(KAPPA*yPlus*yPlus); } if(yPlus>3000) { wf_value=-0.85/(KAPPA*yPlus*yPlus); } break; default: printf("Wall function return value unavailable\n"); } return wf_value; } /*****************************************/ I exported the data to excel and tried obtain u+(=u/utau) as a function of y+(=density*utau*yp/viscosity) in a graph, but what I obtain not corresponds to the profile introduced in the UDF. Someone can help me... Can I write in the UDF the three different expressions for the log law in this way? |
|
January 22, 2013, 11:17 |
|
#2 |
Member
CC
Join Date: Jun 2011
Posts: 73
Rep Power: 14 |
Please... Anyone know if the wall law expression for the fully turbulent flow can be divided into three regions in a UDF?
I was thinking that when I write an UDF similar to that I posted in the previous message, the modifications on the wall law interpreted by Fluent just consider the first part of the wall law modification (if(yPlus<=1500)). |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Water subcooled boiling | Attesz | CFX | 7 | January 5, 2013 03:32 |
Law of the wall in the presence of pressure gradient | yidongxia | Main CFD Forum | 2 | August 5, 2012 14:40 |
UDF for wall slipping | HFLUENT | Fluent UDF and Scheme Programming | 0 | April 27, 2011 12:03 |
law of the wall | alansari | FLUENT | 2 | February 2, 2010 09:32 |
Wall Function Approach - log law | Paul | CFX | 2 | June 30, 2005 06:06 |