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/)
-   -   Negative Pressures at water/air Interface? (https://www.cfd-online.com/Forums/openfoam-solving/216151-negative-pressures-water-air-interface.html)

WaterHammer1985 March 29, 2019 11:05

Negative Pressures at water/air Interface?
 
1 Attachment(s)
Hello,

I need help troubleshooting why there would be negative pressure within the water column for an interFoam simulation of water flowing over a weir. See attached image.

1. What would cause the pressure at the interface to be negative? There are ~7 mesh cells between 0Pa and the alpha interface so it isn't negative in just 1 cell (see the line plot in attached image)

2. Is there a way to have the interface correspond to 0Pa? If I change the alpha phase to 0.99 the interface is still negative.

WaterHammer1985 March 29, 2019 11:08

Boundary Conditions
 
0/U

Code:

dimensions      [0 1 -1 0 0 0 0];

internalField  uniform (0 0 0);

boundaryField
{

    inlet_water
    {
        type                      flowRateInletVelocity;
        volumetricFlowRate        constant 30;
        value                    uniform (0 0 0);
    }

    outlet_air
    {
        type            pressureInletOutletVelocity;
        value          uniform (0 0 0);
    }
    outlet_water
    {
        type            pressureInletOutletVelocity;
        value          uniform (0 0 0);
    }

    "(inlet_wall|conc)"
    {
        type            noSlip;
    }

    "(wall1|wall2)"
    {
        type            symmetry;
    }



    "(bed1|bed2)"
    {
        type            noSlip;
    }


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

    defaultFaces
    {
        type            empty;

0/alpha.water
Code:

dimensions      [0 0 0 0 0 0 0];

internalField  uniform 0;

boundaryField
{
    inlet_water
    {
        type            fixedValue;
        value          uniform 1;

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

    outlet_water
    {
        type            inletOutlet;
        inletValue      uniform 1;
        value          uniform 1;
    }


    "(inlet_wall|conc)"
    {
        type            zeroGradient;
    }

    "(wall1|wall2)"
    {
        type            symmetry;
    }


    "(bed1|bed2)"
    {
        type            zeroGradient;
    }


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

    defaultFaces
    {
        type            empty;
    }
}

0/p_rgh
Code:

dimensions      [1 -1 -2 0 0 0 0];

internalField  uniform $pressure;

boundaryField
{
    inlet_water
    {
        type            fixedFluxPressure;
    }

    outlet_water
    {
        type            totalPressure;
        rho            rho;
        psi            none;
        gamma          1;
        p0              uniform 4286970;
        value          uniform 4286970;
    }

    outlet_air
    {
        type            totalPressure;
        rho            rho;
        psi            none;
        gamma          1;
        p0              uniform 0;
        value          uniform 0;
    }


    "(inlet_wall|conc)"
    {
        type            fixedFluxPressure;
    }

    "(wall1|wall2)"
    {
        type            symmetry;
    }


    "(bed1|bed2)"
    {
            type            fixedFluxPressure;
    }


    top
    {
        type            totalPressure;
        p0              uniform 0;
    }


    defaultFaces
    {
        type            empty;
    }
}

fvSchemes
Code:

ddtSchemes
{
    default        Euler;
}

gradSchemes
{
    default        Gauss linear;
}

divSchemes
{
    div(rhoPhi,U)  Gauss upwind; //Gauss limitedLinearV 1;
    div(phi,alpha)  Gauss upwind; //Gauss vanLeer;
    div(phirb,alpha) Gauss interfaceCompression;
    div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
    div(phi,omega) Gauss upwind;
    div(phi,p_rgh)  Gauss upwind;
    div(phi,k)      Gauss upwind;
    div(phi,epsilon) Gauss upwind;
}

laplacianSchemes
{
    default        Gauss linear corrected;
}

interpolationSchemes
{
    default        linear;
}

snGradSchemes
{
    default        corrected;
}

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

fvSolution
Code:

solvers
{
    "alpha.water.*"
    {
        isoFaceTol      1e-6;
        surfCellTol    1e-6;
        nAlphaBounds    3;
        snapTol        1e-12;
        clip            true;

        nAlphaSubCycles 1;
        cAlpha          1; // Note: cAlpha is not used by isoAdvector but must
                          // be specified because interfacePropertes object
                          // reads it during construction.
    }

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

    p_rgh
    {
        solver          GAMG;
        smoother        DICGaussSeidel;
        tolerance      1e-07;
        relTol          0.05;
    }

    p_rghFinal
    {
        $p_rgh;
        tolerance      1e-07;
        relTol          0;
    }



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



    "(U|k|epsilon)Final"
    {
        $U;
        relTol          0;
    }


}

PIMPLE
{
    momentumPredictor no;
    nCorrectors    3;
    nOuterCorrectors 1;
    nNonOrthogonalCorrectors 0;
    pRefCell        0;
    pRefValue      0;
}


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



All times are GMT -4. The time now is 14:31.