CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   VOF Initialization (

narendra.gadwal May 15, 2012 06:39

VOF Initialization
I have a circle. I meshed it as a whole domain.
I need to give some level of water at the bottom.
I know the value of upper Y co-ordinate of the interface and the lower Y co-ordinate at the bottom of the circle.
Can anyone help me out how to patch those elements as water ?

Thanks in advance !!

fevi84 May 15, 2012 14:22

I understand that do you want do a cylinder of water. Following have you a UDF for initialization of volume fraction in 3D.

#include "udf.h"

#define Xc 0.0
#define Yc 0.0
#define Zmax 0.02
#define Zmin 0.0
#define r 0.01

int phase_domain_index;
cell_t c;
Thread *ct;
Domain *sd;
real X[ND_ND];

sub_domain_loop(sd,mixture_domain,phase_domain_ind ex)
if (DOMAIN_ID(sd) == 3)

begin_c_loop_all (c,ct)
if (X[2]<=Zmax && sqrt((pow(X[0]-Xc,2) + pow(X[1]-Yc,2)))<r)
end_c_loop_all (c,ct)

In this case, ID=3 is the secondary phase. ID=2 is for first phase.

narendra.gadwal May 15, 2012 23:06

Thank you !!!

All times are GMT -4. The time now is 18:09.