CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Outlet BC for multiPhase modeling | Back flow problem (https://www.cfd-online.com/Forums/openfoam/241690-outlet-bc-multiphase-modeling-back-flow-problem.html)

saugatshr4 March 14, 2022 12:28

Outlet BC for multiPhase modeling | Back flow problem
 
1 Attachment(s)
Hello Foamers,

When I run a multiphase case (air and water), the slow through the domain is satisfactory but when it reaches the outlet there is a problem. The flow starts to comes back and becomes erratic.

I want the flow to move out without any back flow.

I am trying to run a RAS k-epsilon model.

I really hope I can get some help here.

Thank you.

Regards,
Saugat

blockMesh
Code:

convertToMeters 1;

vertices
(
        (-135 -600 -105)
        (390 -600 -105)
        (390 -600 10)//
        (-135 -600 10)//
        (-135 136 -200)
        (390 136 -200)
        (390 136 10)//
        (-135 136 10)//
       
);

blocks
(
    hex (0 1 5 4 3 2 6 7)(65 85 16)simpleGrading (1 1 1) 
);

boundary
(
        inlet       
        {
        type patch;
        faces
        (
                (0 1 2 3) 
        );
        }
   

    outlet
    {
        type patch;
        faces
        (
                (4 5 6 7)
        );
    }

    ground
    {
        type wall;
        faces
        (
            (0 1 5 4)
        );
    }


    sides
    {
        type patch;
        faces
        (
                (0 4 7 3)
                (1 2 6 5)
                (3 7 6 2)
        );
    }

);

alpha.water
Code:

internalField  uniform 0;//initially air in the entire domain - we will change that with setFields!

boundaryField
{
    inletwall
    {
        type            zeroGradient;
    }
    inletwat
    {
        type            fixedValue;
        value                uniform 1;//only water enters the domain
    }

    outlet
    {
        type            zeroGradient;
    }

    ground
    {
        type            zeroGradient;//BC is Neumann BC
    }
       
    trySM
    {
        type            zeroGradient;//BC is Neumann BC
    }

       
    sides
    {
        type            zeroGradient;//BC is Neumann BC
    }
       
        top
    {
        type            zeroGradient;//BC is Neumann BC
    }

}

U
Code:

internalField  uniform (0 0 0);//Initially the velocity is (0 0 0) m/s

boundaryField
{
    inletwat
    {
      type            fixedValue;
      value                uniform (0 5 0);//fixed inlet velocity   
    }
       


    inletwall
    {
        type            noSlip;
    }

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

    ground
    {
        type            noSlip;//no slip along the walls - replaces fixedValue with uniform (0 0 0)
    }
       
        trySM
    {
        type            noSlip;//no slip along the walls - replaces fixedValue with uniform (0 0 0)
    }
       
       
    sides
    {
        type            slip;//no slip along the walls - replaces fixedValue with uniform (0 0 0)
    }
}

p_rgh
Code:

internalField  uniform 0;//initially atmospheric pressure in the entire domain

boundaryField
{
    inletwat
    {
        type            fixedFluxPressure;
        value          uniform 0;
    }
       
       
    inletwall
    {
        type            fixedFluxPressure;
        value          uniform 0;
    }


    outlet
    {
        type            fixedValue;
        \\p0              uniform 0;
        value                uniform 0;
    }
       
    trySM
    {
        type            fixedFluxPressure;
        value          uniform 0;
    }
       
       
    ground
    {
        type            fixedFluxPressure;
        value          uniform 0;
    }


    sides
    {
        type            slip;
    }

}

nut
Code:

internalField  uniform 0;

boundaryField
{
    trySM
    {
        type            nutkWallFunction;
        value          uniform 0;
    }

    inletwall
    {
        type            nutkWallFunction;
        value          uniform 0;
    }
       
    ground
    {
        type            nutkWallFunction;
        value          uniform 0;
    }

    ".*"
    {
        type            calculated;
        value          uniform 0;
    }
}

k
Code:

internalField  uniform 0.0001;

boundaryField
{
    inletwat
    {
        type            fixedValue;
        intensity      0.05;
        value          $internalField;
    }

    inletwall
    {
        type            kqRWallFunction;
        value          $internalField;
    }

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

    trySM
    {
        type            kqRWallFunction;
        value          $internalField;
    }
       
    ground
    {
        type            kqRWallFunction;
        value          $internalField;
    }
       
    sides
    {
        type            slip;
    }
}

epsilon
Code:

boundaryField
{
    inletwat
    {
        type            fixedValue;
        value          $internalField;
    }


    inletwall
    {
        type            epsilonWallFunction;
        value          $internalField;
    }

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

    ground
    {
        type            epsilonWallFunction;
        value          $internalField;
    }
       
    trySM
    {
        type            epsilonWallFunction;
        value          $internalField;
    }
       

    sides
    {
        type            slip;
    }
       
}


al.csc March 15, 2022 05:26

For alpha.water, outlet:

Code:

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


saugatshr4 March 15, 2022 09:01

Thank You al.csc for the response.

I ran the simulations with boundary conditions you suggested. However, there is still backflow in the outlet.

How can we make it work?

al.csc March 15, 2022 09:26

Can you try for p_rgh:

Code:

outlet
    {
        type            totalPressure;
        p0              uniform 0;
        value          uniform 0;
    }

Since you are using pressureInletOutletVelocity for velocity (they are usually combined).

saugatshr4 March 15, 2022 09:33

Thank You again for your response. I tried that, still getting backflow.

al.csc March 15, 2022 09:54

Then let's start from the beginning: which solver and OF version are you using?

saugatshr4 March 15, 2022 10:15

Im using OpenFoam version 4.0 and using interFoam (PimpleFoam) for multiphase simulation.

al.csc March 23, 2022 00:59

Have you checked phi/U at the outlet patch? You can do it in paraview after
Code:

foamToVTK -surfaceFields
.

But my suggestion is to switch to a newer OF version.

Quote:

Originally Posted by saugatshr4 (Post 824133)
Im using OpenFoam version 4.0 and using interFoam (PimpleFoam) for multiphase simulation.



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