Challenge

Week 12 - Validation studies of Symmetry BC vs Wedge BC in OpenFOAM vs Analytical H.P equation

AIM- Simulation of Flow through a pipe in OpenFoam.

Angles to test:

  • 10 degree
  • 25 degree
  • 45 degree

Expected Results

  1. Validate Hydro-dynamic length with the numerical result
  2. Validate the fully developed flow velocity profile with its analytical profile
  3. Validate maximum velocity and pressured drop for fully developed flow
  4. Post-process Shear stress and validate wall shear stress for fully developed flow
  5. Highligh the differences in both boundary conditions in terms of their usage and aplication

INPUT PARAMETERS:

reynolds number Re=2000;
total length of the pipe L=2.5;
diameter of pipe D=0.02;

wedge angle in degrees=5 DEGREES
density(kg/m3) rho=997;
dynamic viscocity(pa.sec) mu= 8.90e-4;
radius of pipe R=D/2;


GRID ALONG X=nx=20;
GRID ALONG Y=ny=1;
GRID ALONG Z=nz=500;

LET US GET TO KNOW THE THEORY OF THE Hagen Poiseuille Equation

In nonideal fluid dynamics, the Hagen–Poiseuille equation, also known as the Hagen–Poiseuille law, Poiseuille law or Poiseuille equation, is a physical law that gives the pressure drop in an incompressible and Newtonian fluid in laminar flow flowing through a long cylindrical pipe of constant cross section. It can be successfully applied to air flow in lung alveoli, or the flow through a drinking straw or through a hypodermic needle. It was experimentally derived independently by Jean Léonard Marie Poiseuille in 1838 and Gotthilf Heinrich Ludwig Hagen, and published by Poiseuille in 1840–41 and 1846. The theoretical justification of the Poiseuille law was given by George Stokes in 1845.

The assumptions of the equation are that the fluid is incompressible and Newtonian; the flow is laminar through a pipe of constant circular cross-section that is substantially longer than its diameter; and there is no acceleration of fluid in the pipe. For velocities and pipe diameters above a threshold, actual fluid flow is not laminar but turbulent, leading to larger pressure drops than calculated by the Hagen–Poiseuille equation.

Poiseuille's Equation describes the pressure drop due to the viscosity of the fluid; Other types of pressure drops may still occur in a fluid (see a demonstration here). For example, the pressure needed to drive a viscous fluid up against gravity would contain both that as needed in Poiseuille's Law plus that as needed in Bernoulli's equation, such that any point in the flow would have a pressure greater than zero (otherwise no flow would happen).

Another example is when blood flows into a narrower constriction, its speed will be greater than in a larger diameter (due to continuity of volumetric flow rate), and its pressure will be lower than in a larger diameter (due to Bernoulli's equation). However, the viscosity of blood will cause additional pressure drop along the direction of flow, which is proportional to length traveled(as per Poiseuille's Law). Both effects contribute to the actual pressure drop.

LET US LOOK AT SOME EQUATIONS FROM A REFERENCE BOOK

THESE ARE THE EQUATIONS TO FIND MAX VELOCITY AND PRESUREDROP.

THE FORMULAE FOR SHEAR STRESS IS BELOW.

THE HAND CALCULATION IS ATTACHED BELOW.

10 DEGREE WEDGE ANGLE CALCULATION WITH ERROR ESTIMATION.

25 DEGREE WEDGE ANGLE CALCULATION WITH ERROR ESTIMATION.

45 DEGREE WEDGE ANGLE CALCULATION WITH ERROR ESTIMATION.

NOW LET US SEE HOW WE WROTE THE BLOCKMESHDICT FILE.

WE USE MATLAB TO PERFORM THE SAME.

LET US SEE THE CODE.

%input parameters
%reynolds number
Re=2000;
%total length of the pipe
L=2.5;
%diameter of pipe
D=0.02;
%wedge angle in degrees
th= input('<0> wedge angle in degree - ');
%density(kg/m3)
rho=997;
%dynamic viscocity(pa.sec)
mu= 8.90e-4;
%radius of pipe m
R=D/2;
nx=20;
ny=1;
nz=500;
%GENERATING THE blockMeshDict file using the following function.
result=blockMesh(R,th,L,nx,ny,nz);



