Challenge

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

Project

It is continuation of project week11, with different wedge angles and boundary conditions are symmetry instead of wedge.

Flow in a conduit can be either develpoing or fully developed flow. Considering a laminar flow entering the pipe, the velocity profile changes as it moves inside pipe. This region of changing velocity profile is called as developing flow. After the parabolic profile is acheived, the flow profile does not change in streamwise direction and this flow is called as fully developed flow. The distance required for a flow to become developed is called as entrance length and it depends upon shear stresses that act on the wall.

This fully developed flow is termed as Hagen- Poiseuille's flow and forlulae related to this flow are as below,

1) Pressure loss during the fluid flow

where △p is pressure difference

μ is viscosity of fluid

u is average velocity of fluid

L is length of pipe

Le is entrance length of pipe

D is diameter of pipe

2) Reynold's number

For pipe flow applications , it is very important to know whether the flow is laminayr or turbulent. Equations and method that are applied to these flows to analyse the flow are different.

Typical criterion to decide whether pipe flow is laminar or turbulent is value of Reynold's number.

where D is pipe diameter

V is average flow velocity in pipe

ρ is density of flowing fluid

μ is dynamic viscosity of fluid

ν is kinematic viscosity of fluid

Re is dimensionless number

When Re < 2300, it is Laminar flow

Re > 4000, it is Turbulent

Here in this project Re = 2100 as given.

3) Entry length Le = 0.06*Re*D = 0.06* 2100* 0.01 = 1.26m

4) Length of pipe = L = 0.5 + Le = 0.5+1.26 = 1.76 m

5) Average flow velocity = Vavg = Re.μ/(density* D)

6) Shear stress:

BlockMeshDict files for all three angles

1) Angle = 10 degrees

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

/*

wedge angle = 10 degrees

*/

vertices
(
    (0 0 0)
    (0 0.00498097 -0.0004357) // x dir
    (0 0.00498097 0.0004357) // y dir
    (1.5 0 0) //z 
    (1.5 0.00498097 -0.0004357)
    (1.5 0.00498097 0.0004357)
   
);

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

edges
(
/*
arc 1 2 (0 0.01 0)
arc 3 4 (3 0.01 0)
*/
);

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

mergePatchPairs
(
);

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

2) angle = 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;

/*

wedge angle = 20 degrees

*/

vertices
(
    (0 0 0)
    (0 0.004881 -0.001082) // x dir
    (0 0.004881 0.001082) // y dir
    (1.5 0 0) //z 
    (1.5 0.004881 0.001082)
    (1.5 0.004881 -0.001082)
   
);

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

edges
(
/*
arc 1 2 (0 0.01 0)
arc 3 4 (3 0.01 0)
*/
);

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

mergePatchPairs
(
);

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

3) Angle = 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;

/*

wedge angle = 45 degrees

*/

vertices
(
    (0 0 0)
    (0 0.0046194 -0.0019134) // x dir
    (0 0.0046194 0.0019134) // y dir
    (1.5 0 0) //z 
    (1.5 0.0046194 -0.0019134)
    (1.5 0.0046194 0.0019134)
   
);

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

edges
(
/*
arc 1 2 (0 0.01 0)
arc 3 4 (3 0.01 0)
*/
);

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

mergePatchPairs
(
);

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

Pressure setting

We have to change from wedge to symmetry accordingly.

