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/)
-   -   UDF errors (https://www.cfd-online.com/Forums/fluent-udf/162831-udf-errors.html)

mnolan93 November 18, 2015 10:22

UDF errors
 
Hi all,

I am very new to coding and have never done this before. I have made a UDF for specified shear in the x direction, tangential shear. I have the following errors:

line 12: undeclared variable
line 12: f_loop_last: undeclared variable

no idea why! any help?

here is the code:

#include"udf.h"
#define Tauxx /* wall shear stress, wall x direction, tangential shear */


DEFINE_PROFILE(wall_shear_x, thread, position)
{
face_t f;
Thread *t0;
cell_t c0;
real TAUxx;
real dudy,dvdx,mu
begin_f_loop(f, thread)
{
t0 = THREAD_T0(thread); /* adjacent cell thread to f */
c0 = F_C0(f, thread);
dudy = C_DUDY(c0,t0); /* derivative tangential velocity wrt normal coordinate */
dvdx = C_DVDX(c0,t0); /* derivative normal velocity wrt tangential coordinate */
mu = C_MU_L(c0,t0); /* viscosity */
TAUxx=mu*(dudy+dvdx);
F_PROFILE(f, thread, position)=TAUxx;
}
end_f_loop(f, thread)
}





Thanks for any help in advance!


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