Challenge

Week 12 - Symmetry vs Wedge vs HP equation

Objective: In this we simulate the sector of pipe for different wedge angle thetha=10,25,45 in accordance to hagen poisuelles flow conditions with symmetry boundary condition and compare with the results obtained by different wedge angles.

Hagen poiseuilles's flow equations:

Hagen poiseuille's flow is a physical law that gives the pressure drop in an incompressible and newtonian fluid. And the velocity profile for the flow through a pipe in this case. Assumptions are made in deriving the hagen poiseuilies equation regarding the dimension that the length of the pipe is much larger than its diameter (L>>D). An average velocity is calculated across the flow which is used to calculate the maximum velocity.

we derive the flow of viscous fluid through a circular pipe to find

  • velocity distribution across the section
  • maximum velocity
  • average velocity
  • ratio of maximum velocity to average velocity
  • pressure drop in the pipe `Deltap=(32muoverlineuL)/(D^2)`
  • the shear stress distruibution

consider a pipe of length L =3 metres and diameter D=0.02metres .Dynamic viscosity of water `mu`=0.00091Ns/m^2 . The reynolds number is taken as 2100. Instead of taking the whole pipe we take a small sector of pipe this is due to the fact that a huge computational load is to be carried out while simulating for the entire pipe and by this we can save time due to axi-symmetry nature.

calculating analytical solution values for fluid flow:

  • Reynolds number: `Re=(rhoVavgD)/(mu)` `implies2100=(1000*Vavg*0.02)/(0.00091)impliesVavg=0.095m/s`
  • Maximum velocity at the centre : `Vmax=2*Vavg implies2*0.095=0.1911m/s`
  • hydrodynamic entrance length : `Le=0.06*Re*D implies0.06*2100*0.02implies2.52m`
  • Total length for profile Lt=3m
  • pressure drop across the pipe from Hp eqns : `Deltap=(32muVavgL)/(D^2)implies(32*0.0091*0.095*3)/(0.02^2)implies20.748kPa`
  • kinematic pressure difference : `DeltaPk=(Deltap)/(rho)=20.748/1000=0.020748`
  • velocity profile at any location wrt to radial direction: `u(r)=2Vavg(1-(r^2)/(R^2))`
  • kinematic viscosity `nu=mu/rho implies0.00091/1000implies0.00000091 m^2/s`

BlockmeshDict text file for thetha =10 degress:

clear all
close all
clc

%blockmesh file
Re=2100;
rho=1000;%kg/m^3
nu= 0.00091;%dynamic viscosity kine=dyna/rho
D=0.02;
r=D/2;
L_e = 0.06*Re*D;
L=3;
%hp eqns
v_avg = (r*nu)/(rho*D);
v_max = 2*v_avg;
dp = (32*nu*v_avg*L)/(D^2);%hagen poiseulles pressure drop
kinematic_p= dp/(rho);

th=10;
%meshing
mx=200;
my=40;
mz=1;
fx=1;%grading factor f
fy=0.2;
fz=1;

%vertices
v0=[0 0 0];
v1=[0 r*cosd(th/2) r*sind(th/2)];
v2=[0 r*cosd(th/2) -r*sind(th/2)];
v3=[3 0 0];
v4=[3 r*cosd(th/2) r*sind(th/2)];
v5=[3 r*cosd(th/2) -r*sind(th/2)];

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='\*---------------------------------------------------------------------------*/'
header8='FoamFile'
header9='{'
header11='version 	2.0;'
header12='format  	ascii;'
header13='class   	dictionary;'
header14='object  	blockMeshDict;'
header15='}'
header16='// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //'


f1=fopen('blockMeshDict','w')
fprintf(f1,'%sn',header1)
fprintf(f1,'%sn',header2)
fprintf(f1,'%sn',header3)
fprintf(f1,'%sn',header4)
fprintf(f1,'%sn',header5)
fprintf(f1,'%sn',header6)
fprintf(f1,'%sn',header7)
fprintf(f1,'%sn',header8)
fprintf(f1,'%sn',header9)
fprintf(f1,'%sn',header11)
fprintf(f1,'%sn',header12)
fprintf(f1,'%sn',header13)
fprintf(f1,'%sn',header14)
fprintf(f1,'%sn',header15)
fprintf(f1,'%sn',header16)

