Challenge

Week 12 - Symmetry vs Wedge vs HP equation

Aim:

To compare the symmetry boundary condition vs Wedge boundary condition vs Hagen poiseuille's equation and obtain the comparing for angles of 10, 25, 45 degrees.

Procedure:

To compare the boundary condition first we need the get the analytical results from the Hagen Poiseuille's Equation. After that, we need to write the blockMesh files for both the conditions. After that, we need to do some test run for the angles given. Once we get the results from the simulation we need to compare with the Analytical Solution to the problem.

Hagen Poiseuille's law:

The physical law that gives the pressure drop in the incompressible and Newtonian fluid in a laminar flow through a long pipe having the same cross-section.

Average Velocity `V_(avg)=(Re*mu)/(rho*D)`

Maximum Velocity`V_(max)=2*V_(avg)`

Pressure difference `DeltaP=(8*mu*L*V_(avg))/(r^2)`

Kinematic pressure difference `DeltaP_k=(DeltaP)/rho`

Description Value Units
Diameter 30 mm
Radius 15 mm
Dynamic Viscosity 0.0010022 `(Ns)/m^2`
Density 998.21 `(kg)/m^3`
Reynolds Number 2100
Length 3.78 m
Total length (Assumed to get the fully develop flow) 4 m
Pressure drop`(DeltaP)` 10.64345 Pa
Average Velocity 0.07028 `m/s`
Kinematics pressure 0.0106625 `m^2/s^2`

After getting the necessary value for the equation, we need to write the file parsing file in the Matlab/Octave with the Boundary condition of the WEDGE and SYMMETRY. For the following, the angles are 10, 25, and 45 to obtain the results accordingly and to compare the obtained results. Pressure and Velocity files are same as previous challenge. Only difference in this challenge is to change the Boundary Conditions.

File parsing file for SYMMETRY condition

clear all
close all
clc
theta=input("enter theta=");
%if(theta<=5)
%Write Grading factor
GF_x=input("enter x grading factor=");
GF_y=input("enter y grading factor=");
GF_z=input("enter z grading factor=");
R=0.015; %Diameter=0.03m
L=4.0;

%Calculating the vertex of the prism
V_0=[0 0 0];
V_1=[R*cosd(theta/2) -R*sind(theta/2) 0];
V_2=[R*cosd(theta/2) R*sind(theta/2) 0];
V_3=[0 0 L];
V_4=[R*cosd(theta/2) -R*sind(theta/2) L];
V_5=[R*cosd(theta/2) R*sind(theta/2) L];

%FILES PARSHING STARTS:
f1=fopen('blockFoam.txt','w');
head1='/*--------------------------------*- C++ -*----------------------------------*'; 
head2='| =========                 |                                                |'; 
head3='| \      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |'; 
head4='|  \    /   O peration     | Website:  https://openfoam.org                  |'; 
head5='|   \  /    A nd           | Version:  7                                     |'; 
head6='|    \/     M anipulation  |                                                 |'; 
head7='*---------------------------------------------------------------------------*/'; 

head8='FoamFile'; 

head9='{'; 
head10='version     2.0;'; 
head11='format      ascii;';
head12='class       dictionary; ';
head13='object      blockMeshDict;'; 
head14='}'; 
head15='// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //'; 
fprintf(f1,'%s \n',head1);
fprintf(f1,'%s \n',head2);
fprintf(f1,'%s \n',head3);
fprintf(f1,'%s \n',head4);
fprintf(f1,'%s \n',head5);
fprintf(f1,'%s \n',head6);
fprintf(f1,'%s \n',head7);
fprintf(f1,'%s \n',head8);
fprintf(f1,'%s \n',head9);
fprintf(f1,'%s \n',head10);
fprintf(f1,'%s \n',head11);
fprintf(f1,'%s \n',head12);
fprintf(f1,'%s \n',head13);
fprintf(f1,'%s \n',head14);
fprintf(f1,'%s \n',head15);
fprintf(f1,'\n');
fprintf(f1,'%s \n','convertToMetres 1;');
fprintf(f1,'\n');


