Challenge

Week 12 - Validation studies of Symmetry BC vs Wedge BC in OpenFOAM vs Analytical H.P equation

AIM:- To Validation studies of Symmetry BC vs Wedge BC in OpenFOAM vs Analytical H.P equation.

OBJECTIVE:-

  1. Validate Hydro-dynamic length with the numerical result
  2. Validate the fully developed flow velocity profile with its analytical profile
  3. Validate maximum velocity and pressured drop for fully developed flow
  4. Post-process Shear stress and validate wall shear stress for fully developed flow
  5. Highligh the differences in both boundary conditions in terms of their usage and aplication

Angles to test:

  • `10^0`
  • `25^0`
  • `45^0`

THEORY:-

Hagen- Poiseuille's equation:-

  1. Hagen Poiseuille equation, is a physical law that gives the pressure drop in an incompressible and Newtonian fluid in laminar flow flowing through a long cylindrical pipe of constant cross section.
  2. The assumptions of the equation are that the fluid is incompressible and Newtonian; the flow is laminar through a pipe of constant circular cross-section that is substantially longer than its diameter. Also Poiseuille's equation describes the pressure drop due to the viscosity of the fluid.
  • Observations based on Hagen Poiseuille equation:-
  1. Diameter of the pipe `D=0.02 m`
  2. hydrodynamic entrance length`L=0.06⋅Re⋅D =2.52m`
  3. Wedge angle `theta=` `10^0`, `25^0` and`45^0`
  4. Dynamic Viscosity of water `μ=0.89e-3 Pascal-sec`
  5. Density of water `ρ=997 (Kg)/(m3)`
  6. Kinematic Viscosity `ν=μρ=(8.9268e−07)m^2-sec`
  7. Average Velocity `V_(avg)=μ⋅Re⋅ρ⋅D=0.0937m/sec`
  8. Maximum Velocity=`u_max=2⋅vavg= 0.1875 m/sec`
  9. Pressure Drop for Laminar Flow `=ΔP=(32⋅μ⋅v_(avg)⋅L_c)/(D^2)=0.0188Kpa`
  10. `L_c=L+0.3=2.82m`
  11. Shear Stress `τ=(2⋅μ⋅u_(max)⋅r)/(R^2)`

where, r= Radiual distance

R= Radius of Pipe

A) wedge Boundary Method:-

1. Wedge `theta=10^0`

  • blockMeshDict File:-
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  9
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;

vertices
(
    (0.000000 0.000000 0.000000) //0 origin
    (0.000000 0.009962 -0.000872) //1 
    (0.000000 0.009962 0.000872) //2
    (2.820000 0.000000 0.000000) //3
    (2.820000 0.009962 -0.000872) //4
    (2.820000 0.009962 0.000872) //5 
);

blocks
(
    hex (0 1 2 0 3 4 5 3) (50 1 300) simpleGrading (0.4 1 1)
);

edges
(
    arc 1 2 (0.000000 0.010000 0.000000)
    arc 4 5 (2.820000 0.010000 0.000000) 
);

boundary
(
    inlet
    {
        type patch;
        faces
        (
            (0 1 2 0)
        );
    }
    outlet
    {
        type patch;
        faces
        (
            (3 4 5 3)
        );
    }
    Front
    {
        type wedge;
        faces
        (
            (0 3 5 2)
        );
    }
    Back
    {
        type wedge;
        faces
        (
            (0 1 4 3)
        );
    }
    Top
    {
        type wall;
        faces
        (
            (2 1 4 5)
        );
    }
    Axis
    {
        type empty;
        faces
        (
            (0 3 3 0)
        );
    }
);

mergePatchPairs
(
);

// ************************************************************************* //
  • ControlDict File:-
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  9
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       dictionary;
    location    "system";
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application     icoFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         31;

deltaT          0.01;

writeControl    timeStep;

writeInterval   20;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;


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

TransportProperties File:-

/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  9
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       dictionary;
    location    "constant";
    object      transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

