C_VOF_G in three phase model

cfd_Guy
cfd_Guy Member Posts: 1

Hi all,
I am modeling Sun heating oil layer on top of water in three phase vof model (air as primary phase).. the solar flux (w/m2) is incorporated as heat source at the interface for oil vof >=0.5. I using DEFINE ADJUST to store VOF gradiant in C_UDMI; Display C_UDMI shows both interfaces (air/oil and water/oil). when I Run the calculation seem like it don't apply the heat source at all.
my question is why the CUDMI save both interfaces and how to force the SOURCE term at the air/oil interface (F(oil) >= 0.5.
Thanks in advance

include "udf.h"

include "sg_mphase.h"

define Sun_flux 1120 /* average solar heat flux on earth surface (W/m2) */

DEFINE_ADJUST(my_adjust, mixture_domain)
{
int phase_domain_index=0.;
Thread *t;

cell_t c;

mixture_domain= Get_Domain(2);

thread_loop_c (t,mixture_domain)
if (THREAD_STORAGE(t,SV_UDM_I)!=NULL)

begin_c_loop (c,t)
{

/To store gradient of volume fraction in a user defined memory/
C_UDMI(c,t,0)=sqrt((C_VOF_G(c,t)[0])(C_VOF_G(c,t)[0])+(C_VOF_G(c,t)[1])(C_VOF_G(c,t)[1]));
}
end_c_loop (c,t)
}

DEFINE_SOURCE(heat, cell, mix_th, dS, eqn)
{
Thread *pri_th, *sec_th;
real source;

pri_th = THREAD_SUB_THREAD(mix_th, 0);
sec_th = THREAD_SUB_THREAD(mix_th, 1);

if (C_VOF(cell,sec_th)>0.5) /* oil is the first secondary phase*/
{

source= Sun_flux*C_UDMI(cell,mix_th,0);
dS[eqn] = 0.0;
}
else
{

source= 0.0;
dS[eqn] = 0.0;
}
return source;
}

Tagged:

Answers