TUT: planeChannel: add setTurbulenceFields example

TUT: cylinder: fix the order in Allclean
This commit is contained in:
Kutalmis Bercin
2022-06-08 18:09:20 +01:00
committed by Mark Olesen
parent a371f1792b
commit 8c03201cd1
10 changed files with 297 additions and 1 deletions

View File

@ -7,6 +7,6 @@ cd "${0%/*}" || exit # Run from this directory
(cd cylinderAndBackground && ./Allclean)
# The background mesh
(cd cylinderMesh && foamCleanTutorials && rm -rf constant)
(cd cylinderMesh && rm -Rf constant && foamCleanTutorials)
#------------------------------------------------------------------------------

View File

@ -9,6 +9,7 @@ cd "${0%/*}" || exit # Run from this directory
setups="
EBRSM
kOmegaSST
EBRSM.setTurbulenceFields
"
# flag to enable computations

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 volSymmTensorField;
object R;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [ 0 2 -2 0 0 0 0 ];
internalField uniform (1.718 0 0 1.718 0 1.718); // 2*k/3
boundaryField
{
"(bottom|top)"
{
type fixedValue;
value uniform (1e-16 1e-16 1e-16 1e-16 1e-16 1e-16);
}
"(inlet|outlet)"
{
type cyclic;
}
leftAndRight
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,42 @@
/*--------------------------------*- 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 epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [ 0 2 -3 0 0 0 0 ];
internalField uniform 33.6; // Lardeau14-Coel Eq. 21
boundaryField
{
"(bottom|top)"
{
type epsilonWallFunction;
lowReCorrection true;
value uniform 0;
}
"(inlet|outlet)"
{
type cyclic;
}
leftAndRight
{
type empty;
}
}
// ************************************************************************* //

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 f;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [ 0 0 0 0 0 0 0 ];
internalField uniform 1;
boundaryField
{
"(bottom|top)"
{
type fixedValue;
value uniform 0;
}
"(inlet|outlet)"
{
type cyclic;
}
leftAndRight
{
type empty;
}
}
// ************************************************************************* //

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 k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 2.577; // Lardeau14-Coel Eq. 21
boundaryField
{
"(bottom|top)"
{
type fixedValue;
value uniform 1e-10;
}
"(inlet|outlet)"
{
type cyclic;
}
leftAndRight
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,29 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
if [ ! -d constant/polyMesh ]
then
runApplication blockMesh
runApplication renumberMesh -overwrite -constant
runApplication checkMesh -allTopology -allGeometry -constant
fi
restore0Dir
runApplication setTurbulenceFields
runApplication $(getApplication)
runApplication -s "U" postProcess -func sampleU -latestTime
runApplication -s "k" postProcess -func sampleK -latestTime
runApplication -s "epsilon" postProcess -func sampleEpsilon -latestTime
runApplication -s "R" postProcess -func sampleR -latestTime
runApplication -s "G" postProcess -func sampleG -latestTime
runApplication foamLog log."$(getApplication)"
#------------------------------------------------------------------------------

View File

@ -0,0 +1,33 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
if [ ! -d constant/polyMesh ]
then
runApplication blockMesh
runApplication renumberMesh -overwrite -constant
runApplication checkMesh -allTopology -allGeometry -constant
fi
restore0Dir
runApplication decomposePar
runParallel setTurbulenceFields
runParallel $(getApplication)
runApplication reconstructPar
runApplication -s "U" postProcess -func sampleU -latestTime
runApplication -s "k" postProcess -func sampleK -latestTime
runApplication -s "epsilon" postProcess -func sampleEpsilon -latestTime
runApplication -s "R" postProcess -func sampleR -latestTime
runApplication -s "G" postProcess -func sampleG -latestTime
runApplication foamLog log."$(getApplication)"
#------------------------------------------------------------------------------

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 turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType RAS;
RAS
{
RASModel EBRSM;
turbulence on;
printCoeffs on;
}
// ************************************************************************* //

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 dictionary;
object setTurbulenceFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Mandatory entries
uRef 17.55;
// Optional entries
initialiseU true;
initialiseEpsilon true;
initialiseK true;
initialiseOmega true;
initialiseR true;
writeF true;
kappa 0.41;
Cmu 0.09;
dPlusRef 15.0;
f f;
U U;
epsilon epsilon;
k k;
omega omega;
R R;
// ************************************************************************* //