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

Access violation - Help please

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 21, 2006, 05:57
Default Access violation - Help please
  #1
AlwaysLearning
Guest
 
Posts: n/a
I am trying to run some simple udf's. To get going I am using a few of the many examples on the www.

I seem to get the dreaded 'access violation'.

Any help please.

My steps

Load .cas & .dat files. solve/set/expert (keep temporary solver memory for post-processing = yes) interpret UDF. I don't seem to get any problems here.

Then solve case Then run the execute on demand udf.

I get the oputput from the udf. It simply writes out th min, max and average temp in the domain, then I get the access violation probelms.

I get similar access issues with other examples UDF's.

I have tried the same case on another pc, it shares the lic file and I get identical issues.

Any help.

Oh, if it adds anything, when I try to compile the UDF and not use interpret I get

"Opening library "libudf"... Error: open_udf_library: The system cannot find the path specified.

Error Object: ()"

Help please

my udf

#include "udf.h" extern Domain* domain; DEFINE_ON_DEMAND(demo_calc) {

float tavg = 0.;

float tmax = 0.;

float tmin = 0.;

float temp,volume,vol_tot;

Thread *t;

cell_t c;

thread_loop_c(t,domain)

{

begin_c_loop(c,t)

{

volume = C_VOLUME(c,t); /* get cell volume */

temp = C_T(c,t); /* get cell temperature */

if (temp < tmin || tmin == 0.) tmin = temp;

if (temp > tmax || tmax == 0.) tmax = temp;

vol_tot += volume;

tavg += temp*volume;

}

end_c_loop(c,t)

tavg /= vol_tot;

printf("\n Tmin = %g Tmax = %g Tavg = %g\n",tmin,tmax,tavg);

begin_c_loop(c,t)

{

temp = C_T(c,t);

C_UDMI(c,t,0) = (temp-tmin)/(tmax-tmin);

}

end_c_loop(c,t)

} }

  Reply With Quote

Old   August 21, 2006, 09:41
Default Re: Access violation - Help please
  #2
cadaei
Guest
 
Posts: n/a
did you enable a user-defined memory?

The compile error you are getting is a common problem encountered when you don't have a compiler set up correctly. search the forum for the error
  Reply With Quote

Old   August 22, 2006, 09:14
Default Re: Access violation - Help please
  #3
AlwaysLearning
Guest
 
Posts: n/a
Thanks for your help but still no joy. Not sure I have come across my issue in the forum. Or at least how I might 'set the compiler'

If oit helps ...

When I try to compile -> build the UDF I get /////////////////////////

Deleted old libudf\ntx86\2d\libudf.dll

1 file(s) copied. (system "copy C:\Fluent.Inc\fluent6.2.16\src\makefile_nt.udf libudf\ntx86\2d\makefile") 1 file(s) copied. 0 (chdir "libudf")() (chdir "ntx86\2d")() 'nmake' is not recognized as an internal or external command, operable program or batch file. 'nmake' is not recognized as an internal or external command, operable program or batch file. ///////////////////////

Any thoughts?

The 'interpret' udf issue is still there too.

  Reply With Quote

Old   August 22, 2006, 13:21
Default Re: Access violation - Help please
  #4
cadaei
Guest
 
Posts: n/a
This error is definetly an error about the compiler. search the forum for "nmake". You need to install Microsoft Visual Studio c++ or something equivalent for the Fluent compilers to work.
  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
specified shear at wall - temperature gradient - UDF - access violation error senD Fluent UDF and Scheme Programming 9 September 18, 2014 08:29
MPI and Access Violation Errors Cypher FLUENT 1 August 30, 2011 18:11
UDF Access violation therandomestname FLUENT 0 April 15, 2011 18:31
Urgent! Access violation of UDF using VOF Rucy FLUENT 0 January 9, 2006 05:01
ACCESS VIOLATION error opening a .dat file DavidSF FLUENT 12 April 8, 2005 16:37


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