CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   access violation (

R.B.M July 10, 2002 00:18

access violation

I wrote UDF(define- on demande)to calculing the derive of density .(Fluent6) and I compiled(interpretet ) it successfully. BUT when I execute on I had this error:

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

Does anybody know which mistake can lead to this error?

Thanks a lot in advance.


DEFINE_ON_DEMAND(Density_Grad) {

Domain *domain;

Thread *thread;

cell_t cell;

domain = Get_Domain(1);





/* ---- copy density to UDS */

C_UDSI(cell,thread,0) = C_T(cell,thread);

/* --- store gradient d/dx in UDM */

C_UDMI (cell,thread,0) = C_UDSI_G(cell,thread,0)[1];





Thanks a lot in advance.

Ale July 10, 2002 08:35

Re: access violation
Hi, apparently none of the users of this forum has a precise idea of what this error message means.

I asked the same question few months ago (and someone else did the same even earlier), but we had no complete and exhaustive answer, as you can see if you search for 'access violation' on this website.

This error should probably concern memory usage of Fluent, I think.

I'm sure you will receive this message if you attempt to use a number of UDS greater than the one you defined in define/models/user defined scalars (Fluent 5.4; Fluent6 should be similar). Check it. Remember that the index of UDS begins with 0, so that if you use, say, UDSI(cell,thread,5), you are using 6 scalars.

Anyway, sometimes when I load case and data file of a simulation and I try to start again the computation, I receive this message. Then I initialize the solution, I make 1 iteration, I load data again and I have no more any problem... I yet cannot understand this behavior.

I would be very grateful if anyone could provide us any useful information on this kind of error.

Thank you,


Thitikorn July 11, 2002 04:02

Re: access violation
I don't have knowledge about User Defined Scalar. But when you use Interpret in Fluent 5.5 - 6.0. trial to use this

Domand *domand;


\ / extern Domand *domand;

when, I use Defined On Demand. If I write "Domand *domand;" I got error ACCESS_VIOLATION like you. but If I add "extern" It work :).

lohen July 11, 2002 05:07

Re: access violation
Hi, beware that when you are using UDMI that you have already set memory place before starting calculations.


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