%Vertices
fprintf(f1,'%s \n','vertices');
fprintf(f1,'%s \n','(');
fprintf(f1,'\t(%d %d %d)\n',V_0(1),V_0(2),V_0(3));
fprintf(f1,'\t(%2.7f %2.7f %f)\n',V_1(1),V_1(2),V_1(3));
fprintf(f1,'\t(%2.7f %2.7f %f)\n',V_2(1),V_2(2),V_2(3));
fprintf(f1,'\t(%d %d %f)\n',V_3(1),V_3(2),V_3(3));
fprintf(f1,'\t(%2.7f %2.7f %f)\n',V_4(1),V_4(2),V_4(3));
fprintf(f1,'\t(%2.7f %2.7f %f)\n',V_5(1),V_5(2),V_5(3));
fprintf(f1,'%s \n',');');
fprintf(f1,'\n');
fprintf(f1,'blocks \n');
fprintf(f1,'( \n');
fprintf(f1,'\t hex (0 1 2 0 3 4 5 3) (90 1 300) simpleGrading (%d %d %d)\n',GF_x,GF_y,GF_z);
fprintf(f1,'%s \n',');');
fprintf(f1,'\n');
 

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


%boundary
fprintf(f1,'\n');
fprintf(f1,'%s \n','boundary');
fprintf(f1,'%s \n','(');
%inlet
fprintf(f1,'\t%s \n','inlet');
fprintf(f1,'\t%s \n','{');
fprintf(f1,'\t\t%s\n','type patch;');
fprintf(f1,'\t\t%s\n','faces');
fprintf(f1,'\t\t%s\n','(');
fprintf(f1,'\t\t\t(0 2 1 0)\n');
fprintf(f1,'\t\t%s \n',');');
fprintf(f1,'\t%s\n','}');
fprintf(f1,'\n');
%Outlet
fprintf(f1,'\t%s \n','outlet');
fprintf(f1,'\t%s \n','{');
fprintf(f1,'\t\t%s\n','type patch;');
fprintf(f1,'\t\t%s\n','faces');
fprintf(f1,'\t\t%s\n','(');
fprintf(f1,'\t\t\t(3 5 4 3)\n');
fprintf(f1,'\t\t%s \n',');');
fprintf(f1,'\t%s\n','}');
fprintf(f1,'\n');
%AXIS
fprintf(f1,'\t%s \n','axis');
fprintf(f1,'\t%s \n','{');
fprintf(f1,'\t\t%s\n','type empty;');
fprintf(f1,'\t\t%s\n','faces');
fprintf(f1,'\t\t%s\n','(');
fprintf(f1,'\t\t\t(0 3 3 0)\n');
fprintf(f1,'\t\t%s \n',');');
fprintf(f1,'\t%s\n','}');
fprintf(f1,'\n');
%Front
fprintf(f1,'\t%s \n','front');
fprintf(f1,'\t%s \n','{');
fprintf(f1,'\t\t%s\n','type symmetry;');
fprintf(f1,'\t\t%s\n','faces');
fprintf(f1,'\t\t%s\n','(');
fprintf(f1,'\t\t\t(5 2 0 3)\n');
fprintf(f1,'\t\t%s \n',');');
fprintf(f1,'\t%s\n','}');
fprintf(f1,'\n');
%back
fprintf(f1,'\t%s \n','back');
fprintf(f1,'\t%s \n','{');
fprintf(f1,'\t\t%s\n','type symmetry;');
fprintf(f1,'\t\t%s\n','faces');
fprintf(f1,'\t\t%s\n','(');
fprintf(f1,'\t\t\t(0 1 4 3)\n');
fprintf(f1,'\t\t%s \n',');');
fprintf(f1,'\t%s\n','}');
fprintf(f1,'\n');
%Tankwell
fprintf(f1,'\t%s \n','Noslipwall');
fprintf(f1,'\t%s \n','{');
fprintf(f1,'\t\t%s\n','type wall;');
fprintf(f1,'\t\t%s\n','faces');
fprintf(f1,'\t\t%s\n','(');
fprintf(f1,'\t\t\t(5 2 1 4)\n');
fprintf(f1,'\t\t%s \n',');');
fprintf(f1,'\t%s\n','}');
fprintf(f1,'\n');
%%%%%%%%%end%%%%%%%%%%
fprintf(f1,'%s\n',');');
fprintf(f1,'mergePatchPairs\n');
fprintf(f1,'( \n');
fprintf(f1,');\n');
l1='//*******************************************************************************//';
fprintf(f1,'%s \n',l1);
fclose(f1);
%else
%fprintf('enter value is not valid');

