CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Selective outlet boundary condition for InterFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 21, 2007, 05:30
Default Dear FOAMers, just before c
  #1
caw
Member
 
Christian Winkler
Join Date: Mar 2009
Location: Mannheim, Germany
Posts: 63
Rep Power: 17
caw is on a distinguished road
Dear FOAMers,

just before christmas there is one problem that haunts me night by night ;-)
So any help is highly appreciated.

A two phase flow problem, which can be handled by interFoam quite well, is the basic thing.
I am looking for a way to prevent fluid 1 leaving the flow domain at an outlet while fluid 2 can pass through.

-A quite complicated way to do this would be to move faces from the outlet-bc to a wall-bc if gamma is > 0 in the adjacent cell.

-Or is there a way to force the flux to zero on those faces (not the whole path of course)?

Any hints?


Thanks in advance and have a nice holiday season

kind regards
Christian
caw is offline   Reply With Quote

Old   December 21, 2007, 05:47
Default Are you sure this is what you
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Are you sure this is what you want?

If so, take a mixed boundary condition and manipulate the fixed value-fixed gradient switch based on gamma. It would be easiest just to write a new fvPatchField class.

Enjoy,

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   December 21, 2007, 06:48
Default Thanks Hrv for your fast reply
  #3
caw
Member
 
Christian Winkler
Join Date: Mar 2009
Location: Mannheim, Germany
Posts: 63
Rep Power: 17
caw is on a distinguished road
Thanks Hrv for your fast reply.

Actually i dont know what i want...just some clues for the most efficient solution i suppose ;-))

I will look into the existing fvPatchField classes...that was probably the hint i was looking for.

Kind regards
Christian
caw is offline   Reply With Quote

Old   February 11, 2008, 10:43
Default Hi, I've tried to make this
  #4
Member
 
Francesco Boschetto
Join Date: Mar 2009
Location: Italy
Posts: 56
Rep Power: 17
francesco_b is on a distinguished road
Hi,

I've tried to make this boundary condition, but I've got some issues concerning the switch, can you pls help me with the implementation?

The function should be something like

template<class>
void filterFvPatchField<type>::updateCoeffs()
{
if (this->updated())
{
return;
}
const volScalarField& gammap = gamma
(
reinterpret_cast<double>(NULL)
);

this->valueFraction() = 0.0;

for (int i = 0; i < boundarysize; i++)
{
if (gammap(cellnexttoboundary(i)) > 0.5)
{
this->valueFraction(i) = 1.0;
}
}

mixedFvPatchField<type>::updateCoeffs();
}

I've got this questions:

1) Is the initialization of gammap correct? If it is not, how should it be?
2) What is the name of the variable which gives me "boundarysize"?
3) What should I write to obtain the value of gammap(cellnexttoboundary(i))?
4) Is there a better way of doing this?

As I said before, I'm new to C++, I know these are stupid questions but for me it is not so clear,

Thanks in advance

Francesco
francesco_b is offline   Reply With Quote

Old   May 30, 2009, 00:42
Default
  #5
Member
 
Jitao Liu
Join Date: Mar 2009
Location: Jinan , China
Posts: 64
Rep Power: 17
awacs is on a distinguished road
Quote:
Originally Posted by francesco_b View Post
Hi,

I've tried to make this boundary condition, but I've got some issues concerning the switch, can you pls help me with the implementation?

The function should be something like

template<class>
void filterFvPatchField<type>::updateCoeffs()
{
if (this->updated())
{
return;
}
const volScalarField& gammap = gamma
(
reinterpret_cast<double>(NULL)
);

this->valueFraction() = 0.0;

for (int i = 0; i < boundarysize; i++)
{
if (gammap(cellnexttoboundary(i)) > 0.5)
{
this->valueFraction(i) = 1.0;
}
}

mixedFvPatchField<type>::updateCoeffs();
}

I've got this questions:

1) Is the initialization of gammap correct? If it is not, how should it be?
2) What is the name of the variable which gives me "boundarysize"?
3) What should I write to obtain the value of gammap(cellnexttoboundary(i))?
4) Is there a better way of doing this?

As I said before, I'm new to C++, I know these are stupid questions but for me it is not so clear,

Thanks in advance

Francesco
Dear Francesco,

I am also confused on this issue. How did you retrieve the value of gamma in the cell close to the boundary patch? How to write valueFraction as a function of gamma?
I am a newbie in OpenFOAM. Please give me some tips.

Thanks in advance.

Jitao Liu
awacs is offline   Reply With Quote

Old   February 7, 2012, 14:48
Default
  #6
New Member
 
emad
Join Date: Jan 2011
Posts: 4
Rep Power: 15
ziglat2004 is on a distinguished road
Hi,

I have the same problem in Fluent. do you know how to define the "filter" boundary condition in fluent?

Thanks
ziglat2004 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
Air vents, porosity, selective outlet Catarina CFX 0 December 26, 2008 07:59
Outlet boundary condition for pd in InterFoam gopala OpenFOAM Running, Solving & CFD 0 March 19, 2008 10:26
Outlet boundary condition Asghari Main CFD Forum 0 May 5, 2006 17:51
Outlet boundary condition in channel flow solving with interFoam liuzhw OpenFOAM Running, Solving & CFD 0 November 29, 2005 22:07
selective outlet Shane FLUENT 1 October 16, 2002 02:02


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