|
[Sponsors] |
December 26, 2005, 01:00 |
about complie define_adjust()
|
#1 |
Guest
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()) return; thread_loop_c (t,domain) { if (FLUID_THREAD_P(t)) { begin_c_loop_all (c,t) C_UDSI(c,t,B)=-sigma*C_UDSI_G(c,t,A)[1]; 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 |
|
December 26, 2005, 05:18 |
Re: about complie define_adjust()
|
#2 |
Guest
Posts: n/a
|
This problem I 've solved ..... sorry to bother !
|
|
December 26, 2005, 06:22 |
Re: about complie define_adjust()
|
#3 |
Guest
Posts: n/a
|
Dear Shuqin,
Could you tell me how to solve your problem? Thank you very much. Ray |
|
December 26, 2005, 08:08 |
Re: about complie define_adjust()
|
#4 |
Guest
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
|
|
|
|
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 13:07 |
conjugateheatfoam complie on OF1.7 | kamkari | OpenFOAM | 0 | March 10, 2011 13:11 |