|
[Sponsors] |
March 6, 2009, 13:30 |
UDF for temperature gradient
|
#1 |
Guest
Posts: n/a
|
hi,
im trying to run a compiled udf which I got from one of the fluent manuals (so I know it should work), Ive definitely got my c source file in the same folder as my case file, and ive chosen the header file from the fluent installation directory (udf.h), but i always get an error: 'The system cannot find the file specified. 1 file copied and then it doesnt build a library file, so I cant open it... any ideas? Thanks a lot |
|
March 6, 2009, 14:08 |
Re: UDF for temperature gradient
|
#2 |
Guest
Posts: n/a
|
Can you place your UDF here??
|
|
March 9, 2009, 05:18 |
Re: UDF for temperature gradient
|
#3 |
Guest
Posts: n/a
|
Hi Kuba,
the UDF im using is from the UDF users manual, so its correct, Ive checked the log file and it just has: 'cl' is not recognized as an internal or external command, operable program or batch file. NMAKE : U1077: 'cl' : return code '0x1' Stop. I have visual studio and a c compiler so im not sure what the problem is...the source file is in the same folder as the case/dat files and im using udf.h as the header file.. Thanks again in advance. UDF: #include "udf.h" /* Define which user-defined scalars to use. */ enum { T4, MAG_GRAD_T4, N_REQUIRED_UDS }; DEFINE_ADJUST(adjust_fcn, domain) { Thread *t; cell_t c; face_t f; /* Make sure there are enough user-defined scalars. */ if (n_uds < N_REQUIRED_UDS) Internal_Error("not enough user-defined scalars allocated"); /* Fill first UDS with temperature raised to fourth power. */ thread_loop_c (t,domain) { if (NULL != THREAD_STORAGE(t,SV_UDS_I(T4))) { begin_c_loop (c,t) { real T = C_T(c,t); C_UDSI(c,t,T4) = pow(T,4.); } end_c_loop (c,t) } } } /* Fill second UDS with magnitude of gradient. */ thread_loop_c (t,domain) { if (NULL != THREAD_STORAGE(t,SV_UDS_I(T4)) && NULL != T_STORAGE_R_NV(t,SV_UDSI_G(T4))) { begin_c_loop (c,t) { C_UDSI(c,t,MAG_GRAD_T4) = NV_MAG(C_UDSI_G(c,t,T4)); } end_c_loop (c,t) } } thread_loop_f (t,domain) { if (NULL != THREAD_STORAGE(t,SV_UDS_I(T4)) && NULL != T_STORAGE_R_NV(t->t0,SV_UDSI_G(T4))) { begin_f_loop (f,t) { F_UDSI(f,t,MAG_GRAD_T4)=C_UDSI(F_C0(f,t),t->t0,MAG_GRAD_T4); } end_f_loop (f,t) } } |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Temperature gradient | jaho | CFX | 1 | March 16, 2009 06:32 |
Temperature gradient | Jaho | CFX | 2 | March 12, 2009 19:36 |
Temperature gradient? | Cote | CFX | 1 | February 8, 2007 09:03 |
how to get temperature gradient | lido sum | FLUENT | 1 | February 16, 2002 23:35 |
Temperature gradient | Michal | FLUENT | 7 | December 3, 2001 11:24 |