%for wedge angel 10degree


%max_velocity
%analytical_max_velocity=amv
%openfoam_max_velocity=omv
amv10=0.178;
omv10=0.177416;
error_velocity10=((amv10-omv10)/amv10)*100

%pressure drop
%analytical_pressure_drop=apd
%openfoam_pressure_drop=opd
apd10=2.53472;
opd10=2.55939;
error_pressuredrop10=abs(((apd10-opd10)/apd10)*100)

%shear stress at wall
%analytical_shearstress=ass
%openfoam_shearstress=oss
ass10=0.031773;
oss10=0.0304361;
error_shearstress10=abs(((ass10-oss10)/ass10)*100)



%for wedge angel 25degree


%max_velocity
%analytical_max_velocity=amv
%openfoam_max_velocity=omv
amv25=0.178;
omv25=0.177416;
error_velocity25=((amv25-omv25)/amv25)*100

%pressure drop
%analytical_pressure_drop=apd
%openfoam_pressure_drop=opd
apd25=2.53472;
opd25=2.66478;
error_pressuredrop25=abs(((apd25-opd25)/apd25)*100)

%shear stress at wall
%analytical_shearstress=ass
%openfoam_shearstress=oss
ass25=0.031773;
oss25=0.0309222;
error_shearstress25=abs(((ass25-oss25)/ass25)*100)



%for wedge angel 45degree


%max_velocity
%analytical_max_velocity=amv
%openfoam_max_velocity=omv
amv45=0.178;
omv45=0.177416;
error_velocity45=((amv25-omv45)/amv45)*100

%pressure drop
%analytical_pressure_drop=apd
%openfoam_pressure_drop=opd
apd45=2.53472;
opd45=2.97563;
error_pressuredrop45=abs(((apd45-opd45)/apd45)*100)

%shear stress at wall
%analytical_shearstress=ass
%openfoam_shearstress=oss
ass45=0.031773;
oss45=0.0326688;
error_shearstress45=abs(((ass45-oss45)/ass45)*100)



NOW LET US TAKE A LOOK AT THE FUNCTION.

HERE FIRST WE ARE GENERATING FOR 10 DEGREE 25 DEGREE AND 45 DEGREE WEDGE SHAPED CRITERIA.

THESE ANGELS WILL BE ASKED WHEN WE RUN THE MATLAB PROGRAM AND THE BLOCKMESH FILE WILL BE GENERATED.

%generation of blockMeshDict file

function[f1]=blockMesh(R,th,L,nx,ny,nz)

f1=fopen('blockMeshDict','w');
fprintf(f1,'/--------------------------------- C++ -----------------------------------/n');
fprintf(f1,'=========                 | n');
fprintf(f1,'\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox n');
fprintf(f1,' \    /   O peration     | Website:  https://openfoam.org n');
fprintf(f1,'  \  /    A nd           | Version:  8 n');
fprintf(f1,'   \/     M anipulation  | n');
fprintf(f1,'*---------------------------------------------------------------------------*/ n');

fprintf(f1,'         n');

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

fprintf(f1,'         n');
fprintf(f1,'convertToMeters 1; n');
fprintf(f1,'         n');

fprintf(f1,'vertices n');
%inputing the coordinated sof the wedge shaped pipe,
fprintf(f1,' ( n');
fprintf(f1,'   (0 0 0) n');
fprintf(f1,'   (%f %f 0)n',R*cosd(th/2),R*sind(th/2));
fprintf(f1,'   (%f %f %f)n',R*cosd(th/2),R*sind(th/2),L);
fprintf(f1,'   (0 0 %f)n',L);
fprintf(f1,'   (%f %f 0)n',R*cosd(th/2),-R*sind(th/2));
fprintf(f1,'   (%f %f %f)n',R*cosd(th/2),-R*sind(th/2),L);
fprintf(f1,' ); n');


