|
[Sponsors] |
May 21, 2012, 07:37 |
how to store wall shear in udm
|
#1 |
Member
Join Date: Mar 2012
Location: USA
Posts: 33
Rep Power: 14 |
Hello,
I try to make a udf which store the wall shear. But it gives zero as value. I don't understand why. I have a 2D system. Can anyone helps me ? Here is the code : Code:
# include "mem.h" # include "udf.h" DEFINE_ON_DEMAND(store_wall_shear) { Domain *domain; Thread *t; face_t f; domain = Get_Domain(1); t=Lookup_Thread(domain,5); /* 5 is the wall in my case */ begin_f_loop(f,t) { F_UDMI(f,t,0)=F_STORAGE_R_N3V(f,t,SV_WALL_SHEAR)[0]; F_UDMI(f,t,1)=F_STORAGE_R_N3V(f,t,SV_WALL_SHEAR)[1]; } end_f_loop(f,t) } |
|
May 21, 2012, 09:08 |
|
#2 |
Member
Daniel Tanner
Join Date: Apr 2009
Posts: 54
Rep Power: 18 |
Search the site for this, it has been detailed before.
If memory serves you cannot use F_UDMI() you need to use C_UDMI(). You will need to update the UDF to loop over cells. |
|
May 21, 2012, 09:56 |
|
#3 |
Member
Join Date: Mar 2012
Location: USA
Posts: 33
Rep Power: 14 |
Thank you Daniel Tanner,
I have seen your previous post on the subject (here) but I had thought that it could be different with the wall shear, because it's a face data. But finally it's the same thing. Code:
# include "mem.h" # include "udf.h" DEFINE_ON_DEMAND(store_wall_shear) { Domain *domain; Thread *t, *ct, *t0; face_t f; cell_t c, c0; domain = Get_Domain(1); t=Lookup_Thread(domain,5); thread_loop_c(ct, domain) { begin_c_loop(c,ct) { C_UDMI(c,ct,0) = 0.0; C_UDMI(c,ct,1) = 0.0; } end_c_loop(c,ct) } begin_f_loop(f,t) { c0 = F_C0(f, t); t0 = THREAD_T0(t); C_UDMI(c0,t0,0)=F_STORAGE_R_N3V(f,t,SV_WALL_SHEAR)[0]; C_UDMI(c0,t0,1)=F_STORAGE_R_N3V(f,t,SV_WALL_SHEAR)[1]; } end_f_loop(f,t) } |
|
Tags |
storage, wall shear |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
What does “Mean Wall Shear Stress” mean? | dfytanid | FLUENT | 4 | November 6, 2016 21:19 |
Implementation of wall functions with a constant shear boundary condition | General_Gee | FLUENT | 0 | February 27, 2012 08:49 |
Problems with wall shear stress. | xiexiehezuo | FLUENT | 1 | September 22, 2009 13:26 |
relationship between wall shear stress and TKE | winter | FLUENT | 0 | December 11, 2007 18:11 |
Macro to set Wall Shear Stress | Satish | FLUENT | 4 | November 26, 2003 15:46 |