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

Unphysical pressure in channel Poiseuille flow

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 21, 2023, 08:08
Unhappy Unphysical pressure in channel Poiseuille flow
  #1
New Member
 
Nikos Vasileiadis
Join Date: May 2022
Posts: 5
Rep Power: 4
nikovasi is on a distinguished road
Hi guys,

I'm trying to solve the steady-state laminar compresible Poiseuille flow through a 2D channel using rhoSimpleFoam.

The rhoSimpleFoam solver converges and for the most part the solution looks reasonable as seen in the attached images. However, taking a closer look at the outlet, a weird behaviour is seen for the pressure.

I have tried using a finer mesh and also played around with fvSchemes and fvSolution controls but this behaviour persists and even becomes worse in some cases.

I have also tried rhoPimpleFoam. In that case, when steady-state is reached, I don't get the exact same behaviour seen with rhoSimpleFoam but the pressure shows a "wavy" profile near the outlet.

Since this is a pretty simple case I expect that someone else has encountered something similar? Any help will be greatly appreciated. Thanks!


blockMeshDict

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  1.7.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/

FoamFile
{
    version         2.0;
    format          ascii;

    root            "";
    case            "";
    instance        "";
    local           "";

    class           dictionary;
    object          blockMeshDict;
}

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

scale 1e0;


vertices
(
    (0      0     0)
    (2e-5   0     0)
    (2e-5   5e-7  0)
    (0      5e-7  0)
    (0      0     5e-8)
    (2e-5   0     5e-8)
    (2e-5   5e-7  5e-8)
    (0      5e-7  5e-8)
);

blocks
(
hex (0 1 2 3 4 5 6 7) dsmcZone (1000 50 1) simpleGrading (1 1 1)
);

boundary
(

    inlet
    {
        type patch;
        faces 
        (
        (0 4 7 3)
        );
    }

    outlet
    {
        type patch;
        faces 
        (
        (1 2 6 5)
        );
    }
    wall
    {
        type wall;
        faces
        (
        (7 6 2 3)
        );   
    }    
    symmetry
    {
        type symmetryPlane;
        faces
        (
        (4 5 1 0)
        );   
    }
    empty
    {
        type empty;
        faces 
        (
        (4 5 6 7)
        (0 3 2 1)
        );
    }
    
);

mergePatchPairs
(
);


// ************************************************************************* //
thermoProperties

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

thermoType
{
    type             hePsiThermo;
    mixture         pureMixture;
    transport       const;
    thermo          hConst;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleInternalEnergy;
}

mixture
{
    specie
    {
        molWeight   39.93;
    }
    thermodynamics
    {
        Cp         520.33;
        Hf          0;
    }
    transport
    {
        mu         2.117e-5;
        Pr          0.666667;
    }
}


// ************************************************************************* //
p
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2206                                  |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    arch        "LSB;label=32;scalar=64";
    class       volScalarField;
    location    "0";
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform 20000;


boundaryField
{
    inlet
    {
        type            totalPressure;
        gamma           1.66667;
        p0              uniform 100000;
        value           uniform 100000;
    }
    outlet
    {
        type            fixedValue;
        value           uniform 20000;
    }
    wall
    {
        type            zeroGradient;
    }
    symmetry
    {
        type            symmetryPlane;
    }
    empty
    {
        type            empty;
    }
}

// ************************************************************************* //
T
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2206                                  |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    arch        "LSB;label=32;scalar=64";
    class       volScalarField;
    location    "0";
    object      T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 1 0 0 0];

internalField   uniform 300;

boundaryField
{
    inlet
    {
        type            totalTemperature;
        gamma           1.66667;
        T0              uniform 300;
        value           uniform 300;
    }
    outlet
    {
        type            zeroGradient;
    }
    wall
    {
        type            fixedValue;
        value           uniform 300;
    }
    symmetry
    {
        type            symmetryPlane;
    }
    empty
    {
        type            empty;
    }
}

// ************************************************************************* //
U
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2206                                  |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    arch        "LSB;label=32;scalar=64";
    class       volVectorField;
    location    "0";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform (0 0 0);

boundaryField
{
    inlet
    {
        type            pressureInletVelocity;
        value           uniform (0 0 0);
    }
    outlet
    {
        type            zeroGradient;
    }
    wall
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    symmetry
    {
        type            symmetryPlane;
    }
    empty
    {
        type            empty;
    }
}

// ************************************************************************* //
fvSchemes
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2206                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    default         steadyState;
}

gradSchemes
{
    default         Gauss linear;
}

divSchemes
{
    default         Gauss linear;

    div(((rho*nuEff)*dev2(T(grad(U)))))      Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}

wallDist
{
    method meshWave;
}

// ************************************************************************* //
fvSolution
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2206                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    p
    {
        solver          GAMG;
        smoother        GaussSeidel;
        nSweeps         2;
        tolerance       1e-06;
        relTol          0.0;
        minIter         3;
        maxIter         100;
        nCellsInCoarsestLevel 100;
    }

    "(U|e)"
    {
        solver          PBiCGStab;
        preconditioner  DILU;
        minIter         3;
        maxIter         100;
        tolerance       1e-8;
        relTol          0.0;
    }

}

SIMPLE
{

    momentumPredictor           yes;
    transonic                   yes;
    nNonOrthogonalCorrectors    1;
    turbOnFinalIterOnly         false;

    residualControl
    {
        p       1e-5;
        U       1e-7;
        e       1e-6;
    }    

}

relaxationFactors
{
    equations
    {
        p       0.3;
        U       0.7;
        e       0.7;
    }
}

// ************************************************************************* //
Attached Images
File Type: png slicePressure.png (20.4 KB, 9 views)
File Type: png sliceOutletPressure.png (54.8 KB, 10 views)
File Type: png plotOutletPressure.png (32.5 KB, 12 views)
nikovasi is offline   Reply With Quote

Reply

Tags
perfectgas, poiseuille flow, rhopimplefoam, rhosimplefoam error

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
What are the best settings for a channel flow simulation? Ashkan Kashani CFX 3 October 13, 2022 21:36
Simulating a Poiseuille flow through a 3D square channel dmrigank OpenFOAM Running, Solving & CFD 0 September 18, 2022 02:56
Intuition for why flow follows convex surfaces lopp Main CFD Forum 47 February 1, 2022 13:14
Pressure driven flow through a valve: pressure BCs clarification Coraz94 FLUENT 1 December 17, 2020 05:37
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 05:21


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