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

Sponge layer for outflow BC

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

Like Tree2Likes
  • 2 Post By irc

Reply
 
LinkBack Thread Tools Display Modes
Old   July 25, 2006, 08:52
Default Given that the convective boun
  #1
irc
New Member
 
Ian Cowan
Join Date: Mar 2009
Location: London, UK
Posts: 28
Rep Power: 8
irc is on a distinguished road
Given that the convective boundary condition hasn't yet been coded up (thread http://www.cfd-online.com/OpenFOAM_D...es/1/2695.html), can anyone provide guidance on how to implement a "sponge layer" in for example the last ten rows of cells before a zero-gradient outflow boundary? In this layer I'd want to either drop the differencing scheme to UD and/or add in additional viscosity to smear out gradients before the outflow BC.

The application that I have in mind initially is incompressible flow past a 2D cylinder, where I want the vortex street to be whisked out of the domain without upsetting things upstream (I want a short domain).
irc is offline   Reply With Quote

Old   July 25, 2006, 09:03
Default The easiest way to do this is
  #2
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 12
eugene is on a distinguished road
The easiest way to do this is to use the localBlended differencing scheme. To do this create a surfaceScalarField called UblendingFactor in your top level code and set the value to zero everywhere except in the region you want to use UD, where you set it to 1. Then for div(phi, U) use "localBlended linear upwind;"

(I might be wrong on the details above, but you get the general idea.)
eugene is offline   Reply With Quote

Old   July 25, 2006, 09:09
Default Ingenious! I'll need to do so
  #3
irc
New Member
 
Ian Cowan
Join Date: Mar 2009
Location: London, UK
Posts: 28
Rep Power: 8
irc is on a distinguished road
Ingenious! I'll need to do some reading up to figure out how to createt the surfaceScalarField. Thanks.
irc is offline   Reply With Quote

Old   July 25, 2006, 09:33
Default Hi Ian, I have to admit tha
  #4
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,758
Rep Power: 21
hjasak will become famous soon enough
Hi Ian,

I have to admit that even in a good code like OpenFOAM, new boundary conditions do not appear when they are discussed at the User Forum. If you really need the convective boundary condition, you have 3 options:
- do it yourself (this is what I always do) :-)
- find someone to help you implement it. For a commercial user like your company, the obvious way is a support contract
- get someone to do it for you.

I would be quite happy to get involved if you are serious about this.

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

Old   July 25, 2006, 10:12
Default Like this: surfaceScalarFie
  #5
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 12
eugene is on a distinguished road
Like this:

surfaceScalarField UblendingFactor
(
IOobject
(
"UblendingFactor",
runTime.timeName(),
mesh
),
mesh,
dimensionedScalar("UblendingFactor", dimless, 1.0)
);
eugene is offline   Reply With Quote

Old   July 25, 2006, 14:22
Default Hrv - I appreciate that users
  #6
irc
New Member
 
Ian Cowan
Join Date: Mar 2009
Location: London, UK
Posts: 28
Rep Power: 8
irc is on a distinguished road
Hrv - I appreciate that users of an open source code should expect to roll their sleeves up and try/work things out for themselves, and then contribute their findings to the rest of the forum. It's my belief that that's the best way to learn. However, don't underestimate the difficulty that a new user of Openfoam has in getting to grips with the package - especially if they have a Fortran background (showing my age) and are new to C++. I appreciate the offer of training etc - my interest is only personal at the moment though since for my business we are still slaves to the commercial codes.

Eugene - thanks for the pointer; I'll give it a go.
irc is offline   Reply With Quote

Old   July 25, 2006, 14:34
Default No probs. As you can probably
  #7
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,758
Rep Power: 21
hjasak will become famous soon enough
No probs. As you can probably see from the forum, I ma here to help the people get up to speed and will offer substantial help where appropriate. Please don't let this stop you asking questions - people who do CFD and OpenFOAM on their own time and invest the effort out of their interest or through academic research have always proven to be very beneficial to the project.

Regards,

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

Old   August 6, 2006, 09:44
Default Eugene - works just fine. Tha
  #8
irc
New Member
 
