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/)
-   -   non-physical Results with multiphaseEulerFoam (https://www.cfd-online.com/Forums/openfoam-solving/216473-non-physical-results-multiphaseeulerfoam.html)

Stefanie.S.W. April 9, 2019 07:07

non-physical Results with multiphaseEulerFoam
 
5 Attachment(s)
Hello everyone,



i have some trouble to run a simulation with

3 phases (Water Oil Air)

2 Inlets (Water Oil)

and one outlet (plus large atmosphere)

using multiphaseEulerFoam.
I build a 2D box with 2 small inlets next to large atmospheres (top) and one outlet at the bottom of the box. Also I use a finer Mesh in inlet regions (see pictures "setup" and "Mesh").

I do not understand where the physics goes wrong with my boundary conditions (see screenshot at 1 sec). at a certain point my velocities change drastically and the time steps decline.


Maybe the mistake is related to the phi.xx-therms in U.xx. Or with the outlet BC. Or it is something completely different.

Hopefully you can help me to find the mistake and/ or fix the BCs. I am grateful for your suggestions and tips!



I have a Groovy BC for U.Oil which looks like this:



Quote:

FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U.oil;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform (0 0 0);

boundaryField
{
wall
{
type fixedValue;
value uniform (0 0 0);
}
atmosphere
{
type pressureInletOutletVelocity;
value $internalField;
}
outlet
{
type inletOutlet;
value $internalField;
inletValue uniform (0 0 0);
}
inlet_rain
{
type fixedValue;
value uniform (0 0 0);
}
inlet_oil
{
type groovyBC;
valueExpression "time()<179.99 ? vector( 0, -(((180-time())/180)*1), 0) : vector(0,0,0)";
value uniform (0 0 0);
}
}

Alpha.Oil respectively:

Quote:

inlet_oil
{
type groovyBC;
valueExpression "time()<180 ? 1 : 0";
value uniform 0;
phi phi.oil;
}


p and p.rgh look like this:

Quote:

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

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

internalField uniform 0;

boundaryField
{
wall
{
type zeroGradient;
}

inlet_rain
{
type fixedFluxPressure;
value uniform 0;
}

inlet_oil
{
type fixedFluxPressure;
value uniform 0;
}

outlet
{
type fixedValue;
value uniform 0;
}

atmosphere
{
type fixedValue;
value uniform 0;
}

defaultFaces
{
type empty;
}
}

I will attach the whole case.

You find "Constant" in the next comment.



This is an excerpt of the log file after the simulation "crashed"

Code:



Courant Number mean: 0.0471511 max: 0.990166
deltaT = 3.29388e-14
Time = 42.2803

MULES: Solving for alpha.water
water volume fraction, min, max = 0.000206908 -4.27083e-16 1
MULES: Solving for alpha.oil
oil volume fraction, min, max = 0.00279786 -2.04073e-18 1
MULES: Solving for alpha.air
air volume fraction, min, max = 0.996995 0 1
Phase-sum volume fraction, min, max = 1 1 1.06134
MULES: Solving for alpha.water
water volume fraction, min, max = 0.000206888 -4.27731e-16 1
MULES: Solving for alpha.oil
oil volume fraction, min, max = 0.00279779 -1.97791e-18 1
MULES: Solving for alpha.air
air volume fraction, min, max = 0.996995 0 1
Phase-sum volume fraction, min, max = 1 0.999998 1.06134
MULES: Solving for alpha.water
water volume fraction, min, max = 0.000206869 -4.28377e-16 1
MULES: Solving for alpha.oil
oil volume fraction, min, max = 0.00279773 -1.91774e-18 1
MULES: Solving for alpha.air
air volume fraction, min, max = 0.996995 0 1
Phase-sum volume fraction, min, max = 1 0.999996 1.06134

Thank you for your time and help!

Stefanie.S.W. April 9, 2019 07:12

2 Attachment(s)
Hello everyone,



here is the rest of the case.
I divided "Constant" into properties and blockMesh.



Kind regards,
Stefanie

Stefanie.S.W. April 9, 2019 11:56

2 Attachment(s)
Update:



I went back to the BubbleColumn tutorial and compared BCs.
Also I changed the atmosphere in p_rgh.
Now Oil has the aimed behavior, but water outflow is blocked.


U.air

Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      volVectorField;
    location    "0";
    object      U.air;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform (0 0 0);

boundaryField
{
    wall
    {
        type              fixedValue;
        value              uniform (0 0 0);
    }
    atmosphere
    {
        type              pressureInletOutletVelocity;
        phi                phi.air;
        value              $internalField;
    }
    outlet
    {
        type              pressureInletOutletVelocity;
        phi                phi.air;
        value              $internalField;
    }
    inlet_rain
    {
        type              fixedValue;
        value              uniform (0 0 0);
    }
    inlet_oil
    {
        type              fixedValue;
        value              uniform (0 0 0);
    }

}

U.water
Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      volVectorField;
    location    "0";
    object      U.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform (0 0 0);

boundaryField

    wall
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    atmosphere
    {
        type              pressureInletOutletVelocity;
        value              $internalField;
    }
    outlet
    {
        type              pressureInletOutletVelocity;
        value              $internalField;
        phi                phi.water;
 
    }
    inlet_rain
    {
        type                  fixedValue;
        value                uniform (0 -0.5 0);
        phi                  phi.water;
    }
    inlet_oil
    {
        type                  fixedValue;
        value                uniform (0 0 0);
    }
}

