mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Updated the whole of OpenFOAM to use the new templated TurbulenceModels library
The old separate incompressible and compressible libraries have been removed. Most of the commonly used RANS and LES models have been upgraded to the new framework but there are a few missing which will be added over the next few days, in particular the realizable k-epsilon model. Some of the less common incompressible RANS models have been introduced into the new library instantiated for incompressible flow only. If they prove to be generally useful they can be templated for compressible and multiphase application. The Spalart-Allmaras DDES and IDDES models have been thoroughly debugged, removing serious errors concerning the use of S rather than Omega. The compressible instances of the models have been augmented by a simple backward-compatible eddyDiffusivity model for thermal transport based on alphat and alphaEff. This will be replaced with a separate run-time selectable thermal transport model framework in a few weeks. For simplicity and ease of maintenance and further development the turbulent transport and wall modeling is based on nut/nuEff rather than mut/muEff for compressible models so that all forms of turbulence models can use the same wall-functions and other BCs. All turbulence model selection made in the constant/turbulenceProperties dictionary with RAS and LES as sub-dictionaries rather than in separate files which added huge complexity for multiphase. All tutorials have been updated so study the changes and update your own cases by comparison with similar cases provided. Sorry for the inconvenience in the break in backward-compatibility but this update to the turbulence modeling is an essential step in the future of OpenFOAM to allow more models to be added and maintained for a wider range of cases and physics. Over the next weeks and months more turbulence models will be added of single and multiphase flow, more additional sub-models and further development and testing of existing models. I hope this brings benefits to all OpenFOAM users. Henry G. Weller
This commit is contained in:
@ -30,7 +30,7 @@ divSchemes
|
||||
div(rhoPhi,U) Gauss upwind;
|
||||
div(phi,alpha) Gauss vanLeer;
|
||||
div(phirb,alpha) Gauss linear;
|
||||
div((muEff*dev(T(grad(U))))) Gauss linear;
|
||||
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
|
||||
@ -30,7 +30,7 @@ divSchemes
|
||||
div(rhoPhi,U) Gauss linearUpwind grad(U);
|
||||
div(phi,alpha) Gauss vanLeer;
|
||||
div(phirb,alpha) Gauss linear;
|
||||
div((muEff*dev(T(grad(U))))) Gauss linear;
|
||||
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
|
||||
@ -30,7 +30,7 @@ divSchemes
|
||||
div(rhoPhi,U) Gauss linear;
|
||||
div(phi,alpha) Gauss vanLeer;
|
||||
div(phirb,alpha) Gauss linear;
|
||||
div((muEff*dev(T(grad(U))))) Gauss linear;
|
||||
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
|
||||
@ -10,7 +10,7 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object nuSgs;
|
||||
object nut;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -1,86 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object LESProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
LESModel oneEqEddy;
|
||||
|
||||
delta smooth;
|
||||
|
||||
printCoeffs on;
|
||||
|
||||
cubeRootVolCoeffs
|
||||
{
|
||||
deltaCoeff 1;
|
||||
}
|
||||
|
||||
PrandtlCoeffs
|
||||
{
|
||||
delta cubeRootVol;
|
||||
cubeRootVolCoeffs
|
||||
{
|
||||
deltaCoeff 1;
|
||||
}
|
||||
|
||||
smoothCoeffs
|
||||
{
|
||||
delta cubeRootVol;
|
||||
cubeRootVolCoeffs
|
||||
{
|
||||
deltaCoeff 1;
|
||||
}
|
||||
|
||||
maxDeltaRatio 1.1;
|
||||
}
|
||||
|
||||
Cdelta 0.158;
|
||||
}
|
||||
|
||||
vanDriestCoeffs
|
||||
{
|
||||
delta cubeRootVol;
|
||||
cubeRootVolCoeffs
|
||||
{
|
||||
deltaCoeff 1;
|
||||
}
|
||||
|
||||
smoothCoeffs
|
||||
{
|
||||
delta cubeRootVol;
|
||||
cubeRootVolCoeffs
|
||||
{
|
||||
deltaCoeff 1;
|
||||
}
|
||||
|
||||
maxDeltaRatio 1.1;
|
||||
}
|
||||
|
||||
Aplus 26;
|
||||
Cdelta 0.158;
|
||||
}
|
||||
|
||||
smoothCoeffs
|
||||
{
|
||||
delta cubeRootVol;
|
||||
cubeRootVolCoeffs
|
||||
{
|
||||
deltaCoeff 1;
|
||||
}
|
||||
|
||||
maxDeltaRatio 1.1;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -15,7 +15,78 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType LESModel;
|
||||
simulationType LES;
|
||||
|
||||
LES
|
||||
{
|
||||
LESModel kEqn;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
|
||||
delta smooth;
|
||||
|
||||
cubeRootVolCoeffs
|
||||
{
|
||||
deltaCoeff 1;
|
||||
}
|
||||
|
||||
PrandtlCoeffs
|
||||
{
|
||||
delta cubeRootVol;
|
||||
cubeRootVolCoeffs
|
||||
{
|
||||
deltaCoeff 1;
|
||||
}
|
||||
|
||||
smoothCoeffs
|
||||
{
|
||||
delta cubeRootVol;
|
||||
cubeRootVolCoeffs
|
||||
{
|
||||
deltaCoeff 1;
|
||||
}
|
||||
|
||||
maxDeltaRatio 1.1;
|
||||
}
|
||||
|
||||
Cdelta 0.158;
|
||||
}
|
||||
|
||||
vanDriestCoeffs
|
||||
{
|
||||
delta cubeRootVol;
|
||||
cubeRootVolCoeffs
|
||||
{
|
||||
deltaCoeff 1;
|
||||
}
|
||||
|
||||
smoothCoeffs
|
||||
{
|
||||
delta cubeRootVol;
|
||||
cubeRootVolCoeffs
|
||||
{
|
||||
deltaCoeff 1;
|
||||
}
|
||||
|
||||
maxDeltaRatio 1.1;
|
||||
}
|
||||
|
||||
Aplus 26;
|
||||
Cdelta 0.158;
|
||||
}
|
||||
|
||||
smoothCoeffs
|
||||
{
|
||||
delta cubeRootVol;
|
||||
cubeRootVolCoeffs
|
||||
{
|
||||
deltaCoeff 1;
|
||||
}
|
||||
|
||||
maxDeltaRatio 1.1;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -34,7 +34,7 @@ divSchemes
|
||||
div(phi,B) Gauss limitedLinear 1;
|
||||
div(B) Gauss linear;
|
||||
div(phi,nuTilda) Gauss limitedLinear 1;
|
||||
div((muEff*dev(T(grad(U))))) Gauss linear;
|
||||
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
|
||||
@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
keepCases="damBreak damBreakPorousBaffle weirOverflow waterChannel"
|
||||
keepCases="damBreak damBreakPorousBaffle weirOverflow waterChannel angledDuct"
|
||||
loseCases="damBreakFine"
|
||||
|
||||
for case in $keepCases
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object RASProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
RASModel kEpsilon;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -15,7 +15,16 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType RASModel;
|
||||
simulationType RAS;
|
||||
|
||||
RAS
|
||||
{
|
||||
RASModel kEpsilon;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -32,7 +32,7 @@ divSchemes
|
||||
div(phirb,alpha) Gauss linear;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
div((muEff*dev(T(grad(U))))) Gauss linear;
|
||||
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object RASProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
RASModel kEpsilon;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -20,18 +20,21 @@ FoamFile
|
||||
leftWall
|
||||
{
|
||||
type wall;
|
||||
inGroups 1(wall);
|
||||
nFaces 50;
|
||||
startFace 4432;
|
||||
}
|
||||
rightWall
|
||||
{
|
||||
type wall;
|
||||
inGroups 1(wall);
|
||||
nFaces 50;
|
||||
startFace 4482;
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type wall;
|
||||
inGroups 1(wall);
|
||||
nFaces 62;
|
||||
startFace 4532;
|
||||
}
|
||||
|
||||
@ -15,7 +15,16 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType RASModel;
|
||||
simulationType RAS;
|
||||
|
||||
RAS
|
||||
{
|
||||
RASModel kEpsilon;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -32,7 +32,7 @@ divSchemes
|
||||
div(phirb,alpha) Gauss linear;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
div((muEff*dev(T(grad(U))))) Gauss linear;
|
||||
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
|
||||
@ -59,7 +59,7 @@ boundaryField
|
||||
jump uniform 0;
|
||||
value uniform 0;
|
||||
D 1000;
|
||||
I 1000;
|
||||
I 500;
|
||||
length 0.15;
|
||||
}
|
||||
porous_half1
|
||||
@ -68,7 +68,7 @@ boundaryField
|
||||
patchType cyclic;
|
||||
value uniform 0;
|
||||
D 1000;
|
||||
I 1000;
|
||||
I 500;
|
||||
length 0.15;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object RASProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
RASModel kEpsilon;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -20,18 +20,21 @@ FoamFile
|
||||
leftWall
|
||||
{
|
||||
type wall;
|
||||
inGroups 1(wall);
|
||||
nFaces 50;
|
||||
startFace 4419;
|
||||
}
|
||||
rightWall
|
||||
{
|
||||
type wall;
|
||||
inGroups 1(wall);
|
||||
nFaces 50;
|
||||
startFace 4469;
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type wall;
|
||||
inGroups 1(wall);
|
||||
nFaces 62;
|
||||
startFace 4519;
|
||||
}
|
||||
@ -51,7 +54,13 @@ FoamFile
|
||||
porous_half0
|
||||
{
|
||||
type cyclic;
|
||||
inGroups 1(cyclic);
|
||||
inGroups
|
||||
2
|
||||
(
|
||||
cyclic
|
||||
cyclicFaces
|
||||
)
|
||||
;
|
||||
nFaces 13;
|
||||
startFace 9163;
|
||||
matchTolerance 0.0001;
|
||||
@ -61,7 +70,13 @@ FoamFile
|
||||
porous_half1
|
||||
{
|
||||
type cyclic;
|
||||
inGroups 1(cyclic);
|
||||
inGroups
|
||||
2
|
||||
(
|
||||
cyclic
|
||||
cyclicFaces
|
||||
)
|
||||
;
|
||||
nFaces 13;
|
||||
startFace 9176;
|
||||
matchTolerance 0.0001;
|
||||
|
||||
@ -15,7 +15,16 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType RASModel;
|
||||
simulationType RAS;
|
||||
|
||||
RAS
|
||||
{
|
||||
RASModel kEpsilon;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -52,11 +52,5 @@ maxAlphaCo 0.1;
|
||||
|
||||
maxDeltaT 1;
|
||||
|
||||
libs
|
||||
(
|
||||
"libturbulenceDerivedFvPatchFields.so"
|
||||
"libincompressibleTurbulenceModel.so"
|
||||
"libincompressibleRASModels.so"
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -32,7 +32,7 @@ divSchemes
|
||||
div(phirb,alpha) Gauss linear;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
div((muEff*dev(T(grad(U))))) Gauss linear;
|
||||
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
|
||||
@ -32,7 +32,7 @@ divSchemes
|
||||
div(phirb,alpha) Gauss linear;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,omega) Gauss upwind;
|
||||
div((muEff*dev(T(grad(U))))) Gauss linear;
|
||||
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object RASProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
RASModel kOmegaSST;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -15,7 +15,16 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType RASModel;
|
||||
simulationType RAS;
|
||||
|
||||
RAS
|
||||
{
|
||||
RASModel kOmegaSST;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -34,7 +34,7 @@ divSchemes
|
||||
div(phirb,alpha) Gauss linear;
|
||||
|
||||
"div\(phi,(k|omega)\)" Gauss upwind;
|
||||
div((muEff*dev(T(grad(U))))) Gauss linear;
|
||||
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object RASProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
RASModel kEpsilon;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -15,7 +15,16 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType RASModel;
|
||||
simulationType RAS;
|
||||
|
||||
RAS
|
||||
{
|
||||
RASModel kEpsilon;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -35,7 +35,7 @@ divSchemes
|
||||
div(phi,R) Gauss upwind;
|
||||
div(R) Gauss linear;
|
||||
div(phi,nuTilda) Gauss upwind;
|
||||
div((muEff*dev(T(grad(U))))) Gauss linear;
|
||||
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
|
||||
Reference in New Issue
Block a user