TUT: SpalartAllmaras: add showcase for k/epsilon/omega estimation funcs

TUT: airfoil2D: clean up the tutorial case
This commit is contained in:
Kutalmis Bercin
2021-04-13 11:11:19 +01:00
parent c7357bd1c3
commit 42bbd05992
23 changed files with 91 additions and 140078 deletions

View File

@ -43,4 +43,5 @@ boundaryField
} }
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -44,4 +44,5 @@ boundaryField
} }
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -44,4 +44,5 @@ boundaryField
} }
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -43,4 +43,5 @@ boundaryField
} }
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -1,9 +1,10 @@
#!/bin/sh #!/bin/sh
cd "${0%/*}" || exit # Run from this directory cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Clean time directories only cleanCase0
rm -rf *[1-9]*
rm -f log.* rm -rf constant/polyMesh
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -3,6 +3,32 @@ cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions . ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
runApplication $(getApplication) # settings
# flag to enable computations in parallel mode
parallel=true
#------------------------------------------------------------------------------
restore0Dir
[ -d constant/polyMesh ] || cp -rf constant/polyMesh.orig constant/polyMesh
if [ "$parallel" = true ]
then
runApplication decomposePar
runParallel $(getApplication)
runApplication reconstructPar
else
runApplication $(getApplication)
fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -10,15 +10,13 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class dictionary; class dictionary;
location "constant";
object transportProperties; object transportProperties;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
transportModel Newtonian; transportModel Newtonian;
rho 1;
nu 1e-05; nu 1e-05;
// ************************************************************************* // // ************************************************************************* //

View File

@ -10,20 +10,20 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class dictionary; class dictionary;
location "constant";
object turbulenceProperties; object turbulenceProperties;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType RAS; simulationType RAS;
RAS RAS
{ {
RASModel SpalartAllmaras; RASModel SpalartAllmaras;
turbulence on; turbulence on;
printCoeffs on; printCoeffs on;
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -10,7 +10,6 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class dictionary; class dictionary;
location "system";
object controlDict; object controlDict;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -49,21 +48,52 @@ functions
{ {
momErr momErr
{ {
type momentumError; type momentumError;
libs (fieldFunctionObjects); libs (fieldFunctionObjects);
executeControl writeTime; executeControl writeTime;
writeControl writeTime; writeControl writeTime;
} }
contErr contErr
{ {
type div; type div;
libs (fieldFunctionObjects); libs (fieldFunctionObjects);
field phi; field phi;
executeControl writeTime; executeControl writeTime;
writeControl writeTime; writeControl writeTime;
} }
turbulenceFields1
{
type turbulenceFields;
libs (fieldFunctionObjects);
fields
(
k
epsilon
nut
nuEff
R
devReff
L
I
);
executeControl writeTime;
writeControl writeTime;
}
mag1
{
type mag;
libs (fieldFunctionObjects);
field turbulenceProperties:R;
result magR;
executeControl writeTime;
writeControl writeTime;
}
} }

View File

@ -9,43 +9,19 @@ FoamFile
{ {
version 2.0; version 2.0;
format ascii; format ascii;
class polyBoundaryMesh; class dictionary;
object boundary; object decomposeParDict;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
4
( numberOfSubdomains 8;
inlet
method hierarchical;
coeffs
{ {
type patch; n (4 2 1);
physicalType inlet;
nFaces 134;
startFace 21254;
} }
outlet
{
type patch;
physicalType outlet;
nFaces 160;
startFace 21388;
}
walls
{
type wall;
physicalType wall;
nFaces 78;
startFace 21548;
}
frontAndBack
{
type empty;
physicalType empty;
nFaces 21440;
startFace 21626;
}
)
// ************************************************************************* // // ************************************************************************* //

View File

@ -10,7 +10,6 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class dictionary; class dictionary;
location "system";
object fvSchemes; object fvSchemes;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -28,8 +27,11 @@ gradSchemes
divSchemes divSchemes
{ {
default none; default none;
div(phi,U) bounded Gauss linearUpwind grad(U); div(phi,U) bounded Gauss linearUpwind grad(U);
div(phi,nuTilda) bounded Gauss linearUpwind grad(nuTilda); div(phi,nuTilda) bounded Gauss linearUpwind grad(nuTilda);
div((nuEff*dev2(T(grad(U))))) Gauss linear; div((nuEff*dev2(T(grad(U))))) Gauss linear;
} }
@ -50,7 +52,7 @@ snGradSchemes
wallDist wallDist
{ {
method meshWave; method meshWave;
} }

View File

@ -10,7 +10,6 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class dictionary; class dictionary;
location "system";
object fvSolution; object fvSolution;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //