TUT: planeChannel: new verification case for RANS turbulence models

This commit is contained in:
Kutalmis Bercin
2022-05-30 14:29:01 +01:00
parent c1311bc785
commit 7c59abef60
30 changed files with 2128 additions and 0 deletions

View File

@ -0,0 +1,97 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
scale 1;
nx 10;
ny 100;
nz 1;
xMin 0;
xMax 1;
yMin 0;
yMax 1;
yyMax 2;
zMin 0;
zMax 1;
yExpansion 10.09757454;
yExpansion2 #eval{ -1*$yExpansion };
vertices
(
($xMin $yMin $zMin)
($xMax $yMin $zMin)
($xMax $yMax $zMin)
($xMax $yyMax $zMin)
($xMin $yyMax $zMin)
($xMin $yMax $zMin)
($xMin $yMin $zMax)
($xMax $yMin $zMax)
($xMax $yMax $zMax)
($xMax $yyMax $zMax)
($xMin $yyMax $zMax)
($xMin $yMax $zMax)
);
blocks
(
hex ( 0 1 2 5 6 7 8 11) ($nx $ny $nz) simpleGrading (1 $yExpansion 1)
hex ( 5 2 3 4 11 8 9 10) ($nx $ny $nz) simpleGrading (1 $yExpansion2 1)
);
boundary
(
bottom
{
type wall;
faces ((0 6 7 1));
}
top
{
type wall;
faces ((4 3 9 10));
}
leftAndRight
{
type empty;
faces
(
(1 2 5 0)
(2 3 4 5)
(6 11 8 7)
(11 10 9 8)
);
}
inlet
{
type cyclic;
neighbourPatch outlet;
faces ((0 5 11 6)(5 4 10 11));
}
outlet
{
type cyclic;
neighbourPatch inlet;
faces ((1 7 8 2)(2 8 9 3));
}
);
// ************************************************************************* //

View File

