TUT: turbulentDFSEMInlet: update DFSEM tutorials (fixes #2097)

This commit is contained in:
Kutalmis Bercin
2021-05-18 16:38:06 +01:00
committed by Andrew Heather
parent b9c174312b
commit f5fe37114f
80 changed files with 2362 additions and 1317 deletions

View File

@ -0,0 +1,41 @@
/*--------------------------------*- 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 volScalarField;
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
"(inlet|outlet)"
{
type calculated;
value uniform 1e-08;
}
"(bottom|top)"
{
type zeroGradient;
}
"(left|right)"
{
type cyclic;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,46 @@
/*--------------------------------*- 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 volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
inlet
{
type zeroGradient;
}
"(bottom|top)"
{
type zeroGradient;
}
outlet
{
type fixedValue;
value $internalField;
}
"(left|right)"
{
type cyclic;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,22 @@
/*--------------------------------*- 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 transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
transportModel Newtonian;
nu 2.5494595145829e-3;
// ************************************************************************* //

View File

@ -0,0 +1,45 @@
/*--------------------------------*- 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 turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType LES;
LES
{
LESModel Smagorinsky;
SmagorinskyCoeffs
{
Ce 1.048;
Ck 0.0265463553; // Updated to give Cs = 0.065
}
delta vanDriest;
vanDriestCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}
Aplus 26;
Cdelta 0.158;
}
printCoeffs on;
turbulence on;
}
// ************************************************************************* //

View File

@ -0,0 +1,85 @@
/*--------------------------------*- 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;
// L:length, H:height, W:width
L 0.125664;
H 1.0;
H2 #eval{ 2*$H };
W #eval{ pi() };
vertices
(
( 0 0 0)
($L 0 0)
($L $H 0)
($L $H2 0)
( 0 $H2 0)
( 0 $H 0)
( 0 0 $W)
($L 0 $W)
($L $H $W)
($L $H2 $W)
( 0 $H2 $W)
( 0 $H $W)
);
blocks
(
hex ( 0 1 2 5 6 7 8 11) (1 23 82) simpleGrading (1 10.7028 1)
hex ( 5 2 3 4 11 8 9 10) (1 23 82) simpleGrading (1 -10.7028 1)
);
boundary
(
bottom
{
type wall;
faces ((0 6 7 1));
}
top
{
type wall;
faces ((4 3 9 10));
}
left
{
type cyclic;
neighbourPatch right;
faces ((1 2 5 0)(2 3 4 5));
}
right
{
type cyclic;
neighbourPatch left;
faces ((6 11 8 7)(11 10 9 8));
}
inlet
{
type patch;
faces ((0 5 11 6)(5 4 10 11));
}
outlet
{
type patch;
faces ((1 7 8 2)(2 8 9 3));
}
);
// ************************************************************************* //

View File

@ -0,0 +1,13 @@
// -*- C++ -*-
type columnAverage;
libs (fieldFunctionObjects);
patches ( left );
fields ( UPrime2Mean UMean );
executeControl onEnd;
writeControl onEnd;
// ************************************************************************* //

View File

@ -0,0 +1,74 @@
/*--------------------------------*- 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 pisoFoam;
startFrom latestTime;
startTime 0;
stopAt endTime;
endTime 30.0;
deltaT 2e-3;
writeControl timeStep;
writeInterval 50;
purgeWrite 3;
writeFormat ascii;
writePrecision 8;
writeCompression off;
timeFormat general;
timePrecision 8;
runTimeModifiable false;
adjustTimeStep false;
// Allow 10% of time for initialisation before sampling
timeStart #eval{ 0.1 * ${/endTime} };
functions
{
fieldAverage1
{
type fieldAverage;
libs (fieldFunctionObjects);
writeControl writeTime;
timeStart $/timeStart;
fields
(
U
{
mean on;
prime2Mean on;
base time;
}
);
}
}
// ************************************************************************* //

View File

@ -0,0 +1,22 @@
/*--------------------------------*- 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 4;
method random;
// ************************************************************************* //

View File

@ -0,0 +1,52 @@
/*--------------------------------*- 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 backward;
}
gradSchemes
{
default Gauss linear;
}
divSchemes
{
default none;
div(phi,U) Gauss linear;
div((nuEff*dev2(T(grad(U))))) Gauss linear;
}
laplacianSchemes
{
default Gauss linear orthogonal;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default orthogonal;
}
// ************************************************************************* //

View File

@ -0,0 +1,65 @@
/*--------------------------------*- 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-06;
relTol 0.001;
nPreSweeps 0;
nPostSweeps 2;
cacheAgglomeration true;
nCellsInCoarsestLevel 1000;
agglomerator faceAreaPair;
mergeLevels 1;
}
pFinal
{
$p;
tolerance 1e-06;
relTol 0;
}
U
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-08;
relTol 0.1;
}
UFinal
{
$U;
tolerance 1e-08;
relTol 0;
}
}
PISO
{
nCorrectors 3;
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;
}
// ************************************************************************* //

View File

@ -0,0 +1,35 @@
// -*- C++ -*-
type sets;
libs (sampling);
interpolationScheme cellPatchConstrained;
setFormat raw;
writeControl onEnd;
fields
(
columnAverage:columnAverage(UMean)
columnAverage:columnAverage(UPrime2Mean)
);
sets
(
inletPatch
{
type face;
axis y;
start (0.0 0 1.57);
end (0.0 2 1.57);
}
inletCell
{
type midPoint;
axis y;
start (0.062832 0 1.57);
end (0.062832 2 1.57);
}
);
// ************************************************************************* //

View File

@ -0,0 +1,35 @@
// -*- C++ -*-
type sets;
libs (sampling);
interpolationScheme cellPoint;
setFormat raw;
writeControl onEnd;
fields
(
columnAverage:columnAverage(UMean)
columnAverage:columnAverage(UPrime2Mean)
);
sets
(
inletPatch
{
type face;
axis y;
start (0.0 0 1.57);
end (0.0 2 1.57);
}
inletCell
{
type midPoint;
axis y;
start (0.062832 0 1.57);
end (0.062832 2 1.57);
}
);
// ************************************************************************* //