|
[Sponsors] |
August 8, 2011, 17:26 |
Define source on boundary cells in UDF
|
#1 |
Member
Ming Cai
Join Date: Mar 2011
Posts: 50
Rep Power: 15 |
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. |
|
|
|
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 |