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

Why the value of C_VOLUME(c,t) is zero?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   December 30, 2009, 01:01
Default Why the value of C_VOLUME(c,t) is zero?
  #1
New Member
 
qiang xia
Join Date: Mar 2009
Posts: 8
Rep Power: 9
alanlove is on a distinguished road
Hi everyone:
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:
#include "udf.h"
DEFINE_SOURCE(xmom_source, cell, thread, dS, eqn)
{
const real c2=100.0;
real x[ND_ND];
real con, source;
C_CENTROID(x, cell, thread);
con = c2*0.5*C_R(cell, thread)*x[1];
source = - con*fabs(C_U(cell, thread))*C_U(cell, thread);
dS[eqn] = - 2.*con*fabs(C_U(cell, thread));
Message( "%f\n",C_VOLUME(cell,thread));
C_UDMI(cell,thread,0)=source;

return source;
}
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.
alanlove is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 20:52.