|
[Sponsors] |
August 21, 2006, 05:57 |
Access violation - Help please
|
#1 |
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) } } |
|
August 21, 2006, 09:41 |
Re: Access violation - Help please
|
#2 |
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 |
|
August 22, 2006, 09:14 |
Re: Access violation - Help please
|
#3 |
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. |
|
August 22, 2006, 13:21 |
Re: Access violation - Help please
|
#4 |
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.
|
|
|
|
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 |