Challenge

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

## blockMeshDict

/*--------------------------------*- C++ -*----------------------------------*
==========  
 \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
  \\    /   O peration     | Version:  2.2.1                                 
   \\  /    A nd           | Web:      www.OpenFOAM.com                      
    \\/     M anipulation  |                                                 
*---------------------------------------------------------------------------*/
FoamFile
{
version     2.0;
format      ascii;
class       dictionary;
object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;

vertices
(
       (0.000000 0.000000 0.000000)
       (0.000000 0.009962 -0.000872)
       (0.000000 0.009962 0.000872)
       (3.220000 0.000000 0.000000)
       (3.220000 0.009962 -0.000872)
       (3.220000 0.009962 0.000872)
);

blocks
(
   hex (0 1 2 0 3 4 5 3)    (50 1 200)   simpleGrading (1 0.1 1)
);

edges
(
    arc 1 2 (0.000000 0.010000 0.000000)
    arc 4 5 (3.220000 0.010000 0.000000)
);

boundary
(
    axis
    {
        type empty;
        faces
        (
            (0 3 3 0)
        );
    }

    inlet
    {
        type patch;
        faces
    (
            (0 1 2 0)
        );
    }
    pipe_surface
    {
        type wall;
        faces
        (
            (1 4 5 2)
        );
    }
    outlet
    {
        type patch;
        faces
    (
            (3 4 5 3)
        );
    }
    front
    {
        type wedge;
        faces
        (
            (0 3 5 2)
        );
    }
    back
    {
        type wedge;
        faces
        (
            (0 1 4 3)
        );
    }
       
);
mergePatchPairs
(
);
//**************************************************************//
## Pressure 

/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  9
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 2 -2 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    axis
    {
        type            empty;
    }
    
    inlet
    {
        type            zeroGradient;
    }
    
    pipe_surface
    {
        type            zeroGradient;
    }
    outlet
    {
       type             fixedValue;
       value            uniform 0;
    }    

    front
    {
        type            wedge;
    }

    back
    {
        type            wedge;
    }
}


// ************************************************************************* //
## Velocity (U)

/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  9
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0.0937 0 0);

boundaryField
{
    inlet
    {
        type            fixedValue;
        value           uniform (0.0937 0 0);
    }
    pipe_surface
    {
        type            fixedValue;
        value           uniform (0 0 0);
        
    }
    
    outlet
    {
        type            zeroGradient;
    }

    front
    {
        type            wedge;
        
    }    
    
    back
    {
        type           wedge;
    }
}

// ************************************************************************* //
## ControlDict

/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2012                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application     icoFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         30;

deltaT          0.01;

writeControl    runTime;

writeInterval   0.5;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;


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

Hagen-Poiseuille's Law

In nonideal fluid dynamics, the Hagen-Poiseuille equation , also known as Hagen-Poiseuille law, is a physical law that gives the pressure drop in an incompressible and Newtonian fluid in laminar flow flowing through a cylindrical pipe of constant cross-section. The pressure drop is given by:

ΔP = 32μLV/D^2

where

ΔP is pressure drop

μ is dynamic viscosity

L is length of the pipe

V is the velocity

At the entrance the flow is said to be in the hydrodynamic entrance region where the velocity profiles gradually takes the shapes of the a parabola from a straight line. As soon as the parabola velcity profile becomes steady the flow is said to be in its fully developed state. Normally, Hagen's Poiseuille's equation is applicable for a fully developed flows which helps us to calculate the pressure loss.

Assumption : -

Geometry - Axisymmetric

Reynold number - 2100

Working fluid - Water

Diameter of pipe - 0.02m

Dynamic viscosity(μ) - 0.89×10^-3 Pas

Kinemetic viscosity(v) - 0.8927×10^-6 m^2/s

theta - 10,25,45

Assumptions -

1. The fluid is Newtonian.

2. No slip at the pipe wall.

3. There is no velocity in the radial direction.

4. Reynolds number for the laminar flow is 2100.

Objectives of the Project :

1. Calculation of flow variables.

2. Generations of blockMeshDict using the wedge boundary condition. create the blockMesgDict file in MATLAB such that the mesh is automatically created for 10,25 & 45 degreebwedge angle for wedge and symmetry conditions.

3. Using the pipeflow in OpenFoam using ICOFOAM solver.

4. Post process the Velocity profile and shear stress and compare the simulation results with analytical results obtained using the Hagen-Poiseuille equation.

