Challenge

Week 12 - Symmetry vs Wedge vs HP equation

SYMMETRY VS WEDGE VS HP EQUATION:

Aim:

To simulate the flow through a pipe using wedge and symmetry boundary conditions and compare the results with the analytical solution for angles `theta` = 10, 25, and 45.

Wedge:

This type of boundary condition is used for two-dimensional axisymmetric cases e.g. a cylinder. The geometry is specified as a wedge of small-angle and one cell thickness running along the plane of symmetry. The axisymmetric wedge planes must be specified as separate patches of wedge type. The angle of the wedge should be `<5^@`.

Symmetry:

It is similar to that of a wedge boundary condition in terms of function. In addition, it is used for any non-planar 3-dimensional patch which uses the symmetry boundary condition. No angular limit between the two symmetry planes in axisymmetric problems as in wedge case.

Matlab code to generate blockMeshDict file:

1. Wedge

clear all
close all
clc

%Reynolds number
Re=2100;
%Diameter of the pipe
D=0.02;
%Total length of the pipe
L=3;
%Hydraullic entry length
L_e=0.05*Re*D;
%Length of the fully developed region
L_f=L-L_e;
%Radius of the pipe
r=D/2;
%Wedge angle
theta=10;
%Dynamic viscosity of water at 20degC
mu=1e-03;
%Density of water at 20degC
rho=998;

%Hagen-Poiseuille equation
%Average velocity
v_avg=(Re*mu)/(rho*D);
%Maximum velocity
v_max=2*(v_avg);
%Pressure drop
del_p=(8*mu*L_f*v_avg)/(r^2);
%Kinematic pressure drop
del_p_k=del_p/rho;
%Friction factor
f=64/Re;
%Wall shear stress
tau=(f/4)*((rho*(v_avg)^2)/2);

%To create blockMeshDict file
%Header section
header1='/*--------------------------------*- C++ -*----------------------------------*\';
header2='  =========                 |';
header3='  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox';
header4='   \\    /   O peration     | Website:  https://openfoam.org';
header5='    \\  /    A nd           | Version:  8';
header6='     \\/     M anipulation  |';
header7='\*---------------------------------------------------------------------------*/';

f1=fopen('blockMeshDicta','w');
fprintf(f1, '%s\n',header1);
fprintf(f1, '%s\n',header2);
fprintf(f1, '%s\n',header3);
fprintf(f1, '%s\n',header4);
fprintf(f1, '%s\n',header5);
fprintf(f1, '%s\n',header6);
fprintf(f1, '%s\n',header7);

fprintf(f1, 'FoamFile\n{\n');
fprintf(f1, '\t %s \t 2.0;\n','version');
fprintf(f1, '\t %s \t ascii;\n','format');
fprintf(f1, '\t %s \t\t dictionary;\n','class');
fprintf(f1, '\t %s \t blockMeshDict;\n','object');
fprintf(f1, '}\n');

header8='// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //';
fprintf(f1, '%s\n\n',header8);
fprintf(f1, 'convertToMeters 1;\n\n');

%Vertices section
fprintf(f1, 'vertices\n');
fprintf(f1, '(\n');
fprintf(f1, '\t (%d %d %d)\n',0,0,0);
fprintf(f1, '\t (%d %d %d)\n',0,r*cosd(theta/2),r*sind(theta/2));
fprintf(f1, '\t (%d %d %d)\n',0,r*cosd(theta/2),-r*sind(theta/2));
fprintf(f1, '\t (%d %d %d)\n',L,0,0);
fprintf(f1, '\t (%d %d %d)\n',L,r*cosd(theta/2),r*sind(theta/2));
fprintf(f1, '\t (%d %d %d)\n',L,r*cosd(theta/2),-r*sind(theta/2));
fprintf(f1, ');\n\n');

%Blocks section
fprintf(f1, 'blocks\n');
fprintf(f1, '(\n');
fprintf(f1, '\t hex (0 3 5 2 0 3 4 1) (%d %d %d)',500,25,1);
fprintf(f1, ' simpleGrading (1 0.2 1)\n\n');
fprintf(f1, ');\n\n');

%Edges section
fprintf(f1, 'edges\n');
fprintf(f1, '(\n');
fprintf(f1, '\t arc %d %d (%d %d %d)\n',1,2,0,r,0);
fprintf(f1, '\t arc %d %d (%d %d %d)\n',4,5,L,r,0);
fprintf(f1, ');\n\n');

