
[Sponsors] 
November 3, 2003, 14:46 
Re: About wall shear stress

#1 
Guest
Posts: n/a

Hello, Everyone. I need to access the wall shear stress through UDF. However, I found there is some difference between Tauxy= C_MU_L(c,t)*(C_DUDY(c,t) + C_DVDX(c,t)) and the wall shear stress provided by FLUENT.
Does anyone know what is the exact definition of the wall shear stress in FLUENT or the variable's name of the wall shear stress in UDF? Thanks. Mike 

November 4, 2003, 02:51 
Re: About wall shear stress

#2 
Guest
Posts: n/a

Hi Mike
The macros C_DUDY etc return the cell based velocity derivatives which are obtained by divergence theorem and thus do not represent the actual derivatives at the wall. These you should calculate for example as (F_U(f,t)C_U(c,t))/dy. Hope this helps Markus 

November 4, 2003, 12:51 
Re: About wall shear stress

#3 
Guest
Posts: n/a

Hi,Markus . Thanks for your message. I am recaculating the wall shear stress with (F_U(f,t)C_U(c,t))/dy.But I have two followup questions:
1. Is the C_U(c,t) the velocity of the neighbour cell of the wall face cell? 2. How can I find the neighbour cell and then calculate dy? Regards, Mike 

November 5, 2003, 02:55 
Re: About wall shear stress

#4 
Guest
Posts: n/a

Hi Mike Yes, C_U(c,ct) is the xvelocity in the center of the cell adjacent to a given wall face f. Cell c and cell thread ct can be obtained by the macros F_C0(f,f_thread) & THREAD_T0(f_thread) respectively. The macro BOUNDARY_FACE_GEOMETRY(f,f_thread,A,ds,es,A_by_es, dr0) returns dr0,which is the distance vector from face center to adjacent cell center.So dy = dr0[1] for example. See also the UDF Manual. bg Markus


November 5, 2003, 18:04 
Re: About wall shear stress

#5 
Guest
Posts: n/a

HiMarkus. Glad to see your response. I wrote the following code.I am confused when I saw the udm0 is are all 0 on the zone I applied with XYplot, but it is not zero in the data file "Current4.dat". And they are not the same as the wall shear stress in Fluent. Anyway, I am not good at hacking. Any comment will be appreciated.
Best Regards, Mike DEFINE_ON_DEMAND(on_demand_WallShear) { Thread *th; FILE *fp; cell_t c_Cell; face_t f; Thread *t_Cell; int ID =3; Domain *domain; real Tauxy, Tauyx; real Wall_shear; real NV_VEC(A),NV_VEC(es),NV_VEC(dr0); real ds,A_by_es; domain = Get_Domain(1); th = Lookup_Thread(domain,ID); fp=fopen ("Current4.dat","w"); if(fp == NULL) { Message("\n Warning: unable to open %s for reading\n", "Current4.dat"); } begin_f_loop(f, th) { BOUNDARY_FACE_GEOMETRY(f,th,A,ds,es,A_by_es,dr0); c_Cell = F_C0(f,th); t_Cell = th>t0 ; Tauxy = (F_U(f,t_Cell)C_U(c_Cell,t_Cell))/dr0[1]; Tauyx = (F_V(f,t_Cell)C_V(c_Cell,t_Cell))/dr0[0]; Wall_shear = C_MU_EFF(c_Cell,t_Cell)*(Tauxy+Tauyx); F_UDMI(f,th,0) = Wall_shear; fprintf(fp,"%f %f %f\n", Tauxy,Tauyx,Wall_shear); fprintf(fp,"\n"); }end_f_loop(f, th) fclose (fp); } 

November 7, 2003, 04:48 
Re: About wall shear stress

#6 
Guest
Posts: n/a

hello Mike,
I'm not sure what's the problem with your F_UDMI but I suggest that the difference between your results and fluent is that for turbulent flows the wall shear stress is not given by the simple formula you used but by a wall function. Unfortunately I do not know the way this should be done. Markus 

November 8, 2003, 01:46 
Re: About wall shear stress

#7 
Guest
Posts: n/a

Hi,Markus.
Thank you for your comment. I still don't know how the wall shear stress has been generated. BUt I found a variable named SV_Wall_Shear at storage.h file. It seems it is the variable for wall shear. Do you know how to access such kind of variable(C_STORAGE_R doesn't work!)? Cheers. Mike 

November 11, 2003, 10:30 
Re: About wall shear stress

#8 
Guest
Posts: n/a

Hi Mike
Wallshear is a vector with components x,y,z. These can be obtained with the macro NV_V (wallshear, =, C_STORAGE_R_NV(f,t,SV_WALL_SHEAR)); have a nice day Markus 

November 17, 2003, 14:08 
Re: About wall shear stress

#9 
Guest
Posts: n/a

Hi
Can u explain NV_V (wallshear, =, C_STORAGE_R_NV(f,t,SV_WALL_SHEAR)) a little bit more. Can we also set the wall shear stress using this, i need to write a UDF for setting the wall shear stress using DEFINE_ADJUST, so i need a macro for wall shear stress Thanks 

November 17, 2003, 15:41 
Re: About wall shear stress

#10 
Guest
Posts: n/a

Try using
fprintf(fp,"%2.20e %2.20e % 2.20e\n",Tauxy,Tauyx,Wall_shear); instead of fprintf(fp,"%f %f %f\n", Tauxy,Tauyx,Wall_shear); I suppose the wall_shear is a small number and hence just giving f would print out 0 instead of the actual value. regards, Ajay 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Natural convection in a closed domain STILL NEEDING help!  Yr0gErG  FLUENT  3  June 12, 2013 02:12 
Water subcooled boiling  Attesz  CFX  7  January 5, 2013 04:32 
Wall shear stress  GamFlu  Main CFD Forum  0  June 11, 2011 04:33 
Wall Shear Stress  GamFlu  FLUENT  0  June 11, 2011 03:52 
relationship between wall shear stress and TKE  winter  FLUENT  0  December 11, 2007 18:11 