Entrance length :

The length of the entrance is the distance that fluid travels after entering a pipe before the full development of the flow.

Hagen poiseuille's Law : In non linear fluid dynamics, Hagen-Poiseuille equation is a physical law that gives pressure drop in an incompressible and newtonian fluid in a laminar flow through a long cylinder pipe of constant cross section.

Average velocity Vavg = Re.mu/(rho*D)

Maximum velocity Vmax = 2*Vavg.

Summary :

Consider a flow entering a pipe. Let us think of the entering flow being uniform . As soon as the flow 'hits' the pipe many changes take place. The most important of these is that viscosity imposes itself on the flow and the 'No slip' condition at the wall of the pipe comes into effect. Consequently the velocity components are each zero on the wall u = v = 0. The flow adjacent to the wall decelearates continuously.The length of the pipe between the start and the point where the fully developed flow begins is called the entrance length.

Methodology -

The icoFoam solver available in OpenFoam has been used. Due to unavailability of a steady state solver for laminar incompressible flow in OpenFoam, icoFoam solver has been used for a time of 50s and a time step size of 0.01.

Procedure -

Firstly, i need to calculate the average velocity of the given fluid. for that i need to give proper inputs of reynolds number, Diameter,Viscosity and Density values.

1. Be carefull with parenthesis like commas,brackets and slash symbols which may leads us to the error.

2. Angles for the wedge has been given in the program such as 10, 25 and 45 degree respectively.

3. Using all these values we calculate average velocity, maximum velocity, pressure difference and kinematic pressure difference. The reason to calculate the kinematic pressure is in the OpenFoam pressure file.

4. The angle theta taken less than 3 degree is because only one line has to pass through the center of the axis of symmetry.

5. By using the file parsing technique, we need to write the matlab code that can be useful to perform the simulations using different angles.

6. After getting the BlackMeshDict file,copy it to the case setup file which is located in the run folder.

7. Like this, change other parameters like velocity,Pressure,and Transport properties file which is obtained from the analytical solution means values obtained from the Matlab Code.

8. Now set the start and end time in the control-dict file, and Mention the delta T value also.

9. Now place the command directory file in the cavity, run the file using command "block-Mesh".

10. The Above command gives us the mesh file.

11. Now check the mesh to see whether any error in mesh, Non-alignment and some other using 'checkMesh' command.

12. Onces the mesh check is over and success. Now use 'icoFoam' solver to run the case setup.

13. After running successfully, Use 'paraFoam' command to post-process the velocity and shear stress of the fluid.

Shear Stress

1. when the fluid is in motion , shear stress are developed due to the particles in the fluid moving relative to one another.

2. For a fluid flowing in a pipe Fluid velocity will be zero at the pipe wall. Velocity will increase while moving towards the center of the pipe. Shear Force is normally present because the adjacent layer of the fluid move with different velocities compared to each other.

3. Fluids obeying Newton law where the value of 'mu' are constant are known as Newtonian fluids. if 'mu'(dynamic viscosity) is constant, the shear stress is linearly dependent on the velocity gradient .

here,

tau = mu(du/dy)

How to make shear stress plot

First of all open openfoam by applying paraviewWindows command in ubuntu terminal.

Then click on calculator tool in order to compute the magnitude of the U vector and provide array name mag(U) inside the calculator box and choose velocity from the vector U and click on apply button, the magnitude of the velocity vector U is computed and applied in the field variable selection box

Computing the gradient for U_magnitude using the 'Gradient' by pressing ctrl+space, the properties change in the window

Clicking on apply button will create a new quantity inside the field variable selection box.

Agian create new calculator in oder to define result array name ..tau and in the calculator window gave value of velocity gradient by clicking on the vectors button on the bottom-right and then multiply that by dynamic viscosity.

Next, i used the varaible tau to store shear stress data.

In final step i was computed the shear stress data for entire domain by creating Plot over line tool located in the common toolbar . so in the properties window put the values of desired direction and update the point location and then click apply and the new pop_up window appears with shear-stress plot

% MATLAB CODE to generate blockMeshDict file for Wedge boundary condition

clear all
close all
clc