fprintf(f1,'convertToMeters 1;nn')

fprintf(f1,'verticesn')
fprintf(f1,'(n')
fprintf(f1,'t (%d %d %d)n',0,0,0)
fprintf(f1,'t (%d %d %d)n',0,r*cosd(th/2),r*sind(th/2))
fprintf(f1,'t (%d %d %d)n',0,r*cosd(th/2),-r*sind(th/2))
fprintf(f1,'t (%d %d %d)n',3,0,0)
fprintf(f1,'t (%d %d %d)n',3,r*cosd(th/2),r*sind(th/2))
fprintf(f1,'t (%d %d %d)n',3,r*cosd(th/2),-r*sind(th/2))
fprintf(f1,');nn')

fprintf(f1,'blocksn')
fprintf(f1,'(n')
fprintf(f1,'t hex (0 3 5 2 0 3 4 1) (200 40 1) simpleGrading (1 0.2 1)')
fprintf(f1,');nn')

fprintf(f1,'edgesn')
fprintf(f1,'(n')
fprintf(f1,'t arc 1 2 (0 0.01000 0)')
fprintf(f1,'t arc 4 5 (3 0.01000 0)')
fprintf(f1,');nn')

fprintf(f1,'boundaryn')
fprintf(f1,'(n')
fprintf(f1,'t inletn')
fprintf(f1,'t {n')
fprintf(f1,'t type patch;')
fprintf(f1,'t facesn')
fprintf(f1,'(n')
fprintf(f1,'(0 1 2 0)')
fprintf(f1,');n')
fprintf(f1,'t }n')

fprintf(f1,'t outletn')
fprintf(f1,'t {n')
fprintf(f1,'t type patch;')
fprintf(f1,'t facesn')
fprintf(f1,'(n')
fprintf(f1,'(3 5 4 3)')
fprintf(f1,');n')
fprintf(f1,'t }n')

fprintf(f1,'t topwalln')
fprintf(f1,'t {n')
fprintf(f1,'t type wall;')
fprintf(f1,'t facesn')
fprintf(f1,'(n')
fprintf(f1,'(1 4 5 2)')
fprintf(f1,');n')
fprintf(f1,'t }n')

fprintf(f1,'t frontn')
fprintf(f1,'t {n')
fprintf(f1,'t type symmetry;')
fprintf(f1,'t facesn')
fprintf(f1,'(n')
fprintf(f1,'(0 2 5 3)')
fprintf(f1,');n')
fprintf(f1,'t }n')

fprintf(f1,'t backn')
fprintf(f1,'t {n')
fprintf(f1,'t type symmetry;')
fprintf(f1,'t facesn')
fprintf(f1,'(n')
fprintf(f1,'(0 3 4 1)')
fprintf(f1,');n')
fprintf(f1,'t }n')

fprintf(f1,'t axisn')
fprintf(f1,'t {n')
fprintf(f1,'t type empty;')
fprintf(f1,'t facesn')
fprintf(f1,'(n')
fprintf(f1,'(0 3 3 0)')
fprintf(f1,');n')
fprintf(f1,'t }n')
fprintf(f1,');n')


fprintf(f1,'mergePatchPairs')
fprintf(f1,'t {n')
fprintf(f1,');nn')
fprintf(f1,'header16')

fclose(f1)


BlockmeshDict text file for thetha =25 degress:

clear all
close all
clc

%blockmesh file
Re=2100;
rho=1000;%kg/m^3
nu= 0.00091;%dynamic viscosity kine=dyna/rho
D=0.02;
r=D/2;
L_e = 0.06*Re*D;
L=3;
%hp eqns
v_avg = (r*nu)/(rho*D);
v_max = 2*v_avg;
dp = (32*nu*v_avg*L)/(D^2);%hagen poiseulles pressure drop
kinematic_p= dp/(rho);

th=25;
%meshing
mx=200;
my=40;
mz=1;
fx=1;%grading factor f
fy=0.2;
fz=1;

%vertices
v0=[0 0 0];
v1=[0 r*cosd(th/2) r*sind(th/2)];
v2=[0 r*cosd(th/2) -r*sind(th/2)];
v3=[3 0 0];
v4=[3 r*cosd(th/2) r*sind(th/2)];
v5=[3 r*cosd(th/2) -r*sind(th/2)];

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='\*---------------------------------------------------------------------------*/'
header8='FoamFile'
header9='{'
header11='version 	2.0;'
header12='format  	ascii;'
header13='class   	dictionary;'
header14='object  	blockMeshDict;'
header15='}'
header16='// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //'


