CFD Online Logo CFD Online URL
Home > Forums > Fluent UDF and Scheme Programming

uninitialized local variable 't' used

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

LinkBack Thread Tools Display Modes
Old   July 27, 2012, 12:56
Default uninitialized local variable 't' used
New Member
Bradley J
Join Date: Jul 2012
Location: Cincinnati, OH
Posts: 12
Rep Power: 7
Blackhawks84 is on a distinguished road
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.


Here is my code:

# include"udf.h"
# include"mem.h"
# include"metric.h"
# include"math.h"
/*calculating and storing the 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);
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;
st = -1*(2*vof*vof_grad*m_flux);
C_UDMI(c0,t0,1) = st;
Blackhawks84 is offline   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
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 15:33
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 bookie56 OpenFOAM Installation 8 August 13, 2011 04:03
BlockMeshmergePatchPairs hjasak OpenFOAM Native Meshers: blockMesh 11 August 15, 2008 07:36
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 02:58
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 19:07

All times are GMT -4. The time now is 16:10.