|
[Sponsors] |
July 27, 2012, 13:56 |
uninitialized local variable 't' used
|
#1 |
New Member
Bradley J
Join Date: Jul 2012
Location: Cincinnati, OH
Posts: 12
Rep Power: 14 |
Hello all,
I have recieved this error on line 12: mf_source_memory_limit20.c(12) : warning C4700: uninitialized local variable 't' used It does not like t-> and I am unsure why......thank you in advance for your time. Bradley Here is my code: # include"udf.h" # include"mem.h" # include"metric.h" # include"math.h" /*calculating and storing the source term*/ DEFINE_EXECUTE_AT_END(source_term) { #if !RP_HOST Domain *d; face_t f; cell_t c0; Thread *t,*t0=t->t0; /*this is line 12*/ double vof; double vof_grad; double st; int Zone_ID = 6; /*zone id boundary conditions, 6 = base wall*/ double m_flux = 34.234; /*define mass flux, units: kg/(s*m^2)*/ d=Get_Domain(2); /*liquid domain*/ /*loops over all faces on the base wall in the liquid domain*/ t = Lookup_Thread(d,Zone_ID); begin_f_loop(f,t) { t0 = THREAD_T0(t); c0 = F_C0(f,t); vof = C_UDSI(c0,t0,0); vof_grad = C_UDMI(c0,t0,0); /*loops over all cells adjacent to wall*/ if ((vof_grad < 0.001)||(vof < 0.001)||(vof > 0.999)) { C_UDMI(c0,t0,1) = 0.0; } else { st = -1*(2*vof*vof_grad*m_flux); C_UDMI(c0,t0,1) = st; } } end_f_loop(f,t) #endif } |
|
October 29, 2018, 13:02 |
|
#2 |
Member
Oula
Join Date: Apr 2015
Location: United Kingdom
Posts: 81
Rep Power: 11 |
Hi Bradley
Have you managed to solve this problem? could you please share your experience? Regards Oula |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to write k and epsilon before the abnormal end | xiuying | OpenFOAM Running, Solving & CFD | 8 | August 27, 2013 16:33 |
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 | bookie56 | OpenFOAM Installation | 8 | August 13, 2011 05:03 |
[blockMesh] BlockMeshmergePatchPairs | hjasak | OpenFOAM Meshing & Mesh Conversion | 11 | August 15, 2008 08:36 |
IcoFoam parallel woes | msrinath80 | OpenFOAM Running, Solving & CFD | 9 | July 22, 2007 03:58 |
Could anybody help me see this error and give help | liugx212 | OpenFOAM Running, Solving & CFD | 3 | January 4, 2006 19:07 |