%Creating blockMesh file
%assumption made the fluid is assumed as water
%Flow through a pipe
L = 1;
D = 0.02;         % diameter of pipe
R = D/2;          % radius of pipe 
theta= 10;         % wedge angle 10,24 and 45 degree 
nx = 500;
ny = 50;
nz = 1;
Re = 2100;        % Reynold's number for laminar flow
rho = 997    % density of water
D = 0.02      % diameter of the pipe
r = D/2       % radius of the pipe
mu = 0.89×10^-3  %Dynamic viscosity of the water at 25 degree celcius
nu = 0.8927×10^-6 m^2/s  %Kinemetic viscosity of the water at 25 degree celcius


% Anlytical Solution
V_avg = (Re*mu)/(rho*D);        %average velocity
V_max = 2*V_avg;               %maximum velocity
P_drop = (32*mu*L*V_avg)/D^2   %pressure drop
P_kinematic = (P_drop)/rho;    %Kinematic pressure drop
L = 0.06*Re*D;    % hydrodynamic entry length
L_c = L+0.03;     % Characterstics length
rho = 997;        % Denisty of water in kg/m^3
nu = mu/rho;      % Kinematic Viscosity

%finding vertices
%creating blockMeshDict file:
v0 = [0 0 0];
v1 = [0  R*cosd(0.5*theta) -R*sind(0.5*theta)];
v2 = [0  R*cosd(0.5*theta) R*sind(0.5*theta)];
v3 = [L 0 0];
v4 = [L  R*cosd(0.5*theta) -R*sind(0.5*theta)];
v5 = [L  R*cosd(0.5*theta) R*sind(0.5*theta)];


