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

UDF DEFINE_ON_DEMAND set uds value to zero

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 7, 2013, 05:04
Default UDF DEFINE_ON_DEMAND set uds value to zero
  #1
New Member
 
Charles Gao
Join Date: Oct 2013
Posts: 1
Rep Power: 0
gfy_mythical is on a distinguished road
Hello, everyone. I use an UDF to set the Ultraviolet fluence rate (Concentration) to zero at selected region. But it didn't work at the region near the wall. (The middle of the region is zero, but the near wall region is not zero). Here is the code:
DEFINE_ON_DEMAND(set_UV)
{
Domain *d ;
Thread *t ;
cell_t c ;
real coord[ND_ND], Z_low = 1.8, Z_high = 2.6 ;

{
d=Get_Domain(1);
thread_loop_c(t,d)
{
begin_c_loop(c,t)
{

/* restrict the Fluence rate to zero outside the irradiation zone */
C_CENTROID(coord,c,t) ;
if ( (coord[2] < Z_low) || (coord[2] > Z_high) )
C_UDSI(c,t,0) = 0 ;
}
end_c_loop(c,t);
}
}
}
gfy_mythical is offline   Reply With Quote

Reply

Tags
concentration, udf, uds, ultraviolet


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 flux - drift velocity - udf johnwinter Fluent UDF and Scheme Programming 3 November 25, 2017 05:07
unsteady udf for concentration uds borhan_sd@yahoo.com Fluent UDF and Scheme Programming 0 July 15, 2013 04:32
Consulting for some issues of FLUENT UDF and UDS wjl163 Fluent UDF and Scheme Programming 2 November 12, 2012 04:24
connection between udf and uds a.maroofi Fluent UDF and Scheme Programming 1 September 19, 2010 09:46
Associating profile files for the UDS though a UDF Bharath FLUENT 0 December 1, 2006 16:58


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