CFD Online Logo CFD Online URL
Home > Forums > FLUENT

UDF for temperature gradient

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

LinkBack Thread Tools Display Modes
Old   March 6, 2009, 14:30
Default UDF for temperature gradient
A Kourm
Posts: n/a

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

  Reply With Quote

Old   March 6, 2009, 15:08
Default Re: UDF for temperature gradient
Posts: n/a
Can you place your UDF here??

  Reply With Quote

Old   March 9, 2009, 06:18
Default Re: UDF for temperature gradient
A Kourm
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) } }
  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
Temperature gradient jaho CFX 1 March 16, 2009 07:32
Temperature gradient Jaho CFX 2 March 12, 2009 20:36
Temperature gradient? Cote CFX 1 February 8, 2007 10:03
how to get temperature gradient lido sum FLUENT 1 February 17, 2002 00:35
Temperature gradient Michal FLUENT 7 December 3, 2001 12:24

All times are GMT -4. The time now is 15:20.