CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   i have some problem in useing UDF for boundary condition (http://www.cfd-online.com/Forums/fluent-udf/79075-i-have-some-problem-useing-udf-boundary-condition.html)

eeman August 11, 2010 14:44

i have some problem in useing UDF for boundary condition
 
Hi all

how can i solve this error in fluent:

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: ()

after interpreting,when i want to use UDF for boundary condition,this error will be appear,also i cant iterate it:(


here is my UDF:

#include "udf.h"
#define meanfreepath 6.8e-8
#define underrlx 0.02
DEFINE_PROFILE(maxwell_slip_velocity_x_full,f_thre ad,index)
{
face_t f;

cell_t c;
Thread *cell_thread;
real dveloc;
begin_f_loop(f,f_thread)
{
dveloc=((meanfreepath)*C_U_G(c,cell_thread)[1]);
c=F_C0(f,f_thread);
cell_thread=THREAD_T0(f_thread);

F_PROFILE(f,f_thread,index)=dveloc;
}
end_f_loop(face,f_thread)
}

coglione August 12, 2010 06:12

You are using C_U_G(c,cell_thread)[1] before retrieving c and cell_thread with
c=F_C0(f,f_thread);
cell_thread=THREAD_T0(f_thread);

switch these lines and everything should be fine.

cheers

eeman August 12, 2010 08:18

thank you coglione,thank you so much:)

every thing is ok now!!!

tarangbulchandani September 19, 2012 02:14

UDF for boundary conditions
 
DEFINE_PROFILE(outlet_boundary,t,i)
{
#if !RP_HOST
face_t f;
cell_t c0;
Thread *t0;
begin_f_loop(f,t)
{
t0=F_C0_THREAD(f,t);
c0=F_C0(f,t);
F_PROFILE(f,t,i)=-C_UDSI(c0,t0,0);

}
end_f_loop(f,t)
#endif
}

Hi ,
I want to use this udf for reflect boundary condition can anyone suggest me whether its correct or not.
Plzz

Regards


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