CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

UDF: how to identify interface in VOF model

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By bharat.cmeri

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 4, 2012, 06:52
Default UDF: how to identify interface in VOF model
  #1
New Member
 
Chemflame
Join Date: Feb 2012
Posts: 2
Rep Power: 0
process.abhi is on a distinguished road
Hello,

I am doing unsteady state analysis of a 2-D droplet evaporation in an square box. I have considered 1 mm radius semi-spherical water droplet placed in a square box of 5x5 mm. The surrounding of the droplet is air. I am trying to give a constant evaporation rate as my source term at the interface of the water droplet and air (i.e. only the water on the interface will evaporate into the surrounding). I have tried to write a UDF but I am unable to understand how to find the interface at which I should apply Source term .


Since this is VOF model so to find the interface I can find VOF in each cell and if it is 1, then I can say that it is water and if it comes less than 1 than I can say that it is mixture of water and air. As:

#include "udf.h"
DEFINE_SOURCE(mass_rate_source,c,t,dS,eqn)
{
Thread *t;
cell_t c;
real source;

C_CENTROID (coord,c,t);
if (C_VOF(c,c_t) ==1)&&(MISSING CONDITION)
dS[eqn]=0.0;

if (IT IS INTERFACE)
source = 0.0001;
else
source=0;

return source;
}

In the missing condiiton i need to find the VOF value of a vertically above cell and if it is less then 1 then it can be said that this is the interface.
I am unable to understand how to write this portion .
Any help would be much appreciated,

Thanks!!

Abhishek
process.abhi is offline   Reply With Quote

Old   April 19, 2012, 03:11
Default
  #2
New Member
 
Jacky
Join Date: Jul 2011
Posts: 24
Rep Power: 15
bharat.cmeri is on a distinguished road
Quote:
Originally Posted by process.abhi View Post
Hello,

I am doing unsteady state analysis of a 2-D droplet evaporation in an square box. I have considered 1 mm radius semi-spherical water droplet placed in a square box of 5x5 mm. The surrounding of the droplet is air. I am trying to give a constant evaporation rate as my source term at the interface of the water droplet and air (i.e. only the water on the interface will evaporate into the surrounding). I have tried to write a UDF but I am unable to understand how to find the interface at which I should apply Source term .


Since this is VOF model so to find the interface I can find VOF in each cell and if it is 1, then I can say that it is water and if it comes less than 1 than I can say that it is mixture of water and air. As:

#include "udf.h"
DEFINE_SOURCE(mass_rate_source,c,t,dS,eqn)
{
Thread *t;
cell_t c;
real source;

C_CENTROID (coord,c,t);
if (C_VOF(c,c_t) ==1)&&(MISSING CONDITION)
dS[eqn]=0.0;

if (IT IS INTERFACE)
source = 0.0001;
else
source=0;

return source;
}

In the missing condiiton i need to find the VOF value of a vertically above cell and if it is less then 1 then it can be said that this is the interface.
I am unable to understand how to write this portion .
Any help would be much appreciated,

Thanks!!

Abhishek
Well as u need to find cell top of ur current cell u can do following :

begin_c_loop(c,t)
{
V[0] = C_U(c,t);
V[1] = C_V(c,t);
mag = NV_MAG(V);
NV_D(xunit, = ,1,0,0);
NV_D(yunit, = ,0,1,0);

c_face_loop(c, t, n)
{
F_AREA(A, f,t);
C_CENTROID(dr0, F_C0(f,t),t->t0);
F_CENTROID(xf, f,t);
NV_VV(dr0, =, xf,-,dr0);
ds = NV_MAG(dr0);
NV_VS(es,=,dr0,/,ds);

XDOT = NV_DOT(es,xunit);
YDOT = NV_DOT(es,yunit);

if( YDOT <= 1.0 && YDOT > cos(15.0))
{
top = n;
}
} /* end of c_face_loop */

ftop = C_FACE(c0,t,top);
c1 = F_C1(ftop,t);

/* This is ur condition */
if (C_VOF(c1,t_liquid) < 1.0)
{
message(" IT IS INTERFACE \n");
}

}
end_c_loop(c,t)




HOPE this helps and is self-explanatory.....
Regards,
Bharat
piyupant likes this.
bharat.cmeri is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
question about Heat transfer between two phases with VOF model sooroo3 FLUENT 0 February 15, 2011 04:24
UDF for linear PTT model implementation dpitz Fluent UDF and Scheme Programming 1 February 4, 2011 11:08
UDF to read data from a file for VOF model Pablo FLUENT 0 October 23, 2008 08:02
UDF for VOF interface moving with velocity V Johann FLUENT 3 June 10, 2006 05:42
UDF for VOF model Kunal Ashar FLUENT 0 September 8, 2004 14:13


All times are GMT -4. The time now is 14:35.