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

[Problem]THREAD_STORE: undeclared variable

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

Reply
 
LinkBack Thread Tools Display Modes
Old   January 8, 2012, 18:31
Default [Problem]THREAD_STORE: undeclared variable
  #1
Member
 
HJ
Join Date: Nov 2011
Posts: 30
Rep Power: 5
wanghaojie is on a distinguished road
Hi all,
While im debugging, i find this problem:
THREAD_STORE: undeclared variable
in this line
t0 = F_C0_THREAD(f,t);
I check with the manual and it seems right to me, any ideas?
Thanks.

This is my code


#include "udf.h"
#define ID 10023
#define Vel 1.0
#define Angle 90.0
#define Alfa 1.0
#define Gama 0.15
#define rho 1.225

DEFINE_EXECUTE_AT_END(VentilationRate)
{

Domain *d;
FILE *fp;
face_t f;
float A[2];
float x[2],z;
Thread *t,*t0,*t1;
double incid;
double v,v_door,cp,cp_sin,VentRate;
cell_t c0, c1;

fp = fopen("data.csv","a+");
d = Get_Domain(1);
t = Lookup_Thread (d, ID);
incid = Angle/180.0*3.14159;
fprintf (fp, "Vel,Angle\n");
begin_f_loop(f, t)
{
F_AREA(A,f,t);
c0 = F_C0(f,t);
t0 = F_C0_THREAD(f,t);
c1 = F_C1(f,t); /* Get cell on other side of face */
t1 = F_C1_THREAD(f,t);
v_door= 0.5*(C_V(c0,t0)+C_V(c1,t1));/*Average the velocity before and after the door)*/
}
end_f_loop(f, thread)

fclose(fp);

}
wanghaojie is offline   Reply With Quote

Old   January 8, 2012, 18:44
Default
  #2
Member
 
HJ
Join Date: Nov 2011
Posts: 30
Rep Power: 5
wanghaojie is on a distinguished road
I found the problem, the marco has been updated to THREAD_T0(t) in ansys fluent 12
wanghaojie is offline   Reply With Quote

Reply

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
P_POS(p) undeclared variable spring FLUENT 6 March 8, 2014 06:47
emag beta feature: charge density charlotte CFX 4 March 22, 2011 10:14
error in COMSOL:'ERROR:6164 Duplicate Variable' bhushas Main CFD Forum 1 May 30, 2008 04:35
Env variable not set gruber2 OpenFOAM Installation 5 December 30, 2005 05:27
Replace periodic by inlet-outlet pair lego CFX 3 November 5, 2002 21:09


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