CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Fluent UDF and Scheme Programming

how to store wall shear in udm

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   May 21, 2012, 06:37
Default how to store wall shear in udm
  #1
New Member
 
Join Date: Mar 2012
Posts: 26
Rep Power: 5
tsi07 is on a distinguished road
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)
}
Thanks
tsi07 is offline   Reply With Quote

Old   May 21, 2012, 08:08
Default
  #2
Member
 
Daniel Tanner
Join Date: Apr 2009
Posts: 54
Rep Power: 8
Daniel Tanner is on a distinguished road
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.
Daniel Tanner is offline   Reply With Quote

Old   May 21, 2012, 08:56
Default
  #3
New Member
 
Join Date: Mar 2012
Posts: 26
Rep Power: 5
tsi07 is on a distinguished road
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)
}
tsi07 is offline   Reply With Quote

Reply

Tags
storage, wall shear

Thread Tools
Display Modes

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
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 12:26
What does “Mean Wall Shear Stress” mean? dfytanid FLUENT 0 September 16, 2009 08:15
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


All times are GMT -4. The time now is 10:17.