Project

To Simulate the Flow through Backward Facing step by help of icoFoam solver in openFoam

Title : To Simulate the Flow through Backward Facing step by help of icoFoam solver

Objective :1. To study the effect of grading factor on laminar flow or incompressible flow or newtonian fluids(viscous fluid)

2. Effect of backword facing step on laminar flow velocity

3.To Measure the velocity profile at 0.085 m from the inlet of the geometry

4. To Compare velocity magnitude contours near the step region

5 .To see effect on Velocity magnitude profile as change a function of mesh grading factor. by use factors, 0.2, 0.5,0.8.

Given Domain

given domain is uses for define the boundry contion , intial conditon, vertices, blocks

Domain Dividation into block

Defined vertices

For Define the Boundry Condition

Simulation Procedure

1. As there is mention use of icoFoam solver, so this solver is related with incompressible fluid.

2. Based upon the solver picked right tutorial by going in to terminal & by type of cd tutorial

3. As there is tutorail so many tutorial , so pick the incompressible tutorial by cd incompressible

4. As in the incompressible so many problem, pick the icoFoam folder by cd icoFoam

5. In icoFoam there is two problem , so pick right tutorial by based upon the boundry , intitial condition. so by type of cd cavity

6. copied the cavity folder into $FOAM_RUN by cp -r cavity/ $FOAM_RUN/cavity_test & given the specific the name to folder like cavity_test.

7. so , in cavity_test folder you can see the 0, constant, system folder which is require to run the simulation & make changer in geometry etc.

8. so, by typing cd system edit the file blokMeshDict file given the vertices, boundry , block, & in controlDict file given the start time , end time, deltaT

9. By typing cd constant make changes in trasporProperties file define kinematic viscosity

10. By type of cd 0 make the changes in velocity (U)& pressure file (P) given the initial condition.

11. the going in to the cavity_test type the blockMesh to check the block , vertice, faces. & to write the polyMesh

12. by type of checkMesh check the mesh is ok or not

13. finally use of solver by type of icoFoam to solve the all changes made various file . so , all calculation will be done & will show the execuation & clock time .

15. so in last step to see your domain in paraview you need to type the paraFoam in cavity_test folder.

BlcokMeshDict File

/*--------------------------------*- 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)
    (8 0 0)
    (8 0.5 0)
    (0 0.5 0)
    (8 1 0)
    (0 1 0)
    (20 1 0)
    (20 0.5 0)
    (20 0 0)
    (20 -1 0)
    (8 -1 0)
    (0 0 0.1)
    (8 0 0.1)
    (8 0.5 0.1)
    (0 0.5 0.1)
    (8 1 0.1)
    (0 1 0.1)
    (20 1 0.1)
    (20 0.5 0.1)
    (20 0 0.1)
    (20 -1 0.1)
    (8 -1 0.1)
);

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

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

Control Dict File

/*--------------------------------*- 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.1;

deltaT          1e-4;

writeControl    timeStep;

writeInterval   20;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;


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

TransportProperties

/*--------------------------------*- 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    \"constant\";
    object      transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

nu              [0 2 -1 0 0 0 0] 0.01;


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

Pressure File

/*--------------------------------*- 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;
    }
}

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

Velocity File

/*--------------------------------*- 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;
	value		uniform (0 0 0 );
    }                   

    frontAndBack
    {
        type            empty;
    }
}

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

Grading Factor

Grade 1

    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) 

Grade 0.2

    hex (0 1 2 3 11 12 13 14) (200 10 1) simpleGrading (1 5 1)
    hex (3 2 4 5 14 13 15 16) (200 10 1) simpleGrading (1 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) 

Grade 0.5

    hex (0 1 2 3 11 12 13 14) (200 10 1) simpleGrading (1 2 1)
    hex (3 2 4 5 14 13 15 16) (200 10 1) simpleGrading (1 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) 

Grade 0.8

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

Grade 1 Result

Mesh

Velocity

Preesure

Velocity at 0.085

Grade 0.2 Result

Velocity

Preesure

Velocity at 0.085

Grade 0.5 Result

Velocity

Pressure

Velocity at 0.085

Grade 0.8 Result

velocity

Preesure

Velocity at 0.085

Conclusion

1. By looking in to the contour of velocity it is seen that ,velocity is maximum at cetral part & minimum at near to wall surface ( this is occurs due to the no slip constion).

2. At 0.085m from the inlet there is velocity is maximum velocity at centre & zero at the wall surface( because shear stress is moreor where no slip condition is consider)

3. By varying the grading factor there is not major change found in velocity profile.

4. For grade 0.1 there is smooth profile of velocity & pressure is found it.

5. After grade 0.2 there is slightly graph is distorated after intial part.

6. By the grading factor we can refine the mesh & we can measure the properties in perticular area, for geeting the correct result.

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.