CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   How to apply a heat distribution over a dynamic free-surface (https://www.cfd-online.com/Forums/fluent-udf/198218-how-apply-heat-distribution-over-dynamic-free-surface.html)

cfdstar January 30, 2018 11:58

How to apply a heat distribution over a dynamic free-surface
 
Hi experts,

I wanted to model a gas-liquid problem using a fixed grid approach (i.e. no dynamic mesh), in which the liquid interface is heated by an external source. The free surface is free to deform and move. How can I distribute a flux over this dynamic free surface? Is there any UDF example that I can use or modify to this end?

Cheers

doruk February 23, 2018 02:35

Hello,

You can use DEFINE_SOURCE macro and add it to the cell zone source terms.

here is how i would do it

DEFINE_SOURCE(Energy, cell, thread, dS, eqn)

{
real heat;
Thread *pri_th, *sec_th;
pri_th = THREAD_SUB_THREAD(thread,0);
sec_th = THREAD_SUB_THREAD(thread,1);

if(C_VOF(cell,sec_th)>0.001&&C_VOF(cell,sec_th)<0. 99) //finds the free surface
{
heat=900; // this value has to be w/m3. You can adjust this as you wish
}
else
{
heat=0;
}

dS[eqn] = 0;
return heat;

}

best regards,
Doruk


All times are GMT -4. The time now is 22:01.