CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   Problem with UDF in VOF model (

vijay April 18, 2006 01:06

Problem with UDF in VOF model

I am doing simulation using VOF model. I am using a UDF to add a source term in y-momentum equation. But when I click "iterate" it is giving some error. Can anybody help me in identifying the mistake in this UDF.

DEFINE_SOURCE(cell_y_source, cell, thread, dS, eqn) { real source;

Thread *t_phase2 = THREAD_SUB_THREAD(THREAD_T0(thread),1);

source=0.0; if (C_VOF(cell,t_phase2)<1)


source = 0.0;

dS[eqn] = 0.0;

} else

/* source term */

source = C_R(cell,thread)*29.43;

/* derivative of source term w.r.t. x-velocity. */


return source; }

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