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

Define source on boundary cells in UDF

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   August 8, 2011, 17:26
Smile Define source on boundary cells in UDF
  #1
Member
 
Ming Cai
Join Date: Mar 2011
Posts: 50
Rep Power: 15
mingersai is on a distinguished road
Hi, friends

I want to define a mass source on the boundary cells with udf, here's my code,
I don't know why it doesn't work, can any of you guys kindly give me some suggestions?
I'm new to udf...

Thanks in advance!

# include "udf.h"

DEFINE_SOURCE(mass_source,c,t,dS,eqn)
{
real x[ND_ND];
real source;
Domain *domain = Get_Domain(1);
face_t f;
Thread *tb = Lookup_Thread(domain,2); /* Get boundary thread, wall zone id is 2 */
if(c = F_C0(f,tb)) /* if cell is wall boundary cell */
{
source = 10000;
dS[eqn]=0;
}
else
{
source = 0;
dS[eqn]=0;
}
return source;
}

Thank you very much!

Last edited by mingersai; August 9, 2011 at 09:32.
mingersai is offline   Reply With Quote

 


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
Robin B.C. Yu FLUENT 3 May 27, 2012 04:19
help:uds source added to boundary cells FredPacheo FLUENT 5 September 5, 2008 05:45
UDF to define source term at every grid point Ralf Schmidt FLUENT 0 September 21, 2006 11:32
Free surface boudary conditions with SOLA-VOF Fan Main CFD Forum 10 September 9, 2006 12:24
Ignore cells on partition boundary Karl FLUENT 7 May 11, 2002 22:12


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