nu              [0 2 -1 0 0 0 0] 8.9268e-7;


// ************************************************************************* //
  • Velocity File:-
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  9
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       volVectorField;
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform (0 0 0);

boundaryField
{
    inlet
    {
        type            fixedValue;
        value           uniform (0.0937 0 0);
    }
    outlet
    {
        type            zeroGradient;
    }
    Front
    {
        type            wedge;
    }
    Back
    {
        type            wedge;
    }
    Top
    {
        type            noSlip;
    }
    Axis
    {
        type            empty;
    }
}

// ************************************************************************* //
  • Pressure File:-
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  9
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    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.0188;
    }
    Front
    {
        type            wedge;
    }
    Back
    {
        type            wedge;
    }
    Top
    {
        type            zeroGradient;
    }
    
    Axis
    {
        type            empty;
    }
}

// ************************************************************************* //
  • Geometry and Mesh:-

  • Velocity Distribution Profile

  • Velocity Profile at 2.52 m distance

  • Pressure Plot at entire Domain:-

  • Shear Stress Plot from OpenFoam:-

Simulattion of Wedge of `10^0`

2. Wedge `theta=25^0`

blockMeshDict File:-

/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  9
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;

vertices
(
    (0.000000 0.000000 0.000000) //0 origin
    (0.000000 0.009763 -0.002164) //1 
    (0.000000 0.009763 0.002164) //2
    (2.820000 0.000000 0.000000) //3
    (2.820000 0.009763 -0.002164) //4
    (2.820000 0.009763 0.002164) //5 
);

blocks
(
    hex (0 1 2 0 3 4 5 3) (50 1 300) simpleGrading (0.4 1 1)
);

edges
(
    arc 1 2 (0.000000 0.010000 0.000000)
    arc 4 5 (2.820000 0.010000 0.000000) 
);

boundary
(
    inlet
    {
        type patch;
        faces
        (
            (0 1 2 0)
        );
    }
    outlet
    {
        type patch;
        faces
        (
            (3 4 5 3)
        );
    }
    Front
    {
        type wedge;
        faces
        (
            (0 3 5 2)
        );
    }
    Back
    {
        type wedge;
        faces
        (
            (0 1 4 3)
        );
    }
    Top
    {
        type wall;
        faces
        (
            (2 1 4 5)
        );
    }
    Axis
    {
        type empty;
        faces
        (
            (0 3 3 0)
        );
    }
);

mergePatchPairs
(
);

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

Here controlDict File, transportProperties File, Velocity File and Pressure File are same for `theta=25^0`and `theta=45^0` Wedge.

Geometry for `theta=25^0`

  • Velocity Profile:-

  • Pressure Profile:-

  • Velocity Distribution Plot

  • Pressure Distribution Plot

  • Shear Stress Plot:-

Simulation of Wedge of `25^0`

  1. Wedge `theta=45^0`
  • blockMeshDict File:-
/*--------------------------------*- C++ -*----------------------------------*\

  =========                 |

  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox

   \\    /   O peration     | Website:  https://openfoam.org

    \\  /    A nd           | Version:  9

     \\/     M anipulation  |

\*---------------------------------------------------------------------------*/

FoamFile

{

    format      ascii;

    class       dictionary;

    object      blockMeshDict;

}

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

 

convertToMeters 1;

 

vertices

(

    (0.000000 0.000000 0.000000) //0 origin

    (0.000000 0.009239 -0.003827) //1

    (0.000000 0.009239 0.003827) //2

    (2.820000 0.000000 0.000000) //3

    (2.820000 0.009239 -0.003827) //4

    (2.820000 0.009239 0.003827) //5

);

 

blocks

(

    hex (0 1 2 0 3 4 5 3) (50 1 300) simpleGrading (0.4 1 1)

);

 

edges

(

    arc 1 2 (0.000000 0.010000 0.000000)

    arc 4 5 (2.820000 0.010000 0.000000)

);

 

boundary

