CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Porosity as function of position

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By IRobin

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   September 9, 2019, 09:21
Default Porosity as function of position
  #1
New Member
 
Robin
Join Date: Sep 2019
Posts: 4
Rep Power: 6
IRobin is on a distinguished road
Hello,

I would like to create a UDF which sets the porosity value at a fixed value at a given position. I have been struggling with this for the last couple of days but I am still not succesful . That is why I ask you guys, as I hope you might help me a bit further.

So the problem, I have the following UDF written:

#include "udf.h"

DEFINE_PROFILE(PROF_Pm_Zeta,thread,i)
{

cell_t cell;
real x[ND_ND];
real a;

begin_c_loop(cell,thread)
{
if (x[0] > 0.2)
{
a = 0.0;
}
else
{
a = 1.0;
}
C_PROFILE(cell,thread,i) = a;

} end_c_loop(cell,thread) }

I call this UDF in Fluent as: Cell zone conditions -> Porous Zone -> Fluid porosity

Its goal is to set the porosity equal to 0, when the x-value is larger than 0.2m. However, after implementing this in a rather simple test case (1 inlet + 3 outlet boundaries), it seems to not work. The velocity is not affected what so ever. Does any one have an idea why the porosity is not changed as I intended it to do?

Robin
IRobin is offline   Reply With Quote

 


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
[Other] mesh airfoil NACA0012 anand_30 OpenFOAM Meshing & Mesh Conversion 13 March 7, 2022 17:22
[Other] refineWallLayer Error Yuby OpenFOAM Meshing & Mesh Conversion 2 November 11, 2021 11:04
[snappyHexMesh] How to define to right point for locationInMesh Mirage12 OpenFOAM Meshing & Mesh Conversion 7 March 13, 2016 14:07
UDF for writing porosity as a function of distance from the wall rohinibc Fluent UDF and Scheme Programming 5 August 8, 2012 08:16
ParaView for OF-1.6-ext Chrisi1984 OpenFOAM Installation 0 December 31, 2010 06:42


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