%end

File parsing for the WEDGE condition:

clear all
close all
clc
theta=input("enter theta=");
%if(theta<=5)
%Write Grading factor
GF_x=input("enter x grading factor=");
GF_y=input("enter y grading factor=");
GF_z=input("enter z grading factor=");
R=0.015; %Diameter=0.03m
L=4.0;

%Calculating the vertex of the prism
V_0=[0 0 0];
V_1=[R*cosd(theta/2) -R*sind(theta/2) 0];
V_2=[R*cosd(theta/2) R*sind(theta/2) 0];
V_3=[0 0 L];
V_4=[R*cosd(theta/2) -R*sind(theta/2) L];
V_5=[R*cosd(theta/2) R*sind(theta/2) L];

%FILES PARSHING STARTS:
f1=fopen('blockFoam.txt','w');
head1='/*--------------------------------*- C++ -*----------------------------------*'; 
head2='| =========                 |                                                |'; 
head3='| \      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |'; 
head4='|  \    /   O peration     | Website:  https://openfoam.org                  |'; 
head5='|   \  /    A nd           | Version:  7                                     |'; 
head6='|    \/     M anipulation  |                                                 |'; 
head7='*---------------------------------------------------------------------------*/'; 

head8='FoamFile'; 

head9='{'; 
head10='version     2.0;'; 
head11='format      ascii;';
head12='class       dictionary; ';
head13='object      blockMeshDict;'; 
head14='}'; 
head15='// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //'; 
fprintf(f1,'%s \n',head1);
fprintf(f1,'%s \n',head2);
fprintf(f1,'%s \n',head3);
fprintf(f1,'%s \n',head4);
fprintf(f1,'%s \n',head5);
fprintf(f1,'%s \n',head6);
fprintf(f1,'%s \n',head7);
fprintf(f1,'%s \n',head8);
fprintf(f1,'%s \n',head9);
fprintf(f1,'%s \n',head10);
fprintf(f1,'%s \n',head11);
fprintf(f1,'%s \n',head12);
fprintf(f1,'%s \n',head13);
fprintf(f1,'%s \n',head14);
fprintf(f1,'%s \n',head15);
fprintf(f1,'\n');
fprintf(f1,'%s \n','convertToMetres 1;');
fprintf(f1,'\n');


%Vertices
fprintf(f1,'%s \n','vertices');
fprintf(f1,'%s \n','(');
fprintf(f1,'\t(%d %d %d)\n',V_0(1),V_0(2),V_0(3));
fprintf(f1,'\t(%2.7f %2.7f %f)\n',V_1(1),V_1(2),V_1(3));
fprintf(f1,'\t(%2.7f %2.7f %f)\n',V_2(1),V_2(2),V_2(3));
fprintf(f1,'\t(%d %d %f)\n',V_3(1),V_3(2),V_3(3));
fprintf(f1,'\t(%2.7f %2.7f %f)\n',V_4(1),V_4(2),V_4(3));
fprintf(f1,'\t(%2.7f %2.7f %f)\n',V_5(1),V_5(2),V_5(3));
fprintf(f1,'%s \n',');');
fprintf(f1,'\n');
fprintf(f1,'blocks \n');
fprintf(f1,'( \n');
fprintf(f1,'\t hex (0 1 2 0 3 4 5 3) (90 1 300) simpleGrading (%d %d %d)\n',GF_x,GF_y,GF_z);
fprintf(f1,'%s \n',');');
fprintf(f1,'\n');
 

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