f1=fopen('blockMeshDict','w')
fprintf(f1,'%sn',header1)
fprintf(f1,'%sn',header2)
fprintf(f1,'%sn',header3)
fprintf(f1,'%sn',header4)
fprintf(f1,'%sn',header5)
fprintf(f1,'%sn',header6)
fprintf(f1,'%sn',header7)
fprintf(f1,'%sn',header8)
fprintf(f1,'%sn',header9)
fprintf(f1,'%sn',header11)
fprintf(f1,'%sn',header12)
fprintf(f1,'%sn',header13)
fprintf(f1,'%sn',header14)
fprintf(f1,'%sn',header15)
fprintf(f1,'%sn',header16)

fprintf(f1,'convertToMeters 1;nn')

fprintf(f1,'verticesn')
fprintf(f1,'(n')
fprintf(f1,'t (%d %d %d)n',0,0,0)
fprintf(f1,'t (%d %d %d)n',0,r*cosd(th/2),r*sind(th/2))
fprintf(f1,'t (%d %d %d)n',0,r*cosd(th/2),-r*sind(th/2))
fprintf(f1,'t (%d %d %d)n',3,0,0)
fprintf(f1,'t (%d %d %d)n',3,r*cosd(th/2),r*sind(th/2))
fprintf(f1,'t (%d %d %d)n',3,r*cosd(th/2),-r*sind(th/2))
fprintf(f1,');nn')

fprintf(f1,'blocksn')
fprintf(f1,'(n')
fprintf(f1,'t hex (0 3 5 2 0 3 4 1) (200 40 1) simpleGrading (1 0.2 1)')
fprintf(f1,');nn')

fprintf(f1,'edgesn')
fprintf(f1,'(n')
fprintf(f1,'t arc 1 2 (0 0.01000 0)')
fprintf(f1,'t arc 4 5 (3 0.01000 0)')
fprintf(f1,');nn')

fprintf(f1,'boundaryn')
fprintf(f1,'(n')
fprintf(f1,'t inletn')
fprintf(f1,'t {n')
fprintf(f1,'t type patch;')
fprintf(f1,'t facesn')
fprintf(f1,'(n')
fprintf(f1,'(0 1 2 0)')
fprintf(f1,');n')
fprintf(f1,'t }n')

fprintf(f1,'t outletn')
fprintf(f1,'t {n')
fprintf(f1,'t type patch;')
fprintf(f1,'t facesn')
fprintf(f1,'(n')
fprintf(f1,'(3 5 4 3)')
fprintf(f1,');n')
fprintf(f1,'t }n')

fprintf(f1,'t topwalln')
fprintf(f1,'t {n')
fprintf(f1,'t type wall;')
fprintf(f1,'t facesn')
fprintf(f1,'(n')
fprintf(f1,'(1 4 5 2)')
fprintf(f1,');n')
fprintf(f1,'t }n')

fprintf(f1,'t frontn')
fprintf(f1,'t {n')
fprintf(f1,'t type symmetry;')
fprintf(f1,'t facesn')
fprintf(f1,'(n')
fprintf(f1,'(0 2 5 3)')
fprintf(f1,');n')
fprintf(f1,'t }n')

fprintf(f1,'t backn')
fprintf(f1,'t {n')
fprintf(f1,'t type symmetry;')
fprintf(f1,'t facesn')
fprintf(f1,'(n')
fprintf(f1,'(0 3 4 1)')
fprintf(f1,');n')
fprintf(f1,'t }n')

fprintf(f1,'t axisn')
fprintf(f1,'t {n')
fprintf(f1,'t type empty;')
fprintf(f1,'t facesn')
fprintf(f1,'(n')
fprintf(f1,'(0 3 3 0)')
fprintf(f1,');n')
fprintf(f1,'t }n')
fprintf(f1,');n')


fprintf(f1,'mergePatchPairs')
fprintf(f1,'t {n')
fprintf(f1,');nn')
fprintf(f1,'header16')

fclose(f1)


BlockmeshDict text file for thetha =45 degrees:

clear all
close all
clc

