Challenge

Week 8 - BlockMesh Drill down challenge

AIM:

To redesign the cavity block and to rum the simullation for various grading factors of mesh.

METHOD:

Break the block into 5 different sections of the dimensions specified below.

Since our design is a 3D model it looks similar to the picture below

The numbering of the verticess should be assigned in such a way that the first vector that is when specifing the frst 2 nodes they should be along x axis which will denote a local coordinate system for the model. similarly the second vector should be along y axis, and by default third direction will be z axis as per right hand thumb rule.

While denoting the faces, we should follow right hand thumb rule where area vector is facing outside and the sgoulb the z axis.

front and back are taken as empty type, top and bottom are of type wall, and inlet and outlet are patch type.

The faces are as follows: left faces of 4 and 5 block are inlet, right face of 1,2 and 3 are denoted as outlet.

I have taken different fluids in case 2 namely water and air with nu = 1e-6 and nu = 1.5e-5 respectively.

Programs:

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

mergePatchPairs
(
);

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

ControlDict 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.6;

deltaT          1e-4;

writeControl    timeStep;

writeInterval   20;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;



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

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;
    }
    
    noSlipWall
    {
        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;
        // Field Value
        value           uniform (1 0 0);
    }

    outlet
    {
        type            zeroGradient;
        // Field Value
    }
         
    noSlipWall
    {
        type            noSlip;
    }

    frontAndBack
    {
        type            empty;
    }

}

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

TransportProperties for nu = 0.01

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


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

TransportProperties file for water nu = 1e-6

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


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

transportProperties file for air nu = 1.5e-5

/*--------------------------------*- 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] 1.5e-5;


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

Case 1:

viscosity 0.01 and 1e-6 for simple grading(1 1 1)

Mesh:

velocity for nu = 0.01

velocity and pressure for nu = 1e-5 m^2/s

Here we can clearly observe that the kinematic viscosity plays a major role which says that along the nozzle for high viscous fluid velocity is raising linearly and exactly at the throat we observe a sudden drop in velocity and after that the slope of graph inceases along the duct.

Caes 2: where the mesh grading is varied for water and air

pressure for water

pressure for air

velocity for water

velocity for air

graphs for air and water

1. water

2. air

Grading factor of 0.5

pressure for water

pressure for air

velocity for water

velocity for air

Graph for water

Graph for air

Grading factor of 0.8

Pressure for water

Pressure for air

Velocity for water

Velocity for air

Graph for water

Graph for air

CONCLUSION:

We have clearly seen that for a high kinematic viscosity fluid the vlocity is high only with in the smaller duct while for a smaller kinematic viscosity fluid the velocity if the fluid is maintained till the outlet. This is because of the density of the liquid. A high density fluid is flowing and a cross section of the duct increases, in such cases the fluid continues to increase the velocity with a higher rate due to less dynamic viscosity because the value of y have increased when cross section is increased. this is why the high density fluid continues to flow at highr rate even even after the increase in cross section.

We have also observed that grading have not significantly affected the reuslts and we approximately arrive at similar results in all grading factors.

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.