# Wall law modification

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

 January 21, 2013, 14:42 Wall law modification #1 Member   CC Join Date: Jun 2011 Posts: 54 Rep Power: 7 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, 12:17 #2 Member   CC Join Date: Jun 2011 Posts: 54 Rep Power: 7 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)).

 Thread Tools 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 On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Attesz CFX 7 January 5, 2013 04:32 yidongxia Main CFD Forum 2 August 5, 2012 14:40 HFLUENT Fluent UDF and Scheme Programming 0 April 27, 2011 12:03 alansari FLUENT 2 February 2, 2010 10:32 Paul CFX 2 June 30, 2005 06:06

All times are GMT -4. The time now is 21:55.

 Contact Us - CFD Online - Top