
[Sponsors] 
February 4, 2012, 06:52 
UDF: how to identify interface in VOF model

#1 
New Member
Chemflame
Join Date: Feb 2012
Posts: 2
Rep Power: 0 
Hello,
I am doing unsteady state analysis of a 2D droplet evaporation in an square box. I have considered 1 mm radius semispherical 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 

February 11, 2012, 09:59 

#2 
Senior Member
Join Date: Jun 2011
Posts: 119
Rep Power: 7 
Here is how you can identify the cells at the interface:
http://capeforum.com/index.php/topic,529.0.html 

April 19, 2012, 02:11 

#3  
New Member
Jacky
Join Date: Jul 2011
Posts: 24
Rep Power: 7 
Quote:
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 selfexplanatory..... Regards, Bharat 

Thread Tools  
Display Modes  


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 07:02 
UDF for VOF interface moving with velocity V  Johann  FLUENT  3  June 10, 2006 04:42 
UDF for VOF model  Kunal Ashar  FLUENT  0  September 8, 2004 13:13 