CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

uninitialized local variable 't' used

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 27, 2012, 12:56
Default uninitialized local variable 't' used
  #1
New Member
 
Bradley J
Join Date: Jul 2012
Location: Cincinnati, OH
Posts: 12
Rep Power: 13
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.

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
}
Blackhawks84 is offline   Reply With Quote

Old   October 29, 2018, 12:02
Default
  #2
Member
 
Oula
Join Date: Apr 2015
Location: United Kingdom
Posts: 81
Rep Power: 10
Oula is on a distinguished road
Hi Bradley

Have you managed to solve this problem? could you please share your experience?

Regards
Oula
Oula is offline   Reply With Quote

Reply


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 Off
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
[blockMesh] BlockMeshmergePatchPairs hjasak OpenFOAM Meshing & Mesh Conversion 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 18:07


All times are GMT -4. The time now is 04:33.