CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   UDF sucessfully interpreted initialization error (https://www.cfd-online.com/Forums/fluent/64439-udf-sucessfully-interpreted-initialization-error.html)

duaiduaihu May 11, 2009 21:18

UDF sucessfully interpreted initialization error
 
my model is: it is a complete heat conduction problem without convection .the domain is water with a solid fully immerged in:
i define the temperature of the solid .heat flux of all the out face except one part(named face A) is 0. the heat flux of face A is defined with a UDF.
the picture: http://fmn028.xnimg.cn/fmn028/200905...803n206096.jpg
after i define all the boundary condition in FLUENT, i do the solve->initialize->initialization .it cautioned me that:
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: ()

UDF:
#include<udf.h>
#include<math.h>
DEFINE_PROFILE(currentdensity,thread,position)
{
double potential,icorr,iL,Ecorr,bc,ba;
double a,a1,a2,a3,ic,ia,iA;
face_t f;
Thread *thread;
icorr=1.53e-5;
Ecorr=-0.55;
bc=0.1;
iL=3.09e-3;
ba=0.1;
begin_f_loop(f,thread)
{
potential=-1*F_T(f,thread);
a1=-1*(potential-Ecorr)/bc;
a2=pow(10,a1);
a=icorr/iL*(1-a2);
ic=icorr*a2/(1-a);
a3=(potential-Ecorr)/ba;
ia=icorr*pow(10,a3);
iA=ic-ia;
F_PROFILE(f,thread,position)=-1*iA;
}
end_f_loop(f,thread)
}

thanks in advance !


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