# UDF problems with porous flow

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

April 8, 2014, 09:12
UDF problems with porous flow
#1
New Member

Nick
Join Date: Sep 2012
Posts: 11
Rep Power: 13
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
 flow.jpg (83.8 KB, 24 views)

 Thread Tools Search this Thread Search this Thread: Advanced Search Display Modes Linear Mode

 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 OffTrackbacks are Off Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post florian_krause OpenFOAM 22 June 13, 2013 21:25 Samuel Andrade FLUENT 2 August 26, 2012 09:43 StefanG ANSYS Meshing & Geometry 19 May 15, 2012 06:44 MasterCooler OpenFOAM 11 May 2, 2012 07:48 Chirag2302 FLUENT 0 March 2, 2012 23:13

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

 Contact Us - CFD Online - Privacy Statement - Top