f1 = fopen('blockMeshDict.txt','w');     % creating a text file
fprintf(f1,'%s', '/*--------------------------------*- C++ -*----------------------------------*');
fprintf(f1,'\n');
fprintf(f1,'%s', '==========  ');
fprintf(f1,'\n');
fprintf(f1,'%s', '\\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox');
fprintf(f1,'\n');
fprintf(f1,'%s','  \\    /   O peration     | Version:  2.2.1                                 ');
fprintf(f1,'\n');
fprintf(f1,'%s','   \\  /    A nd           | Web:      www.OpenFOAM.com                      ');
fprintf(f1,'\n');
fprintf(f1,'%s','    \\/     M anipulation  |                                                 ');
fprintf(f1,'\n');
fprintf(f1,'%s','*---------------------------------------------------------------------------*/');
fprintf(f1,'\n');
fprintf(f1,'%s', 'FoamFile');
fprintf(f1,'\n');
fprintf(f1,'%s','{');
fprintf(f1,'\n');
fprintf(f1,'%s',    'version     2.0;');
fprintf(f1,'\n');
fprintf(f1,'%s',    'format      ascii;');
fprintf(f1,'\n');
fprintf(f1,'%s',    'class       dictionary;');
fprintf(f1,'\n');
fprintf(f1,'%s',    'object      blockMeshDict;');
fprintf(f1,'\n');
fprintf(f1,'%s','}');
fprintf(f1,'\n');
fprintf(f1,'%s','// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //');
fprintf(f1,'\n');
fprintf(f1,'\n');
fprintf(f1,'%s', 'convertToMeters 1');
fprintf(f1,'\n');
fprintf(f1,'\n');
fprintf(f1,'vertices');
fprintf(f1,'\n');
fprintf(f1,'(');
fprintf(f1,'\n');
fprintf(f1,'%s', blanks(7),'(');
fprintf(f1,'%f %f %f' ,v0(1),v0(2),v0(3));
fprintf(f1,')');
fprintf(f1,'\n');
fprintf(f1,'%s', blanks(7),'(');
fprintf(f1,'%f %f %f' ,v1(1),v1(2),v1(3));
fprintf(f1,')');
fprintf(f1,'\n');
fprintf(f1,'%s', blanks(7),'(');
fprintf(f1,'%f %f %f' ,v2(1),v2(2),v2(3));
fprintf(f1,')');
fprintf(f1,'\n');
fprintf(f1,'%s', blanks(7),'(');
fprintf(f1,'%f %f %f' ,v3(1),v3(2),v3(3));
fprintf(f1,')');
fprintf(f1,'\n');
fprintf(f1,'%s', blanks(7),'(');
fprintf(f1,'%f %f %f' ,v4(1),v4(2),v4(3));
fprintf(f1,')');
fprintf(f1,'\n');
fprintf(f1,'%s', blanks(7),'(');
fprintf(f1,'%f %f %f' ,v5(1),v5(2),v5(3));
fprintf(f1,')');
fprintf(f1,'\n');
fprintf(f1,');');
fprintf(f1,'\n');
fprintf(f1,'\n');
fprintf(f1,'blocks');
fprintf(f1,'\n');
fprintf(f1,'%s','(');
fprintf(f1,'\n');
fprintf(f1,'%s', blanks(3));
fprintf(f1,'%s','hex (0 1 2 0 3 4 5 3)');
fprintf(f1,'%s', blanks(3));
fprintf(f1,'%s',' (50 1 200)');
fprintf(f1,'%s', blanks(3));
fprintf(f1,'%s','simpleGrading (1 0.1 1)');
fprintf(f1,'\n');
fprintf(f1,');');
fprintf(f1,'\n');
fprintf(f1,'\n');
fprintf(f1,'edges');
fprintf(f1,'\n');
fprintf(f1,'%s', '(');
fprintf(f1,'\n');
fprintf(f1,'%s', blanks(4));
fprintf(f1,'arc 1 2 (');
fprintf(f1,'%f %f %f' ,0,R,0);
fprintf(f1,'%s', ')');
fprintf(f1,'\n');
fprintf(f1,'%s', blanks(4));
fprintf(f1,'arc 4 5 (');
fprintf(f1,'%f %f %f' ,L,R,0);
fprintf(f1,'%s', ')');
fprintf(f1,'\n');
fprintf(f1,'%s', ');');
fprintf(f1,'\n');
fprintf(f1,'\n');
fprintf(f1,'boundary');
fprintf(f1,'\n');
fprintf(f1,'%s','(');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(4),'axis');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(4),'{');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(8),'type empty;');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(8),'faces');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(8),'(');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(12),'(0 3 3 0)');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(8),');');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(4),'}');
fprintf(f1,'\n');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(4),'inlet');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(4),'{');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(8),'type patch;');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(8),'faces');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(4),'(');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(12),'(0 1 2 0)');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(8),');');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(4),'}');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(4),'pipe_surface');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(4),'{');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(8),'type wall;');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(8),'faces');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(8),'(');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(12),'(1 4 5 2)');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(8),');');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(4),'}');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(4),'outlet');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(4),'{');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(8),'type patch;');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(8),'faces');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(4),'(');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(12),'(3 4 5 3)');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(8),');');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(4),'}');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(4),'front');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(4),'{');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(8),'type wedge;');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(8),'faces');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(8),'(');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(12),'(0 3 5 2)');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(8),');');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(4),'}');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(8),'back');
fprintf(f1,'\n');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(4),'{');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(4),'type wedge;');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(8),'faces');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(8),'(');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(12),'(0 1 4 3)');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(8),');');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(4),'}');
fprintf(f1,'\n');
fprintf(f1,'%s',blanks(8),');');
fprintf(f1,'\n');
fprintf(f1,'%s',');');
fprintf(f1,'\n');
fprintf(f1,'\n');
fprintf(f1,'%s','mergePatchPairs');
fprintf(f1,'\n');
fprintf(f1,'%s','(');
fprintf(f1,'\n');
fprintf(f1,'\n');
fprintf(f1,'%s',');');
fprintf(f1,'\n');
fprintf(f1,'%s','//**************************************************************//');
fclose(f1);
# transportProperties

/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2012                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

nu              8.9238e-7;


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

# Symmetry Section

#10 degree#

The maximum velocity obtained from the openfoam is 0.15865 at 0.5 and 0.1768 at 1m and 0.17877 for fully developed region of the pipe, whereas the analytical maximum velocity obtained from matlab is 0.1873,the error is 0.02865 for 0.5m , 0.0105 for 1m and 0.00853 for fully developed region of the pipe.

The pressure drop obtained from the openfoam is 0.00475273 whereas the analytical maximum pressure drop obtained from matlab is 0.0047, the error is 0.00005273 .

The maximum wall shear stress obtained from the openfoam is 0.0330505 whereas the analytical maximum wall shear stress obtained from matlab is 0.0333, the error is 0.0002495 .

#25 degree#

The maximum velocity obtained from the openfoam is 0.15865 at 0.5m, 0.17665 at 1m and 0.1788 for fully developed region of the pipe, whereas the analytical maximum velocity obtained from matlab is 0.1873,the error is 0.02865 for 0.5 m, 0.01065 for 1m and , 0.0085 for fully developed region of the pipe.

The pressure drop obtained from the openfoam is 0.00494248 whereas the analytical maximum pressure drop obtained from matlab is 0.0047, the error is 0.00024248 .

