Challenge

Week 12 - Symmetry vs Wedge vs HP equation

In the previous part we looked into the simulation results for a laminar ,incompressible flow through a pipe in OpenFoam .now in this section ,we attempt the same with symmetery boundary conditions

BlockMeshDict for 10deg

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

vertices
(
	 (0 0 0)
	 (0 1.99239e-03 1.74311e-04)
	 (0 1.99239e-03 -1.74311e-04)
	 (1.204000e+00 0 0)
	 (1.204000e+00 1.99239e-03 1.74311e-04)
	 (1.204000e+00 1.99239e-03 -1.74311e-04)
);

blocks
(
	 hex (0 3 5 2 0 3 4 1) (300 30 1)SimpleGrading (1 0.1 1)

);

edges
(
	 arc 1 2 (0 2.000000e-03 0)
	 arc 4 5 (1.204000e+00 2.000000e-03 0)
);

boundary
(
	 inlet 
	 {
		 type patch;
		 faces
		 (
			 (0 2 1 0)
		 );
	 }
	 outlet
	 {
		 type patch;
		 faces
		(
			 (3 4 5 3)
		 );
	 }
	 top
	 {
		 type wall;
		 faces
		(
			 (1 2 5 4)
		 );
	 }
	 back
	 {
		 type symmetry;
		 faces
		(
			 (0 2 5 3)
		 );
	 }
	 front
	 {
		 type symmetry;
		 faces
		(
			 (0 3 4 1)
		 );
	 }
	 axis
	 {
		 type empty;
		 faces
		(
			 (0 3 3 0)
		 );
	 }
);

mergePatchPairs
(
);

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

Pressure

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

    axis
    {
        type            empty;
    }

    top
    {
         type           zeroGradient;
    }
 
    front
    {
         type            symmetry;
    }
    
    back
    {
         type            symmetry;
    }

}

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

Velocity

/*--------------------------------*- 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.4686 0 0);

boundaryField
{
    inlet
    {
        type            fixedValue;
        value         uniform (0.4686 0 0);
    }

    outlet
    {
        type            zeroGradient;
    }

    axis
    {
        type            empty;
    }
    
    top
    {
        type            fixedValue;
        value       uniform (0 0 0) ;
    }
    
    front
    {
        type          symmetry;
    }
    
    back
    {
        type           symmetry;
     } 
}

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

ControlDict

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

deltaT          0.001;

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:  8
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

nu              [0 2 -1 0 0 0 0] 0.892e-6;


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

Theta=25deg

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

vertices
(
	 (0 0 0)
	 (0 1.95259e-03 4.32879e-04)
	 (0 1.95259e-03 -4.32879e-04)
	 (1.204000e+00 0 0)
	 (1.204000e+00 1.95259e-03 4.32879e-04)
	 (1.204000e+00 1.95259e-03 -4.32879e-04)
);

blocks
(
	 hex (0 3 5 2 0 3 4 1) (300 30 1)SimpleGrading (1 0.1 1)

);

edges
(
	 arc 1 2 (0 2.000000e-03 0)
	 arc 4 5 (1.204000e+00 2.000000e-03 0)
);

boundary
(
	 inlet 
	 {
		 type patch;
		 faces
		 (
			 (0 2 1 0)
		 );
	 }
	 outlet
	 {
		 type patch;
		 faces
		(
			 (3 4 5 3)
		 );
	 }
	 top
	 {
		 type wall;
		 faces
		(
			 (1 2 5 4)
		 );
	 }
	 back
	 {
		 type symmetry;
		 faces
		(
			 (0 2 5 3)
		 );
	 }
	 front
	 {
		 type symmetry;
		 faces
		(
			 (0 3 4 1)
		 );
	 }
	 axis
	 {
		 type empty;
		 faces
		(
			 (0 3 3 0)
		 );
	 }
);

mergePatchPairs
(
);

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

Theta=45deg

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

vertices
(
	 (0 0 0)
	 (0 1.847759e-03 7.653668e-04)
	 (0 1.847759e-03 -7.653668e-04)
	 (1.204000e+00 0 0)
	 (1.204000e+00 1.847759e-03 7.653668e-04)
	 (1.204000e+00 1.847759e-03 -7.653668e-04)
);

blocks
(
	 hex (0 3 5 2 0 3 4 1) (300 30 1)SimpleGrading (1 0.1 1)

);

edges
(
	 arc 1 2 (0 2.000000e-03 0)
	 arc 4 5 (1.204000e+00 2.000000e-03 0)
);

boundary
(
	 inlet 
	 {
		 type patch;
		 faces
		 (
			 (0 2 1 0)
		 );
	 }
	 outlet
	 {
		 type patch;
		 faces
		(
			 (3 4 5 3)
		 );
	 }
	 top
	 {
		 type wall;
		 faces
		(
			 (1 2 5 4)
		 );
	 }
	 back
	 {
		 type symmetry;
		 faces
		(
			 (0 2 5 3)
		 );
	 }
	 front
	 {
		 type symmetry;
		 faces
		(
			 (0 3 4 1)
		 );
	 }
	 axis
	 {
		 type empty;
		 faces
		(
			 (0 3 3 0)
		 );
	 }
);

mergePatchPairs
(
);

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

Results

Remarks

1.symmetry bonndary conditions are more accurate than wedge conditions

2.Execution time is greater for symmetry than boundary conditions than wedge conditions

3.Courant number increases with increase in the angle

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.