|
[Sponsors] |
August 13, 2012, 00:11 |
Scheme variable problem
|
#1 |
Senior Member
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18 |
Dear users,
I have written a UDF as below: no problem in compiling but when i run Fluent, there is an error message, DEFINE_EXECUTE_AT_END(heat_flux) { Domain *d; Thread *t; face_t f; real A[ND_ND]; real q; real T_W; real htc; real q_t; real TT = RP_Get_Real("T-ref"); d = Get_Domain(1); t = Lookup_Thread(d,3); begin_f_loop (f,t) { F_AREA(A,f,t); q = WALL_HEAT_FLUX(f,t); /* gets the TOTAL Heat flux vector at the surface */ q_t = q / NV_MAG(A); T_W = F_T(f,t); htc = ABS(q_t / (T_W - TT)); C_UDMI(F_C0(f,t),THREAD_T0(t),0) = q_t; C_UDMI(F_C0(f,t),THREAD_T0(t),1) = htc; } end_f_loop (f,t) } The following error message appears: Error: rpgetvar: T-ref: undefined variable Error Object: () I have already defined T-ref using (if (not (rp-var-object ‘T-ref))(rp-var-define ‘T-ref 290 ‘real #f)) in TUI so I think there should be no problems! I will appreciate if you can help me resolve this problem, tnx |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Lax-wendroff scheme for Shock tube problem. | manukamin | Main CFD Forum | 1 | November 26, 2011 15:10 |
Problem with a leapfrog scheme for wave equation | Shiranui | Main CFD Forum | 0 | June 22, 2010 10:19 |
Env variable not set | gruber2 | OpenFOAM Installation | 5 | December 30, 2005 05:27 |
UDF compilation problem -- "undeclared variable" | Henrik Ström | FLUENT | 1 | September 21, 2005 06:25 |
problem about numerical scheme in LES. | libin | Main CFD Forum | 4 | July 1, 2004 05:32 |