%blockmesh file
Re=2100;
rho=1000;%kg/m^3
nu= 0.00091;%dynamic viscosity kine=dyna/rho
D=0.02;
r=D/2;
L_e = 0.06*Re*D;
L=3;
%hp eqns
v_avg = (r*nu)/(rho*D);
v_max = 2*v_avg;
dp = (32*nu*v_avg*L)/(D^2);%hagen poiseulles pressure drop
kinematic_p= dp/(rho);

th=45;
%meshing
mx=200;
my=40;
mz=1;
fx=1;%grading factor f
fy=0.2;
fz=1;

%vertices
v0=[0 0 0];
v1=[0 r*cosd(th/2) r*sind(th/2)];
v2=[0 r*cosd(th/2) -r*sind(th/2)];
v3=[3 0 0];
v4=[3 r*cosd(th/2) r*sind(th/2)];
v5=[3 r*cosd(th/2) -r*sind(th/2)];

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='\*---------------------------------------------------------------------------*/'
header8='FoamFile'
header9='{'
header11='version 	2.0;'
header12='format  	ascii;'
header13='class   	dictionary;'
header14='object  	blockMeshDict;'
header15='}'
header16='// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //'


f1=fopen('blockMeshDict','w')
fprintf(f1,'%sn',header1)
fprintf(f1,'%sn',header2)
fprintf(f1,'%sn',header3)
fprintf(f1,'%sn',header4)
fprintf(f1,'%sn',header5)
fprintf(f1,'%sn',header6)
fprintf(f1,'%sn',header7)
fprintf(f1,'%sn',header8)
fprintf(f1,'%sn',header9)
fprintf(f1,'%sn',header11)
fprintf(f1,'%sn',header12)
fprintf(f1,'%sn',header13)
fprintf(f1,'%sn',header14)
fprintf(f1,'%sn',header15)
fprintf(f1,'%sn',header16)

fprintf(f1,'convertToMeters 1;nn')

fprintf(f1,'verticesn')
fprintf(f1,'(n')
fprintf(f1,'t (%d %d %d)n',0,0,0)
fprintf(f1,'t (%d %d %d)n',0,r*cosd(th/2),r*sind(th/2))
fprintf(f1,'t (%d %d %d)n',0,r*cosd(th/2),-r*sind(th/2))
fprintf(f1,'t (%d %d %d)n',3,0,0)
fprintf(f1,'t (%d %d %d)n',3,r*cosd(th/2),r*sind(th/2))
fprintf(f1,'t (%d %d %d)n',3,r*cosd(th/2),-r*sind(th/2))
fprintf(f1,');nn')

fprintf(f1,'blocksn')
fprintf(f1,'(n')
fprintf(f1,'t hex (0 3 5 2 0 3 4 1) (200 40 1) simpleGrading (1 0.2 1)')
fprintf(f1,');nn')

fprintf(f1,'edgesn')
fprintf(f1,'(n')
fprintf(f1,'t arc 1 2 (0 0.01000 0)')
fprintf(f1,'t arc 4 5 (3 0.01000 0)')
fprintf(f1,');nn')

fprintf(f1,'boundaryn')
fprintf(f1,'(n')
fprintf(f1,'t inletn')
fprintf(f1,'t {n')
fprintf(f1,'t type patch;')
fprintf(f1,'t facesn')
fprintf(f1,'(n')
fprintf(f1,'(0 1 2 0)')
fprintf(f1,');n')
fprintf(f1,'t }n')

fprintf(f1,'t outletn')
fprintf(f1,'t {n')
fprintf(f1,'t type patch;')
fprintf(f1,'t facesn')
fprintf(f1,'(n')
fprintf(f1,'(3 5 4 3)')
fprintf(f1,');n')
fprintf(f1,'t }n')

fprintf(f1,'t topwalln')
fprintf(f1,'t {n')
fprintf(f1,'t type wall;')
fprintf(f1,'t facesn')
fprintf(f1,'(n')
fprintf(f1,'(1 4 5 2)')
fprintf(f1,');n')
fprintf(f1,'t }n')

fprintf(f1,'t frontn')
fprintf(f1,'t {n')
fprintf(f1,'t type symmetry;')
fprintf(f1,'t facesn')
fprintf(f1,'(n')
fprintf(f1,'(0 2 5 3)')
fprintf(f1,');n')
fprintf(f1,'t }n')