(

    inlet

    {

        type patch;

        faces

        (

            (0 1 2 0)

        );

    }

    outlet

    {

        type patch;

        faces

        (

            (3 4 5 3)

        );

    }

    Front

    {

        type wedge;

        faces

        (

            (0 3 5 2)

        );

    }

    Back

    {

        type wedge;

        faces

        (

            (0 1 4 3)

        );

    }

    Top

    {

        type wall;

        faces

        (

            (2 1 4 5)

        );

    }

    Axis

    {

        type empty;

        faces

        (

            (0 3 3 0)

        );

    }

);

 

mergePatchPairs

(

);

 

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

 

Here controlDict File, transportProperties File, Velocity File and Pressure File are same for `theta=25^0`and `theta=45^0` Wedge.

  • Geometry and Mesh :-

  • Velocity Profile:-

  • Pressure Profile:-

  • Velocity Plot at 2.52 m :-

  • Pressure Plot at Entire Pipe:-

  • Shear Stress Plot:-

Simulation For `theta=45^0`

B) By Symmetry method:-

In Symmetry Method we have to change 'wedge' Boundary Condition to 'symmetry' in blockMeshDict File, Pressure (p) File and Velocity (U) File as shown below.

1.`theta=10^0`

  • blockMeshDict File:-
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  9
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;

vertices
(
    (0.000000 0.000000 0.000000) //0 origin
    (0.000000 0.009962 -0.000872) //1 
    (0.000000 0.009962 0.000872) //2
    (2.820000 0.000000 0.000000) //3
    (2.820000 0.009962 -0.000872) //4
    (2.820000 0.009962 0.000872) //5 
);

blocks
(
    hex (0 1 2 0 3 4 5 3) (50 1 300) simpleGrading (0.4 1 1)
);

edges
(
    arc 1 2 (0.000000 0.010000 0.000000)
    arc 4 5 (2.820000 0.010000 0.000000) 
);

boundary
(
    inlet
    {
        type patch;
        faces
        (
            (0 1 2 0)
        );
    }
    outlet
    {
        type patch;
        faces
        (
            (3 4 5 3)
        );
    }
    Front
    {
        type symmetry;
        faces
        (
            (0 3 5 2)
        );
    }
    Back
    {
        type symmetry;
        faces
        (
            (0 1 4 3)
        );
    }
    Top
    {
        type wall;
        faces
        (
            (2 1 4 5)
        );
    }
    Axis
    {
        type empty;
        faces
        (
            (0 3 3 0)
        );
    }
);

mergePatchPairs
(
);

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

here controlDict, Pressure(p) and Velocity(U) Files are same as `theta=45^0`

  • Velocity Profile:-

  • Pressure Profile:-

  • Shear Stress Profile:-

Simulation for `theta=10^0`

2.`theta=25^0`

  • blockMeshDict File:-
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  9
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;

vertices
(
    (0.000000 0.000000 0.000000) //0 origin
    (0.000000 0.009763 -0.002164) //1 
    (0.000000 0.009763 0.002164) //2
    (2.820000 0.000000 0.000000) //3
    (2.820000 0.009763 -0.002164) //4
    (2.820000 0.009763 0.002164) //5 
);

blocks
(
    hex (0 1 2 0 3 4 5 3) (50 1 300) simpleGrading (0.4 1 1)
);

edges
(
    arc 1 2 (0.000000 0.010000 0.000000)
    arc 4 5 (2.820000 0.010000 0.000000) 
);

boundary
(
    inlet
    {
        type patch;
        faces
        (
            (0 1 2 0)
        );
    }
    outlet
    {
        type patch;
        faces
        (
            (3 4 5 3)
        );
    }
    Front
    {
        type symmetry;
        faces
        (
            (0 3 5 2)
        );
    }
    Back
    {
        type symmetry;
        faces
        (
            (0 1 4 3)
        );
    }
    Top
    {
        type wall;
        faces
        (
            (2 1 4 5)
        );
    }
    Axis
    {
        type empty;
        faces
        (
            (0 3 3 0)
        );
    }
);

