Challenge

Week 8 - BlockMesh Drill down challenge

ABSTRACT-:

In this project, we are going to simulate an incompressible-laminar-viscous flow through the backward-facing step geometry. From the experiment, we should perform a transient simulation. The solver can be chosen based on the described physics of the flow. In this project, explain the entire simulation procedure.

AIM-:

  1. To compare the flow parameter by varting the grading factors of 0.2,0.5,0.8,1.
  2. To measure the flow parameter at a distance of 0.085m from the inlet and analyze the result.
  3. To generate the blockmesh file using OpenFOAM and solve the problem with icofoam solver.

Mesh specification

  1. Number of cells along the x direction (longer dimension) = 200
  2. Number of cells along the longer y-direction = 20;

Boundary condition specification

The domain specifications are provided in the following figure.

Desired output

  • Measure the velocity profile at 0.085 m from the inlet of the geometry for both case studies and compare. You can use the plot over line tool for this.
  • Explain why the Grading/Growth factor is essential for meshing.

ControlDict file-:

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

application     icoFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         0.35;

deltaT          0.00005;

writeControl    timeStep;

writeInterval   20;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;



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

BlockMeshDict file-:

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

convertToMeters 0.01;

Vertices 
( 
    (0 0 0)//0
    (8 0 0)//1
    (8 0.5 0)//2
    (0 0.5 0)//3
    (8 1 0)//4
    (0 1 0)//5
    (20 1 0)//6
    (20 0.5 0)//7
    (20 0 0)//8
    (20 -1 0)//9
    (8 -1 0)//10
    (0 0 0.0)//11
    (8 0 0.1)//12
    (8 0.5 0.1)//13
    (0 0.5 0.1)//14
    (8 1 0.1)//15
    (8 1 0.1)//16
    (20 1 0.1)//17
    (20 0.5 0.1)//18
    (20 0 0.1)//19
    (20 -1 0.1)//20
    (8 -1 0)//21
);

blocks

(
    hex (0 1 2 3 11 12 13 14) (200 10 1) simpleGrading (1 1 1)
    hex (3 2 4 5 14 13 15 16) (200 10 1) simpleGrading (1 1 1)
    hex (2 7 6 4 13 18 17 15) (200 10 1) simpleGrading (1 1 1)
    hex (1 8 7 2 12 19 18 13) (200 10 1) simpleGrading (1 1 1)
    hex (10 9 8 1 21 20 19 12) (200 10 1) simpleGrading (1 1 1)

);

edges
(
);

boundary
(

    inlet
    {
    
        type patch;
        faces
        (

           (0 11 14 3)
           (3 14 16 5)

        );

     }
    outlet
     {
    
        type patch;
        faces
        (
    
           (9 8 19 20)
           (8 7 18 19)
           (7 6 17 18)
        );
     }
    NoslipWalls
    {
    
        type wall;
        faces
        (
    
           (0 1 12 11)
           (5 16 15 4)
           (4 15 17 6)
           (10 21 12 1)
           (10 9 20 21)

        );

     }
     frontAndBack
     {
    
        type empty;
        faces
        (
    
            (0 3 2 1)
            (3 5 4 2)
            (2 4 6 7)
            (1 2 7 8)
            (10 1 8 9)
            (11 12 13 14)
            (14 13 15 16)
            (13 18 17 15)
            (12 19 18 13)
            (21 20 19 12)
        );

     }
);

mergePatchPairs
(
);

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

Boundary condition file-:

Pressure file-:

/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  8
     \\/     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; 
      }

    NoslipWalls
     {
    
        type      zeroGradient;       
     
     }
     frontAndBack
     {
        type      empty; 
     }
}
       

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

Velocity file-:

/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  8
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    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 (1 0 0);        
     }

    outlet
     {
        type      zeroGradient; 
      }

    NoslipWalls
     {
        type      noSlip;       
     }

     frontAndBack
     {
        type      empty; 
     }
}
       

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

Grading results-:

0.2 garding-:

mesh grading

hex (0 1 2 3 11 12 13 14) (200 10 1) simpleGrading (0.2 5 1)
hex (3 2 4 5 14 13 15 16) (200 10 1) simpleGrading (0.2 0.2 1)
hex (2 7 6 4 13 18 17 15) (200 10 1) simpleGrading (5 0.2 1)
hex (1 8 7 2 12 19 18 13) (200 10 1) simpleGrading (5 5 1)
hex (10 9 8 1 21 20 19 12) (200 10 1) simpleGrading (5 5 1)

fig. mesh grading distribution 0. 2

fig.Pressure and velocity of 0.2 grading

fig.Graph of pressure distribution

0.5 garding-:

mesh grading

hex (0 1 2 3 11 12 13 14) (200 10 1) simpleGrading (0.5 2 1)
hex (3 2 4 5 14 13 15 16) (200 10 1) simpleGrading (0.5 0.5 1)
hex (2 7 6 4 13 18 17 15) (200 10 1) simpleGrading (2 0.5 1)
hex (1 8 7 2 12 19 18 13) (200 10 1) simpleGrading (2 2 1)
hex (10 9 8 1 21 20 19 12) (200 10 1) simpleGrading (2 2 1)

fig.mesh grading distribution 0.5

fig.Pressure and velocity of 0.5 grading

fig.Graph of pressure distribution

Conclusion-:

The velocity profile obtained are all similar since minor changes in the is been applied. Finer mesh generation will result in higher accuracy of the results and the velocity profile will be captured accurately for the flow since the boundary layers are formed at the fixed walls.

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.

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.