Project

BlockMesh Drill Down Challenge

The main aim of this project is to simulate the flow through the backward facing step by using the blocks in icoFoam solver and postprocess the results like velocity profile at the step of 0.085m from the start point of the blocks.

The blocks are built by one by one by using the nodes of all three axis There are 5 blocks are used for this project.The number of cells in the x-Direction is 200 and in the y-direction 10 and in the Zdirection it should be the 1.we have to edit the blockmeshdict file in order to run the simulation.

The block diagramm looks like this in 2D and Isometric view

The below shown code for the simple grading .we are edit this code in the blockMeshdict file located in system folder.

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

convertToMeters 0.01 ;

vertices
(
	(0 0 0)//point 0
	(8 0 0)//point 1	
	(8 0.5 0)//point 2
	(0 0.5 0)//point 3
	(8 1 0)//point 4
	(0 1 0)//point 5
	(20 1 0)//point 6
	(20 0.5 0)//point 7
	(20 0 0)//point 8
	(20 -1 0)//point 9
	(8 -1 0)//point 10
	(0 0 0.1)//point 11
	(8 0 0.1)//point 12
	(8 0.5 0.1)//point 13
	(0 0.5 0.1)//point 14
	(8 1 0.1)//point 15
	(0 1 0.1)//point 16
	(20 1 0.1)//point 17
	(20 0.5 0.1)//point 18
	(20 0 0.1)//point 19
	(20 -1 0.1)//point 20
	(8 -1 0.1)//point 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)
        );
    }
    frontandBack
    {
        type empty;
        faces
        (
	(0 3 2 1)
	(3 5 4 2)
	(10 1 8 9)
	(1 2 7 8)
	(2 4 6 7)
	(11 12 13 14)
	(14 13 15 16)
	(21 20 19 12)
	(12 19 18 13)
	(13 18 17 15)   
        );
    }
    Noslipwalls
     {
	type wall;
	faces
        (
	(5 16 15 4)
	(4 15 17 6)
	(0 1 12 11)
	(10 21 12 1)
	(10 9 20 21)
       );
     }       
);
mergePatchPairs
(
);

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

For pressure boundary conditions:

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

For velocity Boundary conditions

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

Controldict conditions

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

application     icoFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         0.5;

deltaT          0.00001;

writeControl    timeStep;

writeInterval   20;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;


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

The pressure ,velocity boundary conditions in folder 0 will remain same for all the mesh grading factor we just change the block and controldict file in the system remains also same for every mesh grading factor.If the courant number is exceeds the maximum limit then we have to change the dt value for every mesh grading factor. The starting time is zero and the end time is 0.5

For simple Meshing grade scheme of 1:

The mesh block diagram

The pressure variations diagram

The velocity variations diagram

The velocity Profile:

The velocity profile at a distance of 0.085 m near the step from the inlet as shown below

For simple Meshing grade scheme of 0.2:

For this we kept the code same and a little bit changes are done i.e in blocks .what we changes is shownbelow remaning code has no changes.

blocks
(
    hex (0 1 2 3 11 12 13 14) (200 10 1) simpleGrading (0.2 1.2 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 (1.2 0.2 1)
    hex (1 8 7 2 12 19 18 13) (200 10 1) simpleGrading (1.2 1.2 1)
    hex (10 9 8 1 21 20 19 12) (200 10 1) simpleGrading (1.2 1.2 1)

);

The mesh block diagram

The pressure variations diagram

The velocity variations diagram

The velocity Profile

The velocity profile at a distance of 0.085 m near the step from the inlet as shown below

For simple Meshing grade scheme 0.5:

For this we kept the code same and a little bit changes are done i.e in blocks .what we changes is shownbelow remaning code has no changes.

blocks
(
    hex (0 1 2 3 11 12 13 14) (200 10 1) simpleGrading (0.5 1.5 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 (1.5 0.5 1)
    hex (1 8 7 2 12 19 18 13) (200 10 1) simpleGrading (1.5 1.5 1)
    hex (10 9 8 1 21 20 19 12) (200 10 1) simpleGrading (1.5 1.5 1)

);

The mesh block diagram

The pressure variations diagram

The velocity variations diagram

The velocity Profile

The velocity profile at a distance of 0.085 m near the step from the inlet as shown below

For simple Meshing grade scheme 0.8:

For this we kept the code same and a little bit changes are done i.e in blocks .what we changes is shownbelow remaning code has no changes.

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

);

The mesh block diagram

The pressure variations diagram

The velocity variations diagram

The velocity Profile

The velocity profile at a distance of 0.085 m near the step from the inlet as shown below

Conlusion:

All The velocity graphs obtainted from the different meshing grading factors are similiar with a negligible variations.As the mesher size is lower i.e for finer mesh we can visualize the accurate output.

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.