CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent Multiphase (https://www.cfd-online.com/Forums/fluent-multiphase/)
-   -   slip boundary condition in the VOF model (https://www.cfd-online.com/Forums/fluent-multiphase/207237-slip-boundary-condition-vof-model.html)

Sinon Lee September 26, 2018 08:13

slip boundary condition in the VOF model
 
hello, everyone, I am doing the work about a velocity slip boundary condition in a two phase flow, i need to define the different slip lengths of the water and oil in a microchannel. so i use the following UDF to do this work. but the mistake says:
Error:
FLUENT received fatal signal (ACCESS_VIOLATION)
1. Note exact events leading to error.
2. Save case/data under new name.
3. Exit program and restart to continue.
4. Report error to your distributor.
Error Object: ()
will occur after some loops over the channel wall just in the first iteration,:confused:


#include "udf.h"
#include "sg_mphase.h"
#define lso 4e-6 /*oil slip length*/
#define lsw 1e-6 /*water slip length*/
#define h 2e-6 /*height of first cell center*/
real x[ND_ND];
real mu;
real vof;

DEFINE_PROFILE(shear_x,t,position)
{

face_t f;
cell_t c0,c2;
Thread *t0=THREAD_T0(t);
Thread *t2=THREAD_SUB_THREAD(t,1);
double ux;
begin_f_loop(f,t)
{
c0=F_C0(f,t);
F_CENTROID(x,f,t);

mu=C_MU_L(c0,t0);
ux=C_U(c0,t0);
Message ("1\n (%f,%f,%f)\n",x[0],x[1],x[2]);
Message ("1\n");
vof=C_VOF(c0,t2);
Message ("2\n");
F_PROFILE(f,t,position)=mu*ux/(lso*(1-vof)+lsw*vof+h);
}
if ((x[0]>=450e-6&&x[0]<=800e-6)&&(x[1]>=98e-6&&x[1]<=100e-6)&&x[2]>=48e-6&&x[2]<=52e-6)
Message ("shear_x=%f\n vof=%f\n mu=%f\n ux=%f\n",mu*ux/(lso*(1-vof)+lsw*vof+h),vof,mu,ux);
end_f_loop(f,t)
}

this is my code, the mistake may be caused by "vof=C_VOF(c0,t2);" debugged by “Message ("1\n");” and “Message ("2\n");”
many thanks for your kindly help.

Praveen Potnuru September 27, 2018 06:51

Interface Boundary condition
 
I am working on a problem, where a system of two fluid layers is heated from below (Convection). whats the boundary condition to be given at the interface.

Sinon Lee September 27, 2018 07:27

Quote:

Originally Posted by Praveen Potnuru (Post 707893)
I am working on a problem, where a system of two fluid layers is heated from below (Convection). whats the boundary condition to be given at the interface.

In my simulation, there is no heat transfer, specified slip boundary condition with a given slip length is employed at the wall, but the slip lengths of oil and water are different, so I want use the volume fraction to calculate the slip length of two phase mixture, then the error occurs.


All times are GMT -4. The time now is 02:00.