#include "udf.h" #define CON 2 DEFINE_SOURCE(cell_x_source, cell, thread, dS, eqn) { real source; real xc[ND_ND]; /* 3D position in array */ C_CENTROID(xc,cell,thread); /* outputs xc (cell centroid) */ if((xc[0] >0.1)&&(xc[0] < 0.105)&& (xc[1] > 0)&&(xc[1] < 0.001)) /*restriction of the body force*/ { source=CON; dS[eqn]=0; } else { source=0; dS[eqn]=0; } return source; }