# How to fixed water height in outlet

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

 April 2, 2019, 18:51 How to fixed water height in outlet #1 New Member   Marcos Join Date: Mar 2019 Posts: 3 Rep Power: 5 Hi everyone. I am modeling an natural river with a bridge. A am using interfoam for solver. I want to know how to fixed the water height in outlet to force the model to have that height at outlet. I want to know which Boundary Conditions must use. Tranks for you help.

 December 17, 2020, 14:37 #2 Member   Grivalszki Péter Join Date: Mar 2019 Location: Budapest, Hungary Posts: 39 Rep Power: 5 Hi! I have the same problem, did you get any solution? Thanks, Péter

 January 25, 2021, 10:43 #3 New Member   Marc Join Date: Oct 2017 Posts: 10 Rep Power: 7 Same here. Any solution? Thanks, Marc

 January 25, 2021, 13:13 #4 New Member   Federico Join Date: Jan 2021 Posts: 13 Rep Power: 3 I posted something in similar below in which I use variableHeightFlowRate but I'd like to understand more about it. It should fix same values of alpha of the inlet with the mass conservation

 January 25, 2021, 15:22 #5 New Member   Marc Join Date: Oct 2017 Posts: 10 Rep Power: 7 Hi Federico, Thank you for the reply. I have tried something similar with the variableHeightFlowRate, however it didn't seem to work for me. I am attempting to simulate a water channel with something similar to an infinite reservoir at the outlet (with a fixed water level). However, the water level drops as the simulation progresses with the variableHeightFlowRate specification. I am now trying with a codedFixedValue boundary as follows. However, I am questioning whether or not it is a numerical issue since my mesh is somewhat coarse. Code: ``` fixedWaterLevel { code #{ const vectorField Cf = patch().Cf(); scalarField& field = *this; forAll(Cf, facei) { field[facei]=(Cf[facei].y() <= -1.68584 ? 1 : 0); } #}; }``` Here -1.68584 is the constant water level I want to specify, and gravity is acting in the "y" direction.

 March 4, 2022, 07:50 #6 New Member   Sophie Join Date: Jan 2021 Posts: 11 Rep Power: 3 Hi Did you find a solution to this need? I've seen elsewhere to fix the velocity of the outlet to V=Qinlet/Achannel for the depth you require, but this leads to a significant impact from the downstream BC on the modeled velocity. And if running LES, the need to extent the mesh further downstream is quickly overwhelming computationally. Did you find a more elegant solution? Mahmoud Abbaszadeh likes this.

July 26, 2022, 05:44
#7
Member

Mahmoud
Join Date: Nov 2020
Location: United Kingdom
Posts: 37
Rep Power: 4
Quote:
 Originally Posted by So_LL Hi Did you find a solution to this need? I've seen elsewhere to fix the velocity of the outlet to V=Qinlet/Achannel for the depth you require, but this leads to a significant impact from the downstream BC on the modeled velocity. And if running LES, the need to extent the mesh further downstream is quickly overwhelming computationally. Did you find a more elegant solution?

Hi. Have you found any solution?

 July 28, 2022, 03:32 #8 New Member   Tobias Join Date: Jul 2022 Posts: 7 Rep Power: 2 I am working on a similar problem: I have a section consisting of a basin open to the atmosphere at the top, fed by a lateral inlet. Then follows a piping (closed at the top, so a section under pressure, because the water level before and after the piping is higher), followed by a basin open to the atmosphere at the top. The model is fed by a constant volume flow Q at the inlet. In reality, there is a flap at the outlet which keeps the water level in the lower basin constant at the desired level. At the inlet I work so far with inlet { type variableHeightFlowRateInletVelocity; volumetricFlowRate 0.5; flowRate 0.5; alpha alpha.water; value uniform (0 0 0); } But how do I keep the water level in the lower pool constant? I have my patches open to the atmosphere with top1 { type pressureInletOutletVelocity; value uniform (0 0 0); } defined. Someone gave me the tip to "lower the model area by x cm", with x as the desired water level, but I can't figure out how to do that.

 September 13, 2022, 03:55 #9 New Member   Kate Bradbrook Join Date: Nov 2015 Posts: 8 Rep Power: 9 Hello, you can try the following: make sure the file hRef exists in constant director with a line "value ***;" Where *** is your desired outlet water level. Then try the following outlet boundary conditions: p_rgh outlet { type totalPressure; //fixedValue also possible for static pressure rho rho; p0 uniform 0; value uniform 0; } U outlet { type inletOutlet; inletValue uniform (0 0 0); value \$internalField; } alpha.water outlet { type zeroGradient; }

 September 21, 2022, 05:13 #10 New Member   Tobias Join Date: Jul 2022 Posts: 7 Rep Power: 2 I solved my problem with a different approach, namely by calculating the expected flux for my water phase at the outlet (using the area to determine the expected velocity) and then using the following boundary condition in U: Code: ``` outlet { type outletPhaseMeanVelocity; Umean XXX; alpha alpha.water; value uniform (0.312 0 0); }```

 Tags boundary conditions, interfoam