Sunteți pe pagina 1din 101

Experiment No 1: INTRODUCTION

AIM
To study of governing equations applicable in fluid flow and heat transfer; introduction,
features and applications of commercial and open source tools for CFD/FEM analysis.

GOVERNING EQUATIONS USED

The equation of continuity for an incompressible fluid

u v w
0
x y z

Navier–Stokes equations in Cartesian coordinates

Reynolds Equation

Umax = (3/2) Uavg

Free Stream Velocity


Laminar Boundary Layer Thickness

Heat Equation

Fin Equation

h = m2kt/2

OPEN FOAM
Open FOAM (Open Field Operation and Manipulation) release of version 2.1.0 of the
Open FOAM is a open-source toolbox for solving anything from complex fluid flows involving
chemical reactions, turbulence and heat transfer, to solid dynamics and electromagnetic. The
structure of Open FOAM is an environment, where it is relative easy to formulate systems of
partial differential equations and solve them for a discritized field of operation is

Solver Capabilities

Compressible and Incompressible flows

Multiphase flows, such as bubble flow, cavitations, VOF, Euler and mixing.

Combustion and Chemical Reaction flows

Buoyancy-driven flows, with consideration of buoyant force for both compressible and
incompressible flows

Conjugate heat transfer, including radiation

Particle methods (DEM, DSMC, MD)

Other (Solid dynamics, electromagnetics)

System
The system folder contains three files for setting various system specific properties.

ControlDict

Contains the most basic setup for the case such as, start time, end time, write interval and
iteration step. The values in this file can be updated while solving.
Constant

The folder has two files where the physical properties of the fluid/species and the turbulence
model are set.

Transport Properties

In this file the physical properties for the fluid are set. For a steady-state incompressible solver
only the kinematic viscosity of the fluid is needed as input.

PolyMesh
This sub-folder has the geometry and boundary condition patches for the mesh. Using a mesh
conversion tool will automatically create these _les. A list of these tools can be found in
(OpenFOAM 2007, U-86).These folders contain the calculated properties, such as velocity,
temperature etc. The 0 folder are used to set the initial boundary conditions. The boundary
conditions are set in separate _les, so the velocity boundary conditions are set in a file U with
patches corresponding to the boundary-type set in the boundary _le in the polyMesh folder in the
controlDict file.

Para View

Para View is an open-source, multi-platform data analysis and visualization application. Para
View users can quickly build visualizations to analyze their data using qualitative and
quantitative techniques. The data exploration can be done interactively in 3D or
programmatically using Para View’s batch processing capabilities.
Experiment No 2:

2D AND 3D STRUCTURED GRID GENERATION

AIM
To draw 2D and 3D structured grid generation by using Salome software.

SOFTWARE REQUIRED

Linux operating software, Salome software

PROCEDURE

 Geometry modules -> New -> New entity -> Basic -> 2D sketch -> 0.30 -> Apply
Axis R-10,O-90 degree
 New entity -> Blocks -> Divided disc -> select orientation -> ozx -> R=1 -> Apply and close
 New entity -> Generation -> Extrusion along path -> Base object -> Divided disc 1 -> path object -
> sketch (from tree) -> Apply and close (pipe created)
 New entity -> Explode -> Main object -> pipe 1 and sub shapes tpe -> Face -> Select sub shapes
(move window and zoom in the pipe and rotate the object using rotation menu, hold a mouse
left button and move the mouse upwards rotate, again zoom) -> show only selected -> Apply
and close (5 faces created in tree)
 New entity -> Group -> Create -> Main shape -> pipe 1 (from tree) -> pipe as face (shape type) ->
select 5 faces (from tree) -> add -> name as “Inlet” (Group name) -> Apply and close
 (repeat the name for outlet face -> another 5 faces creates)
 Geometry -> Mesh -> Mesh (Top menu bar) -> create mesh -> Geometry -> pipe 1 (from tree) ->
Assign a set of hypothesis -> 3D automatic Hexahedralization -> No of segments -> 12 -> Ok ->
Apply and close
 Mesh 1 (from tree) -> Right click -> compute -> close (Mesh created)
 Geometry
 New entity -> Basic Explode -> Main object -> pipe 1 (from tree) -> Sub shapes tpes -> Edge ->
Select sub shapes (move window and zoom in the face of pipe and select all edges) -> Apply and
close
 Geometry tree -> (24 edges)
RESULT
Thus the given 2D structured grid generated by using Salome software.
Experiment No 3:

3D UNSTRUCTURED GRID GENERATION(PIPE)

AIM
To draw 3D unstructured grid generation by using Salome software.

SOFTWARE REQUIRED

Linux operating software ,Salome software

PROCEDURE

 Geometry modules -> New -> New entity -> Basic -> 2D sketch -> 0.30 -> Apply
Axis R-10,O-90 degree
 New entity -> Blocks -> Divided disc -> select orientation -> ozx -> R=1 -> Apply and close
 New entity -> Generation -> Extrusion along path -> Base object -> Divided disc 1 -> path object -
> sketch (from tree) -> Apply and close (pipe created)
 New entity -> Explode -> Main object -> pipe 1 and sub shapes tpe -> Face -> Select sub shapes
(move window and zoom in the pipe and rotate the object using rotation menu, hold a mouse
left button and move the mouse upwards rotate, again zoom) -> show only selected -> Apply
and close (5 faces created in tree)
 New entity -> Group -> Create -> Main shape -> pipe 1 (from tree) -> pipe as face (shape type) ->
select 5 faces (from tree) -> add -> name as “Inlet” (Group name) -> Apply and close
 (repeat the name for outlet face -> another 5 faces creates)
 Geometry -> Mesh -> Mesh (Top menu bar) -> create mesh -> Geometry -> pipe 1 (from tree) ->
Assign a set of hypothesis -> 3D automatic Hexahedralization -> No of segments -> 12 -> Ok ->
Apply and close
 Mesh 1 (from tree) -> Right click -> compute -> close (Mesh created)
 Geometry
 New entity -> Basic Explode -> Main object -> pipe 1 (from tree) -> Sub shapes tpes -> Edge ->
Select sub shapes (move window and zoom in the face of pipe and select all edges) -> Apply and
close
 Geometry tree -> (24 edges)
 RESULT
Thus the given 3D unstructured grid generated by using Salome software.
Experiment No 4:
INCOMPRESSIBLE INTERNAL LAMINAR FLOWS USING
OPEN-FOAM

AIM
To study incompressible internal laminar flows in two dimensional geometry.

SOFTWARE REQUIRED

Linux operating software

Open foam solver

Para foam

PROCEDURE

1. Copy the 3 folders namely “0”, “constant” and “system” in already existing folder.