%boundary
fprintf(f1,'\n');
fprintf(f1,'%s \n','boundary');
fprintf(f1,'%s \n','(');
%inlet
fprintf(f1,'\t%s \n','inlet');
fprintf(f1,'\t%s \n','{');
fprintf(f1,'\t\t%s\n','type patch;');
fprintf(f1,'\t\t%s\n','faces');
fprintf(f1,'\t\t%s\n','(');
fprintf(f1,'\t\t\t(0 2 1 0)\n');
fprintf(f1,'\t\t%s \n',');');
fprintf(f1,'\t%s\n','}');
fprintf(f1,'\n');
%Outlet
fprintf(f1,'\t%s \n','outlet');
fprintf(f1,'\t%s \n','{');
fprintf(f1,'\t\t%s\n','type patch;');
fprintf(f1,'\t\t%s\n','faces');
fprintf(f1,'\t\t%s\n','(');
fprintf(f1,'\t\t\t(3 5 4 3)\n');
fprintf(f1,'\t\t%s \n',');');
fprintf(f1,'\t%s\n','}');
fprintf(f1,'\n');
%AXIS
fprintf(f1,'\t%s \n','axis');
fprintf(f1,'\t%s \n','{');
fprintf(f1,'\t\t%s\n','type empty;');
fprintf(f1,'\t\t%s\n','faces');
fprintf(f1,'\t\t%s\n','(');
fprintf(f1,'\t\t\t(0 3 3 0)\n');
fprintf(f1,'\t\t%s \n',');');
fprintf(f1,'\t%s\n','}');
fprintf(f1,'\n');
%Front
fprintf(f1,'\t%s \n','front');
fprintf(f1,'\t%s \n','{');
fprintf(f1,'\t\t%s\n','type wedge;');
fprintf(f1,'\t\t%s\n','faces');
fprintf(f1,'\t\t%s\n','(');
fprintf(f1,'\t\t\t(5 2 0 3)\n');
fprintf(f1,'\t\t%s \n',');');
fprintf(f1,'\t%s\n','}');
fprintf(f1,'\n');
%back
fprintf(f1,'\t%s \n','back');
fprintf(f1,'\t%s \n','{');
fprintf(f1,'\t\t%s\n','type wedge;');
fprintf(f1,'\t\t%s\n','faces');
fprintf(f1,'\t\t%s\n','(');
fprintf(f1,'\t\t\t(0 1 4 3)\n');
fprintf(f1,'\t\t%s \n',');');
fprintf(f1,'\t%s\n','}');
fprintf(f1,'\n');
%Tankwell
fprintf(f1,'\t%s \n','Noslipwall');
fprintf(f1,'\t%s \n','{');
fprintf(f1,'\t\t%s\n','type wall;');
fprintf(f1,'\t\t%s\n','faces');
fprintf(f1,'\t\t%s\n','(');
fprintf(f1,'\t\t\t(5 2 1 4)\n');
fprintf(f1,'\t\t%s \n',');');
fprintf(f1,'\t%s\n','}');
fprintf(f1,'\n');
%%%%%%%%%end%%%%%%%%%%
fprintf(f1,'%s\n',');');
fprintf(f1,'mergePatchPairs\n');
fprintf(f1,'( \n');
fprintf(f1,');\n');
l1='//*******************************************************************************//';
fprintf(f1,'%s \n',l1);
fclose(f1);
%else
%fprintf('enter value is not valid');

%end

Once we are done with the file parsing, we get the blockMeshDict file for the different angles like 10, 25, and 45.

The following are the blockMeshDict for the symmetry boundary conditions are

10 Degree:

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

convertToMetres 1; 

vertices 
( 
	(0 0 0)
	(0.0149429 -0.0013073 0.000000)
	(0.0149429 0.0013073 0.000000)
	(0 0 4.000000)
	(0.0149429 -0.0013073 4.000000)
	(0.0149429 0.0013073 4.000000)
); 

blocks 
( 
	 hex (0 1 2 0 3 4 5 3) (90 1 300) simpleGrading (0.1 1 1)
); 

edges
( 
	 arc 1 2 (0.015 0 0)
	 arc 4 5 (0.015 0 4)
); 

