CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

RP_variable for porous information

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   February 4, 2014, 06:40
Default RP_variable for porous information
Join Date: Oct 2011
Location: Thessaloniki, Greece
Posts: 75
Rep Power: 10
crevoise is on a distinguished road

I am trying to access information about my porous media
I was wondering how to get the 'porosity' value in my udf?

I have tried stuff like:

por = RP_Get_Real("porosity");
por = RP_Get_Real("fluid-porosity");

but it does not seems such variable exits as a Fluent variable.
Does anyone knows how to access the list of Fluent variables?

I am trying to access such data in order to deal with a porous media only.
In an interpreted UDF, I am writing such loop (for example for the intialization) (let say I have 2 fluid threads and 1 solid thread, one fluid thread being porous):

DEFINE_INIT(init, d)

Thread *t;
cell_t c;

     if (NNULP(T_STORAGE_R(t,SV_P)  // to get the fluid threads
        // here I wish to get only the porous one, so that explain my above
        if porosity = 1, etc....
Alternatively, in a compiled UDF, I have wrote the following:

DEFINE_INIT(init, d)

real cporous;
Thread *t;
cell_t c;

     if (FLUID_THREAD_P(t) && THREAD_VAR(t).fluid.porous)
               cporous = cporous + 1;

but it seems this return the total amount of the fluid cells, both the fluid and the porous.
I do not really understand why the THREAD_Var(t).fuid.porous does not work in the compiled udf.
After several unfruitful tests, I decided to try the way by the interpreted udf (and then the problem on getting the porosity value came, as the THREAD_VAR can be used only in compiled udf).

Thank you for any hint on that problem
crevoise is offline   Reply With Quote

Old   July 22, 2017, 12:42
New Member
EstÍv„o Lannes Tolentino
Join Date: Oct 2016
Posts: 9
Rep Power: 5
estevaotolentino is on a distinguished road
Hi Mr. Crevoise,

I'm having a similar problem. Did you solve the problem of your compiled UDF code ? Were you able to correctly use the terms "FLUID_THREAD_P(t) && THREAD_VAR(t).fluid.porous" ?

Thank you.
estevaotolentino is offline   Reply With Quote


porous, thread, udf

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR #001100279 has occurred in subroutine ErrAction. smnaryal CFX 11 December 20, 2017 16:32
using face information in a cell-based macro ximik Main CFD Forum 2 May 10, 2011 17:42
interchanging face information with cell information/ radiation flux UDF ximik FLUENT 1 May 4, 2011 16:34
PHOENICS Information Peter Spalding Phoenics 0 September 24, 2004 05:30
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 09:11

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