CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   UDF Problem (

Big Stone March 23, 2004 12:53

UDF Problem
I run a case using UDF compiled by C++. every thing is OK. after I save the case and data, I can not reopen it . It appears some error information below: if anyone know this, please help me.

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

Ale March 24, 2004 04:51

Re: UDF Problem

I suggest you to search for "access violation" in this site; the error is quite common and has been discussed quite a lot.

However, I think that the error is connected to the access to memory locations by Fluent. I had the same problems you have, and in my case It was connected to the usage of UDS gradients, which are usually not defined at the beginning of the calculation (even if you start from a previous calculation).

The simplest way to solve the problem is to use gradients only if they are defined. For example, if you are using gradients of UDS i, you can set this control:

if (NULL != THREAD_STORAGE(t,SV_UDSI_G(i))) { what you have to do... } else { ...write alternative instructions that do not need gradients... }

Of course, the 'else' condition will occur only at the first iteration.

I hope this helps.


Big Stone March 24, 2004 11:44

Re: UDF Problem
HI, Ale

Thank you very much. I will try to figure it out.

Big Stone March 24, 2004 11:52

Re: UDF Problem
Hi, Ale

Actually it is a case from the tutorial of FLUENT. Is it possible for it to have this problem.If you want , I can send the code to you and see what's going on?

Ale March 25, 2004 06:02

Re: UDF Problem

Which is the tutorial? If you like, post your code.



Aleex March 25, 2004 09:33

Re: UDF Problem
Thank you for your answer! I temporary solve this problem. I manually storage pressure values from previous time step in static array (static double prevP[MAX_VALUES_COUNT]) and hook to DEFINE_EXECUTE_AT_END and DEFINE_INIT. It`s work!

Regards, Aleex.

Aleex March 25, 2004 09:37

Sorry. It`s for FJ :)

Big Stone March 25, 2004 10:32

Re: UDF Problem
Ale Thanks

It is the tutorial of bubble break in a column. If you do not have it , I will send you email box.

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