|
[Sponsors] |
set up of volume fraction of the thrid phase in VOF |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 27, 2012, 18:22 |
set up of volume fraction of the thrid phase in VOF
|
#1 |
Member
Fer Villa
Join Date: Apr 2012
Posts: 35
Rep Power: 14 |
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) } } } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] mesh airfoil NACA0012 | anand_30 | OpenFOAM Meshing & Mesh Conversion | 13 | March 7, 2022 18:22 |
volume fraction = nan | Virtual-iCFD | OpenFOAM Running, Solving & CFD | 8 | June 12, 2015 19:15 |
Multi phase Volume fraction at inlet | F S | CFX | 1 | April 11, 2011 22:08 |
On the damBreak4phaseFine cases | paean | OpenFOAM Running, Solving & CFD | 0 | November 14, 2008 22:14 |
[blockMesh] Axisymmetrical mesh | Rasmus Gjesing (Gjesing) | OpenFOAM Meshing & Mesh Conversion | 10 | April 2, 2007 15:00 |