|
[Sponsors] |
July 25, 2006, 09:52 |
Given that the convective boun
|
#1 |
New Member
Ian Cowan
Join Date: Mar 2009
Location: London, UK
Posts: 28
Rep Power: 17 |
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). |
|
July 25, 2006, 10:03 |
The easiest way to do this is
|
#2 |
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21 |
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.) |
|
July 25, 2006, 10:09 |
Ingenious! I'll need to do so
|
#3 |
New Member
Ian Cowan
Join Date: Mar 2009
Location: London, UK
Posts: 28
Rep Power: 17 |
Ingenious! I'll need to do some reading up to figure out how to createt the surfaceScalarField. Thanks.
|
|
July 25, 2006, 10:33 |
Hi Ian,
I have to admit tha
|
#4 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
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 |
|
July 25, 2006, 11:12 |
Like this:
surfaceScalarFie
|
#5 |
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21 |
Like this:
surfaceScalarField UblendingFactor ( IOobject ( "UblendingFactor", runTime.timeName(), mesh ), mesh, dimensionedScalar("UblendingFactor", dimless, 1.0) ); |
|
July 25, 2006, 15:22 |
Hrv - I appreciate that users
|
#6 |
New Member
Ian Cowan
Join Date: Mar 2009
Location: London, UK
Posts: 28
Rep Power: 17 |
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. |
|
July 25, 2006, 15:34 |
No probs. As you can probably
|
#7 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
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 |
|
August 6, 2006, 10:44 |
Eugene - works just fine. Tha
|
#8 |
New Member
Ian Cowan
Join Date: Mar 2009
Location: London, UK
Posts: 28
Rep Power: 17 |
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 ...
|
|
August 7, 2006, 05:26 |
Great. How many layers of upwi
|
#9 |
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21 |
Great. How many layers of upwind to you need to prevent reflection?
|
|
August 11, 2006, 05:14 |
We're running some cases now t
|
#10 |
New Member
Ian Cowan
Join Date: Mar 2009
Location: London, UK
Posts: 28
Rep Power: 17 |
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()? |
|
April 7, 2009, 13:12 |
|
#11 |
New Member
|
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:
|
|
April 7, 2009, 18:16 |
|
#12 |
Senior Member
|
Hi Forum,
localBlended scheme is also available for OF 1.5 or only in the 1.5.x version? Thanks... |
|
April 8, 2009, 05:03 |
|
#13 |
New Member
|
||
April 8, 2009, 05:18 |
|
#14 |
Senior Member
|
Thanks Frank,
I will take a look soon on it! |
|
|
|
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 11:55 |
Sponge Oozing | Anil | FLUENT | 0 | February 20, 2006 02:38 |
Velocity outflow vs Pressure Outflow | ramesh | Siemens | 1 | January 9, 2006 02:12 |
sponge layer-boundary condition. | Rajani Kumar Akula | Main CFD Forum | 1 | January 30, 2002 05:57 |