CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Free surface flow in a channel: how to maintain water level (https://www.cfd-online.com/Forums/openfoam-solving/158544-free-surface-flow-channel-how-maintain-water-level.html)

ssmeherk August 28, 2015 01:16

Free surface flow in a channel: how to maintain water level
 
1 Attachment(s)
Dear all,

I am simulating free surface flow around 2D cylinder with interFoam solver using OF 2.4.0. To start with, Iaminar flow is considered. The issue is I am unable to maintain the water level in-spite of trying various boundary conditions. The rectangular domain consists of two inlets and one outlet. The bottom inlet is for water and the top inlet is for air. The top boundary is open to atmosphere. The bottom boundary condition is symmetry. I have attached the grid as well. Please look at boundary conditions and schemes and let me know where I am doing wrong.

Thank you,

Meher.

Code:


U:

boundaryField
{
    WATERINLET
    {
        type            fixedValue;
        value          uniform (0.005 0 0);
    }

    OUTLET
    {
        type            inletOutlet;
        inletValue      uniform (0 0 0);
        value          uniform (0 0 0);
    }

    AIRINLET
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }

    BOTTOM
    {
        type            symmetry;
    }

    CYLINDER
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }

    ATMOSPHERE
    {
        type            pressureInletOutletVelocity;
        value          uniform (0 0 0);
    }

    frontAndBackPlanes
    {
        type            empty;
    }
}

Code:


p_rgh:

boundaryField
{
    WATERINLET
    {
        type    fixedFluxPressure;
        value  uniform 0;
    }

    OUTLET
    {
        type            zeroGradient;
    }

    AIRINLET
    {
        type    fixedFluxPressure;
        value  uniform 0;
    }

    BOTTOM
    {
        type    symmetry;
    }

    CYLINDER
    {
        type            fixedFluxPressure;
        value          uniform 0;
    }


    ATMOSPHERE
    {
        type            totalPressure;
        p0              uniform 0;
        U              U;
        phi            phi;
        rho            rho;
        psi            none;
        gamma          1;
        value          uniform 0;
    }

    frontAndBackPlanes
    {
        type    empty;
    }
}

Code:


alpha.water:

boundaryField
{
    WATERINLET
    {
        type            zeroGradient;
        //type            fixedValue;
        //value          uniform 1;

    }

    OUTLET
    {
        type            inletOutlet;
        inletValue      uniform 0;
        value          uniform 0;
    }

    AIRINLET
    {
        type            zeroGradient;
        //type            fixedValue;
        //value          uniform 0;

    }

    BOTTOM
    {
        type            symmetry;
    }

    CYLINDER
    {
        type            zeroGradient;
    }

    ATMOSPHERE
    {
        type            inletOutlet;
        inletValue      uniform 0;
        value          uniform 0;
    }

    frontAndBackPlanes
    {
        type            empty;
    }
}


Code:


fvSchemes:

ddtSchemes
{
    default        Euler;
}

gradSchemes
{
    default        Gauss linear;
    grad(U)        cellLimited Gauss linear 1;
}

divSchemes
{
    div(rhoPhi,U)  Gauss linearUpwindV grad(U);
    div(phi,alpha)  Gauss vanLeer;
    div(phirb,alpha) Gauss interfaceCompression;
    div((muEff*dev(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
    default        Gauss linear corrected;
}

interpolationSchemes
{
    default        linear;
}

snGradSchemes
{
    default        corrected;
}

fluxRequired
{
    default        no;
    p_rgh;
    pcorr;
    alpha.water;
}

Code:


fvSolution:

solvers
{
        "alpha.water.*"
            {
        nAlphaCorr      2;
        nAlphaSubCycles 1;
        cAlpha          1;
        icAlpha        0;

        MULESCorr      yes;
        nLimiterIter    10;
        alphaApplyPrevCorr  yes;

        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance      1e-8;
        relTol          0;
        minIter        1;
        }


        pcorr
            {       
        solver          PCG;
        preconditioner  DIC;
        tolerance      1e-10;
        relTol          0;
            }

            p_rgh
            {
        solver          PCG;
        preconditioner  DIC;
        tolerance      1e-07;
        relTol          0.05;
            }

            p_rghFinal
            {
        solver          PCG;
        preconditioner  DIC;
        tolerance      1e-07;
        relTol          0;
            }       

            "(U|k|epsilon)"
            {       
        solver          PBiCG;
        preconditioner  DILU;
        tolerance      1e-06;
        relTol          0;
            }

            "(U|k|epsilon)Final"
            {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance      1e-08;
        relTol          0;
            }
       
}

PIMPLE
{
    momentumPredictor no;
    nCorrectors    2;
    nNonOrthogonalCorrectors 0;

    nAlphaCorr      1;
    nAlphaSubCycles 3;
    cAlpha          1;

    pRefCell            0;
    pRefValue          0;

}

relaxationFactors
{
    fields
    {
    }
    equations
    {
        ".*" 1;
    }
}


mgdenno September 2, 2015 20:43

Meher,

Unfortunately, I don't have a great solution to this problem. It is something that I have struggled with. I have a few suggestions that might work though.

1) you could try setting the initial internal velocity field to match the inlet velocity with setFields.

2) you could try to set the outlet velocity boundary the same as the inlet (only negative).

Hope these work for you.

ssmeherk September 3, 2015 00:43

Re: Re: Help regardfng free surface flow in a channel using interfoam
 
Dear Matthew,

Thank you for your reply.

I have already tried these options you suggested.

All these changes are only delaying the inevitable (water level decreasing) but not completely overcoming it.

At times, the water level may start decreasing at 15.0 s., at times at 50 s. But it is bound to happen.

Anyhow, I will attempt your suggestions again and let you know if I notice any substantial change.

Currently, I am trying to refine the mesh and see how it goes.

Meher.

Bashar March 24, 2017 16:42

Hi,

I am simulating close problem to yours. I also have unstable free surface when simulating flow past plate . I tried different combinations of BC with no luck.
Do you manage to solve the free surface issue.

ssmeherk March 25, 2017 06:35

Bashar,

I did solve my issue.
Can you please share your case setup so that I can have a look at it?

Meher.

Bashar March 25, 2017 19:12

Quote:

Originally Posted by ssmeherk (Post 642234)
Bashar,

I did solve my issue.
Can you please share your case setup so that I can have a look at it?

Meher.

@ssmeherk
Thank you Meher,

In the link below you will find a full description for my case with a history of what I have done until this moment.
Many thanks for your input.

Bashar
https://www.cfd-online.com/Forums/op...omega-sst.html


All times are GMT -4. The time now is 06:19.