CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   what is wrong with my UDF for slip boudary (https://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;

real time=CURRENT_TIME;

real coef=17.894/5/1.01325*0.001838;

{

if(time<0.001)

else

{

}

}

real x[ND_ND];

face_t f;

cell_t c;

real time=CURRENT_TIME;

real coef=17.894/5/1.01325*0.001838;

{

if(time<0.001)

else

{

}

}

 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);

This should be

 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.

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:
1. Note exact events leading to error.
2. Save case/data under new name.
3. Exit program and restart to continue.
Error Object: ), I would be please if you help me,

 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.