fprintf(f1,'         n');
fprintf(f1,'         n');


%defining the blocks
fprintf(f1,'blocks n');
fprintf(f1,' ( n');
fprintf(f1,'   hex (0 4 1 0 3 5 2 3) (%d %d %d) simpleGrading (0.2 1 1) n',nx,ny,nz);
fprintf(f1,' ); n');

fprintf(f1,'         n');

fprintf(f1,'edges n');
fprintf(f1,' ( n');
fprintf(f1,'    arc 4 1 (0 %f 0) n',R);
fprintf(f1,'    arc 5 2 (%f %f 0) n',L,R);
fprintf(f1,'  ); n');

fprintf(f1,'         n');

fprintf(f1,'boundary n');
fprintf(f1,'( n');
fprintf(f1,'   inlet n');
fprintf(f1,'    { n');
fprintf(f1,'     type patch; n');
fprintf(f1,'     faces n');
fprintf(f1,'       ( n');
fprintf(f1,'       (0 4 1 0) n');
fprintf(f1,'       ); n');
fprintf(f1,'    } n');

fprintf(f1,'         n');

fprintf(f1,'   outlet n');
fprintf(f1,'   { n');
fprintf(f1,'      type patch; n');
fprintf(f1,'      faces n');
fprintf(f1,'        ( n');
fprintf(f1,'        (3 5 2 3) n');
fprintf(f1,'        ); n');
fprintf(f1,'   } n');

fprintf(f1,'         n');

fprintf(f1,'   front n');
fprintf(f1,'   { n');
fprintf(f1,'          type wedge; n');
fprintf(f1,'          faces n');
fprintf(f1,'            ( n');
fprintf(f1,'             (0 1 2 3) n');
fprintf(f1,'             ); n');
fprintf(f1,'   } n');

fprintf(f1,'         n');

fprintf(f1,'   back n');
fprintf(f1,'   { n');
fprintf(f1,'          type wedge; n');
fprintf(f1,'          faces n');
fprintf(f1,'          ( n');
fprintf(f1,'          (0 3 5 4) n');
fprintf(f1,'          ); n');
fprintf(f1,'   } n');

fprintf(f1,'         n');

fprintf(f1,'   pipewall n');
fprintf(f1,'   { n');
fprintf(f1,'           type wall; n');
fprintf(f1,'           faces n');
fprintf(f1,'             ( n');
fprintf(f1,'             (1 4 5 2) n');
fprintf(f1,'              ); n');
fprintf(f1,'   } n');

fprintf(f1,'         n');

fprintf(f1,'   axis n');
fprintf(f1,'   { n');
fprintf(f1,'           type empty; n');
fprintf(f1,'           faces n');
fprintf(f1,'               ( n');
fprintf(f1,'               (0 3 3 0) n');
fprintf(f1,'                ); n');
fprintf(f1,'   } n');
fprintf(f1,'); n');

fprintf(f1,'         n');

%marging all the boundaries
fprintf(f1,' mergePatchPairs  n');
fprintf(f1,'( n');
fprintf(f1,'); n');

fprintf(f1,'         n');


fprintf(f1,'  // ************************************************************************* // n');



end

IN OPENFOAM THE BLOCKMESH DICT FILE FOR 10 DEGREE LOOKS AS FOLLOWS.

/--------------------------------- 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.009962 0.000872 0)
   (0.009962 0.000872 2.500000)
   (0 0 2.500000)
   (0.009962 -0.000872 0)
   (0.009962 -0.000872 2.500000)
 ); 
         
         
blocks 
 ( 
   hex (0 4 1 0 3 5 2 3) (20 1 500) simpleGrading (0.2 1 1) 
 ); 
         
edges 
 ( 
    arc 4 1 (0 0.010000 0) 
    arc 5 2 (2.500000 0.010000 0) 
  ); 
         
