CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Fluent UDF and Scheme Programming (
-   -   Accessing wall shear stress using UDF (

Robert February 17, 2005 06:53

Accessing wall shear stress using UDF

I am trying to access the wall shear stress/forces using an UDF.

I know that this topic have been discussed here on this forum previously. But I can however not solve my problem using the information in these posts.

In order to keep things simple I am runing 2D axy-symetric pipe flow. My grid is 3x20.

My UDF looks as follows and are intended to return the wall shear forces

#include "udf.h" #include "storage.h"

DEFINE_ON_DEMAND(output) { Domain *domain; Thread *f_thread;

face_t f;

int ID=4; /* from the BC panel */

real wallshear[ND_ND];

domain = Get_Domain(1); f_thread=Lookup_Thread(domain,ID);


NV_V(wallshear,=,C_STORAGE_R_NV(f,f_thread,SV_WALL _SHEAR));

printf("%2.10e %2.10e\n",wallshear[0],wallshear[1]);

} end_f_loop(f,f_thread) }

When it is executed it returns two columns with 20 values each. You would expect these two to be the wall shear forces in the radial and axial direction respectively. What happens is that I get a non zero value on every third row. I expected to get zeros in the first column and non zero values in the second collumn. Any suggestions to what might be wrong? There is obviusly something wrong when I try to access the vector wallshear. I have noticed that the non zero values when divided by the area of the wall face are identical to the wall shear stresses in the axial direction reported by Fluent. So I guess that I am not that far off.

Best Regards


Gold November 4, 2011 11:28

Dear All

i want to write a udf that stores the yplus in a UDMI for using that and get the USTAR at the boundaries, i dont know how use SV_WALL_YPLUS_UTAU;
d = Get_Domain(1);




could you please give me an idea about that please


n.phililipova July 31, 2013 08:34

How to calculate and represent Statistical wall shear stress map in UDF, Fluent
I am not so well acquainted with UDF macros. I need help how to make Fluent to represent Statistical wall shear stress map. For example to calculate area of WSS for which WSS<0.5 Pa.
Thank you so much for your help in advance!
Nina Philipova

All times are GMT -4. The time now is 14:35.