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

ACCESS_VIOLATION error for tempreture jump boundary condition

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 4, 2010, 09:22
Default ACCESS_VIOLATION error for tempreture jump boundary condition
  #1
New Member
 
iman mohammadi
Join Date: Jul 2010
Posts: 11
Rep Power: 16
eeman is on a distinguished road
hi all

I am trying to simulate heat transfer between parallel plates with tempreture jump boundary condition.

this is my udf:

#include "udf.h"
#define TMAC 1
#define meanfreepath 6.8e-8
#define underrlx 0.02
#define SPHR 1.4
#define THAC 1
#define prandtl 0.707
DEFINE_PROFILE(temprature_jump_top,f_thread,index)
{
face_t f;

cell_t c;
Thread *cell_thread;
real gamma;
real temp;
begin_f_loop(f,f_thread)
{
c=F_C0(f,f_thread);

cell_thread=THREAD_T0(f_thread);
gamma=(2*SPHR)/(SPHR+1);
temp=(-2+THAC)/(THAC)*gamma*meanfreepath/prandtl*(C_T_G(c,cell_thread)[1]);
temp=(1-underrlx)*F_T(f,f_thread)+(underrlx*temp);
F_PROFILE(f,f_thread,index)=temp;
}
end_f_loop(face,f_thread)
}


but when i want to use them as a boundary condition,or when i want to iterate it,this error will be appear:

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: ()

how can i solve this error?

I appreciate for any help
eeman is offline   Reply With Quote

Old   September 10, 2010, 07:54
Default
  #2
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
I think the problem is from the temperature gradient C_T_G. Read in the manual how to instruct fluent to keep the gradients. Check the udf manual, section 3.2.3, the paragraph Gradient (G) Vector Macros.
dmoroian is offline   Reply With Quote

Old   September 13, 2010, 03:45
Default hi
  #3
New Member
 
iman mohammadi
Join Date: Jul 2010
Posts: 11
Rep Power: 16
eeman is on a distinguished road
hi
thank you dmoroian
same as you i think the problem is from the temperature gradient C_T_G,but i dont know how can i solve it.
i read section 3.2.3, the paragraph Gradient (G) Vector Macros,but i couldnt find any thing that be useful for me
eeman is offline   Reply With Quote

Old   September 13, 2010, 04:48
Default
  #4
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
"In order to retain the gradient data (when you want to set up user-defined scalar transport equations, for example), you can prevent the solver from freeing up memory by issuing the text command solve/set/expert and then answering yes to the question Keep temporary solver memory from being freed?."
dmoroian is offline   Reply With Quote

Old   September 15, 2010, 04:33
Default
  #5
New Member
 
iman mohammadi
Join Date: Jul 2010
Posts: 11
Rep Power: 16
eeman is on a distinguished road
hi dmoroian,and thank you so much

i do it,but it's not useful.
do you have any other idea???
eeman is offline   Reply With Quote

Old   September 15, 2010, 04:50
Default Debugger
  #6
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
Try to debug it!
One way is to insert
Code:
   Message("debug 0\n");
   ...
   Message("debug 1\n");
   ...
after each line of code and see where it crashes, or use a proper debugger like gdb.
See this link for a hint on how to do it: http://www.cfd-online.com/Wiki/Udf_debug
dmoroian 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
asking for Boundary condition in FLUENT Destry FLUENT 0 July 27, 2010 01:55
External Radiation Boundary Condition for Grid Interface CFD XUE FLUENT 0 July 9, 2010 03:53
External Radiation Boundary Condition (Two sided wall), Grid Interface CFD XUE FLUENT 0 July 8, 2010 07:49
how to set up a wall boundary condition according to calculated wall shear stress? gameoverli OpenFOAM Pre-Processing 1 May 21, 2009 09:28
Help Urgent about changing boundary condition Anjum Naveed FLUENT 7 August 14, 2006 13:25


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