Commit 97fc5165 authored by Andrew Heather's avatar Andrew Heather
Browse files

ENH: Added new periodicHill test case

parent 79f9c3bb
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
(cd steadyState && ./Allrun)
(cd transient && ./Allrun)
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1806 |
| \\ / 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 (1e-3 0 0);
boundaryField
{
"(inlet|outlet|front|back)"
{
type cyclic;
}
"(top|hills)"
{
type noSlip;
}
}
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1806 |
| \\ / 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|outlet|front|back)"
{
type cyclic;
}
"(top|hills)"
{
type zeroGradient;
}
}
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1806 |
| \\ / 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 1e-8;
boundaryField
{
"(inlet|outlet|front|back)"
{
type cyclic;
}
"(top|hills)"
{
type fixedValue;
value uniform 0;
}
}
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1806 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
"(inlet|outlet|front|back)"
{
type cyclic;
}
"(top|hills)"
{
type nutUSpaldingWallFunction;
value $internalField;
}
}
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1806 |
| \\ / 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|outlet|front|back)"
{
type cyclic;
}
"(top|hills)"
{
type zeroGradient;
}
}
// ************************************************************************* //
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh
runApplication topoSet
runApplication decomposePar
runParallel simpleFoam
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1806 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
transportModel Newtonian;
nu 2.643e-6;
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1806 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType RAS;
RAS
{
RASModel SpalartAllmaras;
printCoeffs no;
turbulence yes;
}
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1806 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
scale 0.001;
vertices
(
( 0 28 0) // 0
(252 28 0) // 1
(252 85 0) // 2
( 0 85 0) // 3
( 0 28 126) // 4
(252 28 126) // 5
(252 85 126) // 6
( 0 85 126) // 7
);
blocks
(
hex (0 1 2 3 4 5 6 7) (200 160 80) simpleGrading (1 ((0.5 0.5 100)(0.5 0.5 0.01)) 1)
);
edges #codeStream
{
codeInclude
#{
#include "pointField.H"
#include "mathematicalConstants.H"
#};
code
#{
const scalar xMin = 0;
const scalar xMax = 252;
const label nPoints = 1000;
const scalar dx = (xMax - xMin)/scalar(nPoints - 1);
os << "(" << nl << "spline 0 1" << nl;
pointField profile(nPoints, Zero);
for (label i = 0; i < nPoints; ++i)
{
scalar x = xMin + i*dx;
profile[i].x() = x;
if (x > 198) x = 252 - x;
if (x >= 0 && x < 9)
{
profile[i].y() =
28
+ 6.775070969851E-03*x*x
- 2.124527775800E-03*x*x*x;
}
else if (x >= 9 && x < 14)
{
profile[i].y() =
25.07355893131
+ 0.9754803562315*x
- 1.016116352781E-01*x*x
+ 1.889794677828E-03*x*x*x;
}
else if (x >= 14 && x < 20)
{
profile[i].y() =
2.579601052357E+01
+ 8.206693007457E-01*x
- 9.055370274339E-02*x*x
+ 1.626510569859E-03*x*x*x;
}
else if (x >= 20 && x < 30)
{
profile[i].y() =
4.046435022819E+01
- 1.379581654948E+00*x
+ 1.945884504128E-02*x*x
- 2.070318932190E-04*x*x*x;
}
else if (x >= 30 && x < 40)
{
profile[i].y() =
1.792461334664E+01
+ 8.743920332081E-01*x
- 5.567361123058E-02*x*x
+ 6.277731764683E-04*x*x*x;
}
else if (x >= 40 && x < 54)
{
profile[i].y() =
max
(
0,
5.639011190988E+01
- 2.010520359035E+00*x
+ 1.644919857549E-02*x*x
+ 2.674976141766E-05*x*x*x
);
}
profile[i].z() = 0;
}
os << profile << nl;
os << "spline 4 5" << nl;
profile.replace(2, 126);
os << profile << nl;
os << ");" << nl;
#};
};
boundary
(
inlet
{
type cyclic;
neighbourPatch outlet;
faces
(
(0 4 7 3)
);
}
outlet
{
type cyclic;
neighbourPatch inlet;
faces
(
(1 2 6 5)
);
}
top
{
type wall;
faces
(
(3 7 6 2)
);
}
hills
{
type wall;
faces
(
(1 5 4 0)
);
}
front
{
type cyclic;
neighbourPatch back;
faces
(
(0 3 2 1)
);
}
back
{
type cyclic;
neighbourPatch front;
faces
(
(4 5 6 7)
);
}
);
mergePatchPairs
(
);
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1806 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application simpleFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 1500;
deltaT 1;
writeControl timeStep;
writeInterval 100;
purgeWrite 3;
writeFormat binary;
writePrecision 6;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable true;
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1806 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
note "mesh decomposition control dictionary";
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 16;
method simple;
simpleCoeffs
{
n (4 2 2);
}
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
momentumSource
{
type meanVelocityForce;
selectionMode cellZone;
cellZone inletCellZone;
fields (U);
Ubar (1 0 0);
}
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1806 |
| \\ / 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;
}
divSchemes
{
default none;
div(phi,U) Gauss upwind;
div(phi,k) Gauss limitedLinear 1;
div(phi,nuTilda) Gauss limitedLinear 1;
div((nuEff*dev2(T(grad(U))))) Gauss linear;
}
laplacianSchemes
{
default Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes