CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   Macros for writing UDF for porosity (

umesh June 13, 2003 01:22

Macros for writing UDF for porosity
hi I want to write a UDF for a packed bed it has three layers of packings,with porosity 0.27, 0.3 and 0.35 respectively

i am working with fluent6.1 I read the manual, but cant find how to define/ write UDF for variable porosity

i only found i had to use DEFINE_PROPERTY macro.

anyone having some idea/ sample UDF, Please reply soon. Its Urgent thanks in advance

umesh June 13, 2003 04:20

Re: possible options
Hi I received follow information, hopefully it will help others also........

If your porosity is fixed for the simulation, as you seem to indicate, then I suggest that you simply use Gambit to define a mesh with three fluid zones, one for each layer. In each fluid zone you set the boundary conditions and turn on porous zone and set the constant porosity you want.

If you want porosity to have a complex variation or it changes with solution time etc., you can use a PROFILE function. The manual is wrong and it must be a profile udf not a proprty udf!!!! (Just found that the other day!). I've also had some problems with loading cases with a profile defined, so it may have other bugs since this is new in 6.1.

An example profile is:

DEFINE_PROFILE(PROF_Pm_Zeta,thread,i) { cell_t cell;



F_PROFILE(cell,thread,i) = /* put your function here */

} end_c_loop(cell,thread) }

I'd try the first option before using a udf!!

Have fun

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