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/)
-   -   Boundary conditions - Pressure input ONLY (https://www.cfd-online.com/Forums/openfoam-pre-processing/220729-boundary-conditions-pressure-input-only.html)

Nidalsb September 19, 2019 09:29

Boundary conditions - Pressure input ONLY
 
Hi,

I am using an inlet and an outlet pressure to try and solve an incompressible flow problem. I do not have any velocity or flow rate data.

The issue I am facing is that my solver always fails due to a high courant number no matter what solver I use. I tried Simple, Pimple and Piso.

Please let me know if you can find a mistake in my code below or feel free to suggest anything that would help.

PS: You can think of my problem as a box with a few internal walls directing the flow. xmin is the pressure inlet, xmax is the pressure outlet. the walls on the sides of the box are zmin. zmax, ymin, ymax and finally the internalwall is walls directing the flow in the interior of the box.

My P:
Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  4.0                                  |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform 0;

boundaryField
{
    xmin
    {
        type        totalPressure;
        p0          uniform 130000;
        value        $internalField;

    }

    xmax
    {
        type        totalPressure;
        p0          uniform 100000;
        value        $internalField;

    }

    ymin
    {
        type            zeroGradient;
    }

    ymax
    {
        type            zeroGradient;
    }

    zmin
    {
        type            zeroGradient;
    }

    zmax
    {
        type            zeroGradient;
    }
   
  internalWall
    {
        type            zeroGradient;
    }
}

// ************************************************************************* //


My U:

Code:


/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  4.0                                  |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      volVectorField;
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform (0 0 0);

boundaryField
{
    xmin
    {
        type            pressureInletVelocity;
        value                $internalField;
    }

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

    ymin
    {
        type            noSlip;
    }

    ymax
    {
        type            noSlip;
    }

    zmin       
    {
        type            noSlip;
    }

    zmax
    {
        type            noSlip;
    }

    internalWall
    {
        type            noSlip;
    }
}

// ************************************************************************* //


HPE September 22, 2019 04:48

Quote:

I am using an inlet and an outlet pressure to try and solve an incompressible flow problem. I do not have any velocity or flow rate data.
The short answer is that you cannot specify only pressure-valued boundary conditions for incompressible flow computations. Otherwise, the linear system of equations are over-determined, the velocity field can be anything.

Possibly, with these settings, the velocity field will therefore keep increasing without any bounding as you have already observed it that your simulation got high Courant number problem.

Please do more elborate search the forum. The topic had been discussed quite many times.

Kind regards,
HPE


All times are GMT -4. The time now is 02:47.