CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

buoyantSimpleFoam : flow reverses direction unexpectedly

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 30, 2018, 04:08
Default buoyantSimpleFoam : flow reverses direction unexpectedly
  #1
New Member
 
Join Date: Jul 2017
Posts: 10
Rep Power: 8
dplamp is on a distinguished road
Hello,

My case : a cylindrical pipe, ID=4.76mm, L=71mm. I mesh just a 5 wedge. Fluid = air. Velocity at inlet = 0.11m/s, Re = 35.

I am trying to run buoyantSimpleFoam the most basic way : no turbulence, all temperatures set to 293K.

I plot the velocity profile at the outlet, and I expect a parabolic profile. It does happen, but the velocity then reduces to 1/10 of the expected value (as far as I ran the case) and the flow changes direction near the inlet and exits the pipe trough the inlet, as can be seen in the picture bellow.

I really don't know where to look, so a hint would be very welcome !




0/U :
Code:
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.1169496439);        // 1/8 l/min

boundaryField
{
    #includeEtc "caseDicts/setConstraintTypes"

    inlet
    {
        type            fixedValue;
        value           uniform (0 0 0.1169496439);        // 1/8 l/min
    }

    outlet
    {
        type            zeroGradient;
    }

    wallPipe
    {
        type            noSlip;
    }

    axis
    {
        type            symmetry;
    }

    front
    {
        type            wedge;
    }

    back
    {
        type            wedge;
    }
}
0/p
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    location    "0";
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform 1e5;

boundaryField
{
    #includeEtc "caseDicts/setConstraintTypes"

    inlet
    {
        type            fixedValue;
        value           uniform 1e5;
    }

    outlet
    {
        type            zeroGradient;
    }

    wallPipe
    {
        type            zeroGradient;
    }

    axis
    {
        type            symmetry;
    }

    front
    {
        type            wedge;
    }

    back
    {
        type            wedge;
    }
}
0/p_rgh :
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    location    "0";
    object      p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform 1e5;

boundaryField
{
    #includeEtc "caseDicts/setConstraintTypes"

    inlet
    {
        type            fixedValue;
        value           uniform 1e5;
    }

    outlet
    {
        type            zeroGradient;
    }

    wallPipe
    {
        type            zeroGradient;
    }

    axis
    {
        type            symmetry;
    }

    front
    {
        type            wedge;
    }

    back
    {
        type            wedge;
    }
}
0/T :
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    location    "0";
    object      T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 1 0 0 0];

internalField   uniform 293;

boundaryField
{
    inlet
    {
        type            fixedValue;
//        value           uniform 300.15; // Ts = Tc + 17 degC
        value           uniform 293;
    }

    outlet
    {
        type            zeroGradient;
    }

    wallPipe
    {
        type            fixedValue;
//        value           uniform 283.15; // Tc = 10 degC
        value           uniform 293;
    }

    axis
    {
        type            symmetry;
    }

    front
    {
        type            wedge;
    }

    back
    {
        type            wedge;
    }
}
system/fvSchemes :
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    default steadyState;
}

gradSchemes
{
    default         Gauss linear;
}

divSchemes
{
    default         none;

    div(phi,U)      bounded Gauss limitedLinear 0.2;
    div(phi,K)      bounded Gauss limitedLinear 0.2;
    div(phi,h)      bounded Gauss limitedLinear 0.2;
    div(phi,k)      bounded Gauss limitedLinear 0.2;
    div(phi,epsilon) bounded Gauss limitedLinear 0.2;
    div(phi,omega) bounded Gauss limitedLinear 0.2;
    div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
//    default         Gauss linear orthogonal;
    default         Gauss linear uncorrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
//    default         orthogonal;
    default         uncorrected;
}

/*wallDist
{
    method meshWave;
}
*/
system/fvSolution :
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    p_rgh
    {
        solver           GAMG;
        tolerance        1e-7;
        relTol           0.01;

        smoother         DICGaussSeidel;

    }

//    "(U|h|k|epsilon|omega)"
    "(U|h)"
    {
        solver          PBiCGStab;
        preconditioner  DILU;
        tolerance       1e-8;
        relTol          0.1;
    }

}

SIMPLE
{
//    momentumPredictor no;
    momentumPredictor yes;      // to print U residuals
    nNonOrthogonalCorrectors 0;
    pRefCell        0;
    pRefValue       0;

    residualControl
    {
        p_rgh           1e-4;
        U               1e-4;
        h               1e-4;

        // possibly check turbulence fields
//        "(k|epsilon|omega)" 1e-3;
    }
}

relaxationFactors
{
    fields
    {
        rho             1.0;
        p_rgh           0.7;
    }
    equations
    {
        U               0.3;
        h               0.3;
//        "(k|epsilon|omega)" 0.7;
    }
}
constant/thermoPhysicalProperties :
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

thermoType
{
    type            heRhoThermo;
    mixture         pureMixture;
    transport       const;
    thermo          hConst;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleEnthalpy;
}

mixture
{
    specie
    {
        molWeight       28.96;
    }
    thermodynamics
    {
        Cp              1004.4;
        Hf              0;
    }
    transport
    {
        mu              1.831e-05;
        Pr              0.705;
    }
}
constant/turbulenceProperties :
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      RASProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

//simulationType RAS;
simulationType laminar;

RAS
{
    RASModel            kOmegaSST;

    turbulence          on;

    printCoeffs         on;
}
dplamp is offline   Reply With Quote

Old   June 11, 2018, 05:02
Default
  #2
Senior Member
 
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21
jherb is on a distinguished road
What is the direction of gravity? Perpendicular to the flow direction? If not, you can use for the p_rgh outlet boundary condition:


fixedMean, see https://github.com/OpenFOAM/OpenFOAM...ived/fixedMean
jherb is offline   Reply With Quote

Old   August 19, 2020, 04:28
Default
  #3
New Member
 
Join Date: Jul 2017
Posts: 10
Rep Power: 8
dplamp is on a distinguished road
U and p are set at the inlet. That's OK for U, but p should be set at the outlet instead.
dplamp is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mass flow "outlet" BC reverses flow after 20 iterations swadejaxsun STAR-CCM+ 1 January 31, 2018 12:57
Inlet flow direction at axial turbomachinery with twisted Blades Stuntmanbob CFX 9 November 9, 2015 15:17
High No Iterations in Secondary Flow Direction camoesas OpenFOAM Running, Solving & CFD 0 July 9, 2014 04:11
Bug for cylindrical components of flow direction ? pierre victor cueille CFX 1 May 2, 2006 09:37
Can 'shock waves' occur in viscous fluid flows? diaw Main CFD Forum 104 February 16, 2006 05:44


All times are GMT -4. The time now is 20:29.