CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   UDF problem (https://www.cfd-online.com/Forums/fluent/38078-udf-problem.html)

valemary October 2, 2005 11:02

UDF problem
 
Dear users, I have a problem with my Udf. I want to know thermal conductivity mean value on a velocity inlet boundary. I have a mixture and hydrogen and nytrogen enter. My model is turb ke and the solver is segregated. The text of my udf is:

#include "udf.h"

DEFINE_ADJUST(thermal_cond, d) { int id=5; Thread *t=Lookup_Thread(d,id); cell_t c; int n=0; real tceff=0.;

#define C_K_T(c,t)(C_MU_T(c,t)*C_CP(c,t)/M_keprt) #define C_K_EFF(c,t)(C_K_L(c,t)+C_K_T(c,t))

{ begin_c_loop(c,t) n++ tceff += C_K_EFF(c,t); end_c_loop(c,t) tceff=tceff/n; } printf("Thermal conductivity is: %f\n", tceff); }

Fluent interprets the Udf, but when I start iteration the Fatal error, Access violation message appears! Can you help me?

Thanks

valemary


RoM October 4, 2005 02:18

Re: UDF problem
 
boundary = face thread. use face loop.

RoM


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