CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   OpenFOAM open channel flow downsteam boundary condition (https://www.cfd-online.com/Forums/openfoam-solving/108637-openfoam-open-channel-flow-downsteam-boundary-condition.html)

 Brickman October 29, 2012 09:34

OpenFOAM open channel flow downsteam boundary condition

1 Attachment(s)
Hi folks,

I'm using Interfoam to solve a simple subcritical open channel flow problem. My grid is regular, rectangular. Boundary conditions are:

Upstream boundary (inlet)
alpha1: timeVaryingMappedFixedValue (constant in time, for now)
p_rgh: buoyantPressure
U: fixedValue

Downstream boundary (outlet)
alpha1: timeVaryingMappedFixedValue (constant in time, for now)
p_rgh: buoyantPressure

The upstream BC is basically a prescribed flow rate, while the downstream BC is a prescribed water level. For the alpha1 BC's, I specify points below the free surface as alpha1=1, and above the free surface as alpah1=0 (this is how I specify the water level). Since the flow is subcritical, I expect it to be controlled by the downstream boundary condition, and to cause water to back-up upstream. However, instead of this happening, a small lump with a large alpha1 develops just 1 cell upstream of my downstream boundary, as shown in the attached plot.

Can anyone tell me if I'm going about setting my boundaries incorrectly? Should I be specifying my water level and flow rate in another way? In the end, I'm trying to run the problem this way in order to simulate a time-varying water level in the correct way (with downstream control). Previously, I got the problem to run only with upstream control (all downstream boundary variables zeroGradient), but this is not really the correct way to run the problem of subcritical flow. Any guidance would be appreciated.

Thanks,
Jeremy

 kflora November 5, 2012 12:16

Outlet BC

Jeremy,

I too struggled with this issue for a while. My solution is posted here.

Let me know if it works for you as well.

Kevin

 Brickman November 5, 2012 21:14

Outlet BC

Hi Kevin,

Thank you very much for pointing me to your post. I understand your method. I reckon I could use that (fixed value velocity on the outlet boundary) to make a time-varying downstream water level by making a time-varying outflow speed.

For now, I've been trying the problem of a specified downstream water level by getting rid of the boundaries all together. I've got my domain set up like a flume now, with solid walls and a well at either end, upwelling into the flume on the upstream side, and downwelling out of the flume on the other (so the BC is fixed value velocity in both cases). Then I control the inflow and outflow flow rates in order to control the water level and flow speed in the test section.