CFD Online Logo CFD Online URL
Home > Forums > FLUENT

about complie define_adjust()

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   December 26, 2005, 01:00
Default about complie define_adjust()
Posts: n/a
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
  Reply With Quote

Old   December 26, 2005, 05:18
Default Re: about complie define_adjust()
Posts: n/a
This problem I 've solved ..... sorry to bother !

  Reply With Quote

Old   December 26, 2005, 06:22
Default Re: about complie define_adjust()
Ray Hong
Posts: n/a
Dear Shuqin,

Could you tell me how to solve your problem?

Thank you very much.

  Reply With Quote

Old   December 26, 2005, 08:08
Default Re: about complie define_adjust()
Posts: n/a
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
  Reply With Quote


Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to run a solver on a machine without installation of OpenFOAM waynezw0618 OpenFOAM Running, Solving & CFD 4 June 24, 2017 12:07
conjugateheatfoam complie on OF1.7 kamkari OpenFOAM 0 March 10, 2011 13:11

All times are GMT -4. The time now is 02:48.