mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
TUT: planeChannel: add setTurbulenceFields example
TUT: cylinder: fix the order in Allclean
This commit is contained in:
committed by
Mark Olesen
parent
a371f1792b
commit
8c03201cd1
@ -7,6 +7,6 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
(cd cylinderAndBackground && ./Allclean)
|
(cd cylinderAndBackground && ./Allclean)
|
||||||
|
|
||||||
# The background mesh
|
# The background mesh
|
||||||
(cd cylinderMesh && foamCleanTutorials && rm -rf constant)
|
(cd cylinderMesh && rm -Rf constant && foamCleanTutorials)
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -9,6 +9,7 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
setups="
|
setups="
|
||||||
EBRSM
|
EBRSM
|
||||||
kOmegaSST
|
kOmegaSST
|
||||||
|
EBRSM.setTurbulenceFields
|
||||||
"
|
"
|
||||||
|
|
||||||
# flag to enable computations
|
# flag to enable computations
|
||||||
|
|||||||
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -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)"
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
@ -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)"
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
Reference in New Issue
Block a user