User defined viscosity - error in load
1 Attachment(s)
Here is my udf for defining the viscosity as function of temperature and pressure:
Code:
#include "udf.h" D:\a\libudf\win64\3ddp\libudf.dll Copied D:\a/D:\a\viscosity .c to libudf\src udf_names.c and user_nt.udf files in 3ddp are upto date. (system "copy "C:\PROGRA~1\ANSYSI~1\v160\fluent"\fluent16.0.0\sr c\udf\makefile_nt.udf "libudf\win64\3ddp\makefile" ") 1 file(s) copied. (chdir "libudf")(chdir "win64\3ddp") Done. Then I click on load option to make it available to solver, but then I get this error message : http://www.cfd-online.com/Forums/att...1&d=1439659112 Any suggestion? |
3 Attachment(s)
Today morning, just started the procedure again without any changes to system configuration or Fluent settings and surprisingly every thing is working fine.
Though you can see that I have made few changes to UDF but that is not more than adding comments etc... Here is the message I received now (perfectly working udf ) http://www.cfd-online.com/Forums/att...1&d=1439702414 And UDF (also attached) http://www.cfd-online.com/Forums/att...1&d=1439702177 PS: I am using Visual studio Express 12.0. For editing of udf files ( c files in fact), I am using notepad++. |
I generally find it safest to first unload the compiled library before building and loading a new library (instructions). Restarting Fluent would have a similar effect which could explain why the compilation worked next day.
|
Just wondering, what is the purpose of return command?
|
Fluent UDF macros are implemented with the usual C function definitions which may return a value. Article on C Functions. In this particular case, the DEFINE_PROPERTY macro is called for each cell and returns the viscosity value. This process occurs when the properties are updated (near the end of each iteration before the convergence check).
|
All times are GMT -4. The time now is 04:47. |