%Boundary section
fprintf(f1, 'boundary\n');
fprintf(f1, '(\n');
%Inlet
fprintf(f1, '\t inlet \n');
fprintf(f1, '\t {\n');
fprintf(f1, '\t\t type patch;\n');
fprintf(f1, '\t\t faces \n');
fprintf(f1, '\t\t (\n');
fprintf(f1, '\t\t\t (0 1 2 0)\n');
fprintf(f1, '\t\t );\n');
fprintf(f1, '\t }\n');
%Outlet
fprintf(f1, '\t outlet \n');
fprintf(f1, '\t {\n');
fprintf(f1, '\t\t type patch;\n');
fprintf(f1, '\t\t faces \n');
fprintf(f1, '\t\t (\n');
fprintf(f1, '\t\t\t (3 5 4 3)\n');
fprintf(f1, '\t\t );\n');
fprintf(f1, '\t }\n');
%Top
fprintf(f1, '\t top \n');
fprintf(f1, '\t {\n');
fprintf(f1, '\t\t type wall;\n');
fprintf(f1, '\t\t faces \n');
fprintf(f1, '\t\t (\n');
fprintf(f1, '\t\t\t (1 4 5 2)\n');
fprintf(f1, '\t\t );\n');
fprintf(f1, '\t }\n');
%Front
fprintf(f1, '\t front \n');
fprintf(f1, '\t {\n');
fprintf(f1, '\t\t type wedge;\n');
fprintf(f1, '\t\t faces \n');
fprintf(f1, '\t\t (\n');
fprintf(f1, '\t\t\t (0 3 4 1)\n');
fprintf(f1, '\t\t );\n');
fprintf(f1, '\t }\n');
%Back
fprintf(f1, '\t back \n');
fprintf(f1, '\t {\n');
fprintf(f1, '\t\t type wedge;\n');
fprintf(f1, '\t\t faces \n');
fprintf(f1, '\t\t (\n');
fprintf(f1, '\t\t\t (0 2 5 3)\n');
fprintf(f1, '\t\t );\n');
fprintf(f1, '\t }\n');
%Axis
fprintf(f1, '\t axis \n');
fprintf(f1, '\t {\n');
fprintf(f1, '\t\t type empty;\n');
fprintf(f1, '\t\t faces \n');
fprintf(f1, '\t\t (\n');
fprintf(f1, '\t\t\t (0 3 3 0)\n');
fprintf(f1, '\t\t );\n');
fprintf(f1, '\t }\n');
fprintf(f1, ');\n\n');

%Final section
fprintf(f1, 'mergePatchPairs\n');
fprintf(f1, '(\n');
fprintf(f1, ');\n');

header9='// ************************************************************************* //';
fprintf(f1, '%s\n',header9);
fclose(f1);

2. Symmetry

clear all
close all
clc

%Reynolds number
Re=2100;
%Diameter of the pipe
D=0.02;
%Total length of the pipe
L=3;
%Hydraullic entry length
L_e=0.05*Re*D;
%Length of the fully developed region
L_f=L-L_e;
%Radius of the pipe
r=D/2;
%Wedge angle
theta=10;
%Dynamic viscosity of water at 20degC
mu=1e-03;
%Density of water at 20degC
rho=998;

%Hagen-Poiseuille equation
%Average velocity
v_avg=(Re*mu)/(rho*D);
%Maximum velocity
v_max=2*(v_avg);
%Pressure drop
del_p=(8*mu*L_f*v_avg)/(r^2);
%Kinematic pressure drop
del_p_k=del_p/rho;
%Friction factor
f=64/Re;
%Wall shear stress
tau=(f/4)*((rho*(v_avg)^2)/2);

%To create blockMeshDict file
%Header section
header1='/*--------------------------------*- C++ -*----------------------------------*\';
header2='  =========                 |';
header3='  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox';
header4='   \\    /   O peration     | Website:  https://openfoam.org';
header5='    \\  /    A nd           | Version:  8';
header6='     \\/     M anipulation  |';
header7='\*---------------------------------------------------------------------------*/';

f1=fopen('blockMeshDictd','w');
fprintf(f1, '%s\n',header1);
fprintf(f1, '%s\n',header2);
fprintf(f1, '%s\n',header3);
fprintf(f1, '%s\n',header4);
fprintf(f1, '%s\n',header5);
fprintf(f1, '%s\n',header6);
fprintf(f1, '%s\n',header7);

fprintf(f1, 'FoamFile\n{\n');
fprintf(f1, '\t %s \t 2.0;\n','version');
fprintf(f1, '\t %s \t ascii;\n','format');
fprintf(f1, '\t %s \t\t dictionary;\n','class');
fprintf(f1, '\t %s \t blockMeshDict;\n','object');
fprintf(f1, '}\n');

header8='// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //';
fprintf(f1, '%s\n\n',header8);
fprintf(f1, 'convertToMeters 1;\n\n');

