CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   Equivalent source in VOF model of polymer melting (

Marcowitz February 21, 2008 07:11

Equivalent source in VOF model of polymer melting
Hi, I am using VOF with 2 phase (primary= air, secondary= polymer). The heat flux Q (W/m2) is treated as equivelent heat source addded to the enegy equation as :S=Q*grad(F)*V

V is the volulme of the celle.. Since the gradient of F is nonzero only in the cells adjacent to the free surface, the source is applied only to the interface. but when I interpret the UDF I got error .. I think it come from the use of C_VOF_RG macro ...can some one help me to correct my simple UDF please ..! thanks in advance Marco

DEFINE_SOURCE(heat_source,c,t,dS,eqn) { real source; real Q Thread *liquid_thread ; liquid_thread=THREAD_SUB_THREAD(t,0) ; C_CENTROID(r,c,t);

if(NV_MAG(C_VOF_RG(c,liquid_thread))!=0.0 ) { source = Q*(NV_MAG(A))*C_VOLUME(c,t); dS[eqn]=0. ; }

else { source=0. ; dS[eqn]=0. ; }

return source ; }

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