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

How to get UDS on interior face?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 27, 2012, 08:00
Question How to get UDS on interior face?
  #1
New Member
 
Samuel
Join Date: Nov 2011
Posts: 12
Rep Power: 14
Modest Cat is on a distinguished road
Hi guys,

I want to get the UDS on a interior face. As the 'UDF manual' says, no value of UDS is stored on face. So I tried to find the value on adjacent cell. Here comes the questions:

1. First thing I should do is find the face thread of interior. Knowing the ID of interior, which domain should I look up into for the interior, when the interior is a interface between two different fluid zones? Will that make any difference?

2. After I find the interior face thread from one zone, are the values of adjacent cell on both sides available for me?

Here is the UDF which I used. But I did not get any value return.

/*Description:3 fluid zones (ID 17,19 and 18 from left to right);*/
/* 2 interior faces between 3 zones (ID 29,30 from left to right)*/

DEFINE_DIFFUSIVITY(myuds_diffusivity,c,t,i)
{
Thread *sr,*rl,*src,*rlc;
int a;
real dif;
cell_t c0;
face_t f;
real tall,tavesr,taverl;
Domain *domain0,*domain1;
domain0=Get_Domain(17);
domain1=Get_Domain(18);
sr=Lookup_Thread(domain0,29); /*LOOKUP THREAD 29 IN ZOON 17*/
rl=Lookup_Thread(domain1,30); /*LOOKUP THREAD 30 IN ZONE 18*/
src=THREAD_T0(sr); /*FIND THE CELL THREAD*/
rlc=THREAD_T0(rl); /*FIND THE CELL THREAD*/
a=0;
tall=0.0;
begin_c_loop(c0,src) /*LOOP IN CELL THREAD*/
{
a=a+1;
tall=tall+C_UDSI(c0,src,0);
C_UDMI(c0,src,2)=C_UDSI(c0,src,0);
}
end_c_loop(c0,src)
tavesr=tall/a;
tall=0.0;
a=0;
begin_c_loop(c0,rlc) /*LOOP IN CELL THREAD*/
{
a=a+1;
tall=tall+C_UDSI(c0,rlc,0);
C_UDMI(c0,rlc,3)=C_UDSI(c0,rlc,0);
}
end_c_loop(c0,rlc)
taverl=tall/a;
dif=5.67*(pow(taverl/100,4)-pow(tavesr/100,4))*emissivity*sample_length/1000/(taverl-tavesr);
}
Modest Cat is offline   Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDS stored to UDM do not show the same values swati_mohanty FLUENT 0 December 3, 2010 03:46
Doubts UDS Flux, UDS Unsteady for VOF model kel85uk FLUENT 0 March 17, 2010 08:53
set UDS value at interior BC Simon FLUENT 0 December 12, 2008 13:14
A good question about UDS Z FLUENT 1 March 31, 2005 15:14
ODD: no UDS flux across interior boundary Bob FLUENT 1 February 25, 2002 19:15


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