boundary 
( 
   inlet 
    { 
     type patch; 
     faces 
       ( 
       (0 4 1 0) 
       ); 
    } 
         
   outlet 
   { 
      type patch; 
      faces 
        ( 
        (3 5 2 3) 
        ); 
   } 
         
   front 
   { 
          type wedge; 
          faces 
            ( 
             (0 1 2 3) 
             ); 
   } 
         
   back 
   { 
          type wedge; 
          faces 
          ( 
          (0 3 5 4) 
          ); 
   } 
         
   pipewall 
   { 
           type wall; 
           faces 
             ( 
             (1 4 5 2) 
              ); 
   } 
         
   axis 
   { 
           type empty; 
           faces 
               ( 
               (0 3 3 0) 
                ); 
   } 
); 
         
 mergePatchPairs  
( 
); 
         
  // ************************************************************************* // 

IN OPENFOAM THE BLOCKMESH DICT FILE FOR 25 DEGREE LOOKS AS FOLLOWS.

/--------------------------------- 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.009763 0.002164 0)
   (0.009763 0.002164 2.500000)
   (0 0 2.500000)
   (0.009763 -0.002164 0)
   (0.009763 -0.002164 2.500000)
 ); 
         
         
blocks 
 ( 
   hex (0 4 1 0 3 5 2 3) (20 1 500) simpleGrading (0.2 1 1) 
 ); 
         
edges 
 ( 
    arc 4 1 (0 0.010000 0) 
    arc 5 2 (2.500000 0.010000 0) 
  ); 
         
boundary 
( 
   inlet 
    { 
     type patch; 
     faces 
       ( 
       (0 4 1 0) 
       ); 
    } 
         
   outlet 
   { 
      type patch; 
      faces 
        ( 
        (3 5 2 3) 
        ); 
   } 
         
   front 
   { 
          type wedge; 
          faces 
            ( 
             (0 1 2 3) 
             ); 
   } 
         
   back 
   { 
          type wedge; 
          faces 
          ( 
          (0 3 5 4) 
          ); 
   } 
         
   pipewall 
   { 
           type wall; 
           faces 
             ( 
             (1 4 5 2) 
              ); 
   } 
         
   axis 
   { 
           type empty; 
           faces 
               ( 
               (0 3 3 0) 
                ); 
   } 
); 
         
 mergePatchPairs  
( 
); 
         
  // ************************************************************************* // 

IN OPENFOAM THE BLOCKMESH DICT FILE FOR 45 DEGREE LOOKS AS FOLLOWS.

/--------------------------------- 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.009239 0.003827 0)
   (0.009239 0.003827 2.500000)
   (0 0 2.500000)
   (0.009239 -0.003827 0)
   (0.009239 -0.003827 2.500000)
 ); 
         
         
blocks 
 ( 
   hex (0 4 1 0 3 5 2 3) (20 1 500) simpleGrading (0.2 1 1) 
 ); 
         
edges 
 ( 
    arc 4 1 (0 0.010000 0) 
    arc 5 2 (2.500000 0.010000 0) 
  ); 
         
boundary 
( 
   inlet 
    { 
     type patch; 
     faces 
       ( 
       (0 4 1 0) 
       ); 
    } 
         
   outlet 
   { 
      type patch; 
      faces 
        ( 
        (3 5 2 3) 
        ); 
   } 
         
   front 
   { 
          type wedge; 
          faces 
            ( 
             (0 1 2 3) 
             ); 
   } 
         
   back 
   { 
          type wedge; 
          faces 
          ( 
          (0 3 5 4) 
          ); 
   } 
         
   pipewall 
   { 
           type wall; 
           faces 
             ( 
             (1 4 5 2) 
              ); 
   } 
         
   axis 
   { 
           type empty; 
           faces 
               ( 
               (0 3 3 0) 
                ); 
   } 
); 
         
 mergePatchPairs  
( 
); 
         
  // ************************************************************************* // 

THE CONTROLDICT C++ FILE WILL LOOK AS FOLLOWS.IT CONTAINS ALL THE ITERATIVE PARAMETERS. THESE FILES ARE SAME FOR ALL ANGLE TYPES

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

