|December 30, 2009, 01:01||
Why the value of C_VOLUME(c,t) is zero?
Join Date: Mar 2009
Posts: 8Rep Power: 9
In my problem ,the computer domain is divided into 2 zones(both of them are fluids),now i wanna add a momentum source into a zone,My udf is as following:
DEFINE_SOURCE(xmom_source, cell, thread, dS, eqn)
const real c2=100.0;
real con, source;
C_CENTROID(x, cell, thread);
con = c2*0.5*C_R(cell, thread)*x;
source = - con*fabs(C_U(cell, thread))*C_U(cell, thread);
dS[eqn] = - 2.*con*fabs(C_U(cell, thread));
Before I compiled it, I have defined 1 UDM, then i hooked the udf in Boundary conditions, however, when i iterate, Why the value of C_VOLUME(c,t) is zero? Can anyone help me,big thanks.