CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   [Problem]THREAD_STORE: undeclared variable (https://www.cfd-online.com/Forums/fluent-udf/95942-problem-thread_store-undeclared-variable.html)

wanghaojie January 8, 2012 17:31

[Problem]THREAD_STORE: undeclared variable
 
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 January 8, 2012 17:44

I found the problem, the marco has been updated to THREAD_T0(t) in ansys fluent 12


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