deltaT          0.0001;

writeControl    timeStep;

writeInterval   1000;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;


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

THE TRANSPORT PROPERTIES CONTAIN THE VALUE OF nu WHICH IS 8.90Ee-4

THE MESH FOR 10 DEGREE WEDGE LOOKS LIKE BELOW.

THE MESH FOR 25 DEGREE WEDGE LOOKS LIKE BELOW.

THE MESH FOR 45 DEGREE WEDGE LOOKS LIKE BELOW.

NOW LET US TAKE A LOOT AT THE DIFFERENT PROFILES fFOR 10 DEGREE WEDGE ANGLE

1.MAX VELOCITY GRAPH.

2.PRESSURE DROP AT 0.4M OF THE PIPE

3.SHEAR STRESS GRAPH AT WALL OF PIPE AT 0.01M FROM CENTER

NOW LET US TAKE A LOOT AT THE DIFFERENT PROFILES fFOR 25 DEGREE WEDGE ANGLE

1.MAX VELOCITY GRAPH.

2.PRESSURE DROP AT 0.4M OF THE PIPE

3.SHEAR STRESS GRAPH AT WALL OF PIPE AT 0.01M FROM CENTER

NOW LET US TAKE A LOOT AT THE DIFFERENT PROFILES fFOR 45 DEGREE WEDGE ANGLE

1.MAX VELOCITY GRAPH.

2.PRESSURE DROP AT 0.4M OF THE PIPE

3.SHEAR STRESS GRAPH AT WALL OF PIPE AT 0.01M FROM CENTER

THUS WE HAVE SUCCESSFILLY FINISHED THE SIMULATION FOR 10 25 AND 45 DEGREE WEDGE SHAPED PIPE.

NOW LET US SEE HOW WE TURN THE WEDGE TO SYMETRIC SHAPED.

WITH SMALL MODIFICATION IN THE MATLAB FUNCTION CODE WE CAN ACHIEVE THE BELOW RESULT,

FOR 10 DEGREE THE BLOCKMESHDICT FILE IS AS FOLLOWS:-