2. The necessary changes are made in these folders as per the required properties. The “0”
folder contains the properties of fluid. The “constant” folder contains the geometry, mesh
generation and transport properties. The “system” folder contains the accuracy of the
flow process.

3. Once the above mentioned files are generated, the OpenFOAM terminal is opened and
the mesh file is generated using the “blockMesh”. This mesh can be checked using the
“checkMesh” command.

4. Then the “simpleFoam” command is used to generate the physical properties at the given
time intervals.

5. Now for the analysis part, “paraFoam” command is used to open the paraView editor. All
the analysis is done using Paraview.

6. The Convergence History, and the Contour plots are obtained and a screenshot is taken.
.

/*--------------------------------*- C++ -*----------------------------*\


| ========= |
|| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|| \\ / O peration | Version: 2.0.1
|| \\ / A nd | Web: www.OpenFOAM.com
|| \\/ M anipulation |
|\*---------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
wall-4
{
type zeroGradient;
}
velocity-inlet-5
{
type zeroGradient;
}
velocity-inlet-6
{
type zeroGradient;
}
pressure-outlet-7
{
type fixedValue;
value uniform 0;
}
wall-8
{
type zeroGradient;
}

frontAndBackPlanes
{
type empty;
}
}

//
*************************************************************************
//
/*--------------------------------*- C++ -*-----------------------------*\
| ========= |
|| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|| \\ / O peration | Version: 2.0.1
|| \\ / A nd | Web: www.OpenFOAM.com
|| \\/ 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
{
wall-4
{
type fixedValue;
value uniform (0 0 0);
}
velocity-inlet-5
{
type fixedValue;
value uniform (1 0 0);
}
velocity-inlet-6
{
type fixedValue;
value uniform (0 3 0);
}
pressure-outlet-7
{
type zeroGradient;
}
wall-8
{
type fixedValue;
value uniform (0 0 0);
}

frontAndBackPlanes
{
type empty;
}
}

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

convertToMeters 1;

vertices
(
(0 0 0)
(5 0 0)
(5 0.5 0)
(0 0.5 0)
(0 0 0.1)
(5 0 0.1)
(5 0.5 0.1)
(0 0.5 0.1)
);

blocks
(
hex (0 1 2 3 4 5 6 7) (20 20 1) simpleGrading (1 1 1)
);

edges
(
);

boundary
(

velocity-inlet-5
{
type patch;
faces
(
(0 4 7 3)
);
}
pressure-outlet-7
{
type patch;
faces
(
(2 6 5 1)
);
}
wall-4
{
type wall;
faces
(
(1 5 4 0)
);
}
wall-8
{
type wall;
faces
(
(3 7 6 2)
);
}
frontAndBackPlanes
{
type empty;
faces
(
(0 3 2 1)
(4 5 6 7)
);
}
);

mergePatchPairs
(
);

//
*************************************************************************
//
/*--------------------------------*- C++ -*-----------------------------*\
| ========= |
|| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|| \\ / O peration | Version: 2.0.1
|| \\ / A nd | Web: www.OpenFOAM.com
|| \\/ M anipulation |
|\*---------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
5
(
velocity-inlet-5
{
type patch;
nFaces 20;
startFace 760;
}
pressure-outlet-7
{
type patch;
nFaces 20;
startFace 780;
}
wall-4
{
type wall;
nFaces 20;
startFace 800;
}
wall-8
{
type wall;
nFaces 20;
startFace 820;
}
frontAndBackPlanes
{
type empty;
nFaces 800;
startFace 840;
}
)

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

nu nu [ 0 2 -1 0 0 0 0 ] 0.01;

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

application icoFoam;

startFrom latestTime;

startTime 0;

stopAt endTime;

endTime 10;

deltaT 0.05;

writeControl timeStep;

writeInterval 20;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression off;

timeFormat general;

timePrecision 6;

runTimeModifiable true;

//
*************************************************************************
//
/*--------------------------------*- C++ -*-----------------------------*\
| ========= |
|| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|| \\ / O peration | Version: 2.0.1
|| \\ / A nd | Web: www.OpenFOAM.com
|| \\/ M anipulation |
|\*---------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
}
divSchemes
{
default none;
div(phi,U) Gauss limitedLinearV 1;
}
laplacianSchemes
{
default none;
laplacian(nu,U) Gauss linear corrected;
laplacian((1|A(U)),p) Gauss linear corrected;
}
interpolationSchemes
{
default linear;
interpolate(HbyA) linear;
}
snGradSchemes
{
default corrected;
}
fluxRequired
{
default no;
p ;
}
//
*************************************************************************
//
/*--------------------------------*- C++ -*-------------------------------
---*\
| ========= |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
| \\ / O peration | Version: 2.0.1
|
| \\ / A nd | Web: www.OpenFOAM.com
|
| \\/ M anipulation |
|
\*------------------------------------------------------------------------
---*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* //

solvers
{
p
{
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0;
}

U
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0;
}
}

PISO
{
nCorrectors 2;
nNonOrthogonalCorrectors 2;
}

//
*************************************************************************
//
RESULT
Experiment No 5:
INCOMPRESSIBLE INTERNAL TURBULENT FLOW USING
OPEN-FOAM

AIM
To study incompressible internal turbulelnt flows in two dimensional geometry.

SOFTWARE REQUIRED

Linux operating software

Open foam solver

Para foam

PROCEDURE

1. Copy the 3 folders namely “0”, “constant” and “system” in already existing folder.

2. The necessary changes are made in these folders as per the required properties. The “0”
folder contains the properties of fluid. The “constant” folder contains the geometry, mesh
generation and transport properties. The “system” folder contains the accuracy of the
flow process.

3. Once the above mentioned files are generated, the OpenFOAM terminal is opened and
the mesh file is generated using the “blockMesh”. This mesh can be checked using the
“checkMesh” command.

4. Then the “simpleFoam” command is used to generate the physical properties at the given
time intervals.

5. Now for the analysis part, “paraFoam” command is used to open the paraView editor. All
the analysis is done using Paraview.

6. The Convergence History, and the Contour plots are obtained and a screenshot is taken.
/*--------------------------------*- C++ -*-----------------------------*\

| ========= |
|| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|| \\ / O peration | Version: 2.0.1
|| \\ / A nd | Web: www.OpenFOAM.com
|| \\/ M anipulation |
|\*---------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -3 0 0 0 0];
internalField uniform 14.855;
boundaryField
{
inlet
{
type fixedValue;
value uniform 14.855;
}
outlet
{
type zeroGradient;
}
upperWall
{
type epsilonWallFunction;
value uniform 14.855;
}
lowerWall
{
type epsilonWallFunction;
value uniform 14.855;
}
frontAndBack
{
type empty;
}
//
*************************************************************************
//
/*--------------------------------*- C++ -*-----------------------------*\
| ========= |
|| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|| \\ / O peration | Version: 2.0.1
|| \\ / A nd | Web: www.OpenFOAM.com
|| \\/ M anipulation |
|\*---------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0.375;
boundaryField
{
inlet
{
type fixedValue;
value uniform 0.375;
}
outlet
{
type zeroGradient;
}
upperWall
{
type kqRWallFunction;
value uniform 0.375;
}
lowerWall
{
type kqRWallFunction;
value uniform 0.375;
}
frontAndBack
{
type empty;
}
}

//
*************************************************************************
//
/*--------------------------------*- C++ -*-----------------------------*\
| ========= |
|| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|| \\ / O peration | Version: 2.0.1
|| \\ / A nd | Web: www.OpenFOAM.com
|| \\/ M anipulation |
|\*---------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
inlet
{
type calculated;
value uniform 0;
}
outlet
{
type calculated;
value uniform 0;
}
upperWall
{
type nutkWallFunction;
value uniform 0;
}
lowerWall
{
type nutkWallFunction;
value uniform 0;
}
frontAndBack
{
type empty;
}
}

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

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

internalField uniform 0;

boundaryField
{
inlet
{
type fixedValue;
value uniform 0;
}

outlet
{
type zeroGradient;
}

upperWall
{
type zeroGradient;
}

lowerWall
{
type zeroGradient;
}

frontAndBack
{
type empty;
}
}

//
*************************************************************************
//
/*--------------------------------*- C++ -*-----------------------------*\
| ========= |
|| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|| \\ / O peration | Version: 2.0.1
|| \\ / A nd | Web: www.OpenFOAM.com
|| \\/ 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;
}

upperWall
{
type zeroGradient;
}

lowerWall
{
type zeroGradient;
}

frontAndBack
{
type empty;
}
}

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

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

internalField uniform (0 0 0 0 0 0);

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

outlet
{
type zeroGradient;
}

upperWall
{
type kqRWallFunction;
value uniform ( 0 0 0 0 0 0 );
}

lowerWall
{
type kqRWallFunction;
value uniform ( 0 0 0 0 0 0 );
}

frontAndBack
{
type empty;
}
}

//
*************************************************************************
//
/*--------------------------------*- C++ -*---------------------------*\
| ========= |
|| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|| \\ / O peration | Version: 2.0.1
|| \\ / A nd | Web: www.OpenFOAM.com
|| \\/ 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 (10 0 0);
}

outlet
{
type zeroGradient;
}

upperWall
{
type fixedValue;
value uniform (0 0 0);
}

lowerWall
{
type fixedValue;
value uniform (0 0 0);
}

frontAndBack
{
type empty;
}
}

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

convertToMeters 1;

vertices
(
(0 0 0)
(5 0 0)
(5 0.5 0)
(0 0.5 0)
(0 0 0.1)
(5 0 0.1)
(5 0.5 0.1)
(0 0.5 0.1)
);

blocks
(
hex (0 1 2 3 4 5 6 7) (40 10 1) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
inlet
{
type patch;
faces
(
(0 4 7 3)
);
}
outlet
{
type patch;
faces
(
(2 6 5 1)
);
}
upperWall
{
type wall;
faces
(
(3 7 6 2)
);
}
lowerWall
{
type wall;
faces
(
(1 5 4 0)
);
}
frontAndBack
{
type empty;
faces
(
(0 3 2 1)
(4 5 6 7)
);
}
);

mergePatchPairs
(
);

//
*************************************************************************
//
/*--------------------------------*- C++ -*-----------------------------*\
| ========= |
|| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|| \\ / O peration | Version: 2.0.1
|| \\ / A nd | Web: www.OpenFOAM.com
|| \\/ M anipulation |
|\*---------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
5
(
inlet
{
type patch;
nFaces 10;
startFace 750;
}
outlet
{
type patch;
nFaces 10;
startFace 760;
}
upperWall
{
type wall;
nFaces 40;
startFace 770;
}
lowerWall
{
type wall;
nFaces 40;
startFace 810;
}
frontAndBack
{
type empty;
nFaces 800;
startFace 850;
}
)

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

RASModel kEpsilon;

turbulence on;

printCoeffs on;

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

transportModel Newtonian;

nu nu [ 0 2 -1 0 0 0 0 ] 1e-05;

CrossPowerLawCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
m m [ 0 0 1 0 0 0 0 ] 1;
n n [ 0 0 0 0 0 0 0 ] 1;
}

BirdCarreauCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
k k [ 0 0 1 0 0 0 0 ] 0;
n n [ 0 0 0 0 0 0 0 ] 1;
}

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

application simpleFoam;

startFrom latestTime;

startTime 0;

stopAt endTime;

endTime 1000;

deltaT 1;

writeControl timeStep;

writeInterval 50;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression off;

timeFormat general;

timePrecision 6;

runTimeModifiable true;
functions
{
streamLines
{
type streamLine;

// Where to load it from (if not already in solver)


functionObjectLibs ("libfieldFunctionObjects.so");

// Output every
outputControl outputTime;
// outputInterval 10;

setFormat vtk; //gnuplot; //xmgr; //raw; //jplot;

// Velocity field to use for tracking.


U U;

// Tracked forwards (+U) or backwards (-U)


trackForward true;

// Names of fields to sample. Should contain above velocity field!


fields (p k U);

// Steps particles can travel before being removed


lifeTime 10000;

// Number of steps per cell (estimate). Set to 1 to disable


subcycling.
nSubCycle 5;

// Cloud name to use


cloudName particleTracks;

// Seeding method. See the sampleSets in sampleDict.


seedSampleSet uniform; //cloud;//triSurfaceMeshPointSet;

uniformCoeffs
{
type uniform;
axis x; //distance;

start (-0.0205 0.001 0.00001);


end (-0.0205 0.0251 0.00001);
nPoints 10;
}
}
}

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

ddtSchemes
{
default steadyState;
}

gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
grad(U) Gauss linear;
}

divSchemes
{
default none;
div(phi,U) Gauss upwind;
div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div(phi,R) Gauss upwind;
div(R) Gauss linear;
div(phi,nuTilda) Gauss upwind;
div((nuEff*dev(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
default none;
laplacian(nuEff,U) Gauss linear corrected;
laplacian((1|A(U)),p) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
laplacian(DREff,R) Gauss linear corrected;
laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
}

interpolationSchemes
{
default linear;
interpolate(U) linear;
}

snGradSchemes
{
default corrected;
}

fluxRequired
{
default no;
p ;
}

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

solvers
{
p
{
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0.01;
}

U
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0.1;
}

k
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0.1;
}

epsilon
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0.1;
}

R
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0.1;
}

nuTilda
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0.1;
}
}

SIMPLE
{
nNonOrthogonalCorrectors 0;

residualControl
{
p 1e-2;
U 1e-3;
"(k|epsilon|omega)" 1e-3;
}
}

relaxationFactors
{
p 0.3;
U 0.7;
k 0.7;
epsilon 0.7;
R 0.7;
nuTilda 0.7;
}

//
*************************************************************************
//
RESULT
Experiment No 6:
INCOMPRESSIBLE EXTERNAL LAMINAR FLOWS USING
OPEN-FOAM

AIM
To study incompressible external laminar flows in two dimensional geometry.

SOFTWARE REQUIRED

Linux operating software

Open foam solver

Para foam

PROCEDURE

1. Copy the 3 folders namely “0”, “constant” and “system” in already existing folder.

2. The necessary changes are made in these folders as per the required properties. The “0”
folder contains the properties of fluid. The “constant” folder contains the geometry, mesh
generation and transport properties. The “system” folder contains the accuracy of the
flow process.

3. Once the above mentioned files are generated, the OpenFOAM terminal is opened and
the mesh file is generated using the “blockMesh”. This mesh can be checked using the
“checkMesh” command.

4. Then the “simpleFoam” command is used to generate the physical properties at the given
time intervals.

5. Now for the analysis part, “paraFoam” command is used to open the paraView editor. All
the analysis is done using Paraview.

6. The Convergence History, and the Contour plots are obtained and a screenshot is taken.
/*--------------------------------*- C++ -*----------------------------
------*\
| ========= |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|| \\ / O peration | Version: 2.0.1
|| \\ / A nd | Web: www.OpenFOAM.com
|| \\/ M anipulation |
|\*--------------------------------------------------------------------
-------*/FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * //

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

