|
[Sponsors] |
Setting BCs for Riverine Flows using Interfoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 29, 2012, 18:54 |
Setting BCs for Riverine Flows using Interfoam
|
#1 |
New Member
Kevin Flora
Join Date: Oct 2009
Location: California, USA
Posts: 19
Rep Power: 17 |
Hi Foamers,
I am wanting to model open channel flow for a river and am unsure of the best means to define the inlet and outlet boundary conditions using VOF. With rivers one typically has the inflow rate and downstream water surface elevation (WSEL) defined as known values. Using interFoam with OpenFoam 2.1.x, I can generate a specified flow rate using funkySetBoundaryFields by creating a known area at the inlet by setting alpha =1 and using a fixed velocity so long as I make sure that this area is fully submerged under water. However, I am not sure the best way to "fix" the downstream depth given that it is free surface flow. Using a zeroGradient for the velocity at the outlet leads to the water surface changing due to changes in the calculated velocites from the initial values near the outlet. I have had some success duplicating my inlet approach described above at the outlet as well (fixed area, fixed velocity) so that my Flow In must equal my Flow Out. To clarify my approach, I have attached a screen shot showing my outlet condition for a simplified geometry of a contracted bridge crossing. If I set my initial water surface using setFields, then the total volume of water in the system is constant though the water surface may adjust locally within the system which is OK. This approach seems to work (sometimes, but other times it seems to be unstable); however, I understand that one normally prescribes the velocity (or flow rate) at the inlet and pressure at the outlet. Because my case uses VOF, I'm not sure if or how one can specify a pressure at the outlet to control the water surface elevation. Any thoughts on how to use pressure at the outlet to achieve my goal of having a fixed WSEL or any other suggested changes that I could make to the BCs would be very helpful. I have included my basic files if you wold like to see the specifics. Thanks in Advance. |
|
March 1, 2012, 09:49 |
|
#2 |
Senior Member
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 18 |
hello,
I would set zeroGradient for pressure outlet, and for alpha, set outlet as calculated. You should also try LTSInterFoam, since it does work well and are much faster. regards, olivier |
|
March 8, 2012, 03:39 |
|
#4 | |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Quote:
indeed you can, I currently use: inletOutlet with inletValue uniform 0 for alpha1; totalPressure equals to 0 (same as the atmosphere) for p_rgh; pressureInletOutletVelocity for U; It works very well and apparently it does not disturb the internal behavior (I have a plunging wave crossing it and its shape does not change) Pablo |
||
March 8, 2012, 04:38 |
|
#5 | |
Member
bojiezhang
Join Date: Jan 2010
Posts: 64
Rep Power: 16 |
Quote:
Hi Pablo: I think you may misunderstand the question, we are not sure how to set the outflow boundary, not the surface boundary condition. So if you have any idea to simulate the channel flow with the right outflow boundary condition? Thank you! bojiezhang |
||
March 8, 2012, 04:56 |
|
#6 |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Sorry, I misunderstood.
I may have a custom BC which may be applied for it. It is based on active wave absorption. Tell me your desired in and out water levels, and the inlet velocity and I will see what can I do. Pablo |
|
March 8, 2012, 05:15 |
|
#7 | |
Member
bojiezhang
Join Date: Jan 2010
Posts: 64
Rep Power: 16 |
Quote:
Hi Pablo: I want to model the channel flow using interFoam in the laminar condition. I want to set a velocity in the inflow boundary, use outflow boundary to maintain the water level. I have tried all the methods mentioned in the forum, but still can not find a satisfied one. The water level in the channel either rises up or descends. I do not know how to set a right outflow boundary. Could you give me some advice? Thank you! bojiezhang |
||
March 8, 2012, 06:35 |
freeSurfacePotentialFoam
|
#8 |
New Member
Silvia Di Francesco
Join Date: Jun 2010
Posts: 9
Rep Power: 16 |
Hi foamers,
someone of you have tried to use the new solver freesurfacepotentialFoam? If yes could you help me setting up a simple problem like eg dambreak of interFoam Tutorial or flow in a channel ? Thanks in advance |
|
March 8, 2012, 06:41 |
|
#9 | |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Quote:
Pablo |
||
March 9, 2012, 15:11 |
|
#10 | |
New Member
Kevin Flora
Join Date: Oct 2009
Location: California, USA
Posts: 19
Rep Power: 17 |
Quote:
I have also set up the same simulation using LTSInterform which also works quite well for this case. My problem at this point seems to be moving from the simple geometry of a contracted opening into a more natural river geometry. I have yet to be able to get either interFoam or LTSInterFoam to not blow up for this case. Attached are a few files showing the problem. As you can see, I have a high velocity near the surface at the outlet. I am using 1. The same specified area and magnitude for the velocity at both the inlet and outlet 2. Alpha is calculated at the inlet and outlet 3. Buoyant Pressure at the Inlet and zeroGradient Pressure at the Outlet Any ideas? |
||
May 11, 2012, 06:24 |
|
#11 | |
Senior Member
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17 |
Quote:
I used the same settings for VOF channel flow using interFoam always working fine with OF 1.7.1, but since I changed to OF 2.1.x with the new interFOAM using PIMPLE instead of PISO the alpha1 phase gets reflected at the outflow instead of leaving the domain. Any hints? |
||
May 23, 2012, 07:23 |
|
#12 |
Senior Member
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17 |
Ok turning old searching the cause of alpha1 being reflected at the outflow, I finally got it. Maybe this is a bug dependent on ubuntu version, but it is quite relevant. The difference between the two pictures below showing an outflow of a channel is only that I moved the grid from positive x quadrant to negative x quadrant. When the whol gid lies at a position that the x-coordinates are smaller than 0 the outflow works! Maybe this should be reported.
|
|
May 23, 2012, 22:35 |
|
#13 |
Senior Member
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16 |
Can you post your case so we can look at it and try it?
|
|
May 24, 2012, 05:36 |
no outlet in interFoam dependent on outlet location in coordinate system
|
#14 |
Senior Member
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17 |
Shure, here are the two cases. The flume is parallel to the x-Axis, the g-acelleration corresponds to a 30° inclined flume accelerating the alpha phase towards the outlet. I removed the constant folder and yust placed blockMesh, g and transportProperties in the case folder to limit file size.
Since I have already lost a lot of time with it, I have to stop now searching for the reason and just continue my work with all simulations having vertices with x-coordinates < 0. Could you tell me if it shows the same on your machine? If so I will submit a bug report. Thanks, Albrecht |
|
June 14, 2012, 09:54 |
|
#15 |
Senior Member
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17 |
I used for p_rgh at the outlet outletInlet outletValue uniform 0, if I change it to zeroGradient in p_rgh this reflection of alpha1 does not show anymore. Anyway I would be happy for a good explanation, why a grid translation from negative to positive coordinate system quadrant can cause such behavior.
|
|
July 13, 2012, 04:53 |
Specifying Friction Coefficient in OpenFoam
|
#16 |
New Member
Mak
Join Date: Jul 2010
Location: United States
Posts: 10
Rep Power: 16 |
Dear Foamers,
I am working on dambreak flow in an open channel. can any one help me how to specify manning's roughness coefficient in OpenFoam. I checked manual and code, no success. Is there anyway to specify bottom friction in OpenFoam ? Thank You in advance. Regards, Trinath Rao Last edited by trinath2rao; July 13, 2012 at 06:27. |
|
November 5, 2012, 12:13 |
Solved: Outlet BC
|
#17 |
New Member
Kevin Flora
Join Date: Oct 2009
Location: California, USA
Posts: 19
Rep Power: 17 |
The solution that I discovered seems quite simple for the outlet BC. In short, by prescribing a known flow rate at the inlet (either via the flow or GroovyBC), one then determines the required average velocity at the outlet corresponding to ones desired depth and specifies this as a fixedValue for the entire outlet (air and water). Alpha can remain zeroGradient and pressure can be set to buoyant pressure.
This BC works quite well as it will converge to the desired WSEL regardless of the initial conditions. I has worked well for a number of cases and seems to not over prescribe the boundaries. In essence, by setting V at the outlet, Qout can vary which will lead to convergence since if the WSEL is higher than desired, Qout > Qin and so the water volume in the system will decrease and hence, the water surface will also decrease at the outlet until the inflow is equal to the outflow. Similarly, if the water surface is too low at the outlet, it will necessarily increase the storage in the system and adjust the water surface to where one wants it to be. Here is a link showing a case where the channel is initially dry and fills to the desired level. Here is a link to a case showing the setup for a case and which has an initial WSEL higher than desired. Last edited by kflora; November 12, 2012 at 12:13. Reason: Add File |
|
November 13, 2012, 08:20 |
|
#18 | |
Senior Member
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17 |
Quote:
how does this affect the pressure distribution at your ourflow BC? Do you introduce underpressure this way, causing an acceleration towards the outflow? If your channel system has high differences in elevation, I wonder how to use pRefValue if at all, to get a p_rgh that makes sense. I use pressureInletOutletVelocity for U at the outlet or inletOutlet inletValue uniform (0 0 0), I think the outflow should be driven by the flow due to gravity, viscosity and channel roughness, don't you disturb this system by introducing an outflow flow rate, such that your water level at the outflow is not representing the true situation? Of course, if your downstream region is not of interest, this is fine in supercritical flow. |
||
November 13, 2012, 21:09 |
|
#19 |
New Member
Kevin Flora
Join Date: Oct 2009
Location: California, USA
Posts: 19
Rep Power: 17 |
Albrecht,
You raise some interesting points which I have entirely thought through. For my purpose, typically the water depth at the outlet is a known value in subcritical flow and may be influenced by the factors you mentioned (gravity, roughness and viscosity), but also by factors beyond the boundaries of the simulation such as backwater caused by roadways, bridges, bends, etc. In other words, the outlet depth will likely not be at normal depth. It is for this nonuniform flow case that you actually want to "disturb the system" to generate the physically correct flow depth at the outlet. Regardless, if the depth is known or provided, then the average velocity which I am proposing to use at the outlet cross-section will be by definition correct - though, granted, the velocity distribution vertically and horizontally will not be right since I am using a singe velocity for the entire cross-section. Hopefully, this distribution error is not too critical since my outlet is far away from the point of interest anyway. In theory, one could improve my solution by creating a custom BC condition which would provide a paraboic velocity profile vertically and adjust its average velocity horizontally for depth such that the average velocity would still provide the same effect I propose, but without some of the error/unnatural accelerations to which I think you are making reference. |
|
February 4, 2013, 09:52 |
outlet boundary condition for interFoam in inlet-driven open channel flow
|
#20 | |
Senior Member
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17 |
Quote:
but with type buoyantPressure; // see: interFoam/channelFlow tutorial value uniform 0; for p_rgh at the outlet. |
||
Tags |
interfoam, openfoam, river, vof |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Setting up interFoam for sloshing | santiagomarquezd | OpenFOAM Running, Solving & CFD | 2 | August 11, 2017 05:08 |
[ICEM] Setting the BCs | sreekargomatam | ANSYS Meshing & Geometry | 1 | July 12, 2011 20:28 |
Cells with t below lower limit | Purushothama | Siemens | 2 | May 31, 2010 22:58 |
BC's for free flows | kev | FLUENT | 0 | November 9, 2005 00:02 |
Warning 097- | AB | Siemens | 6 | November 15, 2004 05:41 |