CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   Effective thermal conductivity UDF - C_K_EFF?? (

Craig February 9, 2004 19:43

Effective thermal conductivity UDF - C_K_EFF??
Hi, I am modeling heat transfer in a porous media and get a parse error when I work with the macro C_K_EFF. I get a parse error in that line. If I replace with any other arbitrary macro, say C_K_L or C_MU_EFF or whatever I want it compiles fine. Using V6.1.

Anybody have any ideas why this doesn't work? My UDF is below.

#include "udf.h"

DEFINE_PROPERTY(cell_conductivity, cell, thread) { real k_s; real rho = C_R(cell, thread); real u = C_U(cell, thread); real v = C_V(cell, thread); real mu = C_MU_L(cell, thread); real k_gas = C_K_EFF(cell, thread);


return k_s; }

Rob Hart February 10, 2004 05:14

Re: Effective thermal conductivity UDF - C_K_EFF??
works fine in 6.0.20 here.

If you are feeling adventurous, you could have a browse through udf.h and see how C_K_EFF is defined.

In my #define udf.h C_K_EFF is:

#define C_K_EFF(c,t)(C_K_L(c,t) + C_K_T(c,t))

You already said C_K_L works. What about C_K_T?


Craig February 10, 2004 19:20

Re: Effective thermal conductivity UDF - C_K_EFF??
Thanks, actually C_K_T doesn't work either, probably because I'm not even using a turbulence model (I was confused - I didn't want K_EFF, I thought that referred to the effective conductivity of a porous medium).
However I do have another problem, I'm sure this must be something really simple I'm missing, I can't seem to load in more than 2 UDFs at once. If I try to interpret a second UDF, the first one is eliminated from the model. What do I need to do?
Thanks, much appreciated

Rob Hart February 10, 2004 19:54

Re: Effective thermal conductivity UDF - C_K_EFF??
Well the obvious thing to do is put them all in one file.

To be honest I've never tried to have more than one .c file in a case.


Craig February 11, 2004 15:02

Thank you Rob
Ahh, that was the simple thing that I was missing. Seems obvious to me now. Thanks for your help.

All times are GMT -4. The time now is 12:02.