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

UDF problems with porous flow

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 8, 2014, 10:12
Default UDF problems with porous flow
  #1
New Member
 
Nick
Join Date: Sep 2012
Posts: 11
Rep Power: 14
Nicolastheterminator is on a distinguished road
Hi everyone,

I have a problem with my porous flow UDFs. My geometry is a simple 2D channel with a porous region blocking flow. I specify a pressure inlet and outlet.

When solving my problem with the porous flow solver in Fluent, I get a nice reasonable flow. But when I do it with a UDF defining porous flow with a source UDF, I get the same result except some very ugly redlines going into and out of the porous region that are entirely unexpected (see image). My UDFs should be fine as they are simple Darcian flow so I wonder what is wrong?

I suspect it is the mesh, but I would really appreciate advice on what to do.

Thanks,
Nick

Here is my Porous flow UDF

#include "udf.h"
#define urf 0.1 // under-relaxation factor
real s1 = 0. , s2 = 0.;

DEFINE_SOURCE(Darcian_x,c,t,dS,eqn)
{
//k is the permeability, defined in m^2

real source, k, mu;

mu = C_MU_L(c,t); k = 1.4E-11;

source = - C_U(c,t)*mu/k;

dS[eqn] = - mu/k;

s1 = s1*(1-urf) + source*urf;

return s1;

}

DEFINE_SOURCE(Darcian_y,c,t,dS,eqn)
{
//k is the permeability, defined in m^2

real source, k, mu;
mu = C_MU_L(c,t); k = 1E-20;

source = - C_V(c,t)*mu/k;

dS[eqn] = - mu/k;

s2 = s2*(1-urf) + source*urf;

return s2;

}
Attached Images
File Type: jpg flow.jpg (83.8 KB, 25 views)
Nicolastheterminator is offline   Reply With Quote

Reply


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
setup problems - LES pipe flow with cyclic BC (1) and direct mapped inlet (2) florian_krause OpenFOAM 22 June 13, 2013 22:25
Porous Media coupled with internal flow Samuel Andrade FLUENT 2 August 26, 2012 10:43
[ICEM] Flow channel meshing problems StefanG ANSYS Meshing & Geometry 19 May 15, 2012 07:44
unexpected flow speeds within porous zones MasterCooler OpenFOAM 11 May 2, 2012 08:48
compressible flow through porous media Chirag2302 FLUENT 0 March 3, 2012 00:13


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