/*--------------------------------*- 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            wedge;
    }
    
    back
    {
        type            wedge;
    }
    
    axis
    {
    	type		empty;
    }
    
    noslipwalls
    {
    	type		zeroGradient;
    }
}

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

Velocity setting

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

    outlet
    {
        type            zeroGradient;
    }

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

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

Matlab codes to automate blockMeshDict file:

1) theta = 10

clear all
close all
clc

% File parsing

% inputs 
Re = 2100;
rho = 1000; 
mu = 8.9e-7;
v = 0.1869 % m/s
prompt = 'What is pipe diameter' ;
D = input(prompt);

% Total pipe length

L = 1.5; %m

% Le = 0.06*Re*D ;
% L = Le + 0.5; 
% angle of wedge 


theta = 10;

a = (D/2)*cosd(theta/2);
b = (D/2)*sind(theta/2);

v0 = [0 ,0 ,0];
v1= [0 ,a, -b];
v2= [0, a, b];
v3= [L, 0, 0];
v4= [L, a, -b];
v5= [L, a, b];


f1 = fopen('blockmeshdict10.txt', 'w') ;

fprintf(f1,'%s \n', '/*--------------------------------*- C++ -*----------------------------------*\');
fprintf(f1, '%s \n','  =========                 |');
fprintf(f1,'%s \n', '  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox');
fprintf(f1, '%s \n', '   \\    /   O peration     | Website:  https://openfoam.org');
fprintf(f1, '%s \n', '    \\  /    A nd           | Version:  8');
fprintf(f1, '%s \n', '     \\/     M anipulation  |');
fprintf(f1, '%s \n', '\*---------------------------------------------------------------------------*/');
fprintf(f1, '%s \n', 'FoamFile');
fprintf(f1, '%s \n', '{');
fprintf(f1, '%s \n', '    version     2.0;');
fprintf(f1, '%s \n', '    format      ascii;');
fprintf(f1, '%s \n', '    class       dictionary;');
fprintf(f1, '%s \n', '    object      blockMeshDict;');
fprintf(f1, '%s \n', '}');
fprintf(f1, '%s \n', '// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //');

% For a space for one line
fprintf(f1, '\n');

fprintf(f1, '%s \n','convertToMeters 1;') 

% For a space for one line
fprintf(f1, '\n');

fprintf(f1, '%s \n','vertices');
fprintf(f1, '%s \n','(');

fprintf(f1, '(%f %f %f)\n',v0(1), v0(2),v0(3));
fprintf(f1, '(%f %f %f)\n',v1(1), v1(2),v1(3));
fprintf(f1, '(%f %f %f)\n',v2(1), v2(2),v2(3));
fprintf(f1, '(%f %f %f)\n',v3(1), v3(2),v3(3));
fprintf(f1, '(%f %f %f)\n',v4(1), v4(2),v4(3));
fprintf(f1, '(%f %f %f)\n',v5(1), v5(2),v5(3));

fprintf(f1, '%s \n',');');

fprintf(f1, '\n');

fprintf(f1, '%s \n','blocks');
fprintf(f1, '%s \n','(');
fprintf(f1, '%s \n','    hex (0 1 2 0 3 4 5 3) (20 1 200) simpleGrading (1 0.2 1)');
fprintf(f1, '\n');
fprintf(f1, '%s \n',');');

fprintf(f1, '%s \n','edges');
fprintf(f1, '%s \n','(');
fprintf(f1, '%s \n',');');

fprintf(f1, '%s \n','boundary');
fprintf(f1, '%s \n','(');
fprintf(f1, '\n');

fprintf(f1, '%s \n','    inlet');
fprintf(f1, '%s \n','    {');
fprintf(f1, '%s \n','        type patch;');
fprintf(f1, '%s \n','        faces');
fprintf(f1, '%s \n','        (');
fprintf(f1, '%s \n','            (0 2 1 0)');
fprintf(f1, '%s \n',');');
fprintf(f1, '%s \n','}');

fprintf(f1, '%s \n','    outlet');
fprintf(f1, '%s \n','    {');
fprintf(f1, '%s \n','        type patch;');
fprintf(f1, '%s \n','        faces');
fprintf(f1, '%s \n','        (');
fprintf(f1, '%s \n','            (3 4 5 3)');
fprintf(f1, '%s \n',');');
fprintf(f1, '%s \n','}');

fprintf(f1, '%s \n','    noslipwalls');
fprintf(f1, '%s \n','    {');
fprintf(f1, '%s \n','        type wall;');
fprintf(f1, '%s \n','        faces');
fprintf(f1, '%s \n','        (');
fprintf(f1, '%s \n','            (1 2 5 4)');
fprintf(f1, '%s \n',');');
fprintf(f1, '%s \n','}');
        