boundary 
( 
	inlet 
	{ 
		type patch;
		faces
		(
			(0 2 1 0)
		); 
	}

	outlet 
	{ 
		type patch;
		faces
		(
			(3 5 4 3)
		); 
	}

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

	front 
	{ 
		type symmetry;
		faces
		(
			(5 2 0 3)
		); 
	}

	back 
	{ 
		type symmetry;
		faces
		(
			(0 1 4 3)
		); 
	}

	Noslipwall 
	{ 
		type wall;
		faces
		(
			(5 2 1 4)
		); 
	}

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

25 Degree:

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

convertToMetres 1; 

vertices 
( 
	(0 0 0)
	(0.0146444 -0.0032466 0.000000)
	(0.0146444 0.0032466 0.000000)
	(0 0 4.000000)
	(0.0146444 -0.0032466 4.000000)
	(0.0146444 0.0032466 4.000000)
); 

blocks 
( 
	 hex (0 1 2 0 3 4 5 3) (90 1 300) simpleGrading (0.1 1 1)
); 

edges
( 
	 arc 1 2 (0.015 0 0)
	 arc 4 5 (0.015 0 4)
); 

boundary 
( 
	inlet 
	{ 
		type patch;
		faces
		(
			(0 2 1 0)
		); 
	}

	outlet 
	{ 
		type patch;
		faces
		(
			(3 5 4 3)
		); 
	}

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

	front 
	{ 
		type symmetry;
		faces
		(
			(5 2 0 3)
		); 
	}

	back 
	{ 
		type symmetry;
		faces
		(
			(0 1 4 3)
		); 
	}

	Noslipwall 
	{ 
		type wall;
		faces
		(
			(5 2 1 4)
		); 
	}

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

45 Degree:

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

convertToMetres 1; 

vertices 
( 
	(0 0 0)
	(0.0138582 -0.0057403 0.000000)
	(0.0138582 0.0057403 0.000000)
	(0 0 4.000000)
	(0.0138582 -0.0057403 4.000000)
	(0.0138582 0.0057403 4.000000)
); 

blocks 
( 
	 hex (0 1 2 0 3 4 5 3) (90 1 300) simpleGrading (0.1 1 1)
); 

edges
( 
	 arc 1 2 (0.015 0 0)
	 arc 4 5 (0.015 0 4)
); 

boundary 
( 
	inlet 
	{ 
		type patch;
		faces
		(
			(0 2 1 0)
		); 
	}

	outlet 
	{ 
		type patch;
		faces
		(
			(3 5 4 3)
		); 
	}

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

	front 
	{ 
		type symmetry;
		faces
		(
			(5 2 0 3)
		); 
	}

	back 
	{ 
		type symmetry;
		faces
		(
			(0 1 4 3)
		); 
	}

	Noslipwall 
	{ 
		type wall;
		faces
		(
			(5 2 1 4)
		); 
	}

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

Pressure and Velocity files for Symmetry are given

/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  7
     \\/     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.010662539;
    }
    Noslipwall
    {
        type            zeroGradient;
    }

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

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

Velocity file

/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  7
     \\/     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.07028);

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

    Noslipwall
    {
        type            noSlip;
    }

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

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

Results and Discussion for the symmetry boundary condition:

For `theta=25^o`

Velocity Plot is given by

Velocity vs Radial Distance of 0.014644400216639042 m

Velocity Plot for different Length

At 1.4m

At 2.4 m

At 3.4 m

At 4 m

For `theta=45^o`

Velocity plot

Velocity vs Radial Distance

Velocity vs Different lengths

At 1.8m

At 2.8m

At 4m

For `theta=10^o`

Velocity plot:

Velocity vs Radial DIstance

Velocity vs Different length

At 1.5m

At 2.5m

At 3.5m

At 4m

For wedge boundary condition: BlockMeshDict files are given by

Angle `=10^o`

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

convertToMetres 1; 

vertices 
( 
	(0 0 0)
	(0.0149429 -0.0013073 0.000000)
	(0.0149429 0.0013073 0.000000)
	(0 0 4.000000)
	(0.0149429 -0.0013073 4.000000)
	(0.0149429 0.0013073 4.000000)
); 

blocks 
( 
	 hex (0 1 2 0 3 4 5 3) (90 1 300) simpleGrading (0.1 1 1)
); 

edges
( 
	 arc 1 2 (0.015 0 0)
	 arc 4 5 (0.015 0 4)
); 

boundary 
( 
	inlet 
	{ 
		type patch;
		faces
		(
			(0 2 1 0)
		); 
	}

	outlet 
	{ 
		type patch;
		faces
		(
			(3 5 4 3)
		); 
	}

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

	front 
	{ 
		type wedge;
		faces
		(
			(5 2 0 3)
		); 
	}

	back 
	{ 
		type wedge;
		faces
		(
			(0 1 4 3)
		); 
	}

	Noslipwall 
	{ 
		type wall;
		faces
		(
			(5 2 1 4)
		); 
	}

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

Angle `=25^o`

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

convertToMetres 1; 

vertices 
( 
	(0 0 0)
	(0.0146444 -0.0032466 0.000000)
	(0.0146444 0.0032466 0.000000)
	(0 0 4.000000)
	(0.0146444 -0.0032466 4.000000)
	(0.0146444 0.0032466 4.000000)
); 

blocks 
( 
	 hex (0 1 2 0 3 4 5 3) (90 1 300) simpleGrading (0.1 1 1)
); 

edges
( 
	 arc 1 2 (0.015 0 0)
	 arc 4 5 (0.015 0 4)
); 

boundary 
( 
	inlet 
	{ 
		type patch;
		faces
		(
			(0 2 1 0)
		); 
	}

	outlet 
	{ 
		type patch;
		faces
		(
			(3 5 4 3)
		); 
	}

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

	front 
	{ 
		type wedge;
		faces
		(
			(5 2 0 3)
		); 
	}

	back 
	{ 
		type wedge;
		faces
		(
			(0 1 4 3)
		); 
	}

	Noslipwall 
	{ 
		type wall;
		faces
		(
			(5 2 1 4)
		); 
	}

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

Angle `=45^o`

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

convertToMetres 1; 

vertices 
( 
	(0 0 0)
	(0.0138582 -0.0057403 0.000000)
	(0.0138582 0.0057403 0.000000)
	(0 0 4.000000)
	(0.0138582 -0.0057403 4.000000)
	(0.0138582 0.0057403 4.000000)
); 

blocks 
( 
	 hex (0 1 2 0 3 4 5 3) (90 1 300) simpleGrading (0.1 1 1)
); 

edges
( 
	 arc 1 2 (0.015 0 0)
	 arc 4 5 (0.015 0 4)
); 

boundary 
( 
	inlet 
	{ 
		type patch;
		faces
		(
			(0 2 1 0)
		); 
	}

	outlet 
	{ 
		type patch;
		faces
		(
			(3 5 4 3)
		); 
	}

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

	front 
	{ 
		type wedge;
		faces
		(
			(5 2 0 3)
		); 
	}

	back 
	{ 
		type wedge;
		faces
		(
			(0 1 4 3)
		); 
	}

	Noslipwall 
	{ 
		type wall;
		faces
		(
			(5 2 1 4)
		); 
	}

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

Pressure file for wedge:

/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  7
     \\/     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.010662539;
    }
    Noslipwall
    {
        type            zeroGradient;
    }

    front
    {
        type            wedge;
    }
    back
    {
        type            wedge;
    }
    axis
    {
    	type		 empty;
    }
    
}

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

Velocity for wedge:

/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  7
     \\/     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.07028);

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

    Noslipwall
    {
        type            noSlip;
    }

    front
    {
        type            wedge;
    }
    back
    {
        type            wedge;
    }
    axis
    {
    	type		 empty;
    }
}

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

