CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Problem with UDF in VOF model (https://www.cfd-online.com/Forums/fluent/40616-problem-udf-vof-model.html)

vijay April 18, 2006 01:06

Problem with UDF in VOF model
 
Hi,

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. */

dS[eqn]=0.0;

return source; }



All times are GMT -4. The time now is 12:15.