fprintf(f1, '%s \n','    front');
fprintf(f1, '%s \n','    {');
fprintf(f1, '%s \n','        type symmetry;');
fprintf(f1, '%s \n','        faces');
fprintf(f1, '%s \n','        (');
fprintf(f1, '%s \n','            (0 3 5 2)');
fprintf(f1, '%s \n',');');
fprintf(f1, '%s \n','}');

fprintf(f1, '%s \n','    back');
fprintf(f1, '%s \n','    {');
fprintf(f1, '%s \n','        type symmetry;');
fprintf(f1, '%s \n','        faces');
fprintf(f1, '%s \n','        (');
fprintf(f1, '%s \n','            (0 1 4 3)');
fprintf(f1, '%s \n',');');
fprintf(f1, '%s \n','}');

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

fprintf(f1, '\n');
fprintf(f1, '%s \n',');');

fprintf(f1, '%s \n','mergePatchPairs');

fprintf(f1, '%s \n','(');
fprintf(f1, '%s \n',');');

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

2) theta = 20 degrees

clear all
close all
clc

% File parsing

% inputs 
Re = 2100;
rho = 1000; 
mu = 8.9e-7;
v = 0.1869 % m/s
prompt = 'What is pipe diameter' ;
D = input(prompt);

% Total pipe length

L = 1.5; %m

% Le = 0.06*Re*D ;
% L = Le + 0.5; 

% angle of wedge 

theta = 20;


a = (D/2)*cosd(theta/2);
b = (D/2)*sind(theta/2);

v0 = [0 ,0 ,0];
v1= [0 ,a, -b];
v2= [0, a, b];
v3= [L, 0, 0];
v4= [L, a, -b];
v5= [L, a, b];


f1 = fopen('blockmeshdict25.txt', 'w') ;

fprintf(f1,'%s \n', '/*--------------------------------*- C++ -*----------------------------------*\');
fprintf(f1, '%s \n','  =========                 |');
fprintf(f1,'%s \n', '  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox');
fprintf(f1, '%s \n', '   \\    /   O peration     | Website:  https://openfoam.org');
fprintf(f1, '%s \n', '    \\  /    A nd           | Version:  8');
fprintf(f1, '%s \n', '     \\/     M anipulation  |');
fprintf(f1, '%s \n', '\*---------------------------------------------------------------------------*/');
fprintf(f1, '%s \n', 'FoamFile');
fprintf(f1, '%s \n', '{');
fprintf(f1, '%s \n', '    version     2.0;');
fprintf(f1, '%s \n', '    format      ascii;');
fprintf(f1, '%s \n', '    class       dictionary;');
fprintf(f1, '%s \n', '    object      blockMeshDict;');
fprintf(f1, '%s \n', '}');
fprintf(f1, '%s \n', '// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //');

% For a space for one line
fprintf(f1, '\n');

fprintf(f1, '%s \n','convertToMeters 1;'); 

% For a space for one line
fprintf(f1, '\n');

fprintf(f1, '%s \n','vertices');
fprintf(f1, '%s \n','(');

fprintf(f1, '(%f %f %f)\n',v0(1), v0(2),v0(3));
fprintf(f1, '(%f %f %f)\n',v1(1), v1(2),v1(3));
fprintf(f1, '(%f %f %f)\n',v2(1), v2(2),v2(3));
fprintf(f1, '(%f %f %f)\n',v3(1), v3(2),v3(3));
fprintf(f1, '(%f %f %f)\n',v4(1), v4(2),v4(3));
fprintf(f1, '(%f %f %f)\n',v5(1), v5(2),v5(3));

fprintf(f1, '%s \n',');');

fprintf(f1, '\n');

fprintf(f1, '%s \n','blocks');
fprintf(f1, '%s \n','(');
fprintf(f1, '%s \n','    hex (0 1 2 0 3 4 5 3) (20 1 200) simpleGrading (1 0.2 1)');
fprintf(f1, '\n');
fprintf(f1, '%s \n',');');

fprintf(f1, '%s \n','edges');
fprintf(f1, '%s \n','(');
fprintf(f1, '%s \n',');');

fprintf(f1, '%s \n','boundary');
fprintf(f1, '%s \n','(');
fprintf(f1, '\n');

fprintf(f1, '%s \n','    inlet');
fprintf(f1, '%s \n','    {');
fprintf(f1, '%s \n','        type patch;');
fprintf(f1, '%s \n','        faces');
fprintf(f1, '%s \n','        (');
fprintf(f1, '%s \n','            (0 2 1 0)');
fprintf(f1, '%s \n',');');
fprintf(f1, '%s \n','}');

fprintf(f1, '%s \n','    outlet');
fprintf(f1, '%s \n','    {');
fprintf(f1, '%s \n','        type patch;');
fprintf(f1, '%s \n','        faces');
fprintf(f1, '%s \n','        (');
fprintf(f1, '%s \n','            (3 4 5 3)');
fprintf(f1, '%s \n',');');
fprintf(f1, '%s \n','}');

fprintf(f1, '%s \n','    noslipwalls');
fprintf(f1, '%s \n','    {');
fprintf(f1, '%s \n','        type wall;');
fprintf(f1, '%s \n','        faces');
fprintf(f1, '%s \n','        (');
fprintf(f1, '%s \n','            (1 2 5 4)');
fprintf(f1, '%s \n',');');
fprintf(f1, '%s \n','}');
        
fprintf(f1, '%s \n','    front');
fprintf(f1, '%s \n','    {');
fprintf(f1, '%s \n','        type symmetry;');
fprintf(f1, '%s \n','        faces');
fprintf(f1, '%s \n','        (');
fprintf(f1, '%s \n','            (0 3 5 2)');
fprintf(f1, '%s \n',');');
fprintf(f1, '%s \n','}');

fprintf(f1, '%s \n','    back');
fprintf(f1, '%s \n','    {');
fprintf(f1, '%s \n','        type symmetry;');
fprintf(f1, '%s \n','        faces');
fprintf(f1, '%s \n','        (');
fprintf(f1, '%s \n','            (0 1 4 3)');
fprintf(f1, '%s \n',');');
fprintf(f1, '%s \n','}');

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

fprintf(f1, '\n');
fprintf(f1, '%s \n',');');

fprintf(f1, '%s \n','mergePatchPairs');

fprintf(f1, '%s \n','(');
fprintf(f1, '%s \n',');');

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

3) theta = 45 degrees