@ -0,0 +1,151 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application simpleFoam;
startFrom latestTime;
startTime 0;
stopAt endTime;
endTime 100000;
deltaT 1;
writeControl timeStep;
writeInterval 10000;
purgeWrite 1;
writeFormat ascii;
writePrecision 16;
writeCompression off;
timeFormat general;
timePrecision 8;
runTimeModifiable false;
functions
{
fieldMinMax1
{
type fieldMinMax;
libs (fieldFunctionObjects);
writeToFile no;
log yes;
location yes;
mode magnitude;
fields ( p U k omega epsilon );
}
wallShearStress1
{
type wallShearStress;
libs (fieldFunctionObjects);
patches ( bottom );
executeControl writeTime;
writeControl writeTime;
}
yPlus1
{
type yPlus;
libs (fieldFunctionObjects);
executeControl writeTime;
writeControl writeTime;
}
writeCellCentres1
{
type writeCellCentres;
libs (fieldFunctionObjects);
executeControl onEnd;
writeControl onEnd;
}
turbulenceFields1
{
type turbulenceFields;
libs (fieldFunctionObjects);
fields ( k epsilon R );
executeControl writeTime;
writeControl writeTime;
}
productionRate1
{
type coded;
libs (utilityFunctionObjects);
name productionRate;
writeControl writeTime;
codeExecute
#{
auto* prodPtr =
mesh().getObjectPtr<volScalarField>("productionRate");
if (!prodPtr)
{
Info<< "Create production rate field" << nl;
prodPtr = new volScalarField
(
IOobject
(
"productionRate",
mesh().time().timeName(),
mesh(),
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh(),
sqr(dimLength)/pow3(dimTime)
);
regIOobject::store(prodPtr);
}
auto& prod = *prodPtr;
Info<< "Computing production rate field\n" << endl;
const auto& U = mesh().lookupObject<volVectorField>("U");
auto* RPtr =
mesh().getObjectPtr<volSymmTensorField>("R");
if (!RPtr)
{
const auto& nut = mesh().lookupObject<volScalarField>("nut");
prod = 2*nut*(symm(fvc::grad(U)) && symm(fvc::grad(U)));
}
else
{
auto& R = *RPtr;
prod = 0.5*(mag(tr(-twoSymm(R & fvc::grad(U)))));
}
#};
}
}
// ************************************************************************* //

View File

@ -0,0 +1,27 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 2;
method hierarchical;
coeffs
{
n (2 1 1);
}
// ************************************************************************* //

View File

@ -0,0 +1,68 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default steadyState;
}
gradSchemes
{
default Gauss linear;
}
divSchemes
{
default none;
div(phi,U) bounded Gauss linearUpwind grad(U);
turbulence bounded Gauss limitedLinear 1;
div(phi,k) $turbulence;
div(phi,omega) $turbulence;
div(phi,nuTilda) $turbulence;
div(phi,epsilon) $turbulence;
div(phi,phit) $turbulence;
div(phi,f) $turbulence;
div(phi,R) $turbulence;
div((nuEff*dev2(T(grad(U))))) Gauss linear;
div((nu*dev2(T(grad(U))))) Gauss linear;
div(R) Gauss linear;
}
laplacianSchemes
{
default Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
wallDist
{
method meshWave;
}
// ************************************************************************* //

View File

@ -0,0 +1,97 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
p
{
solver GAMG;
smoother DICGaussSeidel;
tolerance 1e-12;
relTol 0;
minIter 3;
}
U
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-12;
relTol 0;
minIter 3;
}
"(k|omega|nuTilda)"
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-12;
relTol 0;
minIter 3;
}
"(epsilon|phit)"
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-12;
relTol 0;
minIter 3;
}
f
{
solver PBiCGStab;
preconditioner DIC;
tolerance 1e-12;
relTol 0;
minIter 3;
}
R
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-12;
relTol 0;
minIter 3;
}
}
SIMPLE
{
nNonOrthogonalCorrectors 0;
consistent yes;
pRefCell 0;
pRefValue 0;
}
relaxationFactors
{
equations
{
U 0.7;
k 0.5;
omega 0.5;
nuTilda 0.5;
epsilon 0.5;
"(phit|f)" 0.5;
R 0.4;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,40 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object sample;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
type sets;
libs (sampling);
interpolationScheme cellPoint;
setFormat raw;
executeControl writeTime;
writeControl writeTime;
fields
(
turbulenceProperties:epsilon
);
sets
(
y
{
type midPoint;
axis y;
start (0.5 0 0.5);
end (0.5 1 0.5);
}
);
// ************************************************************************* //

View File

@ -0,0 +1,40 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object sample;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
type sets;
libs (sampling);
interpolationScheme cellPoint;
setFormat raw;
executeControl writeTime;
writeControl writeTime;
fields
(
f
);
sets
(
y
{
type midPoint;
axis y;
start (0.5 0 0.5);
end (0.5 1 0.5);
}
);
// ************************************************************************* //

View File

@ -0,0 +1,40 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object sample;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
type sets;
libs (sampling);
interpolationScheme cellPoint;
setFormat raw;
executeControl writeTime;
writeControl writeTime;
fields
(
productionRate
);
sets
(
y
{
type midPoint;
axis y;
start (0.5 0 0.5);
end (0.5 1 0.5);
}
);
// ************************************************************************* //

View File

@ -0,0 +1,47 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object sample;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
type sets;
libs (sampling);
interpolationScheme cellPoint;
setFormat raw;
executeControl writeTime;
writeControl writeTime;
fields
(
turbulenceProperties:k
);
sets
(
ref_point
{
type cloud;
axis y;
points ((0.5 1 0.5));
}
y
{
type midPoint;
axis y;
start (0.5 0 0.5);
end (0.5 1 0.5);
}
);
// ************************************************************************* //

View File

@ -0,0 +1,47 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object sample;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
type sets;
libs (sampling);
interpolationScheme cellPoint;
setFormat raw;
executeControl writeTime;
writeControl writeTime;
fields
(
turbulenceProperties:R
);
sets
(
ref_point
{
type cloud;
axis y;
points ((0.5 1 0.5));
}
y
{
type midPoint;
axis y;
start (0.5 0 0.5);
end (0.5 1 0.5);
}
);
// ************************************************************************* //

View File

@ -0,0 +1,47 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object sample;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
type sets;
libs (sampling);
interpolationScheme cellPoint;
setFormat raw;
executeControl writeTime;
writeControl writeTime;
fields
(
U
);
sets
(
ref_point
{
type cloud;
axis y;
points ((0.5 1 0.5));
}
y
{
type midPoint;
axis y;
start (0.5 0 0.5);
end (0.5 1 0.5);
}
);
// ************************************************************************* //