CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

Access violation error during solution initialization

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 14, 2016, 23:07
Question Access violation error during solution initialization
  #1
New Member
 
Delhi (IN-DL)
Join Date: Dec 2015
Posts: 2
Rep Power: 0
kuldeepnitb@gmail.com is on a distinguished road
UDF problem
I am doing the similar kind of study as posted in the forum. I created simple cylinders in the Ansys geometry. Next I created the cylinder geometry then I meshed it (hexa mesh). After creating the mesh I gave name “input” to one end of cylinder and “output” to other end of the cylinder. I gave “name” surface of curvature part of cylinder. I called this meshed geometry in fluent setup.
I have to study the heat generation from the cylinder. Which is function of temperature and pressure of the cylinder? I wrote udf for calculating the heat generation from the cylinder. The udf is interpreted successfully. My udf and case files both are in same directory. In my udf I am using command temp=C_T(c, t); and Pg=C_P(c, t) to obtain the temperature and pressure value from the respective zone, while defining my thread pointer I am using the t=lookup _Thread (d, zone); command. I am testing my udf line by line. But somehow I am getting the access violation error. In the fluent setup window, in boundary condition panel there are only four zone id are written as inlet is 5, outlet id is 6, interior solid is 1 and surface id is 7.
I am applying my udf source file on surface which has zone id 7. I am using the energy model to solve my problem.



Here is my simplified udf code is

DEFINE_EXECUTE_AT_END (source_calculation)
{
Domain *d;
Thread *t;
cell_t c;
real time = CURRENT_TIME;
real temp, Pg, abrate, Peqa, Peqd, mab, mde, m;
real xc[ND_ND];
int zone=7;
d = Get_Domain(1);
t=Lookup_Thread(d,zone);
begin_c_loop(c,t)
{
temp=C_T(c,t);
Pg=C_P(c,t);
m=mab;
}
end_c_loop(c,t);
}

Error message

Here I am giving the same zone ID =7 (WHICH IS WALL), where I hooking my udf source file. Domain id i define is 1. But still I m facing problem. I have tried all the permutation and combination to get of this problem but still I am facing the same problem. When I am using the constant values of temperature and pressure instead of commands temp=C_T(c, t); and Pg=C_P(c, t), then solution initialization is done successfully. It is clear that I am making mistake with t=Lookup_ Thread (d, zone); command but where I am doing mistakes I don’t know. I am very confused, where I am going wrong to solve this basic problem. Am I making very fundamental mistake to solve my problem?
kuldeepnitb@gmail.com is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Solution initialization in case of couette flow dreamz FLUENT 0 March 15, 2015 08:49
specified shear at wall - temperature gradient - UDF - access violation error senD Fluent UDF and Scheme Programming 9 September 18, 2014 07:29
Access violation error pointer to a file salihovic FLUENT 0 February 8, 2011 10:18
ACCESS VIOLATION error opening a .dat file DavidSF FLUENT 12 April 8, 2005 15:37
ACCESS VIOLATION during autosaving case file Ryan FLUENT 1 April 20, 2004 10:32


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