mergePatchPairs
(
);

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

here controlDict, Pressure(p) and Velocity(U) Files are same as `theta=45^0`

  • Velocity Profile:-

  • Pressure Profile:-

  • Shear Stress Profile:-

  • Simulation for `theta=25^0`

3. `theta=45^0`

  • blockMeshDict File:-
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  9
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;

vertices
(
    (0.000000 0.000000 0.000000) //0 origin
    (0.000000 0.009239 -0.003827) //1 
    (0.000000 0.009239 0.003827) //2
    (2.820000 0.000000 0.000000) //3
    (2.820000 0.009239 -0.003827) //4
    (2.820000 0.009239 0.003827) //5 
);

blocks
(
    hex (0 1 2 0 3 4 5 3) (50 1 300) simpleGrading (0.4 1 1)
);

edges
(
    arc 1 2 (0.000000 0.010000 0.000000)
    arc 4 5 (2.820000 0.010000 0.000000) 
);

boundary
(
    inlet
    {
        type patch;
        faces
        (
            (0 1 2 0)
        );
    }
    outlet
    {
        type patch;
        faces
        (
            (3 4 5 3)
        );
    }
    Front
    {
        type symmetry;
        faces
        (
            (0 3 5 2)
        );
    }
    Back
    {
        type symmetry;
        faces
        (
            (0 1 4 3)
        );
    }
    Top
    {
        type wall;
        faces
        (
            (2 1 4 5)
        );
    }
    Axis
    {
        type empty;
        faces
        (
            (0 3 3 0)
        );
    }
);

mergePatchPairs
(
);

// ************************************************************************* //
  • controlDict File:-
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  9
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       dictionary;
    location    "system";
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application     icoFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         31;

deltaT          0.01;

writeControl    timeStep;

writeInterval   20;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;


// ************************************************************************* //
  • TransportProperties File:-
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  9
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       dictionary;
    location    "constant";
    object      transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

nu              [0 2 -1 0 0 0 0] 8.9268e-7;


// ************************************************************************* //
  • Pressure(p) File:-
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  9
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    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.0188;
    }
    Front
    {
        type            symmetry;
    }
    Back
    {
        type            symmetry;
    }
    Top
    {
        type            zeroGradient;
    }
    
    Axis
    {
        type            empty;
    }
}

// ************************************************************************* //
  • Velocity File:-
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  9
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       volVectorField;
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform (0 0 0);

boundaryField
{
    inlet
    {
        type            fixedValue;
        value           uniform (0.0937 0 0);
    }
    outlet
    {
        type            zeroGradient;
    }
    Front
    {
        type            symmetry;
    }
    Back
    {
        type            symmetry;
    }
    Top
    {
        type            noSlip;
    }
    Axis
    {
        type            empty;
    }
}

// ************************************************************************* //
  • Velocity Profile

  • Pressure Plot:-

  • Shear Stress Plot:-

  • Simulation In OpenFoam by icoFoam:-

Shear Stress Plot by MATLAB:-

CONCLUSION:-

  • We can Conclude from above Observation that only diffrence in Wedge and symmetry boundary condition is more Execution Time taken by symmetry over wedge boundary condition for flow through pipe.
a. Execution Time for wedge b. Execution Time for symmetry
1. for `10^0` = 423.31 sec 1. for `10^0` = 472.31 sec
2. for `25^0` = 439.74 sec 2. for `25^0` = 428.37 sec
3. for `45^0` = 412 sec 3. for `45^0` = 424.93 sec
  • Analytical and graphical result are same no much difference in both .
  • From above observation we can conclude no much change in Maximum Velocities in both wedge and symmetry boundary condition.
  • The Courant number is slightly increasing in the case of wedge Boundary Condition over symmetry Condition.
  • Maximum Pressure and Shear Stress is Similar in both wedge and symmetry boundary condition.
Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.