Skip to content
Snippets Groups Projects
Commit a16fd1fa authored by Andrew Heather's avatar Andrew Heather
Browse files

TUT: Added new decay of isotropic turbulence case based on CBC data

Reference:
Comte-Bellot, G., and Corrsin, S., "Simple Eulerian Time Correlation of
Full- and Narrow-Band Velocity Signals in Grid-Generated, 'Isotropic'
Turbulence," Journal of Fluid Mechanics, Vol. 48, No. 2, 1971,
pp. 273–337.
parent a1558b88
No related branches found
No related tags found
No related merge requests found
Showing
with 574 additions and 1 deletion
......@@ -16,7 +16,7 @@ const vector L(dict.get<vector>("L"));
const Vector<label> N(dict.get<Vector<label>>("N"));
// Wave number vs energy profile
autoPtr<Function1<scalar>> Ek(Function1<scalar>::New("E", dict));
autoPtr<Function1<scalar>> Ek(Function1<scalar>::New("Ek", dict));
// Number of modes
const label nModes = dict.get<label>("nModes");
......
/*--------------------------------*- 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 volScalarField;
location "0";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
".*"
{
type cyclic;
}
}
// ************************************************************************* //
/*--------------------------------*- 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 volScalarField;
location "0";
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
".*"
{
type cyclic;
}
}
// ************************************************************************* //
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions
cleanCase0
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
restore0Dir
runApplication -s createBlockMesh createBoxTurb -createBlockMesh
runApplication decomposePar
runParallel createBoxTurb
runParallel pimpleFoam
Decay of homogenious incompressible isotropic turbulence
This case is based on the set-up of Comte-Bellot and S. Corrsin [1]
The mesh comprises a block-structured cube divided into 64x64x64 cells, with
a box length of 9*pi cm.
Turbulence is initialised using the target energy spectrum supplied in [1] (see
table 3).
For more information, see:
https://www.openfoam.com/documentation/cpp-guide/html/verification-validation-turbulent-decay-homogeneous-isotropic-turbulence.html
[1] G. Comte-Bellot and S. Corrsin, "The use of a contraction to improve the
isotropy of grid-generated turbulence," J. Fluid Mech. 25, 657 (1966).
/*--------------------------------*- 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 createBoxTurbDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
N (64 64 64);
//N (128 128 128);
//N (256 256 256);
// Suggested box size of 9*2*pi [cm]
L (0.56548667765 0.56548667765 0.56548667765);
nModes 5000;
// Energy as a function of wave number
// Here using Comte-Bellot and Corrsin data at t.U_0/M = 42 (see Ref. table 3)
Ek table
(
(15 0)
(20 0.000129)
(25 0.00023)
(30 0.000322)
(40 0.000435)
(50 0.000457)
(70 0.00038)
(100 0.00027)
(150 0.000168)
(200 0.00012)
(250 8.9e-05)
(300 7.03e-05)
(400 4.7e-05)
(600 2.47e-05)
(800 1.26e-05)
(1000 7.42e-06)
(1250 3.96e-06)
(1500 2.33e-06)
(1750 1.34e-06)
(2000 8e-07)
);
// ************************************************************************* //
WALE
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}
}
kEqn
{
delta cubeRootVol;
kEqnCoeffs
{
Ck 0.094;
Ce 1.048;
}
}
dynamicKEqn
{
delta cubeRootVol;
dynamicKEqnCoeffs
{
filter simple;
}
}
Smagorinsky
{
delta cubeRootVol;
SmagorinskyCoeffs
{
Ck 0.094;
Ce 1.048;
}
}
/*--------------------------------*- 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 1e-05;
// ************************************************************************* //
/*--------------------------------*- 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;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "include/turbulenceModels"
simulationType LES;
LES
{
turbulence on;
printCoeffs on;
LESModel kEqn;
${:$LESModel}
}
// ************************************************************************* //
/*--------------------------------*- 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 1;
vertices
(
(0 0 0)
(4 0 0)
(0 1 0)
(4 1 0)
(0 2 0)
(4 2 0)
(0 0 2)
(4 0 2)
(0 1 2)
(4 1 2)
(0 2 2)
(4 2 2)
);
blocks
(
hex (0 1 3 2 6 7 9 8) (40 25 30) simpleGrading (1 10.7028 1)
hex (2 3 5 4 8 9 11 10) (40 25 30) simpleGrading (1 0.0934 1)
);
edges
(
);
boundary
(
bottomWall
{
type wall;
faces ((0 1 7 6));
}
topWall
{
type wall;
faces ((4 10 11 5));
}
sides1_half0
{
type cyclic;
neighbourPatch sides1_half1;
faces ((0 2 3 1));
}
sides1_half1
{
type cyclic;
neighbourPatch sides1_half0;
faces ((6 7 9 8));
}
sides2_half0
{
type cyclic;
neighbourPatch sides2_half1;
faces ((2 4 5 3));
}
sides2_half1
{
type cyclic;
neighbourPatch sides2_half0;
faces ((8 9 11 10));
}
inout1_half0
{
type cyclic;
neighbourPatch inout1_half1;
faces ((1 3 9 7));
}
inout1_half1
{
type cyclic;
neighbourPatch inout1_half0;
faces ((0 6 8 2));
}
inout2_half0
{
type cyclic;
neighbourPatch inout2_half1;
faces ((3 5 11 9));
}
inout2_half1
{
type cyclic;
neighbourPatch inout2_half0;
faces ((2 8 10 4));
}
);
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 pimpleFoam;
startFrom startTime;
startTime 0;
//startTime 0.28;
//startTime 0.66;
stopAt endTime;
endTime 1;
deltaT 0.001;
writeControl timeStep;
writeInterval 10;
purgeWrite 0;
writeFormat binary;
writePrecision 6;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable true;
functions
{
energySpectrum1
{
type energySpectrum;
libs ("librandomProcessesFunctionObjects.so");
writeControl writeTime;
}
}
// ************************************************************************* //
/*--------------------------------*- 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 8;
method simple;
simpleCoeffs
{
n (2 2 2);
}
// ************************************************************************* //
/*--------------------------------*- 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 backward;
}
gradSchemes
{
default Gauss linear;
}
divSchemes
{
default none;
div(phi,U) Gauss linear;
div(phi,k) Gauss limitedLinear 1;
div(phi,B) Gauss limitedLinear 1;
div(B) Gauss linear;
div(U) Gauss linear;
div(phi,nuTilda) Gauss limitedLinear 1;
div((nuEff*dev2(T(grad(U))))) Gauss linear;
}
laplacianSchemes
{
default Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
wallDist
{
method meshWave;
}
// ************************************************************************* //
/*--------------------------------*- 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 fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
p
{
solver GAMG;
tolerance 0;
relTol 0.1;
smoother GaussSeidel;
}
pFinal
{
$p;
smoother DICGaussSeidel;
tolerance 1e-06;
relTol 0;
}
"(U|k|nuTilda)"
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-05;
relTol 0.1;
minIter 1;
}
"(U|k|nuTilda)Final"
{
$U;
tolerance 1e-05;
relTol 0;
}
}
PIMPLE
{
nOuterCorrectors 1;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;
}
// ************************************************************************* //
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment