CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   udf error (https://www.cfd-online.com/Forums/fluent/37779-udf-error.html)

T.Hari September 2, 2005 13:36

udf error
 
iam novel to udfs in fluent, iam trying to use source term in granular multiphase flow, adding cohesive presssure as source term. i wrote the follwoing program, but iam getting error in fluent ACCESS_VIOLATIO SAV CASE NAD DATA FLIE UNDER NEW NAME AND EXIT,this kind of error is coming, can any one look at the program and help me

#include "udf.h" #define domain_id 3 DEFINE_ADJUST(pressure_cohesive,domain) {

Thread **pt=0;

Thread *t;

cell_t c;

Domain *subdomain=Get_Domain(domain_id);

int p=PHASE_DOMAIN_INDEX(subdomain);

thread_loop_c(t,subdomain)

{

begin_c_loop(c,t)

{

C_UDSI(c,t,0)=0.73*C_VOF(c,pt[p]);

}

end_c_loop(c,t)

}

} thanks in advance

Ahmed September 7, 2005 03:35

Re: udf error
 
drop the #define directive to the next line. In C language each preprocessing directive must be on its own line. Any C language primer will explain that, keep one handy


All times are GMT -4. The time now is 17:21.