clear all
close all
clc

% File parsing

% inputs 
Re = 2100;
rho = 1000; 
mu = 8.9e-7;
v = 0.1869 % m/s
prompt = 'What is pipe diameter' ;
D = input(prompt);

% Total pipe length

L = 1.5; %m

% Le = 0.06*Re*D ;
% L = Le + 0.5; 

% angle of wedge 

theta = 45; 


a = (D/2)*cosd(theta/2);
b = (D/2)*sind(theta/2);

v0 = [0 ,0 ,0];
v1= [0 ,a, -b];
v2= [0, a, b];
v3= [L, 0, 0];
v4= [L, a, -b];
v5= [L, a, b];


f1 = fopen('blockmeshdict45.txt', 'w') ;

fprintf(f1,'%s \n', '/*--------------------------------*- C++ -*----------------------------------*\');
fprintf(f1, '%s \n','  =========                 |');
fprintf(f1,'%s \n', '  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox');
fprintf(f1, '%s \n', '   \\    /   O peration     | Website:  https://openfoam.org');
fprintf(f1, '%s \n', '    \\  /    A nd           | Version:  8');
fprintf(f1, '%s \n', '     \\/     M anipulation  |');
fprintf(f1, '%s \n', '\*---------------------------------------------------------------------------*/');
fprintf(f1, '%s \n', 'FoamFile');
fprintf(f1, '%s \n', '{');
fprintf(f1, '%s \n', '    version     2.0;');
fprintf(f1, '%s \n', '    format      ascii;');
fprintf(f1, '%s \n', '    class       dictionary;');
fprintf(f1, '%s \n', '    object      blockMeshDict;');
fprintf(f1, '%s \n', '}');
fprintf(f1, '%s \n', '// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //');

% For a space for one line
fprintf(f1, '\n');

fprintf(f1, '%s \n','convertToMeters 1;'); 

% For a space for one line
fprintf(f1, '\n');

fprintf(f1, '%s \n','vertices');
fprintf(f1, '%s \n','(');

fprintf(f1, '(%f %f %f)\n',v0(1), v0(2),v0(3));
fprintf(f1, '(%f %f %f)\n',v1(1), v1(2),v1(3));
fprintf(f1, '(%f %f %f)\n',v2(1), v2(2),v2(3));
fprintf(f1, '(%f %f %f)\n',v3(1), v3(2),v3(3));
fprintf(f1, '(%f %f %f)\n',v4(1), v4(2),v4(3));
fprintf(f1, '(%f %f %f)\n',v5(1), v5(2),v5(3));

fprintf(f1, '%s \n',');');

fprintf(f1, '\n');

fprintf(f1, '%s \n','blocks');
fprintf(f1, '%s \n','(');
fprintf(f1, '%s \n','    hex (0 1 2 0 3 4 5 3) (20 1 200) simpleGrading (1 0.2 1)');
fprintf(f1, '\n');
fprintf(f1, '%s \n',');');

fprintf(f1, '%s \n','edges');
fprintf(f1, '%s \n','(');
fprintf(f1, '%s \n',');');

fprintf(f1, '%s \n','boundary');
fprintf(f1, '%s \n','(');
fprintf(f1, '\n');

fprintf(f1, '%s \n','    inlet');
fprintf(f1, '%s \n','    {');
fprintf(f1, '%s \n','        type patch;');
fprintf(f1, '%s \n','        faces');
fprintf(f1, '%s \n','        (');
fprintf(f1, '%s \n','            (0 2 1 0)');
fprintf(f1, '%s \n',');');
fprintf(f1, '%s \n','}');

fprintf(f1, '%s \n','    outlet');
fprintf(f1, '%s \n','    {');
fprintf(f1, '%s \n','        type patch;');
fprintf(f1, '%s \n','        faces');
fprintf(f1, '%s \n','        (');
fprintf(f1, '%s \n','            (3 4 5 3)');
fprintf(f1, '%s \n',');');
fprintf(f1, '%s \n','}');

fprintf(f1, '%s \n','    noslipwalls');
fprintf(f1, '%s \n','    {');
fprintf(f1, '%s \n','        type wall;');
fprintf(f1, '%s \n','        faces');
fprintf(f1, '%s \n','        (');
fprintf(f1, '%s \n','            (1 2 5 4)');
fprintf(f1, '%s \n',');');
fprintf(f1, '%s \n','}');
        
fprintf(f1, '%s \n','    front');
fprintf(f1, '%s \n','    {');
fprintf(f1, '%s \n','        type symmetry;');
fprintf(f1, '%s \n','        faces');
fprintf(f1, '%s \n','        (');
fprintf(f1, '%s \n','            (0 3 5 2)');
fprintf(f1, '%s \n',');');
fprintf(f1, '%s \n','}');

fprintf(f1, '%s \n','    back');
fprintf(f1, '%s \n','    {');
fprintf(f1, '%s \n','        type symmetry;');
fprintf(f1, '%s \n','        faces');
fprintf(f1, '%s \n','        (');
fprintf(f1, '%s \n','            (0 1 4 3)');
fprintf(f1, '%s \n',');');
fprintf(f1, '%s \n','}');

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

fprintf(f1, '\n');
fprintf(f1, '%s \n',');');

fprintf(f1, '%s \n','mergePatchPairs');

fprintf(f1, '%s \n','(');
fprintf(f1, '%s \n',');');

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

Results :

SYMMETRY front and back

1) For theta = 10

a) Velocity graph

b) Pressure graph

c) Shear stress graph

2) theta = 20 degrees

a) Velocity graph

b) Pressure graph

c) Shear stress graph

3) theta = 45 degrees

a) Velocity graph

b) Pressure graph

c) Shear stress graph

WEDGE front and back

1) theta = 10degrees

a) Velocity profile

b) Pressure profile

c) Shear stress profile

2) theta = 20 degrees

a) Velocity graph

b) Pressure graph

c) Shear stress graph

3) theta = 45 degrees

a) Velocity graph

b) Pressure graph

c) Shear stress graph

Results :

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.