%Vertices section
fprintf(f1, 'vertices\n');
fprintf(f1, '(\n');
fprintf(f1, '\t (%d %d %d)\n',0,0,0);
fprintf(f1, '\t (%d %d %d)\n',0,r*cosd(theta/2),r*sind(theta/2));
fprintf(f1, '\t (%d %d %d)\n',0,r*cosd(theta/2),-r*sind(theta/2));
fprintf(f1, '\t (%d %d %d)\n',L,0,0);
fprintf(f1, '\t (%d %d %d)\n',L,r*cosd(theta/2),r*sind(theta/2));
fprintf(f1, '\t (%d %d %d)\n',L,r*cosd(theta/2),-r*sind(theta/2));
fprintf(f1, ');\n\n');

%Blocks section
fprintf(f1, 'blocks\n');
fprintf(f1, '(\n');
fprintf(f1, '\t hex (0 3 5 2 0 3 4 1) (%d %d %d)',500,25,1);
fprintf(f1, ' simpleGrading (1 0.2 1)\n\n');
fprintf(f1, ');\n\n');

%Edges section
fprintf(f1, 'edges\n');
fprintf(f1, '(\n');
fprintf(f1, '\t arc %d %d (%d %d %d)\n',1,2,0,r,0);
fprintf(f1, '\t arc %d %d (%d %d %d)\n',4,5,L,r,0);
fprintf(f1, ');\n\n');

%Boundary section
fprintf(f1, 'boundary\n');
fprintf(f1, '(\n');
%Inlet
fprintf(f1, '\t inlet \n');
fprintf(f1, '\t {\n');
fprintf(f1, '\t\t type patch;\n');
fprintf(f1, '\t\t faces \n');
fprintf(f1, '\t\t (\n');
fprintf(f1, '\t\t\t (0 1 2 0)\n');
fprintf(f1, '\t\t );\n');
fprintf(f1, '\t }\n');
%Outlet
fprintf(f1, '\t outlet \n');
fprintf(f1, '\t {\n');
fprintf(f1, '\t\t type patch;\n');
fprintf(f1, '\t\t faces \n');
fprintf(f1, '\t\t (\n');
fprintf(f1, '\t\t\t (3 5 4 3)\n');
fprintf(f1, '\t\t );\n');
fprintf(f1, '\t }\n');
%Top
fprintf(f1, '\t top \n');
fprintf(f1, '\t {\n');
fprintf(f1, '\t\t type wall;\n');
fprintf(f1, '\t\t faces \n');
fprintf(f1, '\t\t (\n');
fprintf(f1, '\t\t\t (1 4 5 2)\n');
fprintf(f1, '\t\t );\n');
fprintf(f1, '\t }\n');
%Front
fprintf(f1, '\t front \n');
fprintf(f1, '\t {\n');
fprintf(f1, '\t\t type symmetry;\n');
fprintf(f1, '\t\t faces \n');
fprintf(f1, '\t\t (\n');
fprintf(f1, '\t\t\t (0 3 4 1)\n');
fprintf(f1, '\t\t );\n');
fprintf(f1, '\t }\n');
%Back
fprintf(f1, '\t back \n');
fprintf(f1, '\t {\n');
fprintf(f1, '\t\t type symmetry;\n');
fprintf(f1, '\t\t faces \n');
fprintf(f1, '\t\t (\n');
fprintf(f1, '\t\t\t (0 2 5 3)\n');
fprintf(f1, '\t\t );\n');
fprintf(f1, '\t }\n');
%Axis
fprintf(f1, '\t axis \n');
fprintf(f1, '\t {\n');
fprintf(f1, '\t\t type empty;\n');
fprintf(f1, '\t\t faces \n');
fprintf(f1, '\t\t (\n');
fprintf(f1, '\t\t\t (0 3 3 0)\n');
fprintf(f1, '\t\t );\n');
fprintf(f1, '\t }\n');
fprintf(f1, ');\n\n');

%Final section
fprintf(f1, 'mergePatchPairs\n');
fprintf(f1, '(\n');
fprintf(f1, ');\n');

header9='// ************************************************************************* //';
fprintf(f1, '%s\n',header9);
fclose(f1);

blockMeshDict files

1. Wedge

