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/)
-   -   Issue with pressure boundary and gravity in DPMFoam (https://www.cfd-online.com/Forums/openfoam-solving/160737-issue-pressure-boundary-gravity-dpmfoam.html)

eric October 12, 2015 16:29

Issue with pressure boundary and gravity in DPMFoam
 
Hello,

I have an issue with running the DPMFoam solver with a vertical outlet boundary. There does not seem to be a suitable boundary condition for the pressure in this case.
With gravity on you will get a hydrostatic pressure field in the internal domain, so setting a fixed value of zero becomes wrong.

Does anyone know how to fix this in DPMFoam? Other solvers, such as interFoam, seem to fix this by instead solving for p_rgh.

I have tried various other approaches, such as setting the outlet pressure to the hydrostatic pressure, but without success.

I notice that the tutorial cases for DPMFoam and MPPICFoam either only have horizontal boundaries or have gravity switched off.

Thanks,
Eric

eric October 15, 2015 05:22

2 Attachment(s)
I have attached two plots illustrating the issue. This is flow through a channel with a constant inlet velocity and without any particle injection.
In the first plot, I have used a fixed value for the pressure at the outlet (right boundary). Here you can clearly see the hydrostatic pressure buildup in the domain.

The second picture shows the result when I try to set the pressure to the hydrostatic pressure at the outlet.
That doesn't seem to work either.

- Eric

Attachment 42700

Attachment 42701

Marcio October 28, 2017 07:46

Hello eric and everyone else,

i have the same problem as you. Exchanging air with water in DPMFoam and causes the exact same issue. I tried also many bc at the outlet and got, when the solver ran, a similar phenomena.
Did somebody solve the problem, or could tell me how to implement hydrostatic pressure to the DPMFoam solver?

Marcio November 1, 2017 08:11

1 Attachment(s)
So i tried some more bc combinations and extended the 0-folder a bit(pimpleFoam), leading to no change in both alternatives (simple (DPMFoam) and extended (pimpleFoam) 0-folder). I always get a similiar picture as eric (see attachement).
My example is a simple block geometry with 3 particles on the ground. The Inlet is a fixedValue and the Outlet should just let water out as it comes, which it clearly does not, looking at the screenshot. Am i making something wrong with the boundary conditions? My second assumption is that the DPMFoam Solver (pEqn.H especially) is not made for water simulations.

Following are my p and U.water codes:
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
{
    inlet
    {
        type            fixedFluxPressure;
        phi            phi.water;
        value          $internalField;
    }

    outlet
    {
        type            fixedValue;
        value          uniform 0;;
        //phi            phi.water;
        //value          $internalField;
    }
   
    upperWall
    {
        type            zeroGradient;
    }
    walls
    {
        type            zeroGradient;
        /*
        type            fixedFluxPressure;
        phi            phi.water;
        value          $internalField;
        */
    }

    sides
    {
        type            zeroGradient;
        /*
        type            fixedFluxPressure;
        phi            phi.water;
        value          $internalField;
        */
    }
}

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

U.water:
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
{


    inlet
    {
        type            fixedValue;
        value          uniform (0.5 0 0);
        //phi            phi.water;
        //alpha          alpha.water;   
    }

    outlet
    {
        type            zeroGradient;
        /*
        type            inletOutlet;
        phi            phi.water;
        inletValue        uniform (0 0 0);
        value          uniform (0 0 0);
        */
    }
   
    upperWall
    {
        type            noSlip;
        /*
        type            inletOutlet;
        phi            phi.water;
        inletValue        uniform (0 0 0);
        value          uniform (0 0 0);
        */
       
    }

    walls
    {
        type            noSlip;
    }
   
    sides
    {
        type            noSlip;
    }
}

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


Viet-Dung November 19, 2018 12:54

Hi,
Using DPMFoam to study the scour around a cylinder, I started with a classic model without particles in icoFoam. Everything is ok concerning the mesh, fluid behavior...
Then, in DPMFoam, with 1 particle and the same mesh, boundary conditions..., when I set g = 0, the simulation converges well and the results match those of icoFoam. But when g = -9.81, U_z, U_magnitude,Courant Number increase at the outlet and the simulation stops.
Did you solve the problem ?

rmn_990 March 1, 2019 10:44

same problem

Marcio May 8, 2019 08:28

Iīve solved my problem by coupling an Euler-Lagrangian Solver. I did this by adding to the standard pimpleFoam-Solver the lagrangian library.
Since itīs some time I did this hereīs a presentation, where i got the idea with a short but thorough tutorial.

https://www.foamacademy.com/wp-conte...les_slides.pdf

I hope this helps everyone who got stuck at this exact same point


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