CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

set up of volume fraction of the thrid phase in VOF

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   April 27, 2012, 17:22
Default set up of volume fraction of the thrid phase in VOF
  #1
Member
 
Fer Villa
Join Date: Apr 2012
Posts: 35
Rep Power: 5
fevi84 is on a distinguished road
Hi, I need help.

I have three phase: water (first phase, ID=2), air (second phase, ID=3) and CO2 (second phase, ID=4). I can not set up of the volume fraction initial of CO2. The air phase I set up through a UDF, but for the CO2 phase I try with a UDF and Adapt Region, but not work.

//UDF volume fraction initial of air

#include "udf.h"

#define Xc 0.0
#define Yc 0.09
#define r 0.0085
#define ls 0.06

DEFINE_INIT(vol_fraction_bala,mixture_domain)
{
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)

thread_loop_c(ct,sd)
{
begin_c_loop_all(c,ct)
{
C_CENTROID(X,c,ct);
if (X[1]>=ls && X[1]<=Yc && X[0]>=-r && X[0]<=r)
C_VOF(c,ct)=1.;
else if (X[1]>Yc && sqrt(ND_SUM(pow(X[0]-Xc,2),pow(X[1]-Yc,2)))<r)
C_VOF(c,ct)=1.;

else
C_VOF(c,ct)=0.;
}
end_c_loop_all(c,ct)

}
}
}

//UDF volume fraction initial of CO2

DEFINE_INIT(vol_fraction_slug,mixture_domain)
{
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) == 4)

thread_loop_c(ct,sd)
{
begin_c_loop_all(c,ct)
{
C_CENTROID(X,c,ct);
if (X[1]>=0.001 && X[1]<ls && X[0]>=-r && X[0]<=r)
C_VOF(c,ct)=0.25;
else
C_VOF(c,ct)=0.;
}
end_c_loop_all(c,ct)

}
}
}
fevi84 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
volume fraction = nan Virtual-iCFD OpenFOAM Running, Solving & CFD 8 June 12, 2015 18:15
mesh airfoil NACA0012 anand_30 OpenFOAM Meshing & Mesh Conversion 12 December 12, 2011 05:16
Multi phase Volume fraction at inlet F S CFX 1 April 11, 2011 21:08
On the damBreak4phaseFine cases paean OpenFOAM Running, Solving & CFD 0 November 14, 2008 22:14
Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Native Meshers: blockMesh 10 April 2, 2007 14:00


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