CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   How to fixed water height in outlet (https://www.cfd-online.com/Forums/openfoam-pre-processing/216292-how-fixed-water-height-outlet.html)

MDietrich April 2, 2019 17:51

How to fixed water height in outlet
 
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.

GrivalszkiP December 17, 2020 13:37

Hi!

I have the same problem, did you get any solution?

Thanks,

Péter

mcgoldba January 25, 2021 09:43

Same here. Any solution?

Thanks,
Marc

Federico_ January 25, 2021 12:13

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

mcgoldba January 25, 2021 14:22

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.

So_LL March 4, 2022 06:50

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 July 26, 2022 04:44

Quote:

Originally Posted by So_LL (Post 823520)
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?

dalasrevo July 28, 2022 02:32

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.

KateBradbrook September 13, 2022 02:55

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;
}

dalasrevo September 21, 2022 04:13

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);
    }


Verdant Frond August 27, 2023 08:59

I have a (somewhat) similar case and this seems to be working well for my setup.

Thank you!

Quote:

Originally Posted by dalasrevo (Post 836210)
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);
    }




All times are GMT -4. The time now is 12:24.