Ian Cowan
Join Date: Mar 2009
Location: London, UK
Posts: 28
Rep Power: 8
irc is on a distinguished road
Eugene - works just fine. Thanks for your suggestion. Had to write a small bit of code to set & visualise the surfaceScalarField blending factor, since the setFields utility doesn't work for surface fields. My coding is freely available for anyone who wishes it ...
alisina and vishwakarma like this.
irc is offline   Reply With Quote

Old   August 7, 2006, 04:26
Default Great. How many layers of upwi
  #9
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 12
eugene is on a distinguished road
Great. How many layers of upwind to you need to prevent reflection?
eugene is offline   Reply With Quote

Old   August 11, 2006, 04:14
Default We're running some cases now t
  #10
irc
New Member
 
Ian Cowan
Join Date: Mar 2009
Location: London, UK
Posts: 28
Rep Power: 8
irc is on a distinguished road
We're running some cases now to test it out. Incidentally, when setting up the surfaceScalarField, I looped over all the cell faces of the internal mesh:


forAll(mesh.Cf(), cellfi)
{
UBlendingFactor[cellfi] = ...
}


Are the cell faces on the boundary patches included in this loop, or are they held separately, meaning that I need to do another similar loop with e.g. mesh.boundary()?
irc is offline   Reply With Quote

Old   April 7, 2009, 12:12
Arrow
  #11
4xF
New Member
 
Frank Albina
Join Date: Mar 2009
Location: Switzerland
Posts: 14
Rep Power: 8
4xF is on a distinguished road
Send a message via Skype™ to 4xF
It seems that further development was done since then and as far as I can see in OpenFOAM v1.5 and 1.5.x, using the localBlended scheme, requires to perform the following:
  1. define a surfaceScalarField UBlendingFactor which sets the local blending factor for the variable U. From localBlended.C, it appears that one can define as well local blending factor for other field variable (such as k for instance, which would become kBleningFactor).
  2. use div(phi,U) localBlended linear upwind. Apparently, you can also use other higher order schemes than linear, but needs to be confirmed.
  3. a local value of 1.0 for UBlendingFactor means 100% linear, a local value of 0.0 means 100%UD.
Hope this helps.
4xF is offline   Reply With Quote

Old   April 7, 2009, 17:16
Default
  #12
Senior Member
 
Ivan Flaminio Cozza
Join Date: Mar 2009
Location: Torino, Piemonte, Italia
Posts: 207
Rep Power: 9
ivan_cozza is on a distinguished road
Send a message via MSN to ivan_cozza
Hi Forum,
localBlended scheme is also available for OF 1.5 or only in the 1.5.x version?
Thanks...
ivan_cozza is offline   Reply With Quote

Old   April 8, 2009, 04:03
Smile
  #13
4xF
New Member
 
Frank Albina
Join Date: Mar 2009
Location: Switzerland
Posts: 14
Rep Power: 8
4xF is on a distinguished road
Send a message via Skype™ to 4xF
Quote:
Originally Posted by ivan_cozza View Post
localBlended scheme is also available for OF 1.5 or only in the 1.5.x version?
The answer is both. Check out $WM_PROJECT_INST_DIR/OpenFOAM-1.5/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localBlended
4xF is offline   Reply With Quote

Old   April 8, 2009, 04:18
Default
  #14
Senior Member
 
Ivan Flaminio Cozza
Join Date: Mar 2009
Location: Torino, Piemonte, Italia
Posts: 207
Rep Power: 9
ivan_cozza is on a distinguished road
Send a message via MSN to ivan_cozza
Thanks Frank,
I will take a look soon on it!
ivan_cozza is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
NRBC: Sponge layer approach jinwon park Main CFD Forum 1 December 5, 2013 08:33
is there mass outflow or velocity outflow B.C. kk FLUENT 1 April 12, 2007 10:55
Sponge Oozing Anil FLUENT 0 February 20, 2006 02:38
Velocity outflow vs Pressure Outflow ramesh CD-adapco 1 January 9, 2006 02:12
sponge layer-boundary condition. Rajani Kumar Akula Main CFD Forum 1 January 30, 2002 05:57


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