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/)
-   -   reactingTwoPhaseEulerFoam pressure rising into oblivion (https://www.cfd-online.com/Forums/openfoam-solving/249244-reactingtwophaseeulerfoam-pressure-rising-into-oblivion.html)

Vinzmann April 28, 2023 09:35

reactingTwoPhaseEulerFoam pressure rising into oblivion
 
Hey foamers,

I am having a problem with reactingTwoPhaseEulerFoam.
I want to run a pressure driven flow and for that I modified the wallBoiling tutorial. My problem here is that the pressure rises and rises in the simulation until openfoam throws an error.

My p file looks like this:
Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform 1e5;

boundaryField
{
    inlet
    {
        /*
        type            uniformTotalPressure;
        value          uniform 2e5;
        p0                table
        (
                        (0        1.01e5)
                        (1        1.1e5)
                        (1.01        1.5e5)
                        (1.1        2e5)
                        (2        2e5));
        U                U.gas;
        psi                thermo:psi.gas;
        gamma                1;
        */
        type                fixedValue;
        value                2e5;
       
    }

    outlet
    {
        type            calculated;
        value          $internalField;
        inletValue        $internalField;
    }

    wall1
    {
        type            zeroGradient;
        value          uniform 100000;
    }

    wall2
    {
        type            zeroGradient;
        value          uniform 100000;
    }

    defaultFaces
    {
        type            empty;
    }
}

With p_rgh like this:
Code:

boundaryField
{
    inlet
    {
        /*
        type            uniformTotalPressure;
        value                uniform 2e5;
        p0                table
        (
                        (0      1.01e5)
                        (1        1.1e5)
                        (1.01  1.5e5)
                        (1.1    2e5)
                        (2      2e5));;
        gamma                1;
        U                U.gas;
        psi                thermo:psi.gas;
        */
        type                fixedValue;
        value                2e5;
       
    }

    outlet
    {
        type            prghPressure;
        p              $internalField;
        value          $internalField;
        inletValue        $internalField;
    }

    wall1
    {
        type            zeroGradient;
    }

    wall2
    {
        type            zeroGradient;
    }

    defaultFaces
    {
        type            empty;
    }
}

So when the simulation runs, I obtain maximum pressures in my domain which exceed the maximum total inlet pressure. How can I fix this?

Code:

fieldMinMax inlet_minmax write:
    min(T.liquid) = 259.992008 in cell 1885 at location (0.0175 1.98666667 0.095) on processor 3
    max(T.liquid) = 264.538203 in cell 1707 at location (0.0475 0.0666666667 0.095) on processor 0
    min(p_rgh) = 60708.731 in cell 1684 at location (0.0325 0.0133333333 0.095) on processor 0
    max(p_rgh) = 319567.437 in cell 3 at location (0.0175 0.0133333333 0.005) on processor 0
    min(T.gas) = 246 in cell 177 at location (0.0025 2 0.005) on processor 3
    max(T.gas) = 264.167583 in cell 1707 at location (0.0475 0.0666666667 0.095) on processor 0
    min(p) = 60716.7122 in cell 1684 at location (0.0325 0.0133333333 0.095) on processor 0
    max(p) = 319573.132 in cell 3 at location (0.0175 0.0133333333 0.005) on processor 0
    min(mag(U.gas)) = 0 in cell 0 at location (0 0.0133333333 0.005) on processor 0
    max(mag(U.gas)) = 51.9675555 in cell 3 at location (0.0175 0 0.005) on processor 0
    min(mag(U.liquid)) = 0 in cell 0 at location (0 0.0133333333 0.005) on processor 0
    max(mag(U.liquid)) = 51.9675555 in cell 3 at location (0.0175 0 0.005) on processor 0

This is after only a few time steps. Also my outlet does't let any fluid out, it just lets fluid in, which it should not do, since it is the same pressure as the internal field and has pressureInletOutletVelocity as a boundary condition.

Code:

average(inlet) of phi.gas = -5.61329548e-06
    average(inlet) of phi.liquid = -5.61329548e-06
average(outlet) of phi.gas = -1.11589869e-07
    average(outlet) of phi.liquid = -0.000266711356

It would be really great if you guys could help.

Thanks,
Vinz


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