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 for Permeability in Porous Media (https://www.cfd-online.com/Forums/fluent-udf/32873-udf-permeability-porous-media.html)

solomon January 18, 2004 21:36

UDF for Permeability in Porous Media
 
What is the udf for permeability or viscous resistance in Fluent 6.1?

Umesh January 18, 2004 22:41

Re: UDF for Permeability in Porous Media
 
#include "udf.h" #include "sg.h"

#define R1soil 8e13 /* Resistances */ #define R2soil 2e13

/* Define Resistences */

DEFINE_PROFILE(one_res, thread, np) { cell_t c; real x[ND_ND]; real y;

begin_c_loop (c,thread)

{ C_CENTROID(x,c,thread);

y =x[1];

if ((y<h1 && y>=h2) || (y<h3 && y>=h4) || (y<h5 && y>=h6 ) )

F_PROFILE(c,thread,np) = R1soil; else if ((y<h2 && y>=h3) || (y<h4 && y>=h5) || (y<h6))

F_PROFILE(c,thread,np) = R1graval;

} end_c_loop (c,thread) }

solomon January 20, 2004 01:53

Re: UDF for Permeability in Porous Media
 
What is the h's (h2,h3,h4,h5,h6) stand for?

Thank you

Umesh January 20, 2004 04:24

Re: UDF for Permeability in Porous Media
 
THis is UDF for a Packed column.. h1..h2.are column heights..i.e. distance along height...the udf specifies resistances for two layers of packings..

i had used it successfully

hope this helps.. by -Umesh

co2 January 20, 2004 14:49

Re: UDF for Permeability in Porous Media
 
is there some syntax error in the last 2-3 lines of the code given by Umesh?

umesh January 20, 2004 22:38

Re: UDF for Permeability in Porous Media
 
hi the code is correct... but some symbols were not displyed... just refer to this one

--The Code-----------

#include "udf.h"

#include "sg.h"

#define R1soil 8e13 /* Resistances */

#define R2soil 2e13

#define h1 1.8

#define h2 0.3

/* Define Resistences */

DEFINE_PROFILE(one_res, thread, np) { cell_t c;

real x[ND_ND];

real y;

begin_c_loop (c,thread)

{ C_CENTROID(x,c,thread);

y =x[1];

if (y less than h1 and and y greater than= h2)

F_PROFILE(c,thread,np) = R1soil;

else if (y less than h2)

F_PROFILE(c,thread,np) = R1graval;

} end_c_loop (c,thread) }


reynolds039 August 9, 2012 12:05

hello
what is the viscous resistance in multiphase flow throw a porous medium for each phase
(oil-water) , give the udf for each of them please


All times are GMT -4. The time now is 08:31.