/*--------------------------------*- 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.009962 0.000872 0)
   (0.009962 0.000872 2.500000)
   (0 0 2.500000)
   (0.009962 -0.000872 0)
   (0.009962 -0.000872 2.500000)
 ); 
      
         
         
blocks 
 ( 
   hex (0 4 1 0 3 5 2 3) (20 1 500) simpleGrading (0.2 1 1) 
 ); 
         
edges 
 ( 
    arc 4 1 (0 0.010000 0) 
    arc 5 2 (2.500000 0.010000 0) 
  ); 
         
boundary 
( 
   inlet 
    { 
     type patch; 
     faces 
       ( 
       (0 4 1 0) 
       ); 
    } 
         
   outlet 
   { 
      type patch; 
      faces 
        ( 
        (3 5 2 3) 
        ); 
   } 
         
   front 
   { 
          type symmetry; 
          faces 
            ( 
             (0 1 2 3) 
             ); 
   } 
         
   back 
   { 
          type symmetry; 
          faces 
          ( 
          (0 3 5 4) 
          ); 
   } 
         
   pipewall 
   { 
           type wall; 
           faces 
             ( 
             (1 4 5 2) 
              ); 
   } 
         
   axis 
   { 
           type empty; 
           faces 
               ( 
               (0 3 3 0) 
                ); 
   } 
); 
         
 mergePatchPairs  
(
); 
         
  // ************************************************************************* // 

FOR 25 DEGREE THE BLOCKMESHDICT FILE IS AS FOLLOWS:-

/*--------------------------------*- 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.009763 0.002164 0)
   (0.009763 0.002164 2.500000)
   (0 0 2.500000)
   (0.009763 -0.002164 0)
   (0.009763 -0.002164 2.500000)
 ); 
         
         
blocks 
 ( 
   hex (0 4 1 0 3 5 2 3) (20 1 500) simpleGrading (0.2 1 1) 
 ); 
         
edges 
 ( 
    arc 4 1 (0 0.010000 0) 
    arc 5 2 (2.500000 0.010000 0) 
  ); 
         
boundary 
( 
   inlet 
    { 
     type patch; 
     faces 
       ( 
       (0 4 1 0) 
       ); 
    } 
         
   outlet 
   { 
      type patch; 
      faces 
        ( 
        (3 5 2 3) 
        ); 
   } 
         
   front 
   { 
          type symmetry; 
          faces 
            ( 
             (0 1 2 3) 
             ); 
   } 
         
   back 
   { 
          type symmetry; 
          faces 
          ( 
          (0 3 5 4) 
          ); 
   } 
         
   pipewall 
   { 
           type wall; 
           faces 
             ( 
             (1 4 5 2) 
              ); 
   } 
         
   axis 
   { 
           type empty; 
           faces 
               ( 
               (0 3 3 0) 
                ); 
   } 
); 
         
 mergePatchPairs  
(
); 
         
  // ************************************************************************* // 

FOR 45 DEGREE THE BLOCKMESHDICT FILE IS AS FOLLOWS:-

/*--------------------------------*- 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.009239 0.003827 0)
   (0.009239 0.003827 2.500000)
   (0 0 2.500000)
   (0.009239 -0.003827 0)
   (0.009239 -0.003827 2.500000)
 );         
 
         
         
blocks 
 ( 
   hex (0 4 1 0 3 5 2 3) (20 1 500) simpleGrading (0.2 1 1) 
 ); 
         
edges 
 ( 
    arc 4 1 (0 0.010000 0) 
    arc 5 2 (2.500000 0.010000 0) 
  ); 
         
boundary 
( 
   inlet 
    { 
     type patch; 
     faces 
       ( 
       (0 4 1 0) 
       ); 
    } 
         
   outlet 
   { 
      type patch; 
      faces 
        ( 
        (3 5 2 3) 
        ); 
   } 
         
   front 
   { 
          type symmetry; 
          faces 
            ( 
             (0 1 2 3) 
             ); 
   } 
         
   back 
   { 
          type symmetry; 
          faces 
          ( 
          (0 3 5 4) 
          ); 
   } 
         
   pipewall 
   { 
           type wall; 
           faces 
             ( 
             (1 4 5 2) 
              ); 
   } 
         
   axis 
   { 
           type empty; 
           faces 
               ( 
               (0 3 3 0) 
                ); 
   } 
); 
         
 mergePatchPairs  
(
); 
         
  // ************************************************************************* // 

THE PRESSURE AND VELOCITY FILE ALSO CHANGES A BIT.

THE PRESURE FILE INITIAL CONDITION IS BELOW.

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

    front
    {
        type            symmetry;
    }
    
    back
    {
        type            symmetry;
    }
    
     axis
    {
        type            empty;
    }
    
    pipewall
    {
        type            zeroGradient;
    }   
}

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

THE VELOCITY INITIAL CONDITION ARE AS BELOW.

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

    outlet
    {
         type            zeroGradient;
    }

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


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

THE CONTROL DICT AND TRANSPORT PROPERTIES ARE SAME AS BEFORE IN CASE OF WEDGE SHAPE.

THE RESULTS BETWEEN THE SYMETRIC AND WEDGE SHAPED IS EXPLAINED BELOW IN FORM OF EXCEL FILE.

COMPARISON OF 10 DEGEREE WEDGE AND SYMMETRY

COMPARISON OF 25 DEGEREE WEDGE AND SYMMETRY

COMPARISON OF 45 DEGEREE WEDGE AND SYMMETRY

SO LET US FINALLY DISCUSS HOW WE PLOT SHEAR STRESS.

THE STEPS ARE AS FOLLOWS.

CONCLUSION

1. THE SYMMETRIC SHAPE TAKES MORE TIME WRT WEDGE SHAPED.

2. THE ACCURACY OF RESULT INCREASES FOR THE SYMMETRIC SHAPE.

3. THE COURANT NUMBER INCREASES AS THE WEDGE ANGLE INCREASE.

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.