CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   about complie define_adjust() (

shuqin December 26, 2005 01:00

about complie define_adjust()
hi,everyone! I wannar to define one scalar as a function of the gradient of another user-defined scalar, using DFINE_ADJUST.I define scalar 0 and scalar 1 and also 20 dms the code was mostly the same as the Example 2 in UDF help manual 4.2.1 DEFINE_ADJUST as belows:

#include "udf.h" #define sigma 1.0E5 /* Define which user-defined scalars to use. */ enum { A, /*uds-0*/ B, /*ud-1 */ N_REQUIRED_UDS };

DEFINE_ADJUST(current_define, domain) { Thread *t; cell_t c;

/* Make sure there are enough user-defined scalars. */ if (n_uds < N_REQUIRED_UDS)

Internal_Error("not enough user-defined scalars allocated");

/* Do nothing if gradient isn't allocated yet. */ if (! Data_Valid_P())


thread_loop_c (t,domain)




begin_c_loop_all (c,t)


end_c_loop_all (c,t)


} } and then I complie it ,when I build it ,there comes out the error notice below,I suppose there must be problem in my udf,if it is the case,what is the problem ? can someone help me!thanks a lot! Any solution would be appreciated!

Error Object: ()

Make sure that UDF source files are in the directory

that contains your case and data files. If you have an

existing libudf directory, please remove this directory

to ensure that the latest files are used.The system can not find the specified file。 1 file copied。 (system "move user_nt.udf libudf\ntx86\3ddp")0 (system "copy D:\Fluent.Inc\fluent6.1.22\src\makefile_nt.udf libudf\ntx86\3ddp\makefile")copied

shuqin December 26, 2005 05:18

Re: about complie define_adjust()
This problem I 've solved ..... sorry to bother !

Ray Hong December 26, 2005 06:22

Re: about complie define_adjust()
Dear Shuqin,

Could you tell me how to solve your problem?

Thank you very much.


shuqin December 26, 2005 08:08

Re: about complie define_adjust()
the mistake I made is to add udf.h in the head source column which is for customer difined head source,not for the system head source ,such as udf.h,with out adding it ,the error disappeared shuqin

All times are GMT -4. The time now is 07:58.