U.oil
Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      volVectorField;
    location    "0";
    object      U.oil;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform (0 0 0);

boundaryField
{
    wall
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    atmosphere
    {
        type              pressureInletOutletVelocity;
        value              $internalField;
    }
    outlet
  {
        type              pressureInletOutletVelocity;
        value              $internalField;
        phi                phi.oil;
    }
    inlet_rain
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    inlet_oil
    {
        type            groovyBC;
        valueExpression "time()<179.99 ? vector( 0, -(((180-time())/180)*1), 0) : vector(0,0,0)";
        value          uniform (0 0 0);
        phi            phi.oil;
    }
}

p_rgh
Code:

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

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

internalField  uniform 0;

boundaryField
{
    wall
    {
        type            fixedFluxPressure;
        value          $internalField;
    }

    inlet_rain
    {
        type            fixedFluxPressure;
        value          $internalField;
    }

    inlet_oil
    {
        type            fixedFluxPressure;
        value          $internalField;
    }

    outlet
    {
        type            fixedValue;
        value          $internalField;
    }

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

    defaultFaces
    {
        type            empty;
    }
}

p
Code:

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

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

internalField  uniform 0;

boundaryField
{
    wall
    {
        type            fixedFluxPressure;
        value          $internalField;
    }

    inlet_rain
    {
        type            fixedFluxPressure;
        value          $internalField;
    }

    inlet_oil
    {
        type            fixedFluxPressure;
        value          $internalField;
    }

    outlet
    {
        type            fixedValue;
        value          $internalField;
    }

    atmosphere
    {
        type            fixedValue;
        value          $internalField;
    }

    defaultFaces
    {
        type            empty;
    }
}

I will attach pictures from p and p_rgh. Something seems wrong there, but I can not figure it out. Do you have an idea or a hint?
Do you need any other images or information?

Thank you for your help!
Stefanie

Stefanie.S.W. April 10, 2019 08:12

3 Attachment(s)
Update 2:

I transferred the pressure BCs from a twoPhseEulerFoam Case provided by Tonnykz (https://www.cfd-online.com/Forums/op...tml#post730375) to my case and carefully applied different phis to inlets and outlets. It seems like I fixed the BCs, since the pressure distribution makes more sense now. Also it seems like I have a freestream outlet and unaffected inlets (Pictures attached, after 44 sek).

Attached you find the 0-Directory if you are interested in the exact BC-set up.


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