internalField uniform 14.855;

boundaryField
{
inlet
{
type fixedValue;
value uniform 14.855;
}
outlet
{
type zeroGradient;
}
upperWall
{
type epsilonWallFunction;
value uniform 14.855;
}
lowerWall
{
type epsilonWallFunction;
value uniform 14.855;
}
frontAndBack
{
type empty;
}
}

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

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

internalField uniform 0.375;

boundaryField
{
inlet
{
type fixedValue;
value uniform 0.375;
}
outlet
{
type zeroGradient;
}
upperWall
{
type kqRWallFunction;
value uniform 0.375;
}
lowerWall
{
type kqRWallFunction;
value uniform 0.375;
}
frontAndBack
{
type empty;
}
}
//
*************************************************************************
//
/*--------------------------------*- C++ -*----------------------------*\
| ========= |
|| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|| \\ / O peration | Version: 2.0.1
|| \\ / A nd | Web: www.OpenFOAM.com
|| \\/ M anipulation |
|\*----------------------------------------------------------------------
*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* //

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

internalField uniform 0;

boundaryField
{
inlet
{
type calculated;
value uniform 0;
}
outlet
{
type calculated;
value uniform 0;
}
upperWall
{
type nutkWallFunction;
value uniform 0;
}
lowerWall
{
type nutkWallFunction;
value uniform 0;
}
frontAndBack
{
type empty;
}
}

//
*************************************************************************
//
/*--------------------------------*- C++ -*----------------------------*\
| ========= |
|| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|| \\ / O peration | Version: 2.0.1
|| \\ / A nd | Web: www.OpenFOAM.com
|| \\/ 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;
}

upperWall
{
type zeroGradient;
}

lowerWall
{
type zeroGradient;
}

frontAndBack
{
type empty;
}
}

//
*************************************************************************
//
/*--------------------------------*- C++ -*-----------------------------*\
| ========= |
|| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|| \\ / O peration | Version: 2.0.1
|| \\ / A nd | Web: www.OpenFOAM.com
|| \\/ M anipulation |
|\*----------------------------------------------------------------------
*/
FoamFile
{
version 2.0;
format ascii;
class volSymmTensorField;
object R;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* //
dimensions [0 2 -2 0 0 0 0];
internalField uniform (0 0 0 0 0 0);
boundaryField
{
inlet
{
type fixedValue;
value uniform (0 0 0 0 0 0);
}

outlet
{
type zeroGradient;
}

upperWall
{
type kqRWallFunction;
value uniform ( 0 0 0 0 0 0 );
}

lowerWall
{
type kqRWallFunction;
value uniform ( 0 0 0 0 0 0 );
}

frontAndBack
{
type empty;
}
}

//
*************************************************************************
//
/*--------------------------------*- C++ -*----------------------------*\
| ========= |
|| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|| \\ / O peration | Version: 2.0.1
|| \\ / A nd | Web: www.OpenFOAM.com
|| \\/ M anipulation |
|\*-----------------------------------------------------------------------
----*/
FoamFile
{
version 2.0;
format ascii;
class volSymmTensorField;
object R;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* //
dimensions [0 2 -2 0 0 0 0];
internalField uniform (0 0 0 0 0 0);
boundaryField
{
inlet
{
type fixedValue;
value uniform (0 0 0 0 0 0);
}

outlet
{
type zeroGradient;
}

upperWall
{
type kqRWallFunction;
value uniform ( 0 0 0 0 0 0 );
}

lowerWall
{
type kqRWallFunction;
value uniform ( 0 0 0 0 0 0 );
}

frontAndBack
{
type empty;
}
}

//
*************************************************************************
//
/*--------------------------------*- C++ -*-----------------------------*\
| ========= |
|| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|| \\ / O peration | Version: 2.0.1
|| \\ / A nd | Web: www.OpenFOAM.com
|| \\/ 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 (10 0 0);
}

outlet
{
type zeroGradient;
}

upperWall
{
type fixedValue;
value uniform (0 0 0);
}

lowerWall
{
type fixedValue;
value uniform (0 0 0);
}

frontAndBack
{
type empty;
}
}

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

convertToMeters 1;

vertices
(
(0 0 0)
(10 0 0)
(10 3 0)
(0 3 0)
(0 0 1)
(10 0 1)
(10 3 1)
(0 3 1)
(5 3 0)
(6 3 0)
(6 3.5 0)
(5 3.5 0)
(5 3 1)
(6 3 1)
(6 3.5 1)
(5 3.5 1)
);

blocks
(
hex (0 1 2 3 4 5 6 7) (20 10 1) simpleGrading (1 1 1)
hex (8 9 10 11 12 13 14 15) (10 10 1) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
inlet
{
type patch;
faces
(
(0 4 7 3)
);
}
outlet
{
type patch;
faces
(
(1 5 6 2)
);
}
upperWall
{
type wall;
faces
(
(3 2 6 7)
);
}
lowerWall
{
type wall;
faces
(
(0 1 5 4)
);
}
frontAndBack
{
type empty;
faces
(
(0 1 2 3)
(4 5 6 7)
);
}
);

mergePatchPairs
(
);

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

6
(
inlet
{
type patch;
nFaces 10;
startFace 550;
}
outlet
{
type patch;
nFaces 10;
startFace 560;
}
upperWall
{
type wall;
nFaces 20;
startFace 570;
}
lowerWall
{
type wall;
nFaces 20;
startFace 590;
}
frontAndBack
{
type empty;
nFaces 400;
startFace 610;
}
defaultFaces
{
type empty;
nFaces 240;
startFace 1010;
}
)

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

RASModel kEpsilon;

turbulence off;

printCoeffs off;

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

transportModel Newtonian;

nu nu [ 0 2 -1 0 0 0 0 ] 1e-05;

CrossPowerLawCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
m m [ 0 0 1 0 0 0 0 ] 1;
n n [ 0 0 0 0 0 0 0 ] 1;
}

BirdCarreauCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
k k [ 0 0 1 0 0 0 0 ] 0;
n n [ 0 0 0 0 0 0 0 ] 1;
}

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

application simpleFoam;

startFrom latestTime;

startTime 0;

stopAt endTime;

endTime 1000;

deltaT 1;

writeControl timeStep;

writeInterval 50;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression off;

timeFormat general;

timePrecision 6;

runTimeModifiable true;
functions
{
streamLines
{
type streamLine;

// Where to load it from (if not already in solver)


functionObjectLibs ("libfieldFunctionObjects.so");

// Output every
outputControl outputTime;
// outputInterval 10;

setFormat vtk; //gnuplot; //xmgr; //raw; //jplot;

// Velocity field to use for tracking.


U U;

// Tracked forwards (+U) or backwards (-U)


trackForward true;

// Names of fields to sample. Should contain above velocity field!


fields (p k U);

// Steps particles can travel before being removed


lifeTime 10000;

// Number of steps per cell (estimate). Set to 1 to disable


subcycling.
nSubCycle 5;

// Cloud name to use


cloudName particleTracks;

// Seeding method. See the sampleSets in sampleDict.


seedSampleSet uniform; //cloud;//triSurfaceMeshPointSet;

uniformCoeffs
{
type uniform;
axis x; //distance;

start (-0.0205 0.001 0.00001);


end (-0.0205 0.0251 0.00001);
nPoints 10;
}
}
}

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

ddtSchemes
{
default steadyState;
}

gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
grad(U) Gauss linear;
}

divSchemes
{
default none;
div(phi,U) Gauss upwind;
div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div(phi,R) Gauss upwind;
div(R) Gauss linear;
div(phi,nuTilda) Gauss upwind;
div((nuEff*dev(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
default none;
laplacian(nuEff,U) Gauss linear corrected;
laplacian((1|A(U)),p) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
laplacian(DREff,R) Gauss linear corrected;
laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
}

interpolationSchemes
{
default linear;
interpolate(U) linear;
}

snGradSchemes
{
default corrected;
}

fluxRequired
{
default no;
p ;
}

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

solvers
{
p
{
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0.01;
}

U
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0.1;
}

k
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0.1;
}

epsilon
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0.1;
}

R
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0.1;
}

nuTilda
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0.1;
}
}

SIMPLE
{
nNonOrthogonalCorrectors 0;

residualControl
{
p 1e-2;
U 1e-3;
"(k|epsilon|omega)" 1e-3;
}
}

relaxationFactors
{
p 0.3;
U 0.7;
k 0.7;
epsilon 0.7;
R 0.7;
nuTilda 0.7;
}

//
*************************************************************************
//
RESULT
Experiment No 7:
INCOMPRESSIBLE EXTERNAL TURBULENT FLOWS USING
OPEN-FOAM

AIM
To study incompressible external turbulent flows in two dimensional geometry.

SOFTWARE REQUIRED

Linux operating software

Open foam solver

Para foam

PROCEDURE

1. Copy the 3 folders namely “0”, “constant” and “system” in already existing folder.

2. The necessary changes are made in these folders as per the required properties. The “0”
folder contains the properties of fluid. The “constant” folder contains the geometry, mesh
generation and transport properties. The “system” folder contains the accuracy of the
flow process.

3. Once the above mentioned files are generated, the OpenFOAM terminal is opened and
the mesh file is generated using the “blockMesh”. This mesh can be checked using the
“checkMesh” command.

4. Then the “simpleFoam” command is used to generate the physical properties at the given
time intervals.

5. Now for the analysis part, “paraFoam” command is used to open the paraView editor. All
the analysis is done using Paraview.

6. The Convergence History, and the Contour plots are obtained and a screenshot is taken.
/*--------------------------------*- C++ -*--------------------------*\
| ========= |
|| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|| \\ / O peration | Version: 2.0.1
|| \\ / A nd | Web: www.OpenFOAM.com
|| \\/ M anipulation |
|\*--------------------------------------------------------------------
-------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform 14.855;

boundaryField
{
inlet
{
type fixedValue;
value uniform 14.855;
}
outlet
{
type zeroGradient;
}
upperWall
{
type epsilonWallFunction;
value uniform 14.855;
}
lowerWall
{
type epsilonWallFunction;
value uniform 14.855;
}
frontAndBack
{
type empty;
}
}

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

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

internalField uniform 0.375;

boundaryField
{
inlet
{
type fixedValue;
value uniform 0.375;
}
outlet
{
type zeroGradient;
}
upperWall
{
type kqRWallFunction;
value uniform 0.375;
}
lowerWall
{
type kqRWallFunction;
value uniform 0.375;
}
frontAndBack
{
type empty;
}
}

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

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

internalField uniform 0;

boundaryField
{
inlet
{
type calculated;
value uniform 0;
}
outlet
{
type calculated;
value uniform 0;
}
upperWall
{
type nutkWallFunction;
value uniform 0;
}
lowerWall
{
type nutkWallFunction;
value uniform 0;
}
frontAndBack
{
type empty;
}
}

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

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

internalField uniform 0;

boundaryField
{
inlet
{
type fixedValue;
value uniform 0;
}

outlet
{
type zeroGradient;
}

upperWall
{
type zeroGradient;
}

lowerWall
{
type zeroGradient;
}

frontAndBack
{
type empty;
}
}

//
*************************************************************************
//
/*--------------------------------*- C++ -*-----------------------------*\
| ========= |
|| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|| \\ / O peration | Version: 2.0.1
|| \\ / A nd | Web: www.OpenFOAM.com
|| \\/ 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;
}

upperWall
{
type zeroGradient;
}

lowerWall
{
type zeroGradient;
}

frontAndBack
{
type empty;
}
}

//
*************************************************************************
//
/*--------------------------------*- C++ -*-----------------------------*\
| ========= |
|| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|| \\ / O peration | Version: 2.0.1
|| \\ / A nd | Web: www.OpenFOAM.com
|| \\/ M anipulation |
|\*-----------------------------------------------------------------------
----*/
FoamFile
{
version 2.0;
format ascii;
class volSymmTensorField;
object R;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];

internalField uniform (0 0 0 0 0 0);

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

outlet
{
type zeroGradient;
}

upperWall
{
type kqRWallFunction;
value uniform ( 0 0 0 0 0 0 );
}

lowerWall
{
type kqRWallFunction;
value uniform ( 0 0 0 0 0 0 );
}

frontAndBack
{
type empty;
}
}

//
*************************************************************************
//
/*--------------------------------*- C++ -*-----------------------------*\
| ========= |
|| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|| \\ / O peration | Version: 2.0.1
|| \\ / A nd | Web: www.OpenFOAM.com
|| \\/ 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 (10 0 0);
}

outlet
{
type zeroGradient;
}

upperWall
{
type fixedValue;
value uniform (0 0 0);
}

lowerWall
{
type fixedValue;
value uniform (0 0 0);
}

frontAndBack
{
type empty;
}
}

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

convertToMeters 1;

vertices
(
(0 0 0)
(10 0 0)
(10 3 0)
(0 3 0)
(0 0 1)
(10 0 1)
(10 3 1)
(0 3 1)
(5 3 0)
(6 3 0)
(6 3.5 0)
(5 3.5 0)
(5 3 1)
(6 3 1)
(6 3.5 1)
(5 3.5 1)
);

blocks
(
hex (0 1 2 3 4 5 6 7) (20 10 1) simpleGrading (1 1 1)
hex (8 9 10 11 12 13 14 15) (10 10 1) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
inlet
{
type patch;
faces
(
(0 4 7 3)
);
}
outlet
{
type patch;
faces
(
(1 5 6 2)
);
}
upperWall
{
type wall;
faces
(
(3 2 6 7)
);
}
lowerWall
{
type wall;
faces
(
(0 1 5 4)
);
}
frontAndBack
{
type empty;
faces
(
(0 1 2 3)
(4 5 6 7)
);
}
);

mergePatchPairs
(
);

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

6
(
inlet
{
type patch;
nFaces 10;
startFace 550;
}
outlet
{
type patch;
nFaces 10;
startFace 560;
}
upperWall
{
type wall;
nFaces 20;
startFace 570;
}
lowerWall
{
type wall;
nFaces 20;
startFace 590;
}
frontAndBack
{
type empty;
nFaces 400;
startFace 610;
}
defaultFaces
{
type empty;
nFaces 240;
startFace 1010;
}
)

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

RASModel kEpsilon;

turbulence on;

printCoeffs on;

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

transportModel Newtonian;

nu nu [ 0 2 -1 0 0 0 0 ] 1e-05;

CrossPowerLawCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
m m [ 0 0 1 0 0 0 0 ] 1;
n n [ 0 0 0 0 0 0 0 ] 1;
}

BirdCarreauCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
k k [ 0 0 1 0 0 0 0 ] 0;
n n [ 0 0 0 0 0 0 0 ] 1;
}

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

application simpleFoam;

startFrom latestTime;

startTime 0;

stopAt endTime;

endTime 1000;

deltaT 1;

writeControl timeStep;

writeInterval 50;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression off;

timeFormat general;

timePrecision 6;

runTimeModifiable true;
functions
{
streamLines
{
type streamLine;

// Where to load it from (if not already in solver)


functionObjectLibs ("libfieldFunctionObjects.so");

// Output every
outputControl outputTime;
// outputInterval 10;

setFormat vtk; //gnuplot; //xmgr; //raw; //jplot;

// Velocity field to use for tracking.


U U;

// Tracked forwards (+U) or backwards (-U)


trackForward true;

// Names of fields to sample. Should contain above velocity field!


fields (p k U);

// Steps particles can travel before being removed


lifeTime 10000;

// Number of steps per cell (estimate). Set to 1 to disable


subcycling.
nSubCycle 5;

// Cloud name to use


cloudName particleTracks;

// Seeding method. See the sampleSets in sampleDict.


seedSampleSet uniform; //cloud;//triSurfaceMeshPointSet;

uniformCoeffs
{
type uniform;
axis x; //distance;

start (-0.0205 0.001 0.00001);


end (-0.0205 0.0251 0.00001);
nPoints 10;
}
}
}

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

ddtSchemes
{
default steadyState;
}

gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
grad(U) Gauss linear;
}

divSchemes
{
default none;
div(phi,U) Gauss upwind;
div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div(phi,R) Gauss upwind;
div(R) Gauss linear;
div(phi,nuTilda) Gauss upwind;
div((nuEff*dev(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
default none;
laplacian(nuEff,U) Gauss linear corrected;
laplacian((1|A(U)),p) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
laplacian(DREff,R) Gauss linear corrected;
laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
}

interpolationSchemes
{
default linear;
interpolate(U) linear;
}

snGradSchemes
{
default corrected;
}

fluxRequired
{
default no;
p ;
}

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

solvers
{
p
{
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0.01;
}

U
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0.1;
}

k
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0.1;
}

epsilon
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0.1;
}

R
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0.1;
}

nuTilda
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0.1;
}
}

SIMPLE
{
nNonOrthogonalCorrectors 0;

residualControl
{
p 1e-2;
U 1e-3;
"(k|epsilon|omega)" 1e-3;
}
}

relaxationFactors
{
p 0.3;
U 0.7;
k 0.7;
epsilon 0.7;
R 0.7;
nuTilda 0.7;
}

//
*************************************************************************
//
RESULT
Experiment No 8:
COMPRESSIBLE FLOW USING OPEN-FOAM

AIM
To study compressible flows in two dimensional geometry.

SOFTWARE REQUIRED

Linux operating software

Open foam solver

Para foam

PROCEDURE

1. Copy the 3 folders namely “0”, “constant” and “system” in already existing folder.

2. The necessary changes are made in these folders as per the required properties. The “0”
folder contains the properties of fluid. The “constant” folder contains the geometry, mesh
generation and transport properties. The “system” folder contains the accuracy of the
flow process.

3. Once the above mentioned files are generated, the OpenFOAM terminal is opened and
the mesh file is generated using the “blockMesh”. This mesh can be checked using the
“checkMesh” command.

4. Then the “rhopimpleFoam” command is used to generate the physical properties at the
given time intervals.

5. Now for the analysis part, “paraFoam” command is used to open the paraView editor. All
the analysis is done using Paraview.

6. The Convergence History, and the Contour plots are obtained and a screenshot is taken.
/*--------------------------------*- C++ -*----------------------------*\
| ========= |
|| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|| \\ / O peration | Version: 2.0.1
|| \\ / A nd | Web: www.OpenFOAM.com
|| \\/ M anipulation |
|\*---------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object alphat;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
inlet
{
type zeroGradient;
}

outlet
{
type zeroGradient;
}

upperWall
{
type zeroGradient;
}
lowerWall
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
//
*************************************************************************
//
/*--------------------------------*- C++ -*-----------------------------*\
| ========= |
|| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|| \\ / O peration | Version: 2.0.1
|| \\ / A nd | Web: www.OpenFOAM.com
|| \\/ M anipulation |
|\*---------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volTensorField;
object B;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* //
dimensions [0 2 -2 0 0 0 0];
internalField uniform (0 0 0 0 0 0 0 0 0);
boundaryField
{
inlet
{
type fixedValue;
value uniform (0 0 0 0 0 0 0 0 0);
}
outlet
{
type inletOutlet;
inletValue uniform (0 0 0 0 0 0 0 0 0);
value uniform (0 0 0 0 0 0 0 0 0);
}
upperWall
{
type zeroGradient;
}

lowerWall
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
//
*************************************************************************
//
/*--------------------------------*- C++ -*-------------------------------
---*\
| ========= |
|| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|| \\ / O peration | Version: 2.0.1
|| \\ / A nd | Web: www.OpenFOAM.com
|| \\/ M anipulation |
|\*-----------------------------------------------------------------------
----*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
inlet
{
type fixedValue;
value uniform 2e-05;
}
outlet
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
upperWall
{
type fixedValue;
value uniform 0;
}
lowerWall
{
type fixedValue;
value uniform 0;
}
frontAndBack
{
type empty;
}
}

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

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

internalField uniform 0;

boundaryField
{
inlet
{
type zeroGradient;
}

outlet
{
type zeroGradient;
}

upperWall
{
type zeroGradient;
}

lowerWall
{
type zeroGradient;
}

frontAndBack
{
type empty;
}
}

//
*************************************************************************
//
/*--------------------------------*- C++ -*-------------------------------
---*\
| ========= |
|| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|| \\ / O peration | Version: 2.0.1
|| \\ / A nd | Web: www.OpenFOAM.com
|| \\/ M anipulation |
|\*-----------------------------------------------------------------------
----*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object muTilda;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* //
dimensions [1 -1 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
inlet
{
type fixedValue;
value uniform 0;
}
outlet
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
upperWall
{
type fixedValue;
value uniform 0;
}
lowerWall
{
type fixedValue;
value uniform 0;
}
frontAndBack
{
type empty;
}
}

//
*************************************************************************
//
/*--------------------------------*- C++ -*-------------------------------
---*\
| ========= |
|| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|| \\ / O peration | Version: 2.0.1
|| \\ / A nd | Web: www.OpenFOAM.com
|| \\/ M anipulation |
|\*-----------------------------------------------------------------------
----*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 1e5;
boundaryField
{
inlet
{
type zeroGradient;
}
outlet
{
type waveTransmissive;
field p;
phi phi;
rho rho;
psi psi;
gamma 1.3;
fieldInf 1e5;
lInf 0.3;
value uniform 1e5;
}
upperWall
{
type zeroGradient;
}
lowerWall
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
//
*************************************************************************
//
/*--------------------------------*- C++ -*-------------------------------
---*\
| ========= |
|| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|| \\ / O peration | Version: 2.0.1
|| \\ / A nd | Web: www.OpenFOAM.com
|| \\/ M anipulation |
|\*-----------------------------------------------------------------------
----*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* //
dimensions [0 0 0 1 0 0 0];
internalField uniform 300;
boundaryField
{
inlet
{
type fixedValue;
value uniform 300;
}
outlet
{
type inletOutlet;
inletValue uniform 300;
value uniform 300;
}
upperWall
{
type fixedValue;
value uniform 300;
}
lowerWall
{
type fixedValue;
value uniform 300;
}
frontAndBack
{
type empty;
}
}

//
*************************************************************************
//
/*--------------------------------*- C++ -*-------------------------------
---*\
| ========= |
|| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|| \\ / O peration | Version: 2.0.1
|| \\ / A nd | Web: www.OpenFOAM.com
|| \\/ 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 turbulentInlet;
referenceField uniform (10 0 0);
fluctuationScale (0.02 0.01 0.01);
value uniform (10 0 0);
}
outlet
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0 0 0);
}
upperWall
{
type fixedValue;
value uniform (0 0 0);
}
lowerWall
{
type fixedValue;
value uniform (0 0 0);
}
frontAndBack
{
type empty;
}
}
//
*************************************************************************
//
/*--------------------------------*- C++ -*-------------------------------
---*\
| ========= |
|| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|| \\ / O peration | Version: 2.0.1
|| \\ / A nd | Web: www.OpenFOAM.com
|| \\/ M anipulation |
|\*-----------------------------------------------------------------------
----*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* //
convertToMeters 0.001;
vertices
(
(-20.6 0 -0.5)
(-20.6 3 -0.5)
(-20.6 12.7 -0.5)
(-20.6 25.4 -0.5)
(0 -25.4 -0.5)
(0 -5 -0.5)
(0 0 -0.5)
(0 3 -0.5)
(0 12.7 -0.5)
(0 25.4 -0.5)
(206 -25.4 -0.5)
(206 -8.5 -0.5)
(206 0 -0.5)
(206 6.5 -0.5)
(206 17 -0.5)
(206 25.4 -0.5)
(290 -16.6 -0.5)
(290 -6.3 -0.5)
(290 0 -0.5)
(290 4.5 -0.5)
(290 11 -0.5)
(290 16.6 -0.5)
(-20.6 0 0.5)
(-20.6 3 0.5)
(-20.6 12.7 0.5)
(-20.6 25.4 0.5)
(0 -25.4 0.5)
(0 -5 0.5)
(0 0 0.5)
(0 3 0.5)
(0 12.7 0.5)
(0 25.4 0.5)
(206 -25.4 0.5)
(206 -8.5 0.5)
(206 0 0.5)
(206 6.5 0.5)
(206 17 0.5)
(206 25.4 0.5)
(290 -16.6 0.5)
(290 -6.3 0.5)
(290 0 0.5)
(290 4.5 0.5)
(290 11 0.5)
(290 16.6 0.5)
);
blocks
(
hex (0 6 7 1 22 28 29 23) (18 7 1) simpleGrading (0.5 1.8 1)
hex (1 7 8 2 23 29 30 24) (18 10 1) simpleGrading (0.5 4 1)
hex (2 8 9 3 24 30 31 25) (18 13 1) simpleGrading (0.5 0.25 1)
hex (4 10 11 5 26 32 33 27) (180 18 1) simpleGrading (4 1 1)
hex (5 11 12 6 27 33 34 28) (180 9 1) edgeGrading (4 4 4 4 0.5 1 1 0.5
1 1 1 1)
hex (6 12 13 7 28 34 35 29) (180 7 1) edgeGrading (4 4 4 4 1.8 1 1 1.8
1 1 1 1)
hex (7 13 14 8 29 35 36 30) (180 10 1) edgeGrading (4 4 4 4 4 1 1 4 1
1 1 1)
hex (8 14 15 9 30 36 37 31) (180 13 1) simpleGrading (4 0.25 1)
hex (10 16 17 11 32 38 39 33) (25 18 1) simpleGrading (2.5 1 1)
hex (11 17 18 12 33 39 40 34) (25 9 1) simpleGrading (2.5 1 1)
hex (12 18 19 13 34 40 41 35) (25 7 1) simpleGrading (2.5 1 1)
hex (13 19 20 14 35 41 42 36) (25 10 1) simpleGrading (2.5 1 1)
hex (14 20 21 15 36 42 43 37) (25 13 1) simpleGrading (2.5 0.25 1)
);
edges
(
);
boundary
(
inlet
{
type patch;
faces
(
(0 22 23 1)
(1 23 24 2)
(2 24 25 3)
);
}
outlet
{
type patch;
faces
(
(16 17 39 38)
(17 18 40 39)
(18 19 41 40)
(19 20 42 41)
(20 21 43 42)
);
}
upperWall
{
type wall;
faces
(
(3 25 31 9)
(9 31 37 15)
(15 37 43 21)
);
}
lowerWall
{
type wall;
faces
(
(0 6 28 22)
(6 5 27 28)
(5 4 26 27)
(4 10 32 26)
(10 16 38 32)
);
}
frontAndBack
{
type empty;
faces
(
(22 28 29 23)
(23 29 30 24)
(24 30 31 25)
(26 32 33 27)
(27 33 34 28)
(28 34 35 29)
(29 35 36 30)
(30 36 37 31)
(32 38 39 33)
(33 39 40 34)
(34 40 41 35)
(35 41 42 36)
(36 42 43 37)
(0 1 7 6)
(1 2 8 7)
(2 3 9 8)
(4 5 11 10)
(5 6 12 11)
(6 7 13 12)
(7 8 14 13)
(8 9 15 14)
(10 11 17 16)
(11 12 18 17)
(12 13 19 18)
(13 14 20 19)
(14 15 21 20)
);
}
);
mergePatchPairs
(
);

//
*************************************************************************
//
/*--------------------------------*- C++ -*-----------------------------*\
| ========= |
|| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|| \\ / O peration | Version: 2.0.1
|| \\ / A nd | Web: www.OpenFOAM.com
|| \\/ M anipulation |
|\*---------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* //
5
(
inlet
{
type patch;
nFaces 30;
startFace 24170;
}
outlet
{
type patch;
nFaces 57;
startFace 24200;
}
upperWall
{
type wall;
nFaces 223;
startFace 24257;
}
lowerWall
{
type wall;
nFaces 250;
startFace 24480;
}
frontAndBack
{
type empty;
nFaces 24450;
startFace 24730;
}
)

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

LESModel oneEqEddy;

turbulence on;

printCoeffs on;

delta cubeRootVol;

cubeRootVolCoeffs
{
deltaCoeff 1;
}

PrandtlCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}

smoothCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}
maxDeltaRatio 1.1;
}

Cdelta 0.158;
}

vanDriestCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}

smoothCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}

maxDeltaRatio 1.1;
}

Aplus 26;
Cdelta 0.158;
}

smoothCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}

maxDeltaRatio 1.1;
}

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

application rhoPimpleFoam;

startFrom startTime;

startTime 10;

stopAt endTime;

endTime 12;

deltaT 1e-05;

writeControl timeStep;

writeInterval 100;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression off;

timeFormat general;

timePrecision 6;

runTimeModifiable true;
adjustTimeStep no;

maxCo 0.5;

functions
{
fieldAverage1
{
type fieldAverage;
functionObjectLibs ( "libfieldFunctionObjects.so" );
enabled true;
outputControl outputTime;

fields
(
U
{
mean on;
prime2Mean on;
base time;
}

p
{
mean on;
prime2Mean on;
base time;
}
);
}
}

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

numberOfSubdomains 4;

method hierarchical;

simpleCoeffs
{
n ( 2 1 1 );
delta 0.001;
}

hierarchicalCoeffs
{
n ( 2 2 1 );
delta 0.001;
order xyz;
}

manualCoeffs
{
dataFile "";
}

distributed no;

roots ( );

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

ddtSchemes
{
default backward;
}

gradSchemes
{
default Gauss linear;
}

divSchemes
{
default none;
div(phi,U) Gauss filteredLinear2V 0.2 0;
div(phi,h) Gauss filteredLinear2 0.2 0;
div(phiU,p) Gauss linear;
div(phi,k) Gauss limitedLinear 1;
div(phi,B) Gauss limitedLinear 1;
div(phi,muTilda) Gauss limitedLinear 1;
div(B) Gauss linear;
div((muEff*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
default none;
laplacian(muEff,U) Gauss linear corrected;
laplacian((rho*(1|A(U))),p) Gauss linear corrected;
laplacian(alphaEff,h) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(DBEff,B) Gauss linear corrected;
laplacian(DmuTildaEff,muTilda) Gauss linear corrected;
}

interpolationSchemes
{
default linear;
}

snGradSchemes
{
default corrected;
}

fluxRequired
{
default no;
p ;
}

//
*************************************************************************
//
/*--------------------------------*- C++ -*---------------------------*\
| ========= |
|| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|| \\ / O peration | Version: 2.0.1
|| \\ / A nd | Web: www.OpenFOAM.com
|| \\/ M anipulation |
|\*-------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
"(p|rho)"
{
solver PCG;
preconditioner DIC;
tolerance 1e-6;
relTol 0;
}
"(p|rho)Final"
{
$p;
relTol 0;
}
"(U|h|k|nuTilda)"
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-6;
relTol 0;
}
"(U|h|k|nuTilda)Final"
{
$U;
relTol 0;
}
}
PIMPLE
{
momentumPredictor yes;
nOuterCorrectors 2;
nCorrectors 1;
nNonOrthogonalCorrectors 0;
rhoMin rhoMin [ 1 -3 0 0 0 ] 0.5;
rhoMax rhoMax [ 1 -3 0 0 0 ] 2.0;
}
relaxationFactors
{
"(U|h|k|epsilon|omega).*" 1;
}

//
*************************************************************************
//
RESULT

S-ar putea să vă placă și