CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   REFPROP.DLL and Fluent UDF: ACCESS_VIOLATION error (https://www.cfd-online.com/Forums/fluent-udf/116496-refprop-dll-fluent-udf-access_violation-error.html)

amit112amit April 20, 2013 12:15

REFPROP.DLL and Fluent UDF: ACCESS_VIOLATION error
 
4 Attachment(s)
Hi.
I have written UDFs using DEFINE_PROPERTY to calculate Density, Viscosity, Thermal Conductivity and Sound Speed.

Inside DEFINE_PROPERTY I have a function call to another C function called CELL_DENSITY(press, temp).
When compiled and executed outside Fluent, these other C functions are able to calculate and return values of density etc. using refprop.dll, provided the DLL and CO2.FLD files are present in the same directory. Co2.fld is REFPROP's pure fluid file.
But when run from inside Fluent they give ACCESS_VIOLATION error. I have tried putting the additional files (.DLL and .FLD) under libudf\src and libudf\win64\3d. But it did not work.

I cannot use the NIST real gas models (which use REFPROP 7.0) provided by Fluent. NIST real gas models allow only one pure-fluid or real-gas mixture in the entire domain. I need to use Air and CO2 both.

Please help.

Regards,
Amit Singh
Attachment 20945

Attachment 20946

Attachment 20947

Attachment 20948

wenjue October 20, 2014 07:37

Did you solve this problem at last? I want to use c code to obtain material properties by linking FLUENT to NIST refprop 9.0, but I failed. It seems like that FLUENT cannot compile windows.h correctly. Did you come across errors like this? Looking forward to your reply!!
Besides, I complied your code, the error appears in the driverspecs.h


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