The maximum wall shear stress obtained from the openfoam is 0.0336109 whereas the analytical maximum wall shear stress obtained from matlab is 0.0333, the error is 0.0003109 .

#45 degree#

The maximum velocity obtained from the openfoam is 0.15865 for 0.5 m, 0.1778 at 1m and 0.18125 for fully developed region of the pipe, whereas the analytical maximum velocity obtained from matlab is 0.1873, the error is 0.02865 for 0.5m , 0.0095 for 1m and 0.00605 for fully developed region of the pipe.

The pressure drop obtained from the openfoam is 0.00550494 whereas the analytical maximum pressure drop obtained from matlab is 0.0047, the error is 0.00080494 .

The maximum wall shear stress obtained from the openfoam is 0.0355267 whereas the analytical maximum wall shear stress obtained from matlab is 0.0333, the error is 0.0022267 .

# Wedge Section

#10 degree#

The maximum velocity obtained from the openfoam is 0.15852 at 0.5m , 0.17675 at 1m and 0.18212 for fully developed region of the pipe,whereas the analytical maximum velocity obtained from matlab is 0.1873,the error is 0.02878 for 0.5 m, 0.01055 at 1m and 0.00518 for fully developed region of the pipe.

the pressure drop obtained from the openfoam is 0.00475279 whereas the analytical maximum pressure drop obtained from matlab is 0.0047, the error is 0.00005279 .

the maximum wall shear stress obtained from the openfoam is 0.0330796 whereas the analytical maximum wall shear stress obtained from matlab is 0.0333, the error is 0.0002204 .

#25 degree#

The maximum velocity obtained from the openfoam is 0.15865 at 0.5m, 0.17524 at 1m and 0.18214 for fully developed region of the pipe, whereas the analytical maximum velocity obtained from matlab is 0.1873,the error is 0.02865 for 0.5m , 0.01206 at 1m and 0.00516 for fully developed region of the pipe.

the pressure drop obtained from the openfoam is 0.00493752 whereas the analytical maximum pressure drop obtained from matlab is 0.0047, the error is 0.00023752

the maximum wall shear stress obtained from the openfoam is 0.0337752 whereas the analytical maximum wall shear stress obtained from matlab is 0.0333, the error is 0.0004752

ss obtained from matlab is 0.0333, the error is 0.0002204

#45 degree#

The maximum velocity obtained from the openfoam is 0.15865 at 0.5m, 0.17545 at 1m and 0.18214 at fully developed region of the pipe, whereas the analytical maximum velocity obtained from matlab is 0.1873, the error is 0.02865 at 0.5m , 0.01185 at 1m and 0.00516 at fully developed region of the pipe .

The pressure drop obtained from the openfoam is 0.00550486 whereas the analytical maximum pressure drop obtained from matlab is 0.0047, the error is 0.00080486 .

The maximum wall shear stress obtained from the openfoam is 0.03555 whereas the analytical maximum wall shear stress obtained from matlab is 0.0333, the error is 0.00225 .

So, as i see that by comparing both symmetric and wedge boundary conditions at 25 degree , the error is almost same , but error gets increased with increasing angle from 10 to 25 degrees.

On the other hand by comparing both the results with symmetric and wedge boundary condition at 45 degrees, the error obtained using symmetric boundary condition is less compared with using of wedge boundary condition . but the error keeps on increasing with increasing angle from 25 to 45 degrees. with this we conclude that error in primitive variables increasing with increase in angle.

Differences in both symmetric and Wedge boundary conditions in terms of their usage and application

With the increase of wedge angle, by using of symmetric boundary conditions the error in primitive variables is less compared to using of wedge boundary condition.

The execution time for wedge boundary condition is higher compared to symmetric boundary condition .

So with the increase in wedge angle , the error in in maximum velocity gets decreased in both wedge and symmetric boundary conditions.

To put in a nutshell, i have perfomed simulation for two boundary condition; these are symmtery boundary condition and Wedge boundary condition.

During the Wedge boundary condition simulation, the simulation across the arc of the wedge is not done , but whereas in case of symmetry boundary condition , the calculation across the arc of the wedge is done . Hence, the simulation time is higher in this case . The Courant number is increasing slightly in the case of wedge boundary conditions and hence the symmetry boundary condition will be slightly more accurate . The Symmetry boundary condition considers the mesh as 3D and the calculations is done along all the three global axes.

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.