CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   what is wrong with my UDF for slip boudary (http://www.cfd-online.com/Forums/fluent/36740-what-wrong-my-udf-slip-boudary.html)

cxzhao May 22, 2005 23:39

what is wrong with my UDF for slip boudary
 
i am simulate a micro nozzle.beacuse its have a slip boudary condition.i write a udf for slip as following, but it give wrong infermation when i iteration. #include "udf.h" DEFINE_PROFILE(wallslipx,thread,index) {

real x[ND_ND];

face_t f;

cell_t c;

Thread *t0=t->t0;

real time=CURRENT_TIME;

real coef=17.894/5/1.01325*0.001838;

begin_f_loop(f,thread)

{

if(time<0.001)

F_PROFILE(f,thread,index)=0;

else

{

c=F_C0(f,thread);

F_PROFILE(f,thread,index)=coef*C_U(c,thread);

}

}

end_f_loop(f,thread) }

DEFINE_PROFILE(wallslipy,thread,index) {

real x[ND_ND];

face_t f;

cell_t c;

real time=CURRENT_TIME;

real coef=17.894/5/1.01325*0.001838;

begin_f_loop(f,thread)

{

if(time<0.001)

F_PROFILE(f,thread,index)=0;

else

{

c=F_C0(f,thread);

F_PROFILE(f,thread,index)=coef*C_U(c,thread);

}

}

end_f_loop(f,thread) }

Alec Eiffel May 23, 2005 11:18

Re: what is wrong with my UDF for slip boudary
 
you are using a face thread to access a cell variable. ie. you need to get the cell thread. For example your code is c=F_C0(f,thread);

F_PROFILE(f,thread,index)=coef*C_U(c,thread);

This should be

c=F_C0(f,thread); cell_thread=THREAD_T0(thread)

F_PROFILE(f,thread,index)=coef*C_U(c,cell_thread);

Dont forget to define the cell thread using Thread *cell_thread; at the start of UDF

lichun Dong May 23, 2005 14:13

Re: what is wrong with my UDF for slip boudary
 
Hi, Zhao:

Could you tell me how you decide the slip coef?

thanks a lot

Alec Eiffel May 23, 2005 16:28

Re: what is wrong with my UDF for slip boudary
 
Hi Zhao

Im not sure how cxzhao calculated his slip coefficient but fluent 6 has a slip boundary condtion for low pressure rarefied gas flow. Its based on a Maxwell boundary conditon. Its in section 14.2.2 of Fluent 6.2 help files and shows how its calculated.

http://www.fluentusers.com/fluent/do...ug/node547.htm

cxzhao May 23, 2005 21:18

Re: what is wrong with my UDF for slip boudary
 
Yes, as mentioned by Alec Eiffel, i using Maxwell boundary condition that there is a relation between wall slip velocity and Kn number. and it can be write as : u=(2-F/F)*du/dy or dx. where du/dy is the wll mormal veloctiy gradient. F is always set 1. and Kn number can be writen as : Kn=l/D, where l is the mean freee path of the fluid and D is the length scale of th e physical system. or another form: kn=squr(pi*alfer)*Ma/Re.


hadiramin September 1, 2011 15:37

hi dear Alec Eiffel
Iam trying to implement maxwell slip velocity too, I have a udf that have been written for maxwell slip velocity but when I use it in (specified shear condition on fluent), fluent could not accept it and has an error(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: ), I would be please if you help me,
thanks in advance

gera September 27, 2011 00:46

I'm also trying to implement velocity slip and temperature jump boundary conditions. It is necessary for me to use density based solver, but not pressure one.

hadiramin, did you resolve your problem?
If not it would be better to show your UDF code and maybe somebody can help you.

cxzhao, why did you try to use U-velocity? I think, it depends on geometry. In theory, there should be tangential and normal velocity to a wall.


All the best,
Gera


All times are GMT -4. The time now is 16:25.