CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Fluent UDF and Scheme Programming

udf error : access violation

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   January 25, 2011, 06:23
Default udf error : access violation
  #1
New Member
 
z.j.wang
Join Date: Jan 2011
Posts: 1
Rep Power: 0
butterfly007 is on a distinguished road
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)
}
butterfly007 is offline   Reply With Quote

Old   January 31, 2011, 22:46
Default
  #2
Senior Member
 
Real Name :)
Join Date: Jan 2010
Location: United States
Posts: 180
Rep Power: 7
ComputerGuy is on a distinguished road
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
ComputerGuy is offline   Reply With Quote

Old   June 1, 2012, 11:01
Default UDF ACCESS VIOLATION error
  #3
New Member
 
Tamphasana
Join Date: Jun 2012
Posts: 9
Rep Power: 5
thiyam is on a distinguished road
I am having same problem please help
thiyam is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
specified shear at wall - temperature gradient - UDF - access violation error senD Fluent UDF and Scheme Programming 9 September 18, 2014 07:29
DPM UDF - Segmentation Violation & Stack Backtrace Prashanth Fluent UDF and Scheme Programming 4 July 10, 2012 10:39
udf segmentation violation when hooked jjchristophe Fluent UDF and Scheme Programming 9 June 25, 2012 05:46
UDF problem (ACCESS VIOLATION) Jorge Poyatos FLUENT 5 March 16, 2009 09:02
Urgent! Access violation of UDF using VOF Rucy FLUENT 0 January 9, 2006 05:01


All times are GMT -4. The time now is 05:12.