fprintf(f1,'t backn')
fprintf(f1,'t {n')
fprintf(f1,'t type symmetry;')
fprintf(f1,'t facesn')
fprintf(f1,'(n')
fprintf(f1,'(0 3 4 1)')
fprintf(f1,');n')
fprintf(f1,'t }n')

fprintf(f1,'t axisn')
fprintf(f1,'t {n')
fprintf(f1,'t type empty;')
fprintf(f1,'t facesn')
fprintf(f1,'(n')
fprintf(f1,'(0 3 3 0)')
fprintf(f1,');n')
fprintf(f1,'t }n')
fprintf(f1,');n')


fprintf(f1,'mergePatchPairs')
fprintf(f1,'t {n')
fprintf(f1,');nn')
fprintf(f1,'header16')

fclose(f1)


BlockmeshDict file in openfoam for thetha=10:

/*--------------------------------*- 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)//v0
    (0 0.009968 0.000872)//v1
    (0 0.009968 -0.000872)//v2
    (3 0 0)//v3
    (3 0.009968 0.000872)//v4
    (3 0.009968 -0.000872)//v5
    
);

blocks
(
    hex (0 3 5 2 0 3 4 1) (200 40 1) simpleGrading (1 0.2 1)
);

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

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

mergePatchPairs
(
);

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

BlockmeshDict file in openfoam for thetha=25;

/*--------------------------------*- 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)//v0
    (0 0.009763 0.002164)//v1
    (0 0.009763 -0.002164)//v2
    (3 0 0)//v3
    (3 0.009763 0.002164)//v4
    (3 0.009763 -0.002164)//v5
    
);

blocks
(
    hex (0 3 5 2 0 3 4 1) (200 40 1) simpleGrading (1 0.2 1)
);

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

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

mergePatchPairs
(
);

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

BlockmeshDict file in openfoam for thetha=45;

/*--------------------------------*- 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)//v0
    (0 0.009239 0.003827)//v1
    (0 0.009239 -0.003827)//v2
    (3 0 0)//v3
    (3 0.009239 0.003827)//v4
    (3 0.009239 -0.003827)//v5
    
);

blocks
(
    hex (0 3 5 2 0 3 4 1) (200 40 1) simpleGrading (1 0.2 1)
);

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

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

mergePatchPairs
(
);

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

Boundary conditions for velocity U and Pressure p:

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

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

    outlet
    {
        type            zeroGradient;
    }

    topwall
    {
        type            noSlip;
    }
    front
    {
        type            symmetry;
    }
    back
    {
        type            symmetry;
    }
    axis
    {
        type            empty;
    }
}

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

pressure p:

/*--------------------------------*- 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;
    }
    
    topwall
    {
        type            zeroGradient;
    }
    
    front
    {
        type            symmetry;
    }
    
    back
    {
        type            symmetry;
    }
    
    axis
    {
        type            empty;
    }
}


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

Transport properties:

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


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

Mesh for wedge angle 10:

mesh for wedge angle 25:

Mesh for wedge angle 45:

Velocity distribution:

for wedge angle 10:

For wedge angle 25:

For wedge angle 45:

shear stress distribution for thetha=10,25,45:

comparison of Results:

thetha Vmax(Hp eqn) Vmax(openfoam) max shear stress
4 (wedge) 0.1911m/s 0.1889m/s(approx) 0.034N/m^2
10 (symmetry) 0.1911m/s 0.1891m/s 0.0340 N/m^2
25 (symmetry) 0.1911m/s 0.1910m/s 0.0347N/m^2
45 (symmetry) 0.1911m/s 0.1911m/s 0.0347N/m^2

Conclusion and inferences:

  • There is a slight increase and decrease in Vmax while comparing the wedge angle 10 and 45.
  • The trend cant be compared but can be seen as the wegde angle increases the Vmax openfoam gives much accurate results.
  • The shear stress distribution is almost the same and the gradient makes a very slightest change to the shear stress from eqn `tau=mu(du)/(dr)`
  • The symmetry gives more accurate results then wedge
  • The computational time is more for symmetry bc when compared to wedge
  • The end time can be reduced in control dict to lessen the iteration and more or less gives similar results.
  • The time span and dx should be kept in mind for CFL condition.
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.