CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Fluent UDF and Scheme Programming (
-   -   ACCESS_VIOLATION error for tempreture jump boundary condition (

eeman September 4, 2010 08:22

ACCESS_VIOLATION error for tempreture jump boundary condition
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
face_t f;

cell_t c;
Thread *cell_thread;
real gamma;
real temp;


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

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

dmoroian September 10, 2010 06:54

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.

eeman September 13, 2010 02:45

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

dmoroian September 13, 2010 03:48

"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?."

eeman September 15, 2010 03:33

hi dmoroian,and thank you so much

i do it,but it's not useful.
do you have any other idea???:(

dmoroian September 15, 2010 03:50

Try to debug it!
One way is to insert

  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:

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