BlockMesh Drill down challenge

      BlockMesh Drill down challenge

Objective:-

The objective of this study is to make a backward facing step block by editing the blockMeshDict file and simulate it in openFoam and post process the results like velocity profile near the time step zone and to check the effect of grading scheme on velocity profile.

First the backward facing block was devided into 5 blocks and each block is build one by one of given dimension and number of cells in x direction is taken as 200 while in y direction it is taken as 10 and particular faces are assigned to particular boundary condition. The blockMeshDict file for grading scheme 0.2 is given below.

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

vertices
(
    
    (0 0 0)
    (0.08 0 0)
    (0.08 0.005 0)
    (0 0.005 0)
    (0.08 0.01 0)
    (0 0.01 0)
    (0.2 0.01 0)
    (0.2 0.005 0)
    (0.2 0 0)
    (0.2 -0.01 0)
    (0.08 -0.01 0)
    (0 0 0.005)
    (0.08 0 0.005)
    (0.08 0.005 0.005)
    (0 0.005 0.005)
    (0.08 0.01 0.005)
    (0 0.01 0.005)
    (0.2 0.01 0.005)
    (0.2 0.005 0.005)
    (0.2 0 0.005)
    (0.2 -0.01 0.005)
    (0.08 -0.01 0.005)
);

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)
);

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


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

 

After editing the blockMeshDict file blocks can be seen in the paraFoam using the command paraFoam -block and it will give you the results which are shown below:-

After this the next step is to give the boundary conditions, The boundary condition for pressure and velocity in 0 folder is given as:-

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

    Front
    {
        type            empty;
    }
    Back
    {
        type            empty;
    }
    NoSlipWalls
    {
        type            zeroGradient;
    }
}

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

 

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.5 0 0);
    }

    outlet
    {
        type            zeroGradient;
    }

    Front
    {
        type            empty;
    }
    Back
    {
        type            empty;
    }
    NoSlipWalls
    {
        type            noSlip;
    }
}

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

 

The veocity and pressure file in the 0 folder will remain same for every grading scheme. We just have to change the simple grading points in blockMeshDict.

 

Simulation Results:-

For grading scheme 0.8:-

The memshing and the velocity profile for grading scheme of 0.8 is shown below. In the given condition the grading near all wall is 0.8

    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)

 

velocity profile near the stepat 0.085 metre is plotted and is showen below:-

 

For grading scheme of 0.5:-

The grading scheme is then changed from 0.8 to 0.5 to see the change in meshing and grid size. the grading scheme is used for this is given below:-

    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 velocity profile near the step at 0.085 metres is plotted and is showen below:-

As we are reducing the grading scheme from 0.8 to 0.5 to 0.2 the mesh becomes more finer and you will get more accurate results compare to 1 grading scheme. so in case of any simulation grading scheme should be choosen accordingly in required areas.

Now after that the grading scheme of 0.2 is used.

For grading scheme of 0.2:-

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)

Velocity contour:-


Projects by Saurabh sharma

Challenge on Combustion
Saurabh sharma · 2020-02-16 18:45:07

  Challenge on Combustion Objective:- Perform a combustion simulation on the combuster model and plot the variation of the mass fraction of the different species in the simulation using line probes at different locations of the combuster. You need to plot Read more

 

Cyclone Separator Challenge

 

Objective:-

We have to perform an analysis on the cyclone seperator model for  different number of inectioned particles.

1. The four imperical models use Read more

  Gate Valve Parametric Study A gate valve, also known as a sluice valve, is a valve that opens by lifting a barrier(gate) out of the path of the fluid.Gate valves are used to shut off the flow of liquids rather than for flow regulation. Gate valve require Read more

Conjugate Heat Transfer Analysis on a graphics card. Description of a conjugate heat transfer analysis:- Conjugate heat transfer represents the combination of heat transfer in liquids and solids simulteneously. The mode of heat transfer in solids is conduction and con Read more

    Rayleigh Taylor Instability Challenge SOLUTION-1:- Models used for Rayleigh-Taylor instability:- Early-time growth Potential flow Buoyancy-drag balance Energy budget   1. Early-time growth:- It was noted in the taylor (1950) that t Read more

Exhaust Port Challenge
Saurabh sharma · 2019-12-19 08:14:22

              Exhaust Port Challenge SOLUTION1:- Why and Where a CHT analysis is used? Conjugate Heat Transfer analysis:- Conjugate heat transfer analysis is generally used when there is a teperature variation during heating and co Read more

Ahmed Body Challenge
Saurabh sharma · 2019-12-17 16:08:31

              Ahmed Body Challenge  SOLUTION1: Ahmed body:- The Ahmed body was originally described By S.R. Ahmed in 1984. Ahmed body is a simplified car body. The shape provides a  model to study geometric effects Read more

    Simulation of Flow through a pipe in                                OpenFoam Objective of the project:- 1. Calculation of flow variables. 2. Generation of the blockMeshDict Read more

Simulation of a 1D Super-sonic nozzle flow simulation using Macormack Method Introduction:- nozzles are most commonly used in every fields in order to study the liquids and air properties, because those two elements plays an important role in the enginnering fields. H Read more

             FVM:: Interpolation and Gradient Schemes literature review FVM-Flux limiters and interpolation schemes What is FVM? FVM is a finite volume method for representing and evaluating PDE\'s in the form of algebraic equations Read more


Loading...

The End