CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   udf error : access violation (https://www.cfd-online.com/Forums/fluent-udf/84272-udf-error-access-violation.html)

butterfly007 January 25, 2011 05:23

udf error : access violation
 
I simulate the oval tube-type indirect evaporative cooler which is covered by a water film.
The water, which circulates through the evaporative cooler by a centrifugal pump, is dripped from a distributor in the top of the evaporative cooler and falls from tube to tube. The primary air flows in the oval tube, whereas the secondary air, maintained by a fan, moves upward in the space between these tubes, opposing the flow of the falling water film.
In this process, the falling film evaporates into the secondary air at the cost of lowering the temperature of the primary air in the pipe. At the same time, the secondary air takes away the latent heat of water vapor that humidifies this air.

i have defined a UDS equation (the moisture in the air), and used a UDF boudary condition for the tube wall.

the UDF has been interpreted without parse error ,but when initialized ,FLUENT shows 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: ()

this problem has puzzled me more than a week, so if anyone knows the reasons, please help me check the udf source file. thanks !
if i can't solve this problem , i will fail to attain the degree. help me ~~~

/************************************************** ************/
/********** UDF for UDS DIFFUSIVITY****************************/
/************************************************** ************/
#include "udf.h"
#define Pa 101300 /* atmosphere pressure */
#define Rg 461
#define h_latent 2542 /* latent heat of water */
#define tf 297
DEFINE_DIFFUSIVITY(diffu, c, t, i)
{
real F;
real Temp;
Temp=C_T(c,t) /* get the cell temperature of the secondary air */
F = 0.000024/Pa * pow(Temp/273.15,1.8); /* the diffusivity of the UDS equation */
return F;
}

/************************************************** ************/
/********** UDF for tubewall boundary conditon*****************/
/************************************************** ************/
DEFINE_PROFILE(wallheatgenerate, t, i)
{

cell_t c;
real hm, h;
real m;

begin_c_loop(c,t)
{


h= 30.86155 * pow(1.39,0.56517);
hm = h/(1.0889 * (1005 + 1840 * C_UDSI(c,t,0)));
m= hm /Rg * (9.96072 - 101300 * C_UDSI(c,t,0)/(0.622 + C_UDSI(c,t,0))/ C_T(c,t));
F_PROFILE(c,t,i)= h_latent * m + h * (tf -C_T(c,t));

}
end_c_loop(c,t)
}
/************************************************** ************/
/********** UDF for humid ratio boundary conditon**************/
/************************************************** ************/

DEFINE_PROFILE(humid_ratio, t, i)
{

cell_t c;
real hm, h;
real m;

begin_c_loop(c,t)
{

h= 30.86155 * pow(1.39, 0.56517);
hm = h/(1.0889 * (1005 + 1840 * C_UDSI(c,t,0)));
m= hm / Rg * (9.96072 - 101300 * C_UDSI(c,t,0) / (0.622 + C_UDSI(c,t,0)) / C_T(c,t));
F_PROFILE(c,t,i)= m;

}
end_c_loop(c,t)
}

ComputerGuy January 31, 2011 21:46

This line:
Code:

Temp=C_T(c,t) /* get the cell temperature of the secondary air */
needs a semicolon.

Also: where are you defining your C_UDSI? Have you enabled the user defined scalar in the Fluent GUI?

Regards,
ComputerGuy

thiyam June 1, 2012 11:01

UDF ACCESS VIOLATION error
 
I am having same problem please help


All times are GMT -4. The time now is 22:29.