Result and Discussion:

For `theta=10^o`

Velocity Plot:

Velocity vs Radial Distance:

Velocity Vs Different Length

At 1m

At 2m

At 3m

At 4m

For `theta=25^o`

Velocity plot:

Velocity vs Radial Distance

Velocity vs different length

At 2.1m

At 4m

For `theta=45^o`

Velocity plot

Velocity vs Radial Distance

Velocity vs different length

At 1m

At 2.5m

At 4m

Conclusion:

DESCRIPTION

Angle

10

25

45

Symmetry

Velocity(V)(m/s)

0.133999

0.1395573

0.1399170

Actual velocity(AV)(m/s)

0.140559

0.140559

0.140553

Error(%) =(AV-V)*100

0.659

0.10017

0.0636

C max

0.455593

0.459776

0.471691

C mean

0.0549708

0.0549731

0.0549769

Wedge

Velocity(V)(m/s)

0.139437

0.139532

0.139920

Actual velocity(AV)(m/s)

0.140559

0.140559

0.140559

Error(%)=(AV-V)*100

0.1122

0.1027

0.0639

C max

0.455393

0.459721

0.471667

C mean

0.0549715

0.0549732

0.0549769

  • Comparing the results the execution time of the symmetry is more than that of the wedge.
  • With an increase in the angle, the error in the velocity gets decreased.
  • Symmetry Boundary Condition has better accuracy than the wedge Condition.
  • Wedge Boundary has better results when angle is less than or equal to 5.`theta<=5` .Due to the Mesh size of the element.
  • This symmetry boundary condition is based on the symmetry plane, which enables us to go for the higher angles whereas the wedge condition is based on the Axis-symmetric boundary 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.