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/)
-   -   directionMixed straight out bc (https://www.cfd-online.com/Forums/openfoam-solving/147159-directionmixed-straight-out-bc.html)

Phil_ January 14, 2015 10:49

directionMixed straight out bc
 
2 Attachment(s)
Hi Foamers,

I'm having trouble with the directionMixed bc at the outlet.

The intention was to get a "straight out" velocity outlet. For that the directionMixed bc was configured to (hopefully) set the normal velocites at the outlet to a zeroGradient and the tangential velocities to a zero fixedValue. The pressure is fixedValue 0.

With the normal patch vector being n = (0 -1 0):

Code:

        type            directionMixed;
        refValue        uniform        (0 0 0);
        refGradient    uniform        (0 0 0);
        valueFraction  uniform  (1 0 0 0 0 1); //(XX XY XZ YY YZ ZZ)
        value          uniform        (0 0 0);

This setup leads to strange velocities adjacent to the boundary (see pictures). Any ideas?

The case is a simple 2D box with laminar flow, solved by simpleFoam.

Best regards
Philip

Phil_ January 22, 2015 08:49

Still no success
 
Hey,

I have still no idea what's causing this effect :confused:

As a test I set the inlet and outlet BC's for the velocity to a fixedValue (I know that's not correct), and the result looks the same (strange high velocities near the outlet).

So maybe the combination of boundary conditions with directionMixed is wrong?

Code:

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

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

internalField  uniform (0 0 0);

boundaryField
{
    inlet
    {
        type            fixedValue;
        value          uniform (0.1 0 0); 
}
   
    outlet
    {
        type            directionMixed;
        refValue        uniform      (0 0 0);
        refGradient    uniform      (0 0 0);
        valueFraction  uniform (1 0 0 0 0 1);
        value          uniform      (0 0 0);
    }
   
    wall
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
   
    frontAndBack
    {
        type            empty;
    }
}


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


Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.3.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            zeroGradient;
    }

    outlet
    {
        type            fixedValue;
        value          uniform 0;
    }

    wall
    {
        type            zeroGradient;
    }

    frontAndBack
    {
        type            empty;
    }
}

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

Best regards

Philip


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