/*--------------------------------*- 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 0.00996195 0.000871557)
	 (0 0.00996195 -0.000871557)
	 (3 0 0)
	 (3 0.00996195 0.000871557)
	 (3 0.00996195 -0.000871557)
);

blocks
(
	 hex (0 3 5 2 0 3 4 1) (500 25 1) simpleGrading (1 0.2 1)

);

edges
(
	 arc 1 2 (0 0.01 0)
	 arc 4 5 (3 0.01 0)
);

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

mergePatchPairs
(
);
// ************************************************************************* //

2. Symmetry

/*--------------------------------*- 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 0.00996195 0.000871557)
	 (0 0.00996195 -0.000871557)
	 (3 0 0)
	 (3 0.00996195 0.000871557)
	 (3 0.00996195 -0.000871557)
);

blocks
(
	 hex (0 3 5 2 0 3 4 1) (500 25 1) simpleGrading (1 0.2 1)

);

edges
(
	 arc 1 2 (0 0.01 0)
	 arc 4 5 (3 0.01 0)
);

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

mergePatchPairs
(
);
// ************************************************************************* //

U files:

1. Wedge

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

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

    outlet
    {
        type            zeroGradient;
    }

    axis
    {
        type            empty;
    }

    top
    {
        type            noSlip;
    }

    front
    {
        type            wedge;
    }

    back
    {
        type            wedge;
    }
}

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

2. Symmetry

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

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

    outlet
    {
        type            zeroGradient;
    }

    axis
    {
        type            empty;
    }

    top
    {
        type            noSlip;
    }

    front
    {
        type            symmetry;
    }

    back
    {
        type            symmetry;
    }
}

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

p files:

1. Wedge

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

    axis
    {
        type            empty;
    }

    top
    {
        type            zeroGradient;
    }

    front
    {
        type            wedge;
    }

    back
    {
        type            wedge;
    }
}
// ************************************************************************* //

2. Symmetry

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

    axis
    {
        type            empty;
    }

    top
    {
        type            zeroGradient;
    }

    front
    {
        type            symmetry;
    }

    back
    {
        type            symmetry;
    }
}
// ************************************************************************* //

controlDict file:

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

deltaT          0.001;

writeControl    timeStep;

writeInterval   500;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;


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

transportProperties file:

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


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

fvSchemes file:

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

ddtSchemes
{
    default         Euler;
}

gradSchemes
{
    default         Gauss linear;
    grad(p)         Gauss linear;
}

divSchemes
{
    default         none;
    div(phi,U)      Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear orthogonal;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         orthogonal;
}


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

fvSolution file:

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

solvers
{
    p
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance       1e-06;
        relTol          0.05;
    }

    pFinal
    {
        $p;
        relTol          0;
    }

    U
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-05;
        relTol          0;
    }
}

PISO
{
    nCorrectors     2;
    nNonOrthogonalCorrectors 0;
    pRefCell        0;
    pRefValue       0;
}


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

The case setup is opened in the run folder and blockMesh command is used to create the mesh. Then icoFoam commands used to run the simulation.

Analytical solution:

`V_(avg) = 0.105 m/s`

`V_(max) = 2*V_(avg)`= 0.21 m/s

`V(r) = V_(max) *[1-(r/R)^2]`

where, R= 0.01 m

`tau=mu*((dV)/(dr))`

where, `mu`= 0.001 N s/m^2

Results and discussions:

From paraview, the values of U (velocity) and tau (shear stress) for fully developed flow (x=2.9m) are obtained in .csv format. Using Microsoft excel, velocity profiles and shear stress plots for different angles (10, 25, and 45) are created comparing the wedge, symmetry and analytical results.

Data samples from Microsoft excel:

For fully developed flow (x=2.9m; `theta`=10):

For fully developed flow (x=2.9m; `theta`=25):

For fully developed flow (x=2.9m; `theta`=45):

Velocity profile:

For fully developed flow (x=2.9m; `theta`=10):

For fully developed flow (x=2.9m; `theta`=25):

For fully developed flow (x=2.9m; `theta`=45):

  • It is observed that the velocity is almost zero at the boundary and reaches a maximum value at the center. It is the same for all three cases.
  • There is no much visible difference between the symmetry and wedge BCs.
  • With an increase in the angle, the deviation of the numerical solution from the analytical solution increases.

Shear stress plot:

For fully developed flow (x=2.9m; `theta`=10):

For fully developed flow (x=2.9m; `theta`=25):

For fully developed flow (x=2.9m; `theta`=45):

  • It is observed that the shear stress is almost zero at the center and reaches a maximum value at the boundary due to friction between the fluid and the wall. It is the same for all three cases.
  • There is no much visible difference between the symmetry and wedge BCs.
  • With an increase in the angle, the deviation of the numerical solution from the analytical solution increases.

Symmetry vs Wedge vs HP:

The maximum values of velocity and shear stress in all three cases for fully developed flow (x=2.9m) are shown below:

BC `theta` U_numerical U_analytical tau_numerical tau_analytical
10 0.208229 0.21 0.0408656 0.0418192
Wedge 25 0.208370 0.21 0.0411061 0.0418192
45 0.208661 0.21 0.0439934 0.0418192
10 0.208229 0.21 0.0408656 0.0418192
Symmetry 25 0.208370 0.21 0.0411061 0.0418192
45 0.208661 0.21 0.0439934 0.0418192
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.