CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   udf shear (http://www.cfd-online.com/Forums/fluent/48835-udf-shear.html)

isabel July 22, 2008 07:11

udf shear
 
Hello everybody,

I want to impose as a boundary condition a shear dTdx*T. I have written the following code but I have an error. Does somebody know why?

#include "udf.h"

DEFINE_PROFILE (shear_x, thread, position)

{

real T;

real dTdx;

real shear;

face_t f;

Thread *tc0;

cell_t c0;

begin_f_loop(f,thread) /*PERHAPS I WOULD DEFINE f BEFORE */

{

c0 = F_C0(f,thread);

tc0 = THREAD_T0(thread);

dTdx = C_T_G(c0,tc0) [0];

T = C_T(c0,tc0);

shear = T*dTdx;

F_PROFILE(f,thread,position) = shear;

}

end_f_loop(f,thread);

}

My error is:

Error: CAR: invalid argument [1]: wrong type [not a pair] Error Object: ()



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