diff --git a/Allwmake b/Allwmake index 515d1cdf9a..749c60fc89 100755 --- a/Allwmake +++ b/Allwmake @@ -1,10 +1,13 @@ #!/bin/sh set -x +# run from this directory only +cd ${0%/*} || exit 1 + # wmake is required for subsequent targets (cd wmake/src && make) -(cd $WM_PROJECT_INST_DIR/ThirdParty && ./Allwmake) +(cd $WM_THIRD_PARTY_DIR && ./Allwmake) (cd src && ./Allwmake) diff --git a/README b/README index e012a7c1b0..57b80f5d14 100644 --- a/README +++ b/README @@ -29,8 +29,8 @@ 2. System requirements ~~~~~~~~~~~~~~~~~~~~~~ OpenFOAM is developed and tested on Linux, but should work with other - Unix style system. To check your system setup, execute the foamSystemCheck - script in the bin directory of the OpenFOAM installation. If no problems + Unix style systems. To check your system setup, execute the foamSystemCheck + script in the bin/ directory of the OpenFOAM installation. If no problems are reported, proceed to "3. Installation"; otherwise contact your system administrator. @@ -40,7 +40,6 @@ 3. Installation ~~~~~~~~~~~~~~~ - Download and unpack the files in the $HOME/OpenFOAM directory as described in: http://www.OpenFOAM.org/download.html @@ -77,10 +76,9 @@ 3.1. Installation in alternative locations ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - OpenFOAM may also be installed in an alternative location. - However, the installation directory must be network available - (eg, NFS) if parallel calculations are planned. + OpenFOAM may also be installed in alternative locations. However, the + installation directory should be network available (e.g., NFS) if + parallel calculations are planned. The environment variable 'FOAM_INST_DIR' can be used to find and source the appropriate resource file. Here is a bash/ksh/sh example: @@ -89,7 +87,7 @@ foamDotFile=$FOAM_INST_DIR/OpenFOAM-/etc/bashrc [ -f $foamDotFile ] && . $foamDotFile - and a csh example: + and a csh/tcsh example: setenv FOAM_INST_DIR /data/app/OpenFOAM foamDotFile=$FOAM_INST_DIR/OpenFOAM-/etc/bashrc @@ -102,10 +100,9 @@ 4. Building from Sources (Optional) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - If you cannot find an appropriate binary pack for your platform, you can - build the complete OpenFOAM from the source-pack. First you will need to - compile or obtain a recent version of gcc (we recomend gcc-4.3.?) for + build the complete OpenFOAM from the source-pack. You will first need to + compile or obtain a recent version of gcc (we recomend gcc-4.2.?) for your platform, which may be obtained from http://gcc.gnu.org/. Install the compiler in @@ -114,29 +111,27 @@ $WM_PROJECT_DIR/etc/settings.csh appropriately and finally update the environment variables as in section 3. - Now go to the top-level source directory $WM_PROJECT_DIR and type - ./Allwmake, which is the name of the top-level build script for building - the whole of OpenFOAM. In principle this will build everything, but - sometimes problems occur with the build order and it is necessary to - update the environment variables and re-execute Allwmake. If you - experience difficulties with building the source-pack or your platform is - not currently supported please contact to - negotiate a support contract and we will do the port and maintain it in + Now go to the top-level source directory $WM_PROJECT_DIR and execute the + top-level build script './Allwmake'. In principle this will build + everything, but if problems occur with the build order it may be necessary + to update the environment variables and re-execute 'Allwmake'. If you + experience difficulties with building the source-pack, or your platform is + not currently supported, please contact to + negotiate a support contract and we will do the port and maintain it for future releases. 5. Testing the installation ~~~~~~~~~~~~~~~~~~~~~~~~~~~ To check your installation setup, execute the 'foamInstallationTest' - script (in the bin directory of the OpenFOAM installation). If no problems - are reported, proceed to getting started with OpenFOAM; otherwise, go back - and check you have installed the software correctly and/or contact your - system administrator. + script (in the bin/ directory of the OpenFOAM installation). If no + problems are reported, proceed to getting started with OpenFOAM; + otherwise, go back and check you have installed the software correctly + and/or contact your system administrator. 6. Getting Started ~~~~~~~~~~~~~~~~~~ - Create a project directory within the $HOME/OpenFOAM directory named - (e.g. 'chris-1.5' for user chris and OpenFOAM version 1.5) and create a directory named 'run' within it, e.g. by typing: @@ -144,7 +139,7 @@ mkdir -p $HOME/OpenFOAM/${USER}-${WM_PROJECT_VERSION}/run Copy the 'tutorial' examples directory in the OpenFOAM distribution to the - 'run' directory. If OpenFOAM environment variables are set correctly, + 'run' directory. If the OpenFOAM environment variables are set correctly, then the following command will be correct: cp -r $WM_PROJECT_DIR/tutorials $HOME/OpenFOAM/${USER}-${WM_PROJECT_VERSION}/run @@ -158,27 +153,27 @@ 7. Documentation ~~~~~~~~~~~~~~~~ - http://www.OpenFOAM.org/doc + http://www.OpenFOAM.org/doc 8. Help ~~~~~~~ - http://www.OpenFOAM.org - http://www.OpenFOAM.org/discussion.html + http://www.OpenFOAM.org + http://www.OpenFOAM.org/discussion.html 9. Reporting Bugs in OpenFOAM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - http://www.OpenFOAM.org/bugs.html + http://www.OpenFOAM.org/bugs.html A. Running OpenFOAM in 32-bit mode on 64-bit machines ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Those users with an installation of Linux on a 64-bit machine may install - either or both of the 32-bit version of OpenFOAM (linux) or the 64-bit - version of FOAM (linux64) with 64-bit being the default mode. In order to - set up the user to run in 32-bit mode, the user must set the environment - variable $WM_32 (to anything, e.g. "on") before sourcing the etc/bashrc - (or etc/cshrc) file. Unsetting $WM_32 and sourcing the bashrc file will + Linux users with a 64-bit machine may install either the OpenFOAM 32-bit + version (linux) or the OpenFOAM 64-bit version (linux64), or both. + The 64-bit is the default mode on a 64-bit machine. To use an installed + 32-bit version, the user must set the environment variable $WM_32 (to + anything, e.g. "on") before sourcing the etc/bashrc (or etc/cshrc) file. + Unsetting WM_32 and re-sourcing the etc/bashrc (or etc/cshrc) file will set up the user to run in 64-bit mode. diff --git a/applications/solvers/combustion/PDRFoam/Make/options b/applications/solvers/combustion/PDRFoam/Make/options index 5217f89699..09322fe865 100644 --- a/applications/solvers/combustion/PDRFoam/Make/options +++ b/applications/solvers/combustion/PDRFoam/Make/options @@ -9,7 +9,7 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/RAS/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C index 4526fc31bb..357e749e98 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C @@ -35,7 +35,7 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -55,12 +55,15 @@ PDRkEpsilon::PDRkEpsilon : turbulenceModel(typeName, rho, U, phi, thermophysicalModel), - Cmu(turbulenceModelCoeffs_.lookup("Cmu")), - C1(turbulenceModelCoeffs_.lookup("C1")), - C2(turbulenceModelCoeffs_.lookup("C2")), - alphak(turbulenceModelCoeffs_.lookup("alphak")), - alphaEps(turbulenceModelCoeffs_.lookup("alphaEps")), - alphah(turbulenceModelCoeffs_.lookup("alphah")), + Cmu(turbulenceModelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), + C1(turbulenceModelCoeffs_.lookupOrAddDefault("C1", 1.44)), + C2(turbulenceModelCoeffs_.lookupOrAddDefault("C2", 1.92)), + alphak(turbulenceModelCoeffs_.lookupOrAddDefault("alphak", 1.0)), + alphaEps + ( + turbulenceModelCoeffs_.lookupOrAddDefault("alphaEps", 0.76923) + ), + alphah(turbulenceModelCoeffs_.lookupOrAddDefault("alphah", 1.0)), k_ ( @@ -102,6 +105,8 @@ PDRkEpsilon::PDRkEpsilon ) { # include "wallViscosityI.H" + + printCoeffs(); } @@ -161,12 +166,12 @@ bool PDRkEpsilon::read() { if (turbulenceModel::read()) { - turbulenceModelCoeffs_.lookup("Cmu") >> Cmu; - turbulenceModelCoeffs_.lookup("C1") >> C1; - turbulenceModelCoeffs_.lookup("C2") >> C2; - turbulenceModelCoeffs_.lookup("alphak") >> alphak; - turbulenceModelCoeffs_.lookup("alphaEps") >> alphaEps; - turbulenceModelCoeffs_.lookup("alphah") >> alphah; + turbulenceModelCoeffs_.readIfPresent("Cmu", Cmu); + turbulenceModelCoeffs_.readIfPresent("C1", C1); + turbulenceModelCoeffs_.readIfPresent("C2", C2); + turbulenceModelCoeffs_.readIfPresent("alphak", alphak); + turbulenceModelCoeffs_.readIfPresent("alphaEps", alphaEps); + turbulenceModelCoeffs_.readIfPresent("alphah", alphah); return true; } @@ -204,7 +209,7 @@ void PDRkEpsilon::correct() // in both the k and epsilon equations const volScalarField& betav = U_.db().lookupObject("betav"); - const PDRDragModel& drag = + const PDRDragModel& drag = U_.db().lookupObject("PDRDragModel"); volScalarField GR = drag.Gk(); @@ -259,7 +264,7 @@ void PDRkEpsilon::correct() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS } // End namespace compressible } // End namespace Foam diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H index b2546074ca..7b207abeb4 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H @@ -45,7 +45,7 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -58,12 +58,12 @@ class PDRkEpsilon { // Private data - dimensionedScalar Cmu; - dimensionedScalar C1; - dimensionedScalar C2; - dimensionedScalar alphak; - dimensionedScalar alphaEps; - dimensionedScalar alphah; + scalar Cmu; + scalar C1; + scalar C2; + scalar alphak; + scalar alphaEps; + scalar alphah; volScalarField k_; volScalarField epsilon_; @@ -103,7 +103,7 @@ public: //- Return the effective diffusivity for k tmp DkEff() const { - return tmp + return tmp ( new volScalarField("DkEff", alphak*mut_ + mu()) ); @@ -112,7 +112,7 @@ public: //- Return the effective diffusivity for epsilon tmp DepsilonEff() const { - return tmp + return tmp ( new volScalarField("DepsilonEff", alphaEps*mut_ + mu()) ); @@ -121,7 +121,7 @@ public: //- Return the effective turbulent thermal diffusivity tmp alphaEff() const { - return tmp + return tmp ( new volScalarField("alphaEff", alphah*mut_ + alpha()) ); @@ -158,7 +158,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS } // End namespace compressible } // End namespace Foam diff --git a/applications/solvers/combustion/XiFoam/Make/options b/applications/solvers/combustion/XiFoam/Make/options index 1e5f789db1..c6457c2826 100644 --- a/applications/solvers/combustion/XiFoam/Make/options +++ b/applications/solvers/combustion/XiFoam/Make/options @@ -5,7 +5,7 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/RAS \ -I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude EXE_LIBS = \ diff --git a/applications/solvers/combustion/Xoodles/Make/options b/applications/solvers/combustion/Xoodles/Make/options index 13de0659a5..085bbba8f4 100644 --- a/applications/solvers/combustion/Xoodles/Make/options +++ b/applications/solvers/combustion/Xoodles/Make/options @@ -3,8 +3,8 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ - -I$(LIB_SRC)/LESmodels \ - -I$(LIB_SRC)/LESmodels/LESdeltas/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/LES \ + -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \ diff --git a/applications/solvers/combustion/coldEngineFoam/Make/options b/applications/solvers/combustion/coldEngineFoam/Make/options index a55eb60c56..d932a5dbc1 100644 --- a/applications/solvers/combustion/coldEngineFoam/Make/options +++ b/applications/solvers/combustion/coldEngineFoam/Make/options @@ -6,7 +6,7 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/lnInclude + -I$(LIB_SRC)/turbulenceModels/RAS/compressible/lnInclude EXE_LIBS = \ -lengine \ diff --git a/applications/solvers/combustion/dieselEngineFoam/Make/options b/applications/solvers/combustion/dieselEngineFoam/Make/options index 0179a3a330..c3928b4274 100644 --- a/applications/solvers/combustion/dieselEngineFoam/Make/options +++ b/applications/solvers/combustion/dieselEngineFoam/Make/options @@ -1,7 +1,7 @@ EXE_INC = \ -I../engineFoam \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/RAS \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/dieselSpray/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/liquids/lnInclude \ diff --git a/applications/solvers/combustion/dieselFoam/Make/options b/applications/solvers/combustion/dieselFoam/Make/options index 896e479db5..b19c304f70 100644 --- a/applications/solvers/combustion/dieselFoam/Make/options +++ b/applications/solvers/combustion/dieselFoam/Make/options @@ -1,7 +1,7 @@ EXE_INC = \ -I../dieselEngineFoam \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/RAS \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/dieselSpray/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/liquids/lnInclude \ diff --git a/applications/solvers/combustion/engineFoam/Make/options b/applications/solvers/combustion/engineFoam/Make/options index e05f580960..952aa3091a 100644 --- a/applications/solvers/combustion/engineFoam/Make/options +++ b/applications/solvers/combustion/engineFoam/Make/options @@ -4,7 +4,7 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/RAS/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \ -I../XiFoam diff --git a/applications/solvers/combustion/reactingFoam/Make/options b/applications/solvers/combustion/reactingFoam/Make/options index 28ce92ba32..ad9827feb7 100644 --- a/applications/solvers/combustion/reactingFoam/Make/options +++ b/applications/solvers/combustion/reactingFoam/Make/options @@ -1,7 +1,7 @@ EXE_INC = \ -I../XiFoam \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/RAS \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ diff --git a/applications/solvers/compressible/coodles/Make/options b/applications/solvers/compressible/coodles/Make/options index ddf6a7b342..1bc6e360d0 100644 --- a/applications/solvers/compressible/coodles/Make/options +++ b/applications/solvers/compressible/coodles/Make/options @@ -2,8 +2,8 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/LESmodels \ - -I$(LIB_SRC)/LESmodels/LESdeltas/lnInclude + -I$(LIB_SRC)/turbulenceModels/LES \ + -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude EXE_LIBS = \ -lfiniteVolume \ diff --git a/applications/solvers/compressible/rhoPimpleFoam/Make/options b/applications/solvers/compressible/rhoPimpleFoam/Make/options index 6e789b67e2..1679646dc1 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/Make/options +++ b/applications/solvers/compressible/rhoPimpleFoam/Make/options @@ -2,7 +2,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/cfdTools \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels + -I$(LIB_SRC)/turbulenceModels/RAS EXE_LIBS = \ -lfiniteVolume \ diff --git a/applications/solvers/compressible/rhoPorousSimpleFoam/Make/options b/applications/solvers/compressible/rhoPorousSimpleFoam/Make/options index c3b1a00728..46c3f63621 100644 --- a/applications/solvers/compressible/rhoPorousSimpleFoam/Make/options +++ b/applications/solvers/compressible/rhoPorousSimpleFoam/Make/options @@ -3,7 +3,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels + -I$(LIB_SRC)/turbulenceModels/RAS EXE_LIBS = \ -lfiniteVolume \ diff --git a/applications/solvers/compressible/rhoSimpleFoam/Make/options b/applications/solvers/compressible/rhoSimpleFoam/Make/options index 6e789b67e2..1679646dc1 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/Make/options +++ b/applications/solvers/compressible/rhoSimpleFoam/Make/options @@ -2,7 +2,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/cfdTools \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels + -I$(LIB_SRC)/turbulenceModels/RAS EXE_LIBS = \ -lfiniteVolume \ diff --git a/applications/solvers/compressible/rhoTurbFoam/Make/options b/applications/solvers/compressible/rhoTurbFoam/Make/options index 8fe0a8bfd4..9a953a45d4 100644 --- a/applications/solvers/compressible/rhoTurbFoam/Make/options +++ b/applications/solvers/compressible/rhoTurbFoam/Make/options @@ -2,7 +2,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels + -I$(LIB_SRC)/turbulenceModels/RAS EXE_LIBS = \ -lfiniteVolume \ diff --git a/applications/solvers/compressible/sonicTurbFoam/Make/options b/applications/solvers/compressible/sonicTurbFoam/Make/options index 87490408ff..42838550d1 100644 --- a/applications/solvers/compressible/sonicTurbFoam/Make/options +++ b/applications/solvers/compressible/sonicTurbFoam/Make/options @@ -2,7 +2,7 @@ EXE_INC = \ -I../sonicFoam \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels + -I$(LIB_SRC)/turbulenceModels/RAS EXE_LIBS = \ -lfiniteVolume \ diff --git a/applications/solvers/heatTransfer/buoyantFoam/Make/options b/applications/solvers/heatTransfer/buoyantFoam/Make/options index 182c88e291..ea9f7366bc 100644 --- a/applications/solvers/heatTransfer/buoyantFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantFoam/Make/options @@ -1,7 +1,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/RAS \ -I../XiFoam EXE_LIBS = \ diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options b/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options index 6e789b67e2..1679646dc1 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options @@ -2,7 +2,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/cfdTools \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels + -I$(LIB_SRC)/turbulenceModels/RAS EXE_LIBS = \ -lfiniteVolume \ diff --git a/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/Make/options b/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/Make/options index 12943280aa..5210108717 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/Make/options @@ -3,7 +3,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ - -I$(LIB_SRC)/turbulenceModels + -I$(LIB_SRC)/turbulenceModels/RAS EXE_LIBS = \ -lfiniteVolume \ diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options b/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options index 6bf54dad00..2fe2cc72a3 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options @@ -7,7 +7,7 @@ EXE_INC = \ -IderivedFvPatchFields/solidWallHeatFluxTemperatureCoupled \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels + -I$(LIB_SRC)/turbulenceModels/RAS EXE_LIBS = \ -lfiniteVolume \ diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/coupleManager/coupleManager.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/coupleManager/coupleManager.H index a6f265faae..5291715440 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/coupleManager/coupleManager.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/coupleManager/coupleManager.H @@ -120,7 +120,7 @@ public: inline const fvMesh& neighbourRegion() const; //- Return the neighbour patch ID - inline const label neighbourPatchID() const; + inline label neighbourPatchID() const; //- Return a reference to the neighbour patch inline const fvPatch& neighbourPatch() const; diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/coupleManager/coupleManagerI.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/coupleManager/coupleManagerI.H index 5a252d8704..d660ada818 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/coupleManager/coupleManagerI.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/coupleManager/coupleManagerI.H @@ -55,7 +55,7 @@ inline const Foam::fvMesh& Foam::coupleManager::neighbourRegion() const } -inline const Foam::label Foam::coupleManager::neighbourPatchID() const +inline Foam::label Foam::coupleManager::neighbourPatchID() const { return neighbourRegion().boundaryMesh().findPatchID(neighbourPatchName_); } diff --git a/applications/solvers/heatTransfer/lesBuoyantFoam/Make/options b/applications/solvers/heatTransfer/lesBuoyantFoam/Make/options index 9413e969c3..2dc02308d7 100644 --- a/applications/solvers/heatTransfer/lesBuoyantFoam/Make/options +++ b/applications/solvers/heatTransfer/lesBuoyantFoam/Make/options @@ -2,8 +2,8 @@ EXE_INC = \ -I../buoyantFoam \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/LESmodels \ - -I$(LIB_SRC)/LESmodels/LESdeltas/lnInclude + -I$(LIB_SRC)/turbulenceModels/LES \ + -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude EXE_LIBS = \ -lfiniteVolume \ diff --git a/applications/solvers/incompressible/boundaryFoam/Make/options b/applications/solvers/incompressible/boundaryFoam/Make/options index 9f6d88d3ea..89e1642a87 100644 --- a/applications/solvers/incompressible/boundaryFoam/Make/options +++ b/applications/solvers/incompressible/boundaryFoam/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/RAS \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/sampling/lnInclude diff --git a/applications/solvers/incompressible/boundaryFoam/createFields.H b/applications/solvers/incompressible/boundaryFoam/createFields.H index 60f3062d37..31c3ac5915 100644 --- a/applications/solvers/incompressible/boundaryFoam/createFields.H +++ b/applications/solvers/incompressible/boundaryFoam/createFields.H @@ -31,9 +31,9 @@ singlePhaseTransportModel laminarTransport(U, phi); - autoPtr turbulence + autoPtr turbulence ( - turbulenceModel::New(U, phi, laminarTransport) + incompressible::turbulenceModel::New(U, phi, laminarTransport) ); diff --git a/applications/solvers/incompressible/channelOodles/Make/options b/applications/solvers/incompressible/channelOodles/Make/options index 36e475b86c..5f39a2f093 100644 --- a/applications/solvers/incompressible/channelOodles/Make/options +++ b/applications/solvers/incompressible/channelOodles/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ - -I$(LIB_SRC)/LESmodels \ - -I$(LIB_SRC)/LESmodels/LESdeltas/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/LES \ + -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ diff --git a/applications/solvers/incompressible/oodles/Make/options b/applications/solvers/incompressible/oodles/Make/options index 0247c89bbe..38a50d7766 100644 --- a/applications/solvers/incompressible/oodles/Make/options +++ b/applications/solvers/incompressible/oodles/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ - -I$(LIB_SRC)/LESmodels \ - -I$(LIB_SRC)/LESmodels/LESdeltas/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/LES \ + -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ diff --git a/applications/solvers/incompressible/simpleFoam/Make/options b/applications/solvers/incompressible/simpleFoam/Make/options index ef6915707c..13680640c4 100644 --- a/applications/solvers/incompressible/simpleFoam/Make/options +++ b/applications/solvers/incompressible/simpleFoam/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/RAS \ -I$(LIB_SRC)/transportModels EXE_LIBS = \ diff --git a/applications/solvers/incompressible/simpleFoam/createFields.H b/applications/solvers/incompressible/simpleFoam/createFields.H index 84478adc3c..020d179839 100644 --- a/applications/solvers/incompressible/simpleFoam/createFields.H +++ b/applications/solvers/incompressible/simpleFoam/createFields.H @@ -36,7 +36,7 @@ singlePhaseTransportModel laminarTransport(U, phi); - autoPtr turbulence + autoPtr turbulence ( - turbulenceModel::New(U, phi, laminarTransport) + incompressible::turbulenceModel::New(U, phi, laminarTransport) ); diff --git a/applications/solvers/incompressible/turbDyMFoam/Make/options b/applications/solvers/incompressible/turbDyMFoam/Make/options index 2a1549655e..633daf3e73 100644 --- a/applications/solvers/incompressible/turbDyMFoam/Make/options +++ b/applications/solvers/incompressible/turbDyMFoam/Make/options @@ -2,7 +2,7 @@ EXE_INC = \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/RAS \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/finiteVolume/lnInclude diff --git a/applications/solvers/incompressible/turbDyMFoam/createFields.H b/applications/solvers/incompressible/turbDyMFoam/createFields.H index a536e9cce6..ff3f9c5169 100644 --- a/applications/solvers/incompressible/turbDyMFoam/createFields.H +++ b/applications/solvers/incompressible/turbDyMFoam/createFields.H @@ -37,9 +37,9 @@ singlePhaseTransportModel laminarTransport(U, phi); - autoPtr turbulence + autoPtr turbulence ( - turbulenceModel::New(U, phi, laminarTransport) + incompressible::turbulenceModel::New(U, phi, laminarTransport) ); Info<< "Reading field rAU if present\n" << endl; diff --git a/applications/solvers/incompressible/turbFoam/Make/options b/applications/solvers/incompressible/turbFoam/Make/options index 949db75274..b8036f1d38 100644 --- a/applications/solvers/incompressible/turbFoam/Make/options +++ b/applications/solvers/incompressible/turbFoam/Make/options @@ -1,5 +1,5 @@ EXE_INC = \ - -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/RAS \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/finiteVolume/lnInclude diff --git a/applications/solvers/incompressible/turbFoam/createFields.H b/applications/solvers/incompressible/turbFoam/createFields.H index 8025fb372e..7cae304f6f 100644 --- a/applications/solvers/incompressible/turbFoam/createFields.H +++ b/applications/solvers/incompressible/turbFoam/createFields.H @@ -36,7 +36,7 @@ singlePhaseTransportModel laminarTransport(U, phi); - autoPtr turbulence + autoPtr turbulence ( - turbulenceModel::New(U, phi, laminarTransport) + incompressible::turbulenceModel::New(U, phi, laminarTransport) ); diff --git a/applications/solvers/multiphase/bubbleFoam/createTurbulence.H b/applications/solvers/multiphase/bubbleFoam/createTurbulence.H index 8b60d34a29..347fa1168e 100644 --- a/applications/solvers/multiphase/bubbleFoam/createTurbulence.H +++ b/applications/solvers/multiphase/bubbleFoam/createTurbulence.H @@ -22,29 +22,29 @@ ); - dimensionedScalar Cmu + scalar Cmu ( - kEpsilonCoeffs.lookup("Cmu") + readScalar(kEpsilonCoeffs.lookup("Cmu")) ); - dimensionedScalar C1 + scalar C1 ( - kEpsilonCoeffs.lookup("C1") + readScalar(kEpsilonCoeffs.lookup("C1")) ); - dimensionedScalar C2 + scalar C2 ( - kEpsilonCoeffs.lookup("C2") + readScalar(kEpsilonCoeffs.lookup("C2")) ); - dimensionedScalar alphak + scalar alphak ( - kEpsilonCoeffs.lookup("alphak") + readScalar(kEpsilonCoeffs.lookup("alphak")) ); - dimensionedScalar alphaEps + scalar alphaEps ( - kEpsilonCoeffs.lookup("alphaEps") + readScalar(kEpsilonCoeffs.lookup("alphaEps")) ); dictionary wallFunctionCoeffs @@ -52,14 +52,14 @@ turbulenceProperties.subDict("wallFunctionCoeffs") ); - dimensionedScalar kappa + scalar kappa ( - wallFunctionCoeffs.lookup("kappa") + readScalar(wallFunctionCoeffs.lookup("kappa")) ); - dimensionedScalar E + scalar E ( - wallFunctionCoeffs.lookup("E") + readScalar(wallFunctionCoeffs.lookup("E")) ); nearWallDist y(mesh); diff --git a/applications/solvers/multiphase/bubbleFoam/wallFunctions.H b/applications/solvers/multiphase/bubbleFoam/wallFunctions.H index 2921cdf4c9..8650460bc1 100644 --- a/applications/solvers/multiphase/bubbleFoam/wallFunctions.H +++ b/applications/solvers/multiphase/bubbleFoam/wallFunctions.H @@ -1,8 +1,8 @@ { labelList cellBoundaryFaceCount(epsilon.size(), 0); - scalar Cmu25 = ::pow(Cmu.value(), 0.25); - scalar Cmu75 = ::pow(Cmu.value(), 0.75); + scalar Cmu25 = ::pow(Cmu, 0.25); + scalar Cmu75 = ::pow(Cmu, 0.75); const fvPatchList& patches = mesh.boundary(); @@ -53,14 +53,14 @@ epsilon[faceCelli] += Cmu75*::pow(k[faceCelli], 1.5) - /(kappa.value()*y[patchi][facei]); + /(kappa*y[patchi][facei]); if (yPlus > 11.6) { G[faceCelli] += nuw[facei]*magFaceGradU[facei] *Cmu25*::sqrt(k[faceCelli]) - /(kappa.value()*y[patchi][facei]); + /(kappa*y[patchi][facei]); } } } diff --git a/applications/solvers/multiphase/bubbleFoam/wallViscosity.H b/applications/solvers/multiphase/bubbleFoam/wallViscosity.H index 5915b782f9..cd9c005302 100644 --- a/applications/solvers/multiphase/bubbleFoam/wallViscosity.H +++ b/applications/solvers/multiphase/bubbleFoam/wallViscosity.H @@ -1,5 +1,5 @@ { - scalar Cmu25 = ::pow(Cmu.value(), 0.25); + scalar Cmu25 = ::pow(Cmu, 0.25); const fvPatchList& patches = mesh.boundary(); @@ -24,8 +24,8 @@ if (yPlus > 11.6) { nutw[facei] = - yPlus*nub.value()*kappa.value() - /::log(E.value()*yPlus) + yPlus*nub.value()*kappa + /::log(E*yPlus) - nub.value(); } else diff --git a/applications/solvers/multiphase/compressibleLesInterFoam/Make/options b/applications/solvers/multiphase/compressibleLesInterFoam/Make/options index 7f7317e77a..acc310726a 100644 --- a/applications/solvers/multiphase/compressibleLesInterFoam/Make/options +++ b/applications/solvers/multiphase/compressibleLesInterFoam/Make/options @@ -4,8 +4,8 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/LESmodels \ - -I$(LIB_SRC)/LESmodels/LESdeltas/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/LES \ + -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ diff --git a/applications/solvers/multiphase/interDyMFoam/Make/options b/applications/solvers/multiphase/interDyMFoam/Make/options index 0f706f8621..ddd0160b00 100644 --- a/applications/solvers/multiphase/interDyMFoam/Make/options +++ b/applications/solvers/multiphase/interDyMFoam/Make/options @@ -2,8 +2,8 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/incompressible/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/RAS \ + -I$(LIB_SRC)/turbulenceModels/RAS/incompressible/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ diff --git a/applications/solvers/multiphase/interDyMFoam/createFields.H b/applications/solvers/multiphase/interDyMFoam/createFields.H index 464d28cc45..48e8f1da20 100644 --- a/applications/solvers/multiphase/interDyMFoam/createFields.H +++ b/applications/solvers/multiphase/interDyMFoam/createFields.H @@ -86,10 +86,10 @@ // Construct interface from gamma distribution interfaceProperties interface(gamma, U, twoPhaseProperties); - // Construct LES model - autoPtr turbulence + // Construct incompressible RAS model + autoPtr turbulence ( - turbulenceModel::New(U, phi, twoPhaseProperties) + incompressible::turbulenceModel::New(U, phi, twoPhaseProperties) ); wordList pcorrTypes(pd.boundaryField().types()); diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/Make/options b/applications/solvers/multiphase/interPhaseChangeFoam/Make/options index f1f3bf5815..af6ebd0be3 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/Make/options +++ b/applications/solvers/multiphase/interPhaseChangeFoam/Make/options @@ -2,8 +2,8 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/LESmodels \ - -I$(LIB_SRC)/LESmodels/LESdeltas/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/LES \ + -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ -IphaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture \ -I$(LIB_SRC)/finiteVolume/lnInclude diff --git a/applications/solvers/multiphase/lesCavitatingFoam/Make/options b/applications/solvers/multiphase/lesCavitatingFoam/Make/options index 100c5a0cac..988b21f834 100644 --- a/applications/solvers/multiphase/lesCavitatingFoam/Make/options +++ b/applications/solvers/multiphase/lesCavitatingFoam/Make/options @@ -3,9 +3,9 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/LESmodels \ - -I$(LIB_SRC)/LESmodels/incompressible/lnInclude \ - -I$(LIB_SRC)/LESmodels/LESdeltas/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/LES \ + -I$(LIB_SRC)/turbulenceModels/LES/incompressible/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/barotropicCompressibilityModel/lnInclude EXE_LIBS = \ diff --git a/applications/solvers/multiphase/lesCavitatingFoam/devOneEqEddy/devOneEqEddy.C b/applications/solvers/multiphase/lesCavitatingFoam/devOneEqEddy/devOneEqEddy.C index 3a5db93cb8..2e519dc17c 100644 --- a/applications/solvers/multiphase/lesCavitatingFoam/devOneEqEddy/devOneEqEddy.C +++ b/applications/solvers/multiphase/lesCavitatingFoam/devOneEqEddy/devOneEqEddy.C @@ -31,7 +31,7 @@ License namespace Foam { -namespace LESmodels +namespace LES { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -64,8 +64,10 @@ devOneEqEddy::devOneEqEddy mesh_ ), - ck_(LESmodelProperties().lookup("ck")) -{} + ck_(LESmodelProperties().lookupOrAddDefault("ck", 0.07)) +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -99,7 +101,7 @@ bool devOneEqEddy::read() { if (GenEddyVisc::read()) { - LESmodelProperties().lookup("ck") >> ck_; + LESmodelProperties().readIfPresent("ck", ck_); return true; } @@ -112,7 +114,7 @@ bool devOneEqEddy::read() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // ************************************************************************* // diff --git a/applications/solvers/multiphase/lesCavitatingFoam/devOneEqEddy/devOneEqEddy.H b/applications/solvers/multiphase/lesCavitatingFoam/devOneEqEddy/devOneEqEddy.H index 6581e962c4..4e0763a101 100644 --- a/applications/solvers/multiphase/lesCavitatingFoam/devOneEqEddy/devOneEqEddy.H +++ b/applications/solvers/multiphase/lesCavitatingFoam/devOneEqEddy/devOneEqEddy.H @@ -61,7 +61,7 @@ SourceFiles namespace Foam { -namespace LESmodels +namespace LES { /*---------------------------------------------------------------------------*\ @@ -76,7 +76,7 @@ class devOneEqEddy volScalarField k_; - dimensionedScalar ck_; + scalar ck_; // Private Member Functions @@ -119,7 +119,7 @@ public: //- Return the effective diffusivity for k tmp DkEff() const { - return tmp + return tmp ( new volScalarField("DkEff", nuSgs_ + nu()) ); diff --git a/applications/solvers/multiphase/lesInterFoam/Make/options b/applications/solvers/multiphase/lesInterFoam/Make/options index 16b59ec989..3c761572bf 100644 --- a/applications/solvers/multiphase/lesInterFoam/Make/options +++ b/applications/solvers/multiphase/lesInterFoam/Make/options @@ -4,8 +4,8 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/LESmodels \ - -I$(LIB_SRC)/LESmodels/LESdeltas/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/LES \ + -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ diff --git a/applications/solvers/multiphase/rasCavitatingFoam/Make/options b/applications/solvers/multiphase/rasCavitatingFoam/Make/options index ffd4930257..4c09b3efbe 100644 --- a/applications/solvers/multiphase/rasCavitatingFoam/Make/options +++ b/applications/solvers/multiphase/rasCavitatingFoam/Make/options @@ -3,7 +3,7 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/RAS \ -I$(LIB_SRC)/thermophysicalModels/barotropicCompressibilityModel/lnInclude EXE_LIBS = \ diff --git a/applications/solvers/multiphase/rasCavitatingFoam/createFields.H b/applications/solvers/multiphase/rasCavitatingFoam/createFields.H index 21f5b136bb..da236f7673 100644 --- a/applications/solvers/multiphase/rasCavitatingFoam/createFields.H +++ b/applications/solvers/multiphase/rasCavitatingFoam/createFields.H @@ -79,7 +79,7 @@ twoPhaseMixture twoPhaseProperties(U, phiv, "gamma"); // Create RAS turbulence model - autoPtr turbulence + autoPtr turbulence ( - turbulenceModel::New(U, phiv, twoPhaseProperties) + incompressible::turbulenceModel::New(U, phiv, twoPhaseProperties) ); diff --git a/applications/solvers/multiphase/rasInterFoam/Make/options b/applications/solvers/multiphase/rasInterFoam/Make/options index 4994db0f96..27d86562c3 100644 --- a/applications/solvers/multiphase/rasInterFoam/Make/options +++ b/applications/solvers/multiphase/rasInterFoam/Make/options @@ -3,7 +3,7 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/RAS \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ diff --git a/applications/solvers/multiphase/rasInterFoam/createFields.H b/applications/solvers/multiphase/rasInterFoam/createFields.H index 988e8b3f74..8a3e4d22f0 100644 --- a/applications/solvers/multiphase/rasInterFoam/createFields.H +++ b/applications/solvers/multiphase/rasInterFoam/createFields.H @@ -110,7 +110,7 @@ interfaceProperties interface(gamma, U, twoPhaseProperties); // Construct LES model - autoPtr turbulence + autoPtr turbulence ( - turbulenceModel::New(U, phi, twoPhaseProperties) + incompressible::turbulenceModel::New(U, phi, twoPhaseProperties) ); diff --git a/applications/solvers/multiphase/settlingFoam/createFields.H b/applications/solvers/multiphase/settlingFoam/createFields.H index 7cf3305194..dfc560135e 100644 --- a/applications/solvers/multiphase/settlingFoam/createFields.H +++ b/applications/solvers/multiphase/settlingFoam/createFields.H @@ -234,34 +234,34 @@ ); - dimensionedScalar Cmu + scalar Cmu ( - kEpsilonCoeffs.lookup("Cmu") + readScalar(kEpsilonCoeffs.lookup("Cmu")) ); - dimensionedScalar C1 + scalar C1 ( - kEpsilonCoeffs.lookup("C1") + readScalar(kEpsilonCoeffs.lookup("C1")) ); - dimensionedScalar C2 + scalar C2 ( - kEpsilonCoeffs.lookup("C2") + readScalar(kEpsilonCoeffs.lookup("C2")) ); - dimensionedScalar C3 + scalar C3 ( - kEpsilonCoeffs.lookup("C3") + readScalar(kEpsilonCoeffs.lookup("C3")) ); - dimensionedScalar alphak + scalar alphak ( - kEpsilonCoeffs.lookup("alphak") + readScalar(kEpsilonCoeffs.lookup("alphak")) ); - dimensionedScalar alphaEps + scalar alphaEps ( - kEpsilonCoeffs.lookup("alphaEps") + readScalar(kEpsilonCoeffs.lookup("alphaEps")) ); const dictionary& wallFunctionCoeffs @@ -269,14 +269,14 @@ turbulenceProperties.subDict("wallFunctionCoeffs") ); - dimensionedScalar kappa + scalar kappa ( - wallFunctionCoeffs.lookup("kappa") + readScalar(wallFunctionCoeffs.lookup("kappa")) ); - dimensionedScalar E + scalar E ( - wallFunctionCoeffs.lookup("E") + readScalar(wallFunctionCoeffs.lookup("E")) ); nearWallDist y(mesh); diff --git a/applications/solvers/multiphase/settlingFoam/wallFunctions.H b/applications/solvers/multiphase/settlingFoam/wallFunctions.H index d6b4360c9e..411a897499 100644 --- a/applications/solvers/multiphase/settlingFoam/wallFunctions.H +++ b/applications/solvers/multiphase/settlingFoam/wallFunctions.H @@ -1,8 +1,8 @@ { labelList cellBoundaryFaceCount(epsilon.size(), 0); - scalar Cmu25 = ::pow(Cmu.value(), 0.25); - scalar Cmu75 = ::pow(Cmu.value(), 0.75); + scalar Cmu25 = ::pow(Cmu, 0.25); + scalar Cmu75 = ::pow(Cmu, 0.75); const fvPatchList& patches = mesh.boundary(); @@ -55,14 +55,14 @@ epsilon[faceCelli] += Cmu75*rho[faceCelli]*::pow(k[faceCelli], 1.5) - /(kappa.value()*y[patchi][facei]); + /(kappa*y[patchi][facei]); if (yPlus > 11.6) { G[faceCelli] += mutw[facei]*magFaceGradU[facei] *Cmu25*::sqrt(k[faceCelli]) - /(kappa.value()*y[patchi][facei]); + /(kappa*y[patchi][facei]); } } } diff --git a/applications/solvers/multiphase/settlingFoam/wallViscosity.H b/applications/solvers/multiphase/settlingFoam/wallViscosity.H index 2b2cc99339..665d4bbf74 100644 --- a/applications/solvers/multiphase/settlingFoam/wallViscosity.H +++ b/applications/solvers/multiphase/settlingFoam/wallViscosity.H @@ -1,5 +1,5 @@ { - scalar Cmu25 = ::pow(Cmu.value(), 0.25); + scalar Cmu25 = ::pow(Cmu, 0.25); const fvPatchList& patches = mesh.boundary(); @@ -26,7 +26,7 @@ { mutw[facei] = muw[facei] - *(yPlus*kappa.value()/::log(E.value()*yPlus) - 1); + *(yPlus*kappa/::log(E*yPlus) - 1); } else { diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/createFields.H b/applications/solvers/multiphase/twoPhaseEulerFoam/createFields.H index 13dc8b1b14..7d70f4e575 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/createFields.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/createFields.H @@ -170,29 +170,29 @@ ); - dimensionedScalar Cmu + scalar Cmu ( - kEpsilonCoeffs.lookup("Cmu") + readScalar(kEpsilonCoeffs.lookup("Cmu")) ); - dimensionedScalar C1 + scalar C1 ( - kEpsilonCoeffs.lookup("C1") + readScalar(kEpsilonCoeffs.lookup("C1")) ); - dimensionedScalar C2 + scalar C2 ( - kEpsilonCoeffs.lookup("C2") + readScalar(kEpsilonCoeffs.lookup("C2")) ); - dimensionedScalar alphak + scalar alphak ( - kEpsilonCoeffs.lookup("alphak") + readScalar(kEpsilonCoeffs.lookup("alphak")) ); - dimensionedScalar alphaEps + scalar alphaEps ( - kEpsilonCoeffs.lookup("alphaEps") + readScalar(kEpsilonCoeffs.lookup("alphaEps")) ); dictionary wallFunctionCoeffs @@ -200,14 +200,14 @@ turbulenceProperties.subDict("wallFunctionCoeffs") ); - dimensionedScalar kappa + scalar kappa ( - wallFunctionCoeffs.lookup("kappa") + readScalar(wallFunctionCoeffs.lookup("kappa")) ); - dimensionedScalar E + scalar E ( - wallFunctionCoeffs.lookup("E") + readScalar(wallFunctionCoeffs.lookup("E")) ); nearWallDist y(mesh); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/turbulenceModel/wallFunctions.H b/applications/solvers/multiphase/twoPhaseEulerFoam/turbulenceModel/wallFunctions.H index e9e4cbf41b..ea7d1a9b14 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/turbulenceModel/wallFunctions.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/turbulenceModel/wallFunctions.H @@ -1,8 +1,8 @@ { labelList cellBoundaryFaceCount(epsilon.size(), 0); - scalar Cmu25 = ::pow(Cmu.value(), 0.25); - scalar Cmu75 = ::pow(Cmu.value(), 0.75); + scalar Cmu25 = ::pow(Cmu, 0.25); + scalar Cmu75 = ::pow(Cmu, 0.75); const fvPatchList& patches = mesh.boundary(); @@ -52,14 +52,14 @@ epsilon[faceCelli] += Cmu75*::pow(k[faceCelli], 1.5) - /(kappa.value()*y[patchi][facei]); + /(kappa*y[patchi][facei]); if (yPlus > 11.6) { G[faceCelli] += nuw[facei]*magFaceGradU[facei] *Cmu25*::sqrt(k[faceCelli]) - /(kappa.value()*y[patchi][facei]); + /(kappa*y[patchi][facei]); } } } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/turbulenceModel/wallViscosity.H b/applications/solvers/multiphase/twoPhaseEulerFoam/turbulenceModel/wallViscosity.H index 5915b782f9..cd9c005302 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/turbulenceModel/wallViscosity.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/turbulenceModel/wallViscosity.H @@ -1,5 +1,5 @@ { - scalar Cmu25 = ::pow(Cmu.value(), 0.25); + scalar Cmu25 = ::pow(Cmu, 0.25); const fvPatchList& patches = mesh.boundary(); @@ -24,8 +24,8 @@ if (yPlus > 11.6) { nutw[facei] = - yPlus*nub.value()*kappa.value() - /::log(E.value()*yPlus) + yPlus*nub.value()*kappa + /::log(E*yPlus) - nub.value(); } else diff --git a/applications/test/dictionary/calcEntry/calcEntry.C b/applications/test/dictionary/calcEntry/calcEntry.C index 6fb009456b..d148f5d829 100644 --- a/applications/test/dictionary/calcEntry/calcEntry.C +++ b/applications/test/dictionary/calcEntry/calcEntry.C @@ -42,24 +42,17 @@ namespace functionEntries ( functionEntry, calcEntry, - insert, + execute, primitiveEntryIstream ); - addToMemberFunctionSelectionTable - ( - functionEntry, - calcEntry, - insert, - dictionaryIstream - ); } } // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -bool Foam::functionEntries::calcEntry::insert +bool Foam::functionEntries::calcEntry::execute ( const dictionary& parentDict, primitiveEntry& entry, @@ -75,14 +68,4 @@ bool Foam::functionEntries::calcEntry::insert } -bool Foam::functionEntries::calcEntry::insert -( - dictionary& parentDict, - Istream& is -) -{ - return true; -} - - // ************************************************************************* // diff --git a/applications/test/dictionary/calcEntry/calcEntry.H b/applications/test/dictionary/calcEntry/calcEntry.H index c4c725dfb0..157bdc6d02 100644 --- a/applications/test/dictionary/calcEntry/calcEntry.H +++ b/applications/test/dictionary/calcEntry/calcEntry.H @@ -69,18 +69,13 @@ public: // Member Functions - static bool insert + static bool execute ( const dictionary& parentDict, primitiveEntry& entry, Istream& is ); - static bool insert - ( - dictionary& parentDict, - Istream& is - ); }; diff --git a/applications/test/dictionary/testDict b/applications/test/dictionary/testDict index 70f6885e7e..9bd58c58ae 100644 --- a/applications/test/dictionary/testDict +++ b/applications/test/dictionary/testDict @@ -1,17 +1,19 @@ +/*-------------------------------*- C++ -*---------------------------------*\ +| ========= | +| \\ / OpenFOAM | +| \\ / | +| \\ / The Open Source CFD Toolbox | +| \\/ http://www.OpenFOAM.org | +\*-------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; - - root ""; - case ""; - instance ""; - local ""; - class dictionary; object testDict; } - +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +#inputMode merge dimensions [ 0 2 -2 0 0 0 0 ]; internalField uniform 1; @@ -29,7 +31,6 @@ inactive type zeroGradient; } - boundaryField { Default_Boundary_Region @@ -40,6 +41,12 @@ boundaryField inlet_1 { $active } inlet_2 { $inactive } inlet_3 { $inactive } + inlet_4 { $inactive } + inlet_5 "a primitiveEntry is squashed by a directory entry"; + inlet_5 { $inactive } + inlet_6 { $inactive } + inlet_7 { $inactive } + inlet_8 { $inactive } #include "testDictInc" @@ -48,8 +55,44 @@ boundaryField type inletOutlet; inletValue $internalField; value #include "value"; + // error #remove self; x 5; y 6; another #calc{x $x; y $y;}; } + + // this should have no effect + #remove inactive + + inlet_7 { $active } + #inputMode overwrite + inlet_8 { $active } } + +// NB: the inputMode has a global scope +#inputMode merge +#include "testDict2" + +foo +{ + $active +} + +bar +{ + $active +} + +baz +{ + $active +} + + +// this should work +#remove active + +// this should work too +#remove ( bar baz ) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/test/dictionary/testDict2 b/applications/test/dictionary/testDict2 new file mode 100644 index 0000000000..6c55ab384c --- /dev/null +++ b/applications/test/dictionary/testDict2 @@ -0,0 +1,30 @@ +/*-------------------------------*- C++ -*---------------------------------*\ +| ========= | +| \\ / OpenFOAM | +| \\ / | +| \\ / The Open Source CFD Toolbox | +| \\/ http://www.OpenFOAM.org | +\*-------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object testDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +boundaryField +{ + Default_Boundary_Region + { + value $internalField; + note "actually a noslip wall"; + } + + inlet_3 "a primitiveEntry squashes directory entry"; +} + +#inputMode overwrite +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/test/dictionary/value b/applications/test/dictionary/value index 196f9d3d0a..6a860dc353 100644 --- a/applications/test/dictionary/value +++ b/applications/test/dictionary/value @@ -1 +1,2 @@ -uniform 2 +// the trailing ';' shouldn't actually be there, but shouldn't cause problems +uniform 2; diff --git a/applications/utilities/mesh/conversion/Optional/Allwmake b/applications/utilities/mesh/conversion/Optional/Allwmake index 95f041dd61..31617e3b12 100755 --- a/applications/utilities/mesh/conversion/Optional/Allwmake +++ b/applications/utilities/mesh/conversion/Optional/Allwmake @@ -2,6 +2,9 @@ # Build optional components (eg, may depend on third-party libraries) set -x +# run from this directory only +cd ${0%/*} || exit 1 + # build libccmio if required if [ ! -e $FOAM_LIBBIN/libccmio.so ] then diff --git a/applications/utilities/postProcessing/dataConversion/hashSetUnion.H b/applications/utilities/postProcessing/dataConversion/hashSetUnion.H new file mode 100644 index 0000000000..4f2052f73c --- /dev/null +++ b/applications/utilities/postProcessing/dataConversion/hashSetUnion.H @@ -0,0 +1,53 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Class + Foam::hashSetUnionEqOp + +Description + Union operation to combine hash sets + Usage: combineReduce(myWordHashSet, unionEqOp()); + +\*---------------------------------------------------------------------------*/ + +namespace Foam +{ + template + class hashSetUnionEqOp + { + public: + void operator()(HashSet& x, const HashSet& y) const + { + forAllConstIter(typename HashSet, y, iter) + { + x.insert(iter.key()); + } + } + }; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/utilities/postProcessing/dataConversion/hashTableUnion.H b/applications/utilities/postProcessing/dataConversion/hashTableUnion.H new file mode 100644 index 0000000000..816485d113 --- /dev/null +++ b/applications/utilities/postProcessing/dataConversion/hashTableUnion.H @@ -0,0 +1,53 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Class + Foam::hashTableUnionEqOp + +Description + Union operation to combine hash sets + Usage: combineReduce(myWordHashSet, unionEqOp()); + +\*---------------------------------------------------------------------------*/ + +namespace Foam +{ + template + class hashTableUnionEqOp + { + public: + void operator()(HashTable& x, const HashTable& y) const + { + forAllConstIter(typename HashTable, y, iter) + { + x.insert(iter.key(), iter()); + } + } + }; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/Make/options b/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/Make/options index f67d6a4254..f6c92548fc 100644 --- a/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/Make/options +++ b/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/Make/options @@ -2,9 +2,9 @@ EXE_INC = \ -I$(FOAM_SRC)/postProcessing/postCalc \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/LESmodels/LESdeltas/lnInclude \ - -I$(LIB_SRC)/LESmodels \ + -I$(LIB_SRC)/turbulenceModels/RAS \ + -I$(LIB_SRC)/turbulenceModels/LES \ + -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude EXE_LIBS = \ diff --git a/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/execFlowFunctionObjects.C b/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/execFlowFunctionObjects.C index 9c8c750494..9d437d4355 100644 --- a/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/execFlowFunctionObjects.C +++ b/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/execFlowFunctionObjects.C @@ -148,9 +148,14 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) if (turbulenceProperties.found("turbulenceModel")) { - autoPtr turbulenceModel + autoPtr turbulenceModel ( - turbulenceModel::New(U, phi, laminarTransport) + incompressible::turbulenceModel::New + ( + U, + phi, + laminarTransport + ) ); execFlowFunctionObjects(args, runTime); diff --git a/applications/utilities/postProcessing/stressField/stressComponents/Make/options b/applications/utilities/postProcessing/stressField/stressComponents/Make/options index 47f63723e3..b0d119d888 100644 --- a/applications/utilities/postProcessing/stressField/stressComponents/Make/options +++ b/applications/utilities/postProcessing/stressField/stressComponents/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/RAS \ -I$(LIB_SRC)/transportModels EXE_LIBS = \ diff --git a/applications/utilities/postProcessing/turbulence/R/Make/options b/applications/utilities/postProcessing/turbulence/R/Make/options index 149b58cc98..8b6867b6fc 100644 --- a/applications/utilities/postProcessing/turbulence/R/Make/options +++ b/applications/utilities/postProcessing/turbulence/R/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/RAS \ -I$(LIB_SRC)/transportModels EXE_LIBS = \ diff --git a/applications/utilities/postProcessing/turbulence/R/createFields.H b/applications/utilities/postProcessing/turbulence/R/createFields.H index 35ea975f36..72d049103d 100644 --- a/applications/utilities/postProcessing/turbulence/R/createFields.H +++ b/applications/utilities/postProcessing/turbulence/R/createFields.H @@ -16,7 +16,7 @@ singlePhaseTransportModel laminarTransport(U, phi); - autoPtr turbulence + autoPtr turbulence ( - turbulenceModel::New(U, phi, laminarTransport) + incompressible::turbulenceModel::New(U, phi, laminarTransport) ); diff --git a/applications/utilities/postProcessing/turbulence/createTurbulenceFields/Make/options b/applications/utilities/postProcessing/turbulence/createTurbulenceFields/Make/options index 47f63723e3..b0d119d888 100644 --- a/applications/utilities/postProcessing/turbulence/createTurbulenceFields/Make/options +++ b/applications/utilities/postProcessing/turbulence/createTurbulenceFields/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/RAS \ -I$(LIB_SRC)/transportModels EXE_LIBS = \ diff --git a/applications/utilities/postProcessing/turbulence/createTurbulenceFields/createFields.H b/applications/utilities/postProcessing/turbulence/createTurbulenceFields/createFields.H index 35ea975f36..72d049103d 100644 --- a/applications/utilities/postProcessing/turbulence/createTurbulenceFields/createFields.H +++ b/applications/utilities/postProcessing/turbulence/createTurbulenceFields/createFields.H @@ -16,7 +16,7 @@ singlePhaseTransportModel laminarTransport(U, phi); - autoPtr turbulence + autoPtr turbulence ( - turbulenceModel::New(U, phi, laminarTransport) + incompressible::turbulenceModel::New(U, phi, laminarTransport) ); diff --git a/applications/utilities/postProcessing/velocityField/Pe/Make/options b/applications/utilities/postProcessing/velocityField/Pe/Make/options index 6802a3c91f..eae57baa89 100644 --- a/applications/utilities/postProcessing/velocityField/Pe/Make/options +++ b/applications/utilities/postProcessing/velocityField/Pe/Make/options @@ -4,9 +4,9 @@ EXE_INC = \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/LESmodels/LESdeltas/lnInclude \ - -I$(LIB_SRC)/LESmodels \ + -I$(LIB_SRC)/turbulenceModels/RAS \ + -I$(LIB_SRC)/turbulenceModels/LES \ + -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude EXE_LIBS = \ diff --git a/applications/utilities/postProcessing/velocityField/Pe/Pe.C b/applications/utilities/postProcessing/velocityField/Pe/Pe.C index cd5d76740b..52cd861cbd 100644 --- a/applications/utilities/postProcessing/velocityField/Pe/Pe.C +++ b/applications/utilities/postProcessing/velocityField/Pe/Pe.C @@ -100,9 +100,14 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) if (turbulenceProperties.found("turbulenceModel")) { - autoPtr turbulenceModel + autoPtr turbulenceModel ( - turbulenceModel::New(U, phi, laminarTransport) + incompressible::turbulenceModel::New + ( + U, + phi, + laminarTransport + ) ); PePtr.set diff --git a/applications/utilities/postProcessing/wall/wallGradU/Make/options b/applications/utilities/postProcessing/wall/wallGradU/Make/options index b0e647e10a..6437903e0c 100644 --- a/applications/utilities/postProcessing/wall/wallGradU/Make/options +++ b/applications/utilities/postProcessing/wall/wallGradU/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/RAS \ -I$(LIB_SRC)/transportModels EXE_LIBS = \ diff --git a/applications/utilities/postProcessing/wall/wallHeatFlux/Make/options b/applications/utilities/postProcessing/wall/wallHeatFlux/Make/options index 49c8ba9144..bcd694b425 100644 --- a/applications/utilities/postProcessing/wall/wallHeatFlux/Make/options +++ b/applications/utilities/postProcessing/wall/wallHeatFlux/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/RAS \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude diff --git a/applications/utilities/postProcessing/wall/wallShearStress/Make/options b/applications/utilities/postProcessing/wall/wallShearStress/Make/options index b0e647e10a..6437903e0c 100644 --- a/applications/utilities/postProcessing/wall/wallShearStress/Make/options +++ b/applications/utilities/postProcessing/wall/wallShearStress/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/RAS \ -I$(LIB_SRC)/transportModels EXE_LIBS = \ diff --git a/applications/utilities/postProcessing/wall/wallShearStress/createFields.H b/applications/utilities/postProcessing/wall/wallShearStress/createFields.H index 35ea975f36..72d049103d 100644 --- a/applications/utilities/postProcessing/wall/wallShearStress/createFields.H +++ b/applications/utilities/postProcessing/wall/wallShearStress/createFields.H @@ -16,7 +16,7 @@ singlePhaseTransportModel laminarTransport(U, phi); - autoPtr turbulence + autoPtr turbulence ( - turbulenceModel::New(U, phi, laminarTransport) + incompressible::turbulenceModel::New(U, phi, laminarTransport) ); diff --git a/applications/utilities/postProcessing/wall/yPlusLES/Make/options b/applications/utilities/postProcessing/wall/yPlusLES/Make/options index cb15a51f9a..d1465c1a7c 100644 --- a/applications/utilities/postProcessing/wall/yPlusLES/Make/options +++ b/applications/utilities/postProcessing/wall/yPlusLES/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ - -I$(LIB_SRC)/LESmodels \ - -I$(LIB_SRC)/LESmodels/LESdeltas/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/LES \ + -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/finiteVolume/lnInclude diff --git a/applications/utilities/postProcessing/wall/yPlusRAS/Make/options b/applications/utilities/postProcessing/wall/yPlusRAS/Make/options index b0e647e10a..6437903e0c 100644 --- a/applications/utilities/postProcessing/wall/yPlusRAS/Make/options +++ b/applications/utilities/postProcessing/wall/yPlusRAS/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/RAS \ -I$(LIB_SRC)/transportModels EXE_LIBS = \ diff --git a/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C b/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C index 6792332b65..2f53660d11 100644 --- a/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C +++ b/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C @@ -83,9 +83,9 @@ int main(int argc, char *argv[]) singlePhaseTransportModel laminarTransport(U, phi); - autoPtr turbulence + autoPtr turbulence ( - turbulenceModel::New(U, phi, laminarTransport) + incompressible::turbulenceModel::New(U, phi, laminarTransport) ); const fvPatchList& patches = mesh.boundary(); diff --git a/bin/mpirunDebug b/bin/mpirunDebug index b0a53cdc63..eec1513439 100755 --- a/bin/mpirunDebug +++ b/bin/mpirunDebug @@ -80,27 +80,25 @@ $ECHO "Choose running method: 1)gdb+xterm 2)gdb 3)log 4)xterm+valgrind: \c" read method if [ "$method" -ne 1 -a "$method" -ne 2 -a "$method" -ne 3 -a "$method" -ne 4 ]; then printUsage - exit 1 + exit 1 fi $ECHO "Run all processes local or distributed? 1)local 2)remote: \c" read spawn if [ "$spawn" -ne 1 -a "$spawn" -ne 2 ]; then printUsage - exit 1 + exit 1 fi -# check ~/.OpenFOAM-VERSION -# check /etc -# check /.OpenFOAM-VERSION +# check ~/.$WM_PROJECT/$WM_PROJECT_VERSION/ +# check ~/.$WM_PROJECT/ +# check /etc/ if [ "$WM_PROJECT" ]; then - : ${FOAM_DOT_DIR:=.$WM_PROJECT-$WM_PROJECT_VERSION} - for i in \ - $HOME/$FOAM_DOT_DIR \ + $HOME/.WM_PROJECT/$WM_PROJECT_VERSION \ + $HOME/.WM_PROJECT \ $WM_PROJECT_DIR/etc \ - $WM_PROJECT_DIR/$FOAM_DOT_DIR \ ; do if [ -f "$i/bashrc" ]; then @@ -112,7 +110,12 @@ fi # Construct test string for remote execution. # Source OpenFOAM settings if OpenFOAM environment not set. -sourceFoam='[ "$WM_PROJECT" ] || . '"$sourceFoam" +# attempt to preserve the installation directory 'FOAM_INST_DIR' +if [ "$FOAM_INST_DIR" ]; then + sourceFoam='[ "$WM_PROJECT" ] || '"FOAM_INST_DIR=$FOAM_INST_DIR . $sourceFoam" +else + sourceFoam='[ "$WM_PROJECT" ] || '". $sourceFoam" +fi echo "**sourceFoam:$sourceFoam" diff --git a/bin/tools/CleanFunctions b/bin/tools/CleanFunctions index de10e46fc7..c9d52c9134 100644 --- a/bin/tools/CleanFunctions +++ b/bin/tools/CleanFunctions @@ -1,5 +1,4 @@ -#!/bin/sh -#------------------------------------------------------------------------------ +#---------------------------------*- sh -*------------------------------------- # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | diff --git a/bin/tools/RunFunctions b/bin/tools/RunFunctions index 64cc1ae4e5..8b0208e64e 100644 --- a/bin/tools/RunFunctions +++ b/bin/tools/RunFunctions @@ -1,5 +1,4 @@ -#!/bin/sh -#------------------------------------------------------------------------------ +#---------------------------------*- sh -*------------------------------------- # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | diff --git a/bin/tools/buildParaViewFunctions b/bin/tools/buildParaViewFunctions index 6bbd747555..d5fb1771ec 100644 --- a/bin/tools/buildParaViewFunctions +++ b/bin/tools/buildParaViewFunctions @@ -1,5 +1,4 @@ -#!/bin/sh -#------------------------------------------------------------------------------ +#---------------------------------*- sh -*------------------------------------- # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | @@ -48,6 +47,7 @@ initialiseVariables () if [ "$VERBOSE" = ON ]; then addCMakeVariable "CMAKE_VERBOSE_MAKEFILE=TRUE" fi + addCMakeVariable "VTK_USE_TK=FALSE" } diff --git a/bin/tools/thirdPartyGetFunctions b/bin/tools/thirdPartyGetFunctions index a6c92f8a2d..0a79b6f68f 100644 --- a/bin/tools/thirdPartyGetFunctions +++ b/bin/tools/thirdPartyGetFunctions @@ -1,5 +1,4 @@ -#!/bin/sh -#------------------------------------------------------------------------------ +#---------------------------------*- sh -*------------------------------------- # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | diff --git a/etc/aliases.csh b/etc/aliases.csh index 0239cc8f3b..6042fc6bd3 100644 --- a/etc/aliases.csh +++ b/etc/aliases.csh @@ -38,6 +38,12 @@ alias wm32 'setenv WM_ARCH_OPTION 32; source $WM_PROJECT_DIR/etc/cshrc' alias wmSP 'setenv WM_PRECISION_OPTION SP; source $WM_PROJECT_DIR/etc/cshrc' alias wmDP 'setenv WM_PRECISION_OPTION DP; source $WM_PROJECT_DIR/etc/cshrc' +# Toggle wmakeScheduler on/off +# - also need to set WM_HOSTS +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +alias wmSchedON 'setenv WM_SCHEDULER $WM_PROJECT_DIR/wmake/wmakeScheduler' +alias wmSchedOFF 'unsetenv WM_SCHEDULER' + # Change directory aliases # ~~~~~~~~~~~~~~~~~~~~~~~~ alias src 'cd $FOAM_SRC' diff --git a/etc/aliases.sh b/etc/aliases.sh index 885568a734..1d3367589e 100644 --- a/etc/aliases.sh +++ b/etc/aliases.sh @@ -38,6 +38,12 @@ alias wm32='export WM_ARCH_OPTION=32; . $WM_PROJECT_DIR/etc/bashrc' alias wmSP='export WM_PRECISION_OPTION=SP; . $WM_PROJECT_DIR/etc/bashrc' alias wmDP='export WM_PRECISION_OPTION=DP; . $WM_PROJECT_DIR/etc/bashrc' +# Toggle wmakeScheduler on/off +# - also need to set WM_HOSTS +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +alias wmSchedON='export WM_SCHEDULER=$WM_PROJECT_DIR/wmake/wmakeScheduler' +alias wmSchedOFF='unset WM_SCHEDULER' + # Change directory aliases # ~~~~~~~~~~~~~~~~~~~~~~~~ alias src='cd $FOAM_SRC' diff --git a/src/Allwmake b/src/Allwmake index 1db8264e3f..f7b68983c6 100755 --- a/src/Allwmake +++ b/src/Allwmake @@ -29,7 +29,6 @@ wmake libso randomProcesses ( cd thermophysicalModels && ./Allwmake ) ( cd transportModels && ./Allwmake ) ( cd turbulenceModels && ./Allwmake ) -( cd LESmodels && ./Allwmake ) ( cd lagrangian && ./Allwmake ) ( cd postProcessing && ./Allwmake ) diff --git a/src/OSspecific/Unix/Unix.C b/src/OSspecific/Unix/Unix.C index e50444a236..b2c89395e5 100644 --- a/src/OSspecific/Unix/Unix.C +++ b/src/OSspecific/Unix/Unix.C @@ -213,25 +213,13 @@ bool Foam::chDir(const fileName& dir) Foam::fileName Foam::dotFoam(const fileName& name) { - // Search for file 'name' in: - // 1) ~/.OpenFOAM-VERSION/, ~/.OpenFOAM/VERSION/ or ~/.OpenFOAM/ - // 2) $WM_PROJECT_INST_DIR/site/VERSION or $WM_PROJECT_INST_DIR/site/ - // 3) $WM_PROJECT_DIR/etc/ - // Search user files: // ~~~~~~~~~~~~~~~~~~ - // Check for user file in ~/.OpenFOAM-VERSION/ - fileName fullName = home()/(word(".OpenFOAM-") + FOAMversion)/name; - if (exists(fullName)) - { - return fullName; - } - fileName searchDir = home()/".OpenFOAM"; if (dir(searchDir)) { // Check for user file in ~/.OpenFOAM/VERSION - fullName = searchDir/FOAMversion/name; + fileName fullName = searchDir/FOAMversion/name; if (exists(fullName)) { return fullName; @@ -252,7 +240,7 @@ Foam::fileName Foam::dotFoam(const fileName& name) if (dir(searchDir)) { // Check for site file in $WM_PROJECT_INST_DIR/site/VERSION - fullName = searchDir/"site"/FOAMversion/name; + fileName fullName = searchDir/"site"/FOAMversion/name; if (exists(fullName)) { return fullName; @@ -272,14 +260,14 @@ Foam::fileName Foam::dotFoam(const fileName& name) if (dir(searchDir)) { // Check for shipped OpenFOAM file in $WM_PROJECT_DIR/etc - fullName = searchDir/"etc"/name; + fileName fullName = searchDir/"etc"/name; if (exists(fullName)) { return fullName; } } - // Nothing found + // Not found return fileName::null; } diff --git a/src/OpenFOAM/Make/files b/src/OpenFOAM/Make/files index c9be7642ba..7b137dedc0 100644 --- a/src/OpenFOAM/Make/files +++ b/src/OpenFOAM/Make/files @@ -122,6 +122,7 @@ functionEntries = $(dictionary)/functionEntries $(functionEntries)/functionEntry/functionEntry.C $(functionEntries)/includeEntry/includeEntry.C $(functionEntries)/inputModeEntry/inputModeEntry.C +$(functionEntries)/removeEntry/removeEntry.C IOdictionary = db/IOobjects/IOdictionary $(IOdictionary)/IOdictionary.C diff --git a/src/OpenFOAM/Make/options b/src/OpenFOAM/Make/options index 420d3469ec..c5c5809076 100644 --- a/src/OpenFOAM/Make/options +++ b/src/OpenFOAM/Make/options @@ -1,5 +1,5 @@ EXE_INC = \ - -I$(LIB_SRC)/zlib-1.2.3 + -I$(WM_THIRD_PARTY_DIR)/zlib-1.2.3 LIB_LIBS = \ $(FOAM_LIBBIN)/libOSspecific.o \ diff --git a/src/OpenFOAM/db/IOobject/IOobject.H b/src/OpenFOAM/db/IOobject/IOobject.H index 0c35bd7f1a..e08a56a1a8 100644 --- a/src/OpenFOAM/db/IOobject/IOobject.H +++ b/src/OpenFOAM/db/IOobject/IOobject.H @@ -329,12 +329,9 @@ public: // Writing //- Write the standard OpenFOAM file/dictionary banner + // Optionally without -*- C++ -*- editor hint (eg, for logs) template - static inline void writeBanner(Stream& os); - - //- Write the standard OpenFOAM log banner - template - static inline void writeLogBanner(Stream& os); + static inline void writeBanner(Stream& os, bool noHint=false); //- Write the standard file section divider template diff --git a/src/OpenFOAM/db/IOobject/IOobjectI.H b/src/OpenFOAM/db/IOobject/IOobjectI.H index 09a64ff896..7ffff5ede5 100644 --- a/src/OpenFOAM/db/IOobject/IOobjectI.H +++ b/src/OpenFOAM/db/IOobject/IOobjectI.H @@ -29,48 +29,34 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template -inline void Foam::IOobject::writeBanner(Stream& os) +inline void Foam::IOobject::writeBanner(Stream& os, bool noHint) { static bool spacesSet = false; - static char spaces[80]; + static char spaces[40]; if (!spacesSet) { - memset(spaces, ' ', 80); + memset(spaces, ' ', 40); spaces[38 - strlen(Foam::FOAMversion)] = '\0'; spacesSet = true; } - os << - "/*--------------------------------*- C++ -*----------------------------------*\\\n" - "| ========= | |\n" - "| \\\\ / F ield | OpenFOAM: The Open Source CFD Toolbox |\n" - "| \\\\ / O peration | Version: " << FOAMversion << spaces << "|\n" - "| \\\\ / A nd | Web: http://www.openfoam.org |\n" - "| \\\\/ M anipulation | |\n" - "\\*---------------------------------------------------------------------------*/\n"; -} - - -template -inline void Foam::IOobject::writeLogBanner(Stream& os) -{ - static bool spacesSet = false; - static char spaces[80]; - - if (!spacesSet) + if (noHint) { - memset(spaces, ' ', 80); - spaces[38 - strlen(Foam::FOAMversion)] = '\0'; - spacesSet = true; + os << + "/*---------------------------------------------------------------------------*\\\n"; + } + else + { + os << + "/*--------------------------------*- C++ -*----------------------------------*\\\n"; } os << - "/*---------------------------------------------------------------------------*\\\n" "| ========= | |\n" "| \\\\ / F ield | OpenFOAM: The Open Source CFD Toolbox |\n" "| \\\\ / O peration | Version: " << FOAMversion << spaces << "|\n" - "| \\\\ / A nd | Web: http://www.openfoam.org |\n" + "| \\\\ / A nd | Web: http://www.OpenFOAM.org |\n" "| \\\\/ M anipulation | |\n" "\\*---------------------------------------------------------------------------*/\n"; } diff --git a/src/OpenFOAM/db/IOobject/IOobjectWriteHeader.C b/src/OpenFOAM/db/IOobject/IOobjectWriteHeader.C index 8846dd1d44..6e647c9ca5 100644 --- a/src/OpenFOAM/db/IOobject/IOobjectWriteHeader.C +++ b/src/OpenFOAM/db/IOobject/IOobjectWriteHeader.C @@ -37,8 +37,8 @@ bool Foam::IOobject::writeHeader(Ostream& os) const if (!os.good()) { Info<< "IOobject::writeHeader(Ostream&) : " - << "no stream open for write" - << endl << os.info() << endl; + << "no stream open for write" << nl + << os.info() << endl; return false; } @@ -49,16 +49,14 @@ bool Foam::IOobject::writeHeader(Ostream& os) const << " format " << os.format() << ";\n" << " class " << type() << ";\n"; + // outdent for visibility and more space if (note().size()) { - os << " note " << note() << ";\n"; + os << " note " << note() << ";\n"; } - // writing without quotes would look nicer - os << " object " << name() << ";\n" - //<< " instance " << instance()/local() << ";\n" - //<< " local " << local() << ";\n" - << " location " << instance()/local() << ";\n" + os << " location " << instance()/local() << ";\n" + << " object " << name() << ";\n" << "}" << nl; writeDivider(os); diff --git a/src/OpenFOAM/db/dictionary/dictionary.C b/src/OpenFOAM/db/dictionary/dictionary.C index 8dd2263574..4990cfb8dc 100644 --- a/src/OpenFOAM/db/dictionary/dictionary.C +++ b/src/OpenFOAM/db/dictionary/dictionary.C @@ -34,74 +34,6 @@ defineTypeNameAndDebug(Foam::dictionary, 0); const Foam::dictionary Foam::dictionary::null; -#define DICTIONARY_INPLACE_MERGE - -// * * * * * * * * * * * * * Private member functions * * * * * * * * * * * // - -bool Foam::dictionary::add(entry* ePtr, bool mergeEntry) -{ - HashTable::iterator iter = hashedEntries_.find(ePtr->keyword()); - - if (mergeEntry && iter != hashedEntries_.end()) - { - // merge dictionary with dictionary - if (iter()->isDict() && ePtr->isDict()) - { - iter()->dict().merge(ePtr->dict()); - delete ePtr; - - return true; - } - else - { - // replace existing dictionary with entry or vice versa -#ifdef DICTIONARY_INPLACE_MERGE - IDLList::replace(iter(), ePtr); - delete iter(); - hashedEntries_.erase(iter); - - if (hashedEntries_.insert(ePtr->keyword(), ePtr)) - { - ePtr->name() = name_ + "::" + ePtr->keyword(); - return true; - } - else - { - IOWarningIn("dictionary::add(entry* ePtr)", (*this)) - << "problem replacing entry "<< ePtr->keyword() - << " in dictionary " << name() - << endl; - - IDLList::remove(ePtr); - delete ePtr; - return false; - } -#else - remove(ePtr->keyword()); -#endif - } - } - - if (hashedEntries_.insert(ePtr->keyword(), ePtr)) - { - ePtr->name() = name_ + "::" + ePtr->keyword(); - IDLList::append(ePtr); - - return true; - } - else - { - IOWarningIn("dictionary::add(entry* ePtr)", (*this)) - << "attempt to add entry "<< ePtr->keyword() - << " which already exists in dictionary " << name() - << endl; - - delete ePtr; - return false; - } -} - - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::dictionary::dictionary() @@ -195,15 +127,15 @@ Foam::label Foam::dictionary::endLineNumber() const } -bool Foam::dictionary::found(const word& keyword, bool recusive) const +bool Foam::dictionary::found(const word& keyword, bool recursive) const { if (hashedEntries_.found(keyword)) { return true; } - else if (recusive && &parent_ != &dictionary::null) + else if (recursive && &parent_ != &dictionary::null) { - return parent_.found(keyword, recusive); + return parent_.found(keyword, recursive); } else { @@ -215,16 +147,16 @@ bool Foam::dictionary::found(const word& keyword, bool recusive) const const Foam::entry* Foam::dictionary::lookupEntryPtr ( const word& keyword, - bool recusive + bool recursive ) const { HashTable::const_iterator iter = hashedEntries_.find(keyword); if (iter == hashedEntries_.end()) { - if (recusive && &parent_ != &dictionary::null) + if (recursive && &parent_ != &dictionary::null) { - return parent_.lookupEntryPtr(keyword, recusive); + return parent_.lookupEntryPtr(keyword, recursive); } else { @@ -239,19 +171,19 @@ const Foam::entry* Foam::dictionary::lookupEntryPtr Foam::entry* Foam::dictionary::lookupEntryPtr ( const word& keyword, - bool recusive + bool recursive ) { HashTable::iterator iter = hashedEntries_.find(keyword); if (iter == hashedEntries_.end()) { - if (recusive && &parent_ != &dictionary::null) + if (recursive && &parent_ != &dictionary::null) { return const_cast(parent_).lookupEntryPtr ( keyword, - recusive + recursive ); } else @@ -267,14 +199,13 @@ Foam::entry* Foam::dictionary::lookupEntryPtr const Foam::entry& Foam::dictionary::lookupEntry ( const word& keyword, - bool recusive + bool recursive ) const { - const entry* ePtr = lookupEntryPtr(keyword, recusive); + const entry* entryPtr = lookupEntryPtr(keyword, recursive); - if (ePtr == NULL) + if (entryPtr == NULL) { - // If keyword not found print error message ... FatalIOErrorIn ( "dictionary::lookupEntry(const word& keyword) const", @@ -284,23 +215,25 @@ const Foam::entry& Foam::dictionary::lookupEntry << exit(FatalIOError); } - return *ePtr; + return *entryPtr; } Foam::ITstream& Foam::dictionary::lookup ( const word& keyword, - bool recusive + bool recursive ) const { - return lookupEntry(keyword, recusive).stream(); + return lookupEntry(keyword, recursive).stream(); } bool Foam::dictionary::isDict(const word& keyword) const { - if (const entry* entryPtr = lookupEntryPtr(keyword)) + const entry* entryPtr = lookupEntryPtr(keyword); + + if (entryPtr) { return entryPtr->isDict(); } @@ -313,7 +246,9 @@ bool Foam::dictionary::isDict(const word& keyword) const const Foam::dictionary* Foam::dictionary::subDictPtr(const word& keyword) const { - if (const entry* entryPtr = lookupEntryPtr(keyword)) + const entry* entryPtr = lookupEntryPtr(keyword); + + if (entryPtr) { return &entryPtr->dict(); } @@ -326,13 +261,9 @@ const Foam::dictionary* Foam::dictionary::subDictPtr(const word& keyword) const const Foam::dictionary& Foam::dictionary::subDict(const word& keyword) const { - if (const entry* entryPtr = lookupEntryPtr(keyword)) + const entry* entryPtr = lookupEntryPtr(keyword); + if (entryPtr == NULL) { - return entryPtr->dict(); - } - else - { - // If keyword not found print error message ... FatalIOErrorIn ( "dictionary::subDict(const word& keyword) const", @@ -340,37 +271,31 @@ const Foam::dictionary& Foam::dictionary::subDict(const word& keyword) const ) << " keyword " << keyword << " is undefined in dictionary " << name() << exit(FatalIOError); - - return entryPtr->dict(); } + return entryPtr->dict(); } Foam::dictionary& Foam::dictionary::subDict(const word& keyword) { - if (entry* entryPtr = lookupEntryPtr(keyword)) + entry* entryPtr = lookupEntryPtr(keyword); + if (entryPtr == NULL) { - return entryPtr->dict(); - } - else - { - // If keyword not found print error message ... FatalIOErrorIn ( - "dictionary::subDict(const word& keyword) const", + "dictionary::subDict(const word& keyword)", *this ) << " keyword " << keyword << " is undefined in dictionary " << name() << exit(FatalIOError); - - return entryPtr->dict(); } + return entryPtr->dict(); } Foam::wordList Foam::dictionary::toc() const { - wordList keywords(size()); + wordList keys(size()); label i = 0; for @@ -380,56 +305,124 @@ Foam::wordList Foam::dictionary::toc() const ++iter ) { - keywords[i++] = iter().keyword(); + keys[i++] = iter().keyword(); } - return keywords; + return keys; } -void Foam::dictionary::add(const entry& e) +bool Foam::dictionary::add(entry* entryPtr, bool mergeEntry) { - add(e.clone(*this).ptr()); + HashTable::iterator iter = hashedEntries_.find(entryPtr->keyword()); + + if (mergeEntry && iter != hashedEntries_.end()) + { + // merge dictionary with dictionary + if (iter()->isDict() && entryPtr->isDict()) + { + iter()->dict().merge(entryPtr->dict()); + delete entryPtr; + + return true; + } + else + { + // replace existing dictionary with entry or vice versa + IDLList::replace(iter(), entryPtr); + delete iter(); + hashedEntries_.erase(iter); + + if (hashedEntries_.insert(entryPtr->keyword(), entryPtr)) + { + entryPtr->name() = name_ + "::" + entryPtr->keyword(); + return true; + } + else + { + IOWarningIn("dictionary::add(entry*)", (*this)) + << "problem replacing entry "<< entryPtr->keyword() + << " in dictionary " << name() << endl; + + IDLList::remove(entryPtr); + delete entryPtr; + return false; + } + } + } + + if (hashedEntries_.insert(entryPtr->keyword(), entryPtr)) + { + entryPtr->name() = name_ + "::" + entryPtr->keyword(); + IDLList::append(entryPtr); + + return true; + } + else + { + IOWarningIn("dictionary::add(entry* entryPtr)", (*this)) + << "attempt to add entry "<< entryPtr->keyword() + << " which already exists in dictionary " << name() + << endl; + + delete entryPtr; + return false; + } } -void Foam::dictionary::add(const word& keyword, const token& t) + +void Foam::dictionary::add(const entry& e, bool mergeEntry) { - add(new primitiveEntry(keyword, t)); + add(e.clone(*this).ptr(), mergeEntry); } -void Foam::dictionary::add(const word& keyword, const word& w) +void Foam::dictionary::add(const word& k, const word& w, bool overwrite) { - add(new primitiveEntry(keyword, token(w))); + add(new primitiveEntry(k, token(w)), overwrite); } -void Foam::dictionary::add(const word& keyword, const Foam::string& s) +void Foam::dictionary::add(const word& k, const Foam::string& s, bool overwrite) { - add(new primitiveEntry(keyword, token(s))); + add(new primitiveEntry(k, token(s)), overwrite); } -void Foam::dictionary::add(const word& keyword, const label l) +void Foam::dictionary::add(const word& k, const label l, bool overwrite) { - add(new primitiveEntry(keyword, token(l))); + add(new primitiveEntry(k, token(l)), overwrite); } -void Foam::dictionary::add(const word& keyword, const scalar s) +void Foam::dictionary::add(const word& k, const scalar s, bool overwrite) { - add(new primitiveEntry(keyword, token(s))); + add(new primitiveEntry(k, token(s)), overwrite); } -void Foam::dictionary::add(const word& keyword, const ITstream& tokens) +void Foam::dictionary::add(const word& k, const dictionary& d, bool mergeEntry) { - add(new primitiveEntry(keyword, tokens)); + add(new dictionaryEntry(k, *this, d), mergeEntry); } -void Foam::dictionary::add(const word& keyword, const tokenList& tokens) + +void Foam::dictionary::set(entry* entryPtr) { - add(new primitiveEntry(keyword, tokens)); + entry* existingPtr = lookupEntryPtr(entryPtr->keyword()); + + // clear dictionary so merge acts like overwrite + if (existingPtr && existingPtr->isDict()) + { + existingPtr->dict().clear(); + } + add(entryPtr, true); } -void Foam::dictionary::add(const word& keyword, const dictionary& dict) + +void Foam::dictionary::set(const entry& e) { - add(new dictionaryEntry(keyword, *this, dict)); + set(e.clone(*this).ptr()); +} + +void Foam::dictionary::set(const word& k, const dictionary& d) +{ + set(new dictionaryEntry(k, *this, d)); } @@ -486,7 +479,10 @@ bool Foam::dictionary::changeKeyword } else { - // could issue warning if desired + WarningIn("dictionary::changeKeyword(const word& old, const word& new)") + << "cannot rename keyword "<< oldKeyword + << " to existing keyword " << newKeyword + << " in dictionary " << name() << endl; return false; } } @@ -527,34 +523,24 @@ bool Foam::dictionary::merge(const dictionary& dict) if (iter2 != hashedEntries_.end()) { // Recursively merge sub-dictionaries + // TODO: merge without copying if (iter2()->isDict() && iter().isDict()) { - // without copying and without remove/add? - // this certainly looks ugly and doesn't necessarily - // retain the original sort order (perhaps nice to have) - if - ( - iter2()->dict().merge(iter().dict()) - ) + if (iter2()->dict().merge(iter().dict())) { changed = true; } } else { -#ifdef DICTIONARY_INPLACE_MERGE add(iter().clone(*this).ptr(), true); -#else - remove(keyword); - add(iter().clone(*this)()); -#endif changed = true; } } else { // not found - just add - add(iter().clone(*this)()); + add(iter().clone(*this).ptr()); changed = true; } } @@ -588,8 +574,8 @@ void Foam::dictionary::operator=(const dictionary& dict) << abort(FatalError); } - // Clear the current entries - IDLList::clear(); + name_ = dict.name(); + clear(); // Create clones of the entries in the given dictionary // resetting the parentDict to this dictionary @@ -603,10 +589,6 @@ void Foam::dictionary::operator=(const dictionary& dict) IDLList::append(iter().clone(*this).ptr()); } - name_ = dict.name(); - - hashedEntries_.clear(); - for ( IDLList::iterator iter = begin(); @@ -636,7 +618,7 @@ void Foam::dictionary::operator+=(const dictionary& dict) ++iter ) { - add(iter().clone(*this)()); + add(iter().clone(*this).ptr()); } } @@ -660,7 +642,7 @@ void Foam::dictionary::operator|=(const dictionary& dict) { if (!found(iter().keyword())) { - add(iter().clone(*this)()); + add(iter().clone(*this).ptr()); } } } @@ -683,8 +665,7 @@ void Foam::dictionary::operator<<=(const dictionary& dict) ++iter ) { - remove(iter().keyword()); - add(iter().clone(*this)()); + set(iter().clone(*this).ptr()); } } diff --git a/src/OpenFOAM/db/dictionary/dictionary.H b/src/OpenFOAM/db/dictionary/dictionary.H index 93fc495d59..677d9754b7 100644 --- a/src/OpenFOAM/db/dictionary/dictionary.H +++ b/src/OpenFOAM/db/dictionary/dictionary.H @@ -30,10 +30,14 @@ Description of values (e.g. words and numbers). The dictionary class is the base class for IOdictionary. - It serves the purpose of a bootstrap dictionary for the objectRegistry - data dictionaries, since unlike the IOdictionary class, it does not use a + It also serves as a bootstrap dictionary for the objectRegistry data + dictionaries since, unlike the IOdictionary class, it does not use an objectRegistry itself to work. +ToDo + A merge() member function with a non-const dictionary parameter. + This would avoid unnecessary cloning in the add(entry*,bool) method + SourceFiles dictionary.C dictionaryIO.C @@ -171,31 +175,56 @@ public: // Search and lookup //- Search dictionary for given keyword - // If recusive search parent dictionaries - bool found(const word& keyword, bool recusive=false) const; + // If recursive search parent dictionaries + bool found(const word& keyword, bool recursive=false) const; //- Find and return an entry data stream pointer if present // otherwise return NULL. - // If recusive search parent dictionaries - const entry* lookupEntryPtr(const word&, bool recusive=false) const; + // If recursive search parent dictionaries + const entry* lookupEntryPtr(const word&, bool recursive=false) const; //- Find and return an entry data stream pointer for manipulation // if present otherwise return NULL. - // If recusive search parent dictionaries - entry* lookupEntryPtr(const word&, bool recusive=false); + // If recursive search parent dictionaries + entry* lookupEntryPtr(const word&, bool recursive=false); //- Find and return an entry data stream if present otherwise error. - // If recusive search parent dictionaries - const entry& lookupEntry(const word&, bool recusive=false) const; + // If recursive search parent dictionaries + const entry& lookupEntry(const word&, bool recursive=false) const; //- Find and return an entry data stream - // If recusive search parent dictionaries - ITstream& lookup(const word&, bool recusive=false) const; + // If recursive search parent dictionaries + ITstream& lookup(const word&, bool recursive=false) const; //- Find and return a T, if not found return the given default value - // If recusive search parent dictionaries + // If recursive search parent dictionaries template - T lookupOrDefault(const word&, const T&, bool recusive=false) const; + T lookupOrDefault + ( + const word&, + const T&, + bool recursive=false + ) const; + + //- Find and return a T, if not found return the given default value, + // and add to dictionary. If recursive search parent dictionaries + template + T lookupOrAddDefault + ( + const word&, + const T&, + bool recursive=false + ); + + //- Find an entry if present, and assign to T + // Returns true if the entry was found + template + bool readIfPresent + ( + const word&, + T&, + bool recursive=false + ) const; //- Check if entry is a sub-dictionary bool isDict(const word&) const; @@ -217,38 +246,57 @@ public: // Editing //- Add a new entry - bool add(entry*, bool mergeEntry = false); + // With the merge option, dictionaries are interwoven and + // primitive entries are overwritten + bool add(entry*, bool mergeEntry=false); //- Add an entry - void add(const entry&); - - //- Add a token entry - void add(const word& keyword, const token&); + // With the merge option, dictionaries are interwoven and + // primitive entries are overwritten + void add(const entry&, bool mergeEntry=false); //- Add a word entry - void add(const word& keyword, const word&); + // optionally overwrite an existing entry + void add(const word& keyword, const word&, bool overwrite=false); //- Add a string entry - void add(const word& keyword, const string&); + // optionally overwrite an existing entry + void add(const word& keyword, const string&, bool overwrite=false); //- Add a label entry - void add(const word& keyword, const label); + // optionally overwrite an existing entry + void add(const word& keyword, const label, bool overwrite=false); //- Add a scalar entry - void add(const word& keyword, const scalar); - - //- Add an entry constructed from a ITstream - void add(const word& keyword, const ITstream&); - - //- Add an entry constructed from a tokenList - void add(const word& keyword, const tokenList& tokens); - - //- Add a T entry - template - void add(const word& keyword, const T&); + // optionally overwrite an existing entry + void add (const word& keyword, const scalar, bool overwrite=false); //- Add a dictionary entry - void add(const word& keyword, const dictionary&); + // optionally merge with an existing sub-dictionary + void add + ( + const word& keyword, + const dictionary&, + bool mergeEntry=false + ); + + //- Add a T entry + // optionally overwrite an existing entry + template + void add(const word& keyword, const T&, bool overwrite=false); + + //- Assign a new entry, overwrite any existing entry + void set(entry*); + + //- Assign a new entry, overwrite any existing entry + void set(const entry&); + + //- Assign a dictionary entry, overwrite any existing entry + void set(const word& keyword, const dictionary&); + + //- Assign a T entry, overwrite any existing entry + template + void set(const word& keyword, const T&); //- Remove an entry specified by keyword bool remove(const word& keyword); @@ -307,14 +355,12 @@ public: // Global Operators -// Combine dictionaries starting from the entries in dict one and then including -// those from dict2. -// Warn, but do not overwrite the entries from dict1. +//- Combine dictionaries starting from the entries in dict1 and then including those from dict2. +// Warn, but do not overwrite the entries from dict1. dictionary operator+(const dictionary& dict1, const dictionary& dict2); -// Combine dictionaries starting from the entries in dict one and then including -// those from dict2. -// Do not overwrite the entries from dict1. +//- Combine dictionaries starting from the entries in dict1 and then including those from dict2. +// Do not overwrite the entries from dict1. dictionary operator|(const dictionary& dict1, const dictionary& dict2); diff --git a/src/OpenFOAM/db/dictionary/dictionaryTemplates.C b/src/OpenFOAM/db/dictionary/dictionaryTemplates.C index 73b97fa664..1b40cbefd5 100644 --- a/src/OpenFOAM/db/dictionary/dictionaryTemplates.C +++ b/src/OpenFOAM/db/dictionary/dictionaryTemplates.C @@ -33,30 +33,78 @@ template T Foam::dictionary::lookupOrDefault ( const word& keyword, - const T& deft, - bool recusive + const T& deflt, + bool recursive ) const { - const entry* ePtr = lookupEntryPtr(keyword, recusive); + const entry* entryPtr = lookupEntryPtr(keyword, recursive); - if (ePtr == NULL) + if (entryPtr == NULL) { - return deft; + return deflt; } else { - return pTraits(ePtr->stream()); + return pTraits(entryPtr->stream()); } } template -void Foam::dictionary::add(const word& keyword, const T& t) +T Foam::dictionary::lookupOrAddDefault +( + const word& keyword, + const T& deflt, + bool recursive +) { - entry* ePtr = new primitiveEntry(keyword, t); - append(ePtr); - hashedEntries_.insert(ePtr->keyword(), ePtr); + const entry* entryPtr = lookupEntryPtr(keyword, recursive); + + if (entryPtr == NULL) + { + add(new primitiveEntry(keyword, deflt)); + return deflt; + } + else + { + return pTraits(entryPtr->stream()); + } } +template +bool Foam::dictionary::readIfPresent +( + const word& k, + T& val, + bool recursive +) const +{ + const entry* entryPtr = lookupEntryPtr(k, recursive); + + if (entryPtr == NULL) + { + return false; + } + else + { + entryPtr->stream() >> val; + return true; + } +} + + +template +void Foam::dictionary::add(const word& k, const T& t, bool overwrite) +{ + add(new primitiveEntry(k, t), overwrite); +} + + +template +void Foam::dictionary::set(const word& k, const T& t) +{ + set(new primitiveEntry(k, t)); +} + // ************************************************************************* // diff --git a/src/OpenFOAM/db/dictionary/entry/entryIO.C b/src/OpenFOAM/db/dictionary/entry/entryIO.C index 1b2b2016c9..84efb2bfc2 100644 --- a/src/OpenFOAM/db/dictionary/entry/entryIO.C +++ b/src/OpenFOAM/db/dictionary/entry/entryIO.C @@ -96,7 +96,7 @@ bool Foam::entry::New(dictionary& parentDict, Istream& is) if (keyword[0] == '#') // ... Function entry { word functionName = keyword(1, keyword.size()-1); - return functionEntry::insert(functionName, parentDict, is); + return functionEntry::execute(functionName, parentDict, is); } else if (keyword[0] == '$') // ... Substitution entry { @@ -105,7 +105,7 @@ bool Foam::entry::New(dictionary& parentDict, Istream& is) } else if (keyword == "include") // ... For backward compatibility { - return functionEntries::includeEntry::insert(parentDict, is); + return functionEntries::includeEntry::execute(parentDict, is); } else // ... Data entries { @@ -114,12 +114,18 @@ bool Foam::entry::New(dictionary& parentDict, Istream& is) // Deal with duplicate entries bool mergeEntry = false; - if (parentDict.found(keyword)) + + entry* existingPtr = parentDict.lookupEntryPtr(keyword); + if (existingPtr) { if (functionEntries::inputModeEntry::overwrite()) { - // silently drop previous entries - parentDict.remove(keyword); + // clear dictionary so merge acts like overwrite + if (existingPtr->isDict()) + { + existingPtr->dict().clear(); + } + mergeEntry = true; } else if (functionEntries::inputModeEntry::merge()) { diff --git a/src/OpenFOAM/db/dictionary/functionEntries/functionEntry/functionEntry.C b/src/OpenFOAM/db/dictionary/functionEntries/functionEntry/functionEntry.C index 7e53591c64..3d4b037dfc 100644 --- a/src/OpenFOAM/db/dictionary/functionEntries/functionEntry/functionEntry.C +++ b/src/OpenFOAM/db/dictionary/functionEntries/functionEntry/functionEntry.C @@ -33,22 +33,66 @@ namespace Foam defineMemberFunctionSelectionTable ( functionEntry, - insert, - primitiveEntryIstream + execute, + dictionaryIstream ); defineMemberFunctionSelectionTable ( functionEntry, - insert, - dictionaryIstream + execute, + primitiveEntryIstream ); } // * * * * * * * * * * * * Member Function Selectors * * * * * * * * * * * * // -bool Foam::functionEntry::insert +bool Foam::functionEntry::execute +( + const word& functionName, + dictionary& parentDict, + Istream& is +) +{ + is.fatalCheck + ( + "functionEntry::execute" + "(const word& functionName, dictionary& parentDict, Istream& is)" + ); + + if (!executedictionaryIstreamMemberFunctionTablePtr_) + { + cerr<<"functionEntry::execute" + << "(const word&, dictionary&, Istream&)" + << " not yet initialized, function = " + << functionName.c_str() << std::endl; + + // Return true to keep reading + return true; + } + + executedictionaryIstreamMemberFunctionTable::iterator mfIter = + executedictionaryIstreamMemberFunctionTablePtr_->find(functionName); + + if (mfIter == executedictionaryIstreamMemberFunctionTablePtr_->end()) + { + FatalErrorIn + ( + "functionEntry::execute" + "(const word& functionName, dictionary& parentDict, Istream&)" + ) << "Unknown functionEntry " << functionName + << endl << endl + << "Valid functionEntries are :" << endl + << executedictionaryIstreamMemberFunctionTablePtr_->toc() + << exit(FatalError); + } + + return mfIter()(parentDict, is); +} + + +bool Foam::functionEntry::execute ( const word& functionName, const dictionary& parentDict, @@ -58,14 +102,14 @@ bool Foam::functionEntry::insert { is.fatalCheck ( - "functionEntry::insert" + "functionEntry::execute" "(const word& functionName, const dictionary& parentDict, " - "primitiveEntry& entry, Istream& is)" + "primitiveEntry&, Istream&)" ); - if (!insertprimitiveEntryIstreamMemberFunctionTablePtr_) + if (!executeprimitiveEntryIstreamMemberFunctionTablePtr_) { - cerr<<"functionEntry::insert" + cerr<<"functionEntry::execute" << "(const word&, dictionary&, primitiveEntry&, Istream&)" << " not yet initialized, function = " << functionName.c_str() << std::endl; @@ -74,69 +118,24 @@ bool Foam::functionEntry::insert return true; } - insertprimitiveEntryIstreamMemberFunctionTable::iterator mfIter = - insertprimitiveEntryIstreamMemberFunctionTablePtr_->find(functionName); + executeprimitiveEntryIstreamMemberFunctionTable::iterator mfIter = + executeprimitiveEntryIstreamMemberFunctionTablePtr_->find(functionName); - if (mfIter == insertprimitiveEntryIstreamMemberFunctionTablePtr_->end()) + if (mfIter == executeprimitiveEntryIstreamMemberFunctionTablePtr_->end()) { FatalErrorIn ( - "functionEntry::insert" + "functionEntry::execute" "(const word& functionName, const dictionary& parentDict, " - "primitiveEntry& entry, Istream& is)" + "primitiveEntry&, Istream&)" ) << "Unknown functionEntry " << functionName << endl << endl << "Valid functionEntries are :" << endl - << insertprimitiveEntryIstreamMemberFunctionTablePtr_->toc() + << executeprimitiveEntryIstreamMemberFunctionTablePtr_->toc() << exit(FatalError); } return mfIter()(parentDict, entry, is); } - -bool Foam::functionEntry::insert -( - const word& functionName, - dictionary& parentDict, - Istream& is -) -{ - is.fatalCheck - ( - "functionEntry::insert" - "(const word& functionName, dictionary& parentDict, Istream& is)" - ); - - if (!insertdictionaryIstreamMemberFunctionTablePtr_) - { - cerr<<"functionEntry::insert" - << "(const word&, dictionary&, Istream&)" - << " not yet initialized, function = " - << functionName.c_str() << std::endl; - - // Return true to keep reading - return true; - } - - insertdictionaryIstreamMemberFunctionTable::iterator mfIter = - insertdictionaryIstreamMemberFunctionTablePtr_->find(functionName); - - if (mfIter == insertdictionaryIstreamMemberFunctionTablePtr_->end()) - { - FatalErrorIn - ( - "functionEntry::insert" - "(const word& functionName, dictionary& parentDict, Istream& is)" - ) << "Unknown functionEntry " << functionName - << endl << endl - << "Valid functionEntries are :" << endl - << insertdictionaryIstreamMemberFunctionTablePtr_->toc() - << exit(FatalError); - } - - return mfIter()(parentDict, is); -} - - // ************************************************************************* // diff --git a/src/OpenFOAM/db/dictionary/functionEntries/functionEntry/functionEntry.H b/src/OpenFOAM/db/dictionary/functionEntries/functionEntry/functionEntry.H index aa579420d2..20f1d9b247 100644 --- a/src/OpenFOAM/db/dictionary/functionEntries/functionEntry/functionEntry.H +++ b/src/OpenFOAM/db/dictionary/functionEntries/functionEntry/functionEntry.H @@ -33,13 +33,10 @@ Class Foam::functionEntry Description - A function entry causes entries to be added/manipulated on the specified + A functionEntry causes entries to be added/manipulated on the specified dictionary given an input stream. - In dictionaries, a @c \# sigil is typically used for a functionEntry. - -See Also - functionEntries::includeEntry and functionEntries::inputModeEntry + In dictionaries, a @c '\#' sigil is typically used for a functionEntry. SourceFiles functionEntry.C @@ -84,7 +81,28 @@ public: ( bool, functionEntry, - insert, + execute, + dictionaryIstream, + ( + dictionary& parentDict, + Istream& is + ), + (parentDict, is) + ); + + //- Execute the functionEntry in a sub-dict context + static bool execute + ( + const word& functionName, + dictionary& parentDict, + Istream& is + ); + + declareMemberFunctionSelectionTable + ( + bool, + functionEntry, + execute, primitiveEntryIstream, ( const dictionary& parentDict, @@ -94,7 +112,8 @@ public: (parentDict, entry, is) ); - static bool insert + //- Execute the functionEntry in a primitiveEntry context + static bool execute ( const word& functionName, const dictionary& parentDict, @@ -103,25 +122,6 @@ public: ); - declareMemberFunctionSelectionTable - ( - bool, - functionEntry, - insert, - dictionaryIstream, - ( - dictionary& parentDict, - Istream& is - ), - (parentDict, is) - ); - - static bool insert - ( - const word& functionName, - dictionary& parentDict, - Istream& is - ); }; diff --git a/src/OpenFOAM/db/dictionary/functionEntries/includeEntry/includeEntry.C b/src/OpenFOAM/db/dictionary/functionEntries/includeEntry/includeEntry.C index 81a8c0b23f..60af24c589 100644 --- a/src/OpenFOAM/db/dictionary/functionEntries/includeEntry/includeEntry.C +++ b/src/OpenFOAM/db/dictionary/functionEntries/includeEntry/includeEntry.C @@ -48,16 +48,16 @@ namespace functionEntries ( functionEntry, includeEntry, - insert, - primitiveEntryIstream + execute, + dictionaryIstream ); addToMemberFunctionSelectionTable ( functionEntry, includeEntry, - insert, - dictionaryIstream + execute, + primitiveEntryIstream ); } } @@ -82,7 +82,35 @@ Foam::fileName Foam::functionEntries::includeEntry::includeFileName } -bool Foam::functionEntries::includeEntry::insert +bool Foam::functionEntries::includeEntry::execute +( + dictionary& parentDict, + Istream& is +) +{ + IFstream fileStream(includeFileName(is)); + + if (fileStream) + { + parentDict.read(fileStream); + return true; + } + else + { + FatalIOErrorIn + ( + "functionEntries::includeEntry::includeEntry" + "(dictionary& parentDict,Istream& is)", + is + ) << "Cannot open include file " << fileStream.name() + << " while reading dictionary " << parentDict.name() + << exit(FatalIOError); + + return false; + } +} + +bool Foam::functionEntries::includeEntry::execute ( const dictionary& parentDict, primitiveEntry& entry, @@ -111,34 +139,4 @@ bool Foam::functionEntries::includeEntry::insert } } - -bool Foam::functionEntries::includeEntry::insert -( - dictionary& parentDict, - Istream& is -) -{ - IFstream fileStream(includeFileName(is)); - - if (fileStream) - { - parentDict.read(fileStream); - return true; - } - else - { - FatalIOErrorIn - ( - "functionEntries::includeEntry::includeEntry" - "(dictionary& parentDict,Istream& is)", - is - ) << "Cannot open include file " << fileStream.name() - << " while reading dictionary " << parentDict.name() - << exit(FatalIOError); - - return false; - } -} - - // ************************************************************************* // diff --git a/src/OpenFOAM/db/dictionary/functionEntries/includeEntry/includeEntry.H b/src/OpenFOAM/db/dictionary/functionEntries/includeEntry/includeEntry.H index dfd6de82d7..00e04d60ca 100644 --- a/src/OpenFOAM/db/dictionary/functionEntries/includeEntry/includeEntry.H +++ b/src/OpenFOAM/db/dictionary/functionEntries/includeEntry/includeEntry.H @@ -29,9 +29,9 @@ Description Specify an include file when reading dictionaries, expects a single string to follow. - An example of @c \#include directive: + An example of the @c \#include directive: @verbatim - \#include "includefile" + #include "includeFile" @endverbatim The usual expansion of environment variables and other constructs (eg, @@ -85,18 +85,21 @@ public: // Member Functions - static bool insert + //- Execute the functionEntry in a sub-dict context + static bool execute + ( + dictionary& parentDict, + Istream& is + ); + + //- Execute the functionEntry in a primitiveEntry context + static bool execute ( const dictionary& parentDict, primitiveEntry& entry, Istream& is ); - static bool insert - ( - dictionary& parentDict, - Istream& is - ); }; diff --git a/src/OpenFOAM/db/dictionary/functionEntries/inputModeEntry/inputModeEntry.C b/src/OpenFOAM/db/dictionary/functionEntries/inputModeEntry/inputModeEntry.C index 27b1e78f5e..cdfa9410fd 100644 --- a/src/OpenFOAM/db/dictionary/functionEntries/inputModeEntry/inputModeEntry.C +++ b/src/OpenFOAM/db/dictionary/functionEntries/inputModeEntry/inputModeEntry.C @@ -47,15 +47,7 @@ namespace functionEntries ( functionEntry, inputModeEntry, - insert, - primitiveEntryIstream - ); - - addToMemberFunctionSelectionTable - ( - functionEntry, - inputModeEntry, - insert, + execute, dictionaryIstream ); } @@ -63,10 +55,11 @@ namespace functionEntries // * * * * * * * * * * * * * * * * Private Data * * * * * * * * * * * * * * // -Foam::label Foam::functionEntries::inputModeEntry::inputMode_ = imError; +Foam::label Foam::functionEntries::inputModeEntry::mode_ = imError; // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // +// we could combine this into execute() directly, but leave it here for now void Foam::functionEntries::inputModeEntry::setMode(Istream& is) { clear(); @@ -74,15 +67,15 @@ void Foam::functionEntries::inputModeEntry::setMode(Istream& is) word mode(is); if (mode == "merge") { - inputMode_ = imMerge; + mode_ = imMerge; } else if (mode == "overwrite") { - inputMode_ = imOverwrite; + mode_ = imOverwrite; } else if (mode == "error" || mode == "default") { - inputMode_ = imError; + mode_ = imError; } else { @@ -95,19 +88,7 @@ void Foam::functionEntries::inputModeEntry::setMode(Istream& is) // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -bool Foam::functionEntries::inputModeEntry::insert -( - const dictionary& parentDict, - primitiveEntry& entry, - Istream& is -) -{ - setMode(is); - return true; -} - - -bool Foam::functionEntries::inputModeEntry::insert +bool Foam::functionEntries::inputModeEntry::execute ( dictionary& parentDict, Istream& is @@ -120,13 +101,13 @@ bool Foam::functionEntries::inputModeEntry::insert void Foam::functionEntries::inputModeEntry::clear() { - inputMode_ = imError; + mode_ = imError; } bool Foam::functionEntries::inputModeEntry::merge() { - if (inputMode_ & imMerge) + if (mode_ & imMerge) { return true; } @@ -139,7 +120,7 @@ bool Foam::functionEntries::inputModeEntry::merge() bool Foam::functionEntries::inputModeEntry::overwrite() { - if (inputMode_ & imOverwrite) + if (mode_ & imOverwrite) { return true; } diff --git a/src/OpenFOAM/db/dictionary/functionEntries/inputModeEntry/inputModeEntry.H b/src/OpenFOAM/db/dictionary/functionEntries/inputModeEntry/inputModeEntry.H index 10a3761655..072465341d 100644 --- a/src/OpenFOAM/db/dictionary/functionEntries/inputModeEntry/inputModeEntry.H +++ b/src/OpenFOAM/db/dictionary/functionEntries/inputModeEntry/inputModeEntry.H @@ -74,11 +74,12 @@ class inputModeEntry }; //- current input mode - static label inputMode_; + static label mode_; // Private Member Functions + //- Read the mode as a word and set enum appropriately static void setMode(Istream&); //- Disallow default bitwise copy construct @@ -96,23 +97,20 @@ public: // Member Functions - static bool insert - ( - const dictionary& parentDict, - primitiveEntry&, - Istream& - ); - - static bool insert + //- Execute the functionEntry in a sub-dict context + static bool execute ( dictionary& parentDict, Istream& ); + //- Reset the inputMode to 'default' static void clear(); + //- Return true if the inputMode is 'merge' static bool merge(); + //- Return true if the inputMode is 'overwrite' static bool overwrite(); }; diff --git a/src/OpenFOAM/db/dictionary/functionEntries/removeEntry/removeEntry.C b/src/OpenFOAM/db/dictionary/functionEntries/removeEntry/removeEntry.C new file mode 100644 index 0000000000..f6b1becdca --- /dev/null +++ b/src/OpenFOAM/db/dictionary/functionEntries/removeEntry/removeEntry.C @@ -0,0 +1,88 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*---------------------------------------------------------------------------*/ + +#include "removeEntry.H" +#include "dictionary.H" +#include "IStringStream.H" +#include "OStringStream.H" +#include "addToMemberFunctionSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +const Foam::word Foam::functionEntries::removeEntry::typeName +( + Foam::functionEntries::removeEntry::typeName_() +); + +// Don't lookup the debug switch here as the debug switch dictionary +// might include removeEntry +int Foam::functionEntries::removeEntry::debug(0); + +namespace Foam +{ +namespace functionEntries +{ + addToMemberFunctionSelectionTable + ( + functionEntry, + removeEntry, + execute, + dictionaryIstream + ); +} +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +bool Foam::functionEntries::removeEntry::execute +( + dictionary& parentDict, + Istream& is +) +{ + token currToken(is); + is.putBack(currToken); + + if (currToken == token::BEGIN_LIST) + { + wordList keys(is); + + forAll(keys, keyI) + { + parentDict.remove(keys[keyI]); + } + } + else + { + word key(is); + parentDict.remove(key); + } + + return true; +} + +// ************************************************************************* // diff --git a/src/OpenFOAM/db/dictionary/functionEntries/removeEntry/removeEntry.H b/src/OpenFOAM/db/dictionary/functionEntries/removeEntry/removeEntry.H new file mode 100644 index 0000000000..06c409d299 --- /dev/null +++ b/src/OpenFOAM/db/dictionary/functionEntries/removeEntry/removeEntry.H @@ -0,0 +1,100 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Class + Foam::functionEntries::removeEntry + +Description + Remove a dictionary entry. + + The @c \#remove directive takes a word or a list of words. For example, + @verbatim + #remove entry0 + #remove ( entry1 entry2 entry3 ) + @endverbatim + + The removable only occurs in the current context. + Removing sub-entries or parent entries is not supported. + +SourceFiles + removeEntry.C + +\*---------------------------------------------------------------------------*/ + +#ifndef removeEntry_H +#define removeEntry_H + +#include "functionEntry.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace functionEntries +{ + +/*---------------------------------------------------------------------------*\ + Class removeEntry Declaration +\*---------------------------------------------------------------------------*/ + +class removeEntry +: + public functionEntry +{ + // Private Member Functions + + //- Disallow default bitwise copy construct + removeEntry(const removeEntry&); + + //- Disallow default bitwise assignment + void operator=(const removeEntry&); + + +public: + + //- Runtime type information + TypeName("remove"); + + + // Member Functions + + //- Execute the functionEntry in a sub-dict context + static bool execute + ( + dictionary& parentDict, + Istream& is + ); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace functionEntries +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/OpenFOAM/db/dictionary/primitiveEntry/primitiveEntryIO.C b/src/OpenFOAM/db/dictionary/primitiveEntry/primitiveEntryIO.C index 8c5d0dd9c7..511b53117b 100644 --- a/src/OpenFOAM/db/dictionary/primitiveEntry/primitiveEntryIO.C +++ b/src/OpenFOAM/db/dictionary/primitiveEntry/primitiveEntryIO.C @@ -115,7 +115,7 @@ bool Foam::primitiveEntry::expandFunction ) { word functionName = keyword(1, keyword.size()-1); - return functionEntry::insert(functionName, parentDict, *this, is); + return functionEntry::execute(functionName, parentDict, *this, is); } diff --git a/src/OpenFOAM/global/argList/argList.C b/src/OpenFOAM/global/argList/argList.C index 8e1738a734..59ee6e57b5 100644 --- a/src/OpenFOAM/global/argList/argList.C +++ b/src/OpenFOAM/global/argList/argList.C @@ -186,7 +186,7 @@ Foam::argList::argList // Print the banner once only for parallel runs if (Pstream::master()) { - IOobject::writeLogBanner(Info); + IOobject::writeBanner(Info, true); } // convert argv -> args_ and capture ( ... ) lists @@ -252,19 +252,30 @@ Foam::argList::argList args_.setSize(nArgs); - // Help options: - // -doc display the documentation in browser - // -help print the usage - if (options_.found("doc") || options_.found("help")) + // Help/documentation options: + // -help print the usage + // -doc display application documentation in browser + // -srcDoc display source code in browser + if + ( + options_.found("help") + || options_.found("doc") + || options_.found("srcDoc") + ) { if (options_.found("help")) { printUsage(); } - if (options_.found("doc")) + // only display one or the other + if (options_.found("srcDoc")) { - displayDoc(); + displayDoc(true); + } + else if (options_.found("doc")) + { + displayDoc(false); } ::exit(0); @@ -578,12 +589,9 @@ void Foam::argList::printUsage() const ++iter ) { - Info<< ' ' << '<' << iter().c_str() << '>'; + Info<< " <" << iter().c_str() << '>'; } - // place -doc and -help up front - Info<< " [-doc] [-help]"; - for ( HashTable::iterator iter = validOptions.begin(); @@ -601,16 +609,27 @@ void Foam::argList::printUsage() const Info<< ']'; } - Info<< endl; + // place help/doc options of the way at the end, + // but with an extra space to separate it a little + Info<< " [-help] [-doc] [-srcDoc]" << endl; } -void Foam::argList::displayDoc() const +void Foam::argList::displayDoc(bool source) const { const dictionary& docDict = debug::controlDict().subDict("Documentation"); List docDirs(docDict.lookup("doxyDocDirs")); List docExts(docDict.lookup("doxySourceFileExts")); + // for source code: change foo_8C.html to foo_8C-source.html + if (source) + { + forAll(docExts, extI) + { + docExts[extI].replace(".", "-source."); + } + } + fileName docFile; bool found = false; @@ -618,7 +637,7 @@ void Foam::argList::displayDoc() const { forAll(docExts, extI) { - docFile = docDirs[dirI]/executable() + docExts[extI]; + docFile = docDirs[dirI]/executable_ + docExts[extI]; docFile.expand(); if (exists(docFile)) diff --git a/src/OpenFOAM/global/argList/argList.H b/src/OpenFOAM/global/argList/argList.H index 3068e042c9..f79d6d5d17 100644 --- a/src/OpenFOAM/global/argList/argList.H +++ b/src/OpenFOAM/global/argList/argList.H @@ -27,18 +27,18 @@ Class Description Extract command arguments and options from the supplied - @a argc and @a argv. + @a argc and @a argv parameters. Sequences with "(" ... ")" are transformed into a stringList. For example, @verbatim program -listFiles \( *.txt \) @endverbatim - in which the backslash-escaping has been used to avoid shell expansions, would create a stringList: @verbatim ( "file1.txt" "file2.txt" ... "fileN.txt" ) @endverbatim + The backslash-escaping has been used to avoid shell expansions. @par Default command-line options @param -case \ \n @@ -47,6 +47,8 @@ Description specify case as a parallel job @param -doc \n display the documentation in browser + @param -srcDoc \n + display the source documentation in browser @param -help \n print the usage @@ -130,14 +132,14 @@ public: //- A list of valid parallel options static HashTable validParOptions; - //! @cond ignore documentation for this class + //! @cond ignoreDocumentation class initValidTables { public: initValidTables(); }; - //! @endcond + //! @endcond ignoreDocumentation // Constructors @@ -148,8 +150,8 @@ public: ( int& argc, char**& argv, - bool checkArgs = true, - bool checkOpts = true + bool checkArgs=true, + bool checkOpts=true ); @@ -196,8 +198,7 @@ public: return globalCase_; } - //- Return case name for parallel run - // or the global case for a serial run + //- Return case name for parallel run or the global case for a serial run const fileName& caseName() const { return case_; @@ -222,13 +223,14 @@ public: void printUsage() const; //- Display documentation in browser - void displayDoc() const; + // Optionally display the application source code + void displayDoc(bool source=false) const; // Check //- Check argument list - bool check(bool checkArgs = true, bool checkOpts = true) const; + bool check(bool checkArgs=true, bool checkOpts=true) const; //- Check root path and case path bool checkRootCase() const; diff --git a/src/OpenFOAM/include/OSspecific.H b/src/OpenFOAM/include/OSspecific.H index d071cf6cd0..33e474cdf3 100644 --- a/src/OpenFOAM/include/OSspecific.H +++ b/src/OpenFOAM/include/OSspecific.H @@ -89,8 +89,6 @@ bool chDir(const fileName& dir); //- Search for @em name in the following hierarchy: // -# personal settings: -// - ~/.OpenFOAM-\ -// (old style) // - ~/.OpenFOAM/\/ // for version-specific files // - ~/.OpenFOAM/ diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterfaceTemplates.C b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterfaceTemplates.C index 2944cb8d84..59f152e236 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterfaceTemplates.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterfaceTemplates.C @@ -73,8 +73,7 @@ void Foam::processorLduInterface::send else { FatalErrorIn("processorLduInterface::send") - << "Unsuported communications type " - << Pstream::commsTypeNames[commsType] + << "Unsupported communications type " << commsType << exit(FatalError); } } @@ -104,8 +103,7 @@ void Foam::processorLduInterface::receive else { FatalErrorIn("processorLduInterface::receive") - << "Unsuported communications type " - << Pstream::commsTypeNames[commsType] + << "Unsupported communications type " << commsType << exit(FatalError); } } @@ -184,8 +182,7 @@ void Foam::processorLduInterface::compressedSend else { FatalErrorIn("processorLduInterface::compressedSend") - << "Unsuported communications type " - << Pstream::commsTypeNames[commsType] + << "Unsupported communications type " << commsType << exit(FatalError); } } @@ -225,8 +222,7 @@ void Foam::processorLduInterface::compressedReceive else if (commsType != Pstream::nonBlocking) { FatalErrorIn("processorLduInterface::compressedReceive") - << "Unsuported communications type " - << Pstream::commsTypeNames[commsType] + << "Unsupported communications type " << commsType << exit(FatalError); } diff --git a/src/Pstream/Allwmake b/src/Pstream/Allwmake index 0b81eda108..eb51ef379e 100755 --- a/src/Pstream/Allwmake +++ b/src/Pstream/Allwmake @@ -6,6 +6,10 @@ wmake libso dummy case "$WM_MPLIB" in LAM | OPENMPI | MPI | MPICH | MPICH-GM | MPIGAMMA ) export WM_OPTIONS=${WM_OPTIONS}$WM_MPLIB + set +x + echo + echo "Note: ignore spurious warnings about missing mpicxx.h headers" + set -x wmake libso mpi ;; diff --git a/src/Pstream/dummy/IPread.C b/src/Pstream/dummy/IPread.C index dd28fd7fef..fd4ed46e0f 100644 --- a/src/Pstream/dummy/IPread.C +++ b/src/Pstream/dummy/IPread.C @@ -32,12 +32,9 @@ Description // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * // -IPstream::IPstream +Foam::IPstream::IPstream ( const commsTypes commsType, const int fromProcNo, @@ -53,13 +50,12 @@ IPstream::IPstream { notImplemented ( - "IPstream::IPstream" + "IPsream::IPstream" "(" - "const commsTypes commsType," - "const int fromProcNo," + "const commsTypes," + "const int fromProcNo," "const label bufSize," - "streamFormat format," - "versionNumber version" + "streamFormat, versionNumber" ")" ); } @@ -67,7 +63,7 @@ IPstream::IPstream // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -int IPstream::read +int Foam::IPstream::read ( const commsTypes commsType, const int fromProcNo, @@ -75,33 +71,32 @@ int IPstream::read const std::streamsize bufSize ) { - notImplemented - ( - "IPstream::read" - "(" - "const commsTypes commsType," - "const int fromProcNo," - "char* buf," - "const label bufSize" - ")" + notImplemented + ( + "IPstream::read" + "(" + "const commsTypes," + "const int fromProcNo," + "char* buf," + "const label bufSize" + ")" ); return 0; } -void IPstream::waitRequests() +void Foam::IPstream::waitRequests() {} -bool IPstream::finishedRequest(const label) +bool Foam::IPstream::finishedRequest(const label) { - notImplemented("IPstream::finishedRequest()"); + notImplemented("IPstream::finishedRequest()"); + return false; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace Foam - // ************************************************************************* // diff --git a/src/Pstream/dummy/OPwrite.C b/src/Pstream/dummy/OPwrite.C index 7166a1ad45..d87f22d769 100644 --- a/src/Pstream/dummy/OPwrite.C +++ b/src/Pstream/dummy/OPwrite.C @@ -32,12 +32,9 @@ Description // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -namespace Foam -{ - // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -OPstream::~OPstream() +Foam::OPstream::~OPstream() { notImplemented("OPstream::~OPstream()"); } @@ -45,7 +42,7 @@ OPstream::~OPstream() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -bool OPstream::write +bool Foam::OPstream::write ( const commsTypes commsType, const int toProcNo, @@ -68,11 +65,11 @@ bool OPstream::write } -void OPstream::waitRequests() +void Foam::OPstream::waitRequests() {} -bool OPstream::finishedRequest(const label) +bool Foam::OPstream::finishedRequest(const label) { notImplemented("OPstream::finishedRequest()"); return false; @@ -81,6 +78,4 @@ bool OPstream::finishedRequest(const label) // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace Foam - // ************************************************************************* // diff --git a/src/Pstream/dummy/Pstream.C b/src/Pstream/dummy/Pstream.C index 22adbe6cf2..3b1e9752f5 100644 --- a/src/Pstream/dummy/Pstream.C +++ b/src/Pstream/dummy/Pstream.C @@ -29,16 +29,13 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -namespace Foam -{ - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -void Pstream::addValidParOptions(HashTable& validParOptions) +void Foam::Pstream::addValidParOptions(HashTable& validParOptions) {} -bool Pstream::init(int& argc, char**& argv) +bool Foam::Pstream::init(int& argc, char**& argv) { FatalErrorIn("Pstream::init(int& argc, char**& argv)") << "Trying to use the dummy Pstream library." << nl @@ -49,24 +46,21 @@ bool Pstream::init(int& argc, char**& argv) } -void Pstream::exit(int errnum) +void Foam::Pstream::exit(int errnum) { notImplemented("Pstream::exit(int errnum)"); } -void Pstream::abort() +void Foam::Pstream::abort() { notImplemented("Pstream::abort()"); } -void reduce(scalar&, const sumOp&) +void Foam::reduce(scalar&, const sumOp&) {} - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace Foam - // ************************************************************************* // diff --git a/src/Pstream/gamma/OPwrite.C b/src/Pstream/gamma/OPwrite.C index ca96d1a172..3d1529e4bf 100644 --- a/src/Pstream/gamma/OPwrite.C +++ b/src/Pstream/gamma/OPwrite.C @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Description - Write primitive and binary block from OPstream + Write primitive and binary block from OPstream gamma-mpi \*---------------------------------------------------------------------------*/ @@ -46,8 +46,10 @@ namespace Foam // Largest message sent so far. This tracks the size of the receive // buffer on the receiving end. Done so we only send out resize messages -// if nessecary +// if necessary +//! @cond fileScope labelList maxSendSize; +//! @endcond fileScope // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/Pstream/gamma/PstreamGlobals.H b/src/Pstream/gamma/PstreamGlobals.H index 9d0807a9b1..58941c80be 100644 --- a/src/Pstream/gamma/PstreamGlobals.H +++ b/src/Pstream/gamma/PstreamGlobals.H @@ -26,7 +26,8 @@ Namespace Foam::PstreamGlobals Description - Global functions and variables for working with parallel streams. + Global functions and variables for working with parallel streams, + but principally for gamma/mpi SourceFiles PstreamGlobals.C diff --git a/src/Pstream/mpi/IPread.C b/src/Pstream/mpi/IPread.C index 7423dd6b43..90fc19b13c 100644 --- a/src/Pstream/mpi/IPread.C +++ b/src/Pstream/mpi/IPread.C @@ -33,18 +33,16 @@ Description // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -namespace Foam -{ - // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // Outstanding non-blocking operations. -DynamicList IPstream_outstandingRequests_; - +//! @cond fileScope +Foam::DynamicList IPstream_outstandingRequests_; +//! @endcond fileScope // * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * // -IPstream::IPstream +Foam::IPstream::IPstream ( const commsTypes commsType, const int fromProcNo, @@ -63,7 +61,7 @@ IPstream::IPstream MPI_Status status; - // If the buffer size is not specified probe the incomming message + // If the buffer size is not specified, probe the incomming message // and set it if (!bufSize) { @@ -89,7 +87,7 @@ IPstream::IPstream // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -label IPstream::read +Foam::label Foam::IPstream::read ( const commsTypes commsType, const int fromProcNo, @@ -183,8 +181,7 @@ label IPstream::read ( "IPstream::read" "(const int fromProcNo, char* buf, std::streamsize bufSize)" - ) << "Unsupported communications type " - << Pstream::commsTypeNames[commsType] + ) << "Unsupported communications type " << commsType << Foam::abort(FatalError); return 0; @@ -192,7 +189,7 @@ label IPstream::read } -void IPstream::waitRequests() +void Foam::IPstream::waitRequests() { if (IPstream_outstandingRequests_.size() > 0) { @@ -219,7 +216,7 @@ void IPstream::waitRequests() } -bool IPstream::finishedRequest(const label i) +bool Foam::IPstream::finishedRequest(const label i) { if (i >= IPstream_outstandingRequests_.size()) { @@ -244,6 +241,4 @@ bool IPstream::finishedRequest(const label i) // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace Foam - // ************************************************************************* // diff --git a/src/Pstream/mpi/OPwrite.C b/src/Pstream/mpi/OPwrite.C index 2a09427b7c..6f37386d16 100644 --- a/src/Pstream/mpi/OPwrite.C +++ b/src/Pstream/mpi/OPwrite.C @@ -31,20 +31,16 @@ Description #include "OPstream.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // Outstanding non-blocking operations. -DynamicList OPstream_outstandingRequests_; - +//! @cond fileScope +Foam::DynamicList OPstream_outstandingRequests_; +//! @endcond fileScope // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -OPstream::~OPstream() +Foam::OPstream::~OPstream() { if ( @@ -66,7 +62,7 @@ OPstream::~OPstream() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -bool OPstream::write +bool Foam::OPstream::write ( const commsTypes commsType, const int toProcNo, @@ -80,7 +76,7 @@ bool OPstream::write { transferFailed = MPI_Bsend ( - (char*)buf, + const_cast(buf), bufSize, MPI_PACKED, procID(toProcNo), @@ -92,7 +88,7 @@ bool OPstream::write { transferFailed = MPI_Send ( - (char*)buf, + const_cast(buf), bufSize, MPI_PACKED, procID(toProcNo), @@ -106,7 +102,7 @@ bool OPstream::write transferFailed = MPI_Isend ( - (char*)buf, + const_cast(buf), bufSize, MPI_PACKED, procID(toProcNo), @@ -123,8 +119,7 @@ bool OPstream::write ( "OPstream::write" "(const int fromProcNo, char* buf, std::streamsize bufSize)" - ) << "Unsupported communications type " - << Pstream::commsTypeNames[commsType] + ) << "Unsupported communications type " << commsType << Foam::abort(FatalError); } @@ -132,7 +127,7 @@ bool OPstream::write } -void OPstream::waitRequests() +void Foam::OPstream::waitRequests() { if (OPstream_outstandingRequests_.size() > 0) { @@ -159,7 +154,7 @@ void OPstream::waitRequests() } -bool OPstream::finishedRequest(const label i) +bool Foam::OPstream::finishedRequest(const label i) { if (i >= OPstream_outstandingRequests_.size()) { @@ -184,6 +179,4 @@ bool OPstream::finishedRequest(const label i) // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace Foam - // ************************************************************************* // diff --git a/src/Pstream/mpi/Pstream.C b/src/Pstream/mpi/Pstream.C index a456341317..ce42db4ea6 100644 --- a/src/Pstream/mpi/Pstream.C +++ b/src/Pstream/mpi/Pstream.C @@ -42,12 +42,14 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -namespace Foam -{ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -void Pstream::addValidParOptions(HashTable& validParOptions) +// NOTE: +// valid parallel options vary between implementations, but flag common ones. +// if they are not removed by MPI_Init(), the subsequent argument processing +// will notice that they are wrong +void Foam::Pstream::addValidParOptions(HashTable& validParOptions) { validParOptions.insert("np", ""); validParOptions.insert("p4pg", "PI file"); @@ -59,7 +61,7 @@ void Pstream::addValidParOptions(HashTable& validParOptions) } -bool Pstream::init(int& argc, char**& argv) +bool Foam::Pstream::init(int& argc, char**& argv) { MPI_Init(&argc, &argv); @@ -119,7 +121,7 @@ bool Pstream::init(int& argc, char**& argv) } -void Pstream::exit(int errnum) +void Foam::Pstream::exit(int errnum) { # ifndef SGIMPI int size; @@ -140,13 +142,13 @@ void Pstream::exit(int errnum) } -void Pstream::abort() +void Foam::Pstream::abort() { MPI_Abort(MPI_COMM_WORLD, 1); } -void reduce(scalar& Value, const sumOp& bop) +void Foam::reduce(scalar& Value, const sumOp& bop) { if (!Pstream::parRun()) { @@ -426,6 +428,4 @@ void reduce(scalar& Value, const sumOp& bop) // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace Foam - // ************************************************************************* // diff --git a/src/dynamicMesh/meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.C b/src/dynamicMesh/meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.C index bc36491fa7..0920b53640 100644 --- a/src/dynamicMesh/meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.C +++ b/src/dynamicMesh/meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.C @@ -653,7 +653,7 @@ void Foam::meshCutAndRemove::setRefinement const edge& e = mesh().edges()[edgeI]; // Check if there is any cell using this edge. - if (debug & findCutCell(cuts, mesh().edgeCells()[edgeI]) == -1) + if (debug && findCutCell(cuts, mesh().edgeCells()[edgeI]) == -1) { FatalErrorIn ( diff --git a/src/dynamicMesh/meshCut/meshModifiers/meshCutter/meshCutter.C b/src/dynamicMesh/meshCut/meshModifiers/meshCutter/meshCutter.C index a86578e185..28e72d224a 100644 --- a/src/dynamicMesh/meshCut/meshModifiers/meshCutter/meshCutter.C +++ b/src/dynamicMesh/meshCut/meshModifiers/meshCutter/meshCutter.C @@ -601,7 +601,7 @@ void Foam::meshCutter::setRefinement const edge& e = mesh().edges()[edgeI]; // Check if there is any cell using this edge. - if (debug & findCutCell(cuts, mesh().edgeCells()[edgeI]) == -1) + if (debug && findCutCell(cuts, mesh().edgeCells()[edgeI]) == -1) { FatalErrorIn ( diff --git a/src/sampling/sampledSurface/patch/sampledPatch.C b/src/sampling/sampledSurface/patch/sampledPatch.C index 2b4f636ee7..8ca36d42f5 100644 --- a/src/sampling/sampledSurface/patch/sampledPatch.C +++ b/src/sampling/sampledSurface/patch/sampledPatch.C @@ -140,7 +140,7 @@ Foam::sampledPatch::sampledPatch patchFaceLabels_(0) { // default: non-triangulated - triangulate() = getBool(dict, "triangulate", false); + triangulate() = dict.lookupOrDefault("triangulate", false); createGeometry(); } diff --git a/src/sampling/sampledSurface/sampledSurface/sampledSurface.C b/src/sampling/sampledSurface/sampledSurface/sampledSurface.C index 24ceb62aa6..ef805c8642 100644 --- a/src/sampling/sampledSurface/sampledSurface/sampledSurface.C +++ b/src/sampling/sampledSurface/sampledSurface/sampledSurface.C @@ -151,25 +151,6 @@ Foam::sampledSurface::New ); } - -bool Foam::sampledSurface::getBool -( - const dictionary& dict, - const word& key, - const bool defaultVal -) -{ - if (dict.found(key)) - { - return readBool(dict.lookup(key)); - } - else - { - return defaultVal; - } -} - - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::sampledSurface::sampledSurface @@ -200,8 +181,8 @@ Foam::sampledSurface::sampledSurface : name_(name), mesh_(mesh), - triangulate_(getBool(dict, "triangulate", true)), - interpolate_(getBool(dict, "interpolate", false)), + triangulate_(dict.lookupOrDefault("triangulate", true)), + interpolate_(dict.lookupOrDefault("interpolate", false)), SfPtr_(NULL), magSfPtr_(NULL), CfPtr_(NULL), diff --git a/src/sampling/sampledSurface/sampledSurface/sampledSurface.H b/src/sampling/sampledSurface/sampledSurface/sampledSurface.H index d91ff075e2..d143ee95aa 100644 --- a/src/sampling/sampledSurface/sampledSurface/sampledSurface.H +++ b/src/sampling/sampledSurface/sampledSurface/sampledSurface.H @@ -128,11 +128,6 @@ class sampledSurface protected: - // Protected static functions - - //- Read bool from dictionary. Return provided value if not found - static bool getBool(const dictionary&, const word&, const bool); - // Protected Member functions virtual void clearGeom() const; diff --git a/src/turbulenceModels/Allwmake b/src/turbulenceModels/Allwmake index 5ccba2b371..a05e81fc00 100755 --- a/src/turbulenceModels/Allwmake +++ b/src/turbulenceModels/Allwmake @@ -1,5 +1,5 @@ #!/bin/sh set -x -wmake libso incompressible -wmake libso compressible +( cd RAS && ./Allwmake ) +( cd LES && ./Allwmake ) diff --git a/src/LESmodels/Allwmake b/src/turbulenceModels/LES/Allwmake similarity index 100% rename from src/LESmodels/Allwmake rename to src/turbulenceModels/LES/Allwmake diff --git a/src/LESmodels/LESdeltas/LESdelta/LESdelta.C b/src/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.C similarity index 100% rename from src/LESmodels/LESdeltas/LESdelta/LESdelta.C rename to src/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.C diff --git a/src/LESmodels/LESdeltas/LESdelta/LESdelta.H b/src/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.H similarity index 100% rename from src/LESmodels/LESdeltas/LESdelta/LESdelta.H rename to src/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.H diff --git a/src/LESmodels/LESdeltas/LESdelta/newDelta.C b/src/turbulenceModels/LES/LESdeltas/LESdelta/newDelta.C similarity index 100% rename from src/LESmodels/LESdeltas/LESdelta/newDelta.C rename to src/turbulenceModels/LES/LESdeltas/LESdelta/newDelta.C diff --git a/src/LESmodels/LESdeltas/Make/files b/src/turbulenceModels/LES/LESdeltas/Make/files similarity index 100% rename from src/LESmodels/LESdeltas/Make/files rename to src/turbulenceModels/LES/LESdeltas/Make/files diff --git a/src/LESmodels/LESdeltas/Make/options b/src/turbulenceModels/LES/LESdeltas/Make/options similarity index 100% rename from src/LESmodels/LESdeltas/Make/options rename to src/turbulenceModels/LES/LESdeltas/Make/options diff --git a/src/LESmodels/LESdeltas/PrandtlDelta/PrandtlDelta.C b/src/turbulenceModels/LES/LESdeltas/PrandtlDelta/PrandtlDelta.C similarity index 100% rename from src/LESmodels/LESdeltas/PrandtlDelta/PrandtlDelta.C rename to src/turbulenceModels/LES/LESdeltas/PrandtlDelta/PrandtlDelta.C diff --git a/src/LESmodels/LESdeltas/PrandtlDelta/PrandtlDelta.H b/src/turbulenceModels/LES/LESdeltas/PrandtlDelta/PrandtlDelta.H similarity index 100% rename from src/LESmodels/LESdeltas/PrandtlDelta/PrandtlDelta.H rename to src/turbulenceModels/LES/LESdeltas/PrandtlDelta/PrandtlDelta.H diff --git a/src/LESmodels/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.C b/src/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.C similarity index 100% rename from src/LESmodels/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.C rename to src/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.C diff --git a/src/LESmodels/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.H b/src/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.H similarity index 100% rename from src/LESmodels/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.H rename to src/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.H diff --git a/src/LESmodels/LESdeltas/smoothDelta/smoothDelta.C b/src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.C similarity index 100% rename from src/LESmodels/LESdeltas/smoothDelta/smoothDelta.C rename to src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.C diff --git a/src/LESmodels/LESdeltas/smoothDelta/smoothDelta.H b/src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.H similarity index 100% rename from src/LESmodels/LESdeltas/smoothDelta/smoothDelta.H rename to src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.H diff --git a/src/LESmodels/LESdeltas/smoothDelta/smoothDeltaDeltaDataI.H b/src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDeltaDeltaDataI.H similarity index 100% rename from src/LESmodels/LESdeltas/smoothDelta/smoothDeltaDeltaDataI.H rename to src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDeltaDeltaDataI.H diff --git a/src/LESmodels/LESfilters/LESfilter/LESfilter.C b/src/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.C similarity index 100% rename from src/LESmodels/LESfilters/LESfilter/LESfilter.C rename to src/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.C diff --git a/src/LESmodels/LESfilters/LESfilter/LESfilter.H b/src/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.H similarity index 100% rename from src/LESmodels/LESfilters/LESfilter/LESfilter.H rename to src/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.H diff --git a/src/LESmodels/LESfilters/LESfilter/newFilter.C b/src/turbulenceModels/LES/LESfilters/LESfilter/newFilter.C similarity index 100% rename from src/LESmodels/LESfilters/LESfilter/newFilter.C rename to src/turbulenceModels/LES/LESfilters/LESfilter/newFilter.C diff --git a/src/LESmodels/LESfilters/Make/files b/src/turbulenceModels/LES/LESfilters/Make/files similarity index 100% rename from src/LESmodels/LESfilters/Make/files rename to src/turbulenceModels/LES/LESfilters/Make/files diff --git a/src/LESmodels/LESfilters/Make/options b/src/turbulenceModels/LES/LESfilters/Make/options similarity index 100% rename from src/LESmodels/LESfilters/Make/options rename to src/turbulenceModels/LES/LESfilters/Make/options diff --git a/src/LESmodels/LESfilters/anisotropicFilter/anisotropicFilter.C b/src/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.C similarity index 100% rename from src/LESmodels/LESfilters/anisotropicFilter/anisotropicFilter.C rename to src/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.C diff --git a/src/LESmodels/LESfilters/anisotropicFilter/anisotropicFilter.H b/src/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.H similarity index 100% rename from src/LESmodels/LESfilters/anisotropicFilter/anisotropicFilter.H rename to src/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.H diff --git a/src/LESmodels/LESfilters/laplaceFilter/laplaceFilter.C b/src/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.C similarity index 100% rename from src/LESmodels/LESfilters/laplaceFilter/laplaceFilter.C rename to src/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.C diff --git a/src/LESmodels/LESfilters/laplaceFilter/laplaceFilter.H b/src/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.H similarity index 100% rename from src/LESmodels/LESfilters/laplaceFilter/laplaceFilter.H rename to src/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.H diff --git a/src/LESmodels/LESfilters/simpleFilter/simpleFilter.C b/src/turbulenceModels/LES/LESfilters/simpleFilter/simpleFilter.C similarity index 100% rename from src/LESmodels/LESfilters/simpleFilter/simpleFilter.C rename to src/turbulenceModels/LES/LESfilters/simpleFilter/simpleFilter.C diff --git a/src/LESmodels/LESfilters/simpleFilter/simpleFilter.H b/src/turbulenceModels/LES/LESfilters/simpleFilter/simpleFilter.H similarity index 100% rename from src/LESmodels/LESfilters/simpleFilter/simpleFilter.H rename to src/turbulenceModels/LES/LESfilters/simpleFilter/simpleFilter.H diff --git a/src/LESmodels/compressible/DeardorffDiffStress/DeardorffDiffStress.C b/src/turbulenceModels/LES/compressible/DeardorffDiffStress/DeardorffDiffStress.C similarity index 91% rename from src/LESmodels/compressible/DeardorffDiffStress/DeardorffDiffStress.C rename to src/turbulenceModels/LES/compressible/DeardorffDiffStress/DeardorffDiffStress.C index 3114f7ec86..6b4b10032a 100644 --- a/src/LESmodels/compressible/DeardorffDiffStress/DeardorffDiffStress.C +++ b/src/turbulenceModels/LES/compressible/DeardorffDiffStress/DeardorffDiffStress.C @@ -33,7 +33,7 @@ namespace Foam { namespace compressible { -namespace LESmodels +namespace LES { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -55,9 +55,11 @@ DeardorffDiffStress::DeardorffDiffStress LESmodel(typeName, rho, U, phi, thermoPhysicalModel), GenSGSStress(rho, U, phi, thermoPhysicalModel), - ck_(LESmodelProperties().lookup("ck")), - cm_(LESmodelProperties().lookup("cm")) -{} + ck_(LESmodelProperties().lookupOrAddDefault("ck", 0.094)), + cm_(LESmodelProperties().lookupOrAddDefault("cm", 4.13)) +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -111,8 +113,8 @@ bool DeardorffDiffStress::read() { if (GenSGSStress::read()) { - LESmodelProperties().lookup("ck") >> ck_; - LESmodelProperties().lookup("cm") >> cm_; + LESmodelProperties().readIfPresent("ck", ck_); + LESmodelProperties().readIfPresent("cm", cm_); return true; } @@ -125,7 +127,7 @@ bool DeardorffDiffStress::read() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace compressible } // End namespace Foam diff --git a/src/LESmodels/compressible/DeardorffDiffStress/DeardorffDiffStress.H b/src/turbulenceModels/LES/compressible/DeardorffDiffStress/DeardorffDiffStress.H similarity index 96% rename from src/LESmodels/compressible/DeardorffDiffStress/DeardorffDiffStress.H rename to src/turbulenceModels/LES/compressible/DeardorffDiffStress/DeardorffDiffStress.H index c367b6cea9..c184acc53a 100644 --- a/src/LESmodels/compressible/DeardorffDiffStress/DeardorffDiffStress.H +++ b/src/turbulenceModels/LES/compressible/DeardorffDiffStress/DeardorffDiffStress.H @@ -62,7 +62,7 @@ namespace Foam { namespace compressible { -namespace LESmodels +namespace LES { /*---------------------------------------------------------------------------*\ @@ -75,8 +75,8 @@ class DeardorffDiffStress { // Private data - dimensionedScalar ck_; - dimensionedScalar cm_; + scalar ck_; + scalar cm_; // Private Member Functions @@ -114,7 +114,7 @@ public: //- Return the effective diffusivity for B tmp DBEff() const { - return tmp + return tmp ( new volScalarField("DBEff", muSgs_ + mu()) ); @@ -130,7 +130,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace compressible } // End namespace Foam diff --git a/src/LESmodels/compressible/GenEddyVisc/GenEddyVisc.C b/src/turbulenceModels/LES/compressible/GenEddyVisc/GenEddyVisc.C similarity index 94% rename from src/LESmodels/compressible/GenEddyVisc/GenEddyVisc.C rename to src/turbulenceModels/LES/compressible/GenEddyVisc/GenEddyVisc.C index a892042c29..d52caee3f9 100644 --- a/src/LESmodels/compressible/GenEddyVisc/GenEddyVisc.C +++ b/src/turbulenceModels/LES/compressible/GenEddyVisc/GenEddyVisc.C @@ -32,7 +32,7 @@ namespace Foam { namespace compressible { -namespace LESmodels +namespace LES { // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -51,7 +51,7 @@ GenEddyVisc::GenEddyVisc word("GenEddyVisc"), rho, U, phi, thermoPhysicalModel ), - ce_(LESmodelProperties().lookup("ce")), + ce_(LESmodelProperties().lookupOrAddDefault("ce", 1.048)), k_ ( @@ -78,7 +78,9 @@ GenEddyVisc::GenEddyVisc ), mesh_ ) -{} +{ +// printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -114,7 +116,7 @@ bool GenEddyVisc::read() { if (LESmodel::read()) { - LESmodelProperties().lookup("ce") >> ce_; + LESmodelProperties().readIfPresent("ce", ce_); return true; } @@ -127,7 +129,7 @@ bool GenEddyVisc::read() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace compressible } // End namespace Foam diff --git a/src/LESmodels/compressible/GenEddyVisc/GenEddyVisc.H b/src/turbulenceModels/LES/compressible/GenEddyVisc/GenEddyVisc.H similarity index 98% rename from src/LESmodels/compressible/GenEddyVisc/GenEddyVisc.H rename to src/turbulenceModels/LES/compressible/GenEddyVisc/GenEddyVisc.H index fd6acb14ec..d2d879d3a8 100644 --- a/src/LESmodels/compressible/GenEddyVisc/GenEddyVisc.H +++ b/src/turbulenceModels/LES/compressible/GenEddyVisc/GenEddyVisc.H @@ -48,7 +48,7 @@ namespace Foam { namespace compressible { -namespace LESmodels +namespace LES { /*---------------------------------------------------------------------------*\ @@ -68,7 +68,7 @@ class GenEddyVisc protected: - dimensionedScalar ce_; + scalar ce_; volScalarField k_; volScalarField muSgs_; @@ -144,7 +144,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace compressible } // End namespace Foam diff --git a/src/LESmodels/compressible/GenSGSStress/GenSGSStress.C b/src/turbulenceModels/LES/compressible/GenSGSStress/GenSGSStress.C similarity index 94% rename from src/LESmodels/compressible/GenSGSStress/GenSGSStress.C rename to src/turbulenceModels/LES/compressible/GenSGSStress/GenSGSStress.C index 648efe8598..2c7dff7006 100644 --- a/src/LESmodels/compressible/GenSGSStress/GenSGSStress.C +++ b/src/turbulenceModels/LES/compressible/GenSGSStress/GenSGSStress.C @@ -32,7 +32,7 @@ namespace Foam { namespace compressible { -namespace LESmodels +namespace LES { // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -55,7 +55,7 @@ GenSGSStress::GenSGSStress thermoPhysicalModel ), - ce_(LESmodelProperties().lookup("ce")), + ce_(LESmodelProperties().lookupOrAddDefault("ce" ,1.048)), B_ ( @@ -82,7 +82,9 @@ GenSGSStress::GenSGSStress ), mesh_ ) -{} +{ +// printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -129,7 +131,7 @@ bool GenSGSStress::read() { if (LESmodel::read()) { - LESmodelProperties().lookup("ce") >> ce_; + LESmodelProperties().readIfPresent("ce", ce_); return true; } @@ -142,7 +144,7 @@ bool GenSGSStress::read() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace compressible } // End namespace Foam diff --git a/src/LESmodels/compressible/GenSGSStress/GenSGSStress.H b/src/turbulenceModels/LES/compressible/GenSGSStress/GenSGSStress.H similarity index 98% rename from src/LESmodels/compressible/GenSGSStress/GenSGSStress.H rename to src/turbulenceModels/LES/compressible/GenSGSStress/GenSGSStress.H index 6951132d21..384e49f50e 100644 --- a/src/LESmodels/compressible/GenSGSStress/GenSGSStress.H +++ b/src/turbulenceModels/LES/compressible/GenSGSStress/GenSGSStress.H @@ -49,7 +49,7 @@ namespace Foam { namespace compressible { -namespace LESmodels +namespace LES { /*---------------------------------------------------------------------------*\ @@ -69,7 +69,7 @@ class GenSGSStress protected: - dimensionedScalar ce_; + scalar ce_; volSymmTensorField B_; volScalarField muSgs_; @@ -149,7 +149,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace compressible } // End namespace Foam diff --git a/src/LESmodels/compressible/LESmodel/LESmodel.C b/src/turbulenceModels/LES/compressible/LESmodel/LESmodel.C similarity index 89% rename from src/LESmodels/compressible/LESmodel/LESmodel.C rename to src/turbulenceModels/LES/compressible/LESmodel/LESmodel.C index cfc426fb78..7a95ea699d 100644 --- a/src/LESmodels/compressible/LESmodel/LESmodel.C +++ b/src/turbulenceModels/LES/compressible/LESmodel/LESmodel.C @@ -39,7 +39,19 @@ namespace compressible defineTypeNameAndDebug(LESmodel, 0); defineRunTimeSelectionTable(LESmodel, dictionary); -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // + +void LESmodel::printCoeffs() +{ + if (printCoeffs_) + { + Info<< type() << "Coeffs" << nl + << LESmodelProperties_; + } +} + + +// * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * * // LESmodel::LESmodel ( @@ -70,6 +82,7 @@ LESmodel::LESmodel phi_(phi), thermoPhysicalModel_(thermoPhysicalModel), + printCoeffs_(lookupOrDefault("printCoeffs", false)), LESmodelProperties_(subDict(type + "Coeffs")), k0_("k0", dimVelocity*dimVelocity, SMALL), diff --git a/src/LESmodels/compressible/LESmodel/LESmodel.H b/src/turbulenceModels/LES/compressible/LESmodel/LESmodel.H similarity index 97% rename from src/LESmodels/compressible/LESmodel/LESmodel.H rename to src/turbulenceModels/LES/compressible/LESmodel/LESmodel.H index 8dfd96dfc2..912db4f0a1 100644 --- a/src/LESmodels/compressible/LESmodel/LESmodel.H +++ b/src/turbulenceModels/LES/compressible/LESmodel/LESmodel.H @@ -93,6 +93,7 @@ private: const basicThermo& thermoPhysicalModel_; + Switch printCoeffs_; dictionary LESmodelProperties_; dimensionedScalar k0_; @@ -107,6 +108,14 @@ private: LESmodel& operator=(const LESmodel&); +protected: + + // Protected Member Functions + + //- Print model coefficients + virtual void printCoeffs(); + + public: //- Runtime type information @@ -191,7 +200,7 @@ public: //- Access the dictionary which provides info. about choice of // models, and all related data (particularly model coefficients). - inline const dictionary& LESmodelProperties() + inline dictionary& LESmodelProperties() { return LESmodelProperties_; } diff --git a/src/LESmodels/compressible/LESmodel/newLESmodel.C b/src/turbulenceModels/LES/compressible/LESmodel/newLESmodel.C similarity index 100% rename from src/LESmodels/compressible/LESmodel/newLESmodel.C rename to src/turbulenceModels/LES/compressible/LESmodel/newLESmodel.C diff --git a/src/LESmodels/compressible/Make/files b/src/turbulenceModels/LES/compressible/Make/files similarity index 100% rename from src/LESmodels/compressible/Make/files rename to src/turbulenceModels/LES/compressible/Make/files diff --git a/src/LESmodels/compressible/Make/options b/src/turbulenceModels/LES/compressible/Make/options similarity index 68% rename from src/LESmodels/compressible/Make/options rename to src/turbulenceModels/LES/compressible/Make/options index d013619604..9f0da00e30 100644 --- a/src/LESmodels/compressible/Make/options +++ b/src/turbulenceModels/LES/compressible/Make/options @@ -1,8 +1,8 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/LESmodels/LESdeltas/lnInclude \ - -I$(LIB_SRC)/LESmodels/LESfilters/lnInclude \ + -I../LESdeltas/lnInclude \ + -I../LESfilters/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude LIB_LIBS = \ diff --git a/src/LESmodels/compressible/Smagorinsky/Smagorinsky.C b/src/turbulenceModels/LES/compressible/Smagorinsky/Smagorinsky.C similarity index 93% rename from src/LESmodels/compressible/Smagorinsky/Smagorinsky.C rename to src/turbulenceModels/LES/compressible/Smagorinsky/Smagorinsky.C index 0bee1a50ce..7966b33e81 100644 --- a/src/LESmodels/compressible/Smagorinsky/Smagorinsky.C +++ b/src/turbulenceModels/LES/compressible/Smagorinsky/Smagorinsky.C @@ -33,7 +33,7 @@ namespace Foam { namespace compressible { -namespace LESmodels +namespace LES { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -55,8 +55,10 @@ Smagorinsky::Smagorinsky LESmodel(typeName, rho, U, phi, thermoPhysicalModel), GenEddyVisc(rho, U, phi, thermoPhysicalModel), - ck_(LESmodelProperties().lookup("ck")) -{} + ck_(LESmodelProperties().lookupOrAddDefault("ck", 0.02)) +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -82,7 +84,7 @@ bool Smagorinsky::read() { if (GenEddyVisc::read()) { - LESmodelProperties().lookup("ck") >> ck_; + LESmodelProperties().readIfPresent("ck", ck_); return true; } @@ -95,7 +97,7 @@ bool Smagorinsky::read() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace compressible } // End namespace Foam diff --git a/src/LESmodels/compressible/Smagorinsky/Smagorinsky.H b/src/turbulenceModels/LES/compressible/Smagorinsky/Smagorinsky.H similarity index 97% rename from src/LESmodels/compressible/Smagorinsky/Smagorinsky.H rename to src/turbulenceModels/LES/compressible/Smagorinsky/Smagorinsky.H index ba951aa86e..66a7f160fc 100644 --- a/src/LESmodels/compressible/Smagorinsky/Smagorinsky.H +++ b/src/turbulenceModels/LES/compressible/Smagorinsky/Smagorinsky.H @@ -58,7 +58,7 @@ namespace Foam { namespace compressible { -namespace LESmodels +namespace LES { /*---------------------------------------------------------------------------*\ @@ -71,7 +71,7 @@ class Smagorinsky { // Private data - dimensionedScalar ck_; + scalar ck_; // Private Member Functions @@ -116,7 +116,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace compressible } // End namespace Foam diff --git a/src/LESmodels/compressible/SpalartAllmaras/SpalartAllmaras.C b/src/turbulenceModels/LES/compressible/SpalartAllmaras/SpalartAllmaras.C similarity index 80% rename from src/LESmodels/compressible/SpalartAllmaras/SpalartAllmaras.C rename to src/turbulenceModels/LES/compressible/SpalartAllmaras/SpalartAllmaras.C index 71e22b5548..864f542fa3 100644 --- a/src/LESmodels/compressible/SpalartAllmaras/SpalartAllmaras.C +++ b/src/turbulenceModels/LES/compressible/SpalartAllmaras/SpalartAllmaras.C @@ -34,7 +34,7 @@ namespace Foam { namespace compressible { -namespace LESmodels +namespace LES { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -104,17 +104,17 @@ SpalartAllmaras::SpalartAllmaras : LESmodel(typeName, rho, U, phi, thermoPhysicalModel), - alphaNut_(LESmodelProperties().lookup("alphaNut")), - Cb1_(LESmodelProperties().lookup("Cb1")), - Cb2_(LESmodelProperties().lookup("Cb2")), - Cv1_(LESmodelProperties().lookup("Cv1")), - Cv2_(LESmodelProperties().lookup("Cv2")), - CDES_(LESmodelProperties().lookup("CDES")), - ck_(LESmodelProperties().lookup("ck")), - kappa_(lookup("kappa")), + alphaNut_(LESmodelProperties().lookupOrAddDefault("alphaNut", 1.5)), + Cb1_(LESmodelProperties().lookupOrAddDefault("Cb1", 0.1355)), + Cb2_(LESmodelProperties().lookupOrAddDefault("Cb2", 0.622)), + Cv1_(LESmodelProperties().lookupOrAddDefault("Cv1", 7.1)), + Cv2_(LESmodelProperties().lookupOrAddDefault("Cv2", 5.0)), + CDES_(LESmodelProperties().lookupOrAddDefault("CDES", 0.65)), + ck_(LESmodelProperties().lookupOrAddDefault("ck", 0.07)), + kappa_(lookupOrAddDefault("kappa", 0.4187)), Cw1_(Cb1_/sqr(kappa_) + alphaNut_*(1.0 + Cb2_)), - Cw2_(LESmodelProperties().lookup("Cw2")), - Cw3_(LESmodelProperties().lookup("Cw3")), + Cw2_(LESmodelProperties().lookupOrAddDefault("Cw2", 0.3)), + Cw3_(LESmodelProperties().lookupOrAddDefault("Cw3", 2.0)), nuTilda_ ( @@ -143,7 +143,9 @@ SpalartAllmaras::SpalartAllmaras mesh_ ) -{} +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -216,18 +218,18 @@ bool SpalartAllmaras::read() { if (LESmodel::read()) { - LESmodelProperties().lookup("alphaNut") >> alphaNut_; - LESmodelProperties().lookup("Cb1") >> Cb1_; - LESmodelProperties().lookup("Cb2") >> Cb2_; + LESmodelProperties().readIfPresent("alphaNut", alphaNut_); + LESmodelProperties().readIfPresent("Cb1", Cb1_); + LESmodelProperties().readIfPresent("Cb2", Cb2_); Cw1_ = Cb1_/sqr(kappa_) + alphaNut_*(1.0 + Cb2_); - LESmodelProperties().lookup("Cw2") >> Cw2_; - LESmodelProperties().lookup("Cw3") >> Cw3_; - LESmodelProperties().lookup("Cv1") >> Cv1_; - LESmodelProperties().lookup("Cv2") >> Cv2_; - LESmodelProperties().lookup("CDES") >> CDES_; - LESmodelProperties().lookup("ck") >> ck_; - lookup("kappa") >> kappa_; - + LESmodelProperties().readIfPresent("Cw2", Cw2_); + LESmodelProperties().readIfPresent("Cw3", Cw3_); + LESmodelProperties().readIfPresent("Cv1", Cv1_); + LESmodelProperties().readIfPresent("Cv2", Cv2_); + LESmodelProperties().readIfPresent("CDES", CDES_); + LESmodelProperties().readIfPresent("ck", ck_); + readIfPresent("kappa", kappa_); + return true; } else @@ -239,7 +241,7 @@ bool SpalartAllmaras::read() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace compressible } // End namespace Foam diff --git a/src/LESmodels/compressible/SpalartAllmaras/SpalartAllmaras.H b/src/turbulenceModels/LES/compressible/SpalartAllmaras/SpalartAllmaras.H similarity index 89% rename from src/LESmodels/compressible/SpalartAllmaras/SpalartAllmaras.H rename to src/turbulenceModels/LES/compressible/SpalartAllmaras/SpalartAllmaras.H index 233619579a..79a8a4d7d3 100644 --- a/src/LESmodels/compressible/SpalartAllmaras/SpalartAllmaras.H +++ b/src/turbulenceModels/LES/compressible/SpalartAllmaras/SpalartAllmaras.H @@ -45,7 +45,7 @@ namespace Foam { namespace compressible { -namespace LESmodels +namespace LES { /*---------------------------------------------------------------------------*\ @@ -58,18 +58,18 @@ class SpalartAllmaras { // Private data - dimensionedScalar alphaNut_; + scalar alphaNut_; - dimensionedScalar Cb1_; - dimensionedScalar Cb2_; - dimensionedScalar Cv1_; - dimensionedScalar Cv2_; - dimensionedScalar CDES_; - dimensionedScalar ck_; - dimensionedScalar kappa_; - dimensionedScalar Cw1_; - dimensionedScalar Cw2_; - dimensionedScalar Cw3_; + scalar Cb1_; + scalar Cb2_; + scalar Cv1_; + scalar Cv2_; + scalar CDES_; + scalar ck_; + scalar kappa_; + scalar Cw1_; + scalar Cw2_; + scalar Cw3_; // Private member functions @@ -81,7 +81,7 @@ class SpalartAllmaras // Disallow default bitwise copy construct and assignment SpalartAllmaras(const SpalartAllmaras&); - SpalartAllmaras& operator=(const SpalartAllmaras&); + SpalartAllmaras& operator=(const SpalartAllmaras&); volScalarField nuTilda_; volScalarField dTilda_; @@ -112,7 +112,7 @@ public: // Member Functions - + //- Return SGS kinetic energy tmp k() const { @@ -131,7 +131,7 @@ public: tmp muSgs() const { return muSgs_; - } + } //- Return thermal conductivity tmp alphaEff() const @@ -163,7 +163,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace compressible } // End namespace Foam diff --git a/src/LESmodels/compressible/dynOneEqEddy/dynOneEqEddy.C b/src/turbulenceModels/LES/compressible/dynOneEqEddy/dynOneEqEddy.C similarity index 98% rename from src/LESmodels/compressible/dynOneEqEddy/dynOneEqEddy.C rename to src/turbulenceModels/LES/compressible/dynOneEqEddy/dynOneEqEddy.C index 4156ea6a80..0da469153e 100644 --- a/src/LESmodels/compressible/dynOneEqEddy/dynOneEqEddy.C +++ b/src/turbulenceModels/LES/compressible/dynOneEqEddy/dynOneEqEddy.C @@ -33,7 +33,7 @@ namespace Foam { namespace compressible { -namespace LESmodels +namespace LES { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -90,7 +90,9 @@ dynOneEqEddy::dynOneEqEddy filterPtr_(LESfilter::New(U.mesh(), LESmodelProperties())), filter_(filterPtr_()) -{} +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // @@ -146,7 +148,7 @@ bool dynOneEqEddy::read() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace compressible } // End namespace Foam diff --git a/src/LESmodels/compressible/dynOneEqEddy/dynOneEqEddy.H b/src/turbulenceModels/LES/compressible/dynOneEqEddy/dynOneEqEddy.H similarity index 98% rename from src/LESmodels/compressible/dynOneEqEddy/dynOneEqEddy.H rename to src/turbulenceModels/LES/compressible/dynOneEqEddy/dynOneEqEddy.H index ea7fb7c04b..6c6ec6cc34 100644 --- a/src/LESmodels/compressible/dynOneEqEddy/dynOneEqEddy.H +++ b/src/turbulenceModels/LES/compressible/dynOneEqEddy/dynOneEqEddy.H @@ -63,7 +63,7 @@ namespace Foam { namespace compressible { -namespace LESmodels +namespace LES { /*---------------------------------------------------------------------------*\ @@ -135,7 +135,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace compressible } // End namespace Foam diff --git a/src/LESmodels/compressible/lowReOneEqEddy/lowReOneEqEddy.C b/src/turbulenceModels/LES/compressible/lowReOneEqEddy/lowReOneEqEddy.C similarity index 90% rename from src/LESmodels/compressible/lowReOneEqEddy/lowReOneEqEddy.C rename to src/turbulenceModels/LES/compressible/lowReOneEqEddy/lowReOneEqEddy.C index 5c1a90b8f6..09494ac02e 100644 --- a/src/LESmodels/compressible/lowReOneEqEddy/lowReOneEqEddy.C +++ b/src/turbulenceModels/LES/compressible/lowReOneEqEddy/lowReOneEqEddy.C @@ -33,7 +33,7 @@ namespace Foam { namespace compressible { -namespace LESmodels +namespace LES { // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -55,9 +55,11 @@ lowReOneEqEddy::lowReOneEqEddy LESmodel(typeName, rho, U, phi, thermoPhysicalModel), GenEddyVisc(rho, U, phi, thermoPhysicalModel), - ck_(LESmodelProperties().lookup("ck")), - beta_(LESmodelProperties().lookup("beta")) -{} + ck_(LESmodelProperties().lookupOrAddDefault("ck", ck_)), + beta_(LESmodelProperties().lookupOrAddDefault("beta", beta_)) +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -98,8 +100,8 @@ bool lowReOneEqEddy::read() { if (GenEddyVisc::read()) { - LESmodelProperties().lookup("ck") >> ck_; - LESmodelProperties().lookup("beta") >> beta_; + LESmodelProperties().readIfPresent("ck", ck_); + LESmodelProperties().readIfPresent("beta", beta_); return true; } @@ -112,7 +114,7 @@ bool lowReOneEqEddy::read() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace compressible } // End namespace Foam diff --git a/src/LESmodels/compressible/lowReOneEqEddy/lowReOneEqEddy.H b/src/turbulenceModels/LES/compressible/lowReOneEqEddy/lowReOneEqEddy.H similarity index 95% rename from src/LESmodels/compressible/lowReOneEqEddy/lowReOneEqEddy.H rename to src/turbulenceModels/LES/compressible/lowReOneEqEddy/lowReOneEqEddy.H index 4bc8e8dbaf..a8fb1c8b6c 100644 --- a/src/LESmodels/compressible/lowReOneEqEddy/lowReOneEqEddy.H +++ b/src/turbulenceModels/LES/compressible/lowReOneEqEddy/lowReOneEqEddy.H @@ -59,7 +59,7 @@ namespace Foam { namespace compressible { -namespace LESmodels +namespace LES { /*---------------------------------------------------------------------------*\ @@ -72,8 +72,8 @@ class lowReOneEqEddy { // Private data - dimensionedScalar ck_; - dimensionedScalar beta_; + scalar ck_; + scalar beta_; // Private Member Functions @@ -111,7 +111,7 @@ public: //- Return the effective diffusivity for k tmp DkEff() const { - return tmp + return tmp ( new volScalarField("DkEff", muSgs_ + mu()) ); @@ -127,7 +127,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace compressible } // End namespace Foam diff --git a/src/LESmodels/compressible/oneEqEddy/oneEqEddy.C b/src/turbulenceModels/LES/compressible/oneEqEddy/oneEqEddy.C similarity index 94% rename from src/LESmodels/compressible/oneEqEddy/oneEqEddy.C rename to src/turbulenceModels/LES/compressible/oneEqEddy/oneEqEddy.C index 9788ad6115..f6d9a01811 100644 --- a/src/LESmodels/compressible/oneEqEddy/oneEqEddy.C +++ b/src/turbulenceModels/LES/compressible/oneEqEddy/oneEqEddy.C @@ -33,7 +33,7 @@ namespace Foam { namespace compressible { -namespace LESmodels +namespace LES { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -54,8 +54,10 @@ oneEqEddy::oneEqEddy LESmodel(typeName, rho, U, phi, thermoPhysicalModel), GenEddyVisc(rho, U, phi, thermoPhysicalModel), - ck_(LESmodelProperties().lookup("ck")) -{} + ck_(LESmodelProperties().lookupOrAddDefault("ck", 0.094)) +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -94,7 +96,7 @@ bool oneEqEddy::read() { if (GenEddyVisc::read()) { - LESmodelProperties().lookup("ck") >> ck_; + LESmodelProperties().readIfPresent("ck", ck_); return true; } @@ -107,7 +109,7 @@ bool oneEqEddy::read() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace compressible } // End namespace Foam diff --git a/src/LESmodels/compressible/oneEqEddy/oneEqEddy.H b/src/turbulenceModels/LES/compressible/oneEqEddy/oneEqEddy.H similarity index 97% rename from src/LESmodels/compressible/oneEqEddy/oneEqEddy.H rename to src/turbulenceModels/LES/compressible/oneEqEddy/oneEqEddy.H index a4f0d150f7..850ce019b0 100644 --- a/src/LESmodels/compressible/oneEqEddy/oneEqEddy.H +++ b/src/turbulenceModels/LES/compressible/oneEqEddy/oneEqEddy.H @@ -62,7 +62,7 @@ namespace Foam { namespace compressible { -namespace LESmodels +namespace LES { /*---------------------------------------------------------------------------*\ @@ -75,7 +75,7 @@ class oneEqEddy { // Private data - dimensionedScalar ck_; + scalar ck_; // Private Member Functions @@ -130,7 +130,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace compressible } // End namespace Foam diff --git a/src/LESmodels/compressible/wallFunc/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.C b/src/turbulenceModels/LES/compressible/wallFunc/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.C similarity index 99% rename from src/LESmodels/compressible/wallFunc/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/LES/compressible/wallFunc/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.C index 05924747bb..b5d47a5730 100644 --- a/src/LESmodels/compressible/wallFunc/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/LES/compressible/wallFunc/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.C @@ -36,7 +36,7 @@ namespace Foam { namespace compressible { -namespace LESmodels +namespace LES { // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -191,7 +191,7 @@ makePatchTypeField(fvPatchScalarField, muSgsWallFunctionFvPatchScalarField); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace compressible } // End namespace Foam diff --git a/src/LESmodels/compressible/wallFunc/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.H b/src/turbulenceModels/LES/compressible/wallFunc/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.H similarity index 98% rename from src/LESmodels/compressible/wallFunc/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/LES/compressible/wallFunc/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.H index 54d9ee302c..29a52fca67 100644 --- a/src/LESmodels/compressible/wallFunc/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/LES/compressible/wallFunc/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.H @@ -44,7 +44,7 @@ namespace Foam { namespace compressible { -namespace LESmodels +namespace LES { /*---------------------------------------------------------------------------*\ @@ -148,7 +148,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace compressible } // End namespace Foam diff --git a/src/LESmodels/incompressible/DeardorffDiffStress/DeardorffDiffStress.C b/src/turbulenceModels/LES/incompressible/DeardorffDiffStress/DeardorffDiffStress.C similarity index 82% rename from src/LESmodels/incompressible/DeardorffDiffStress/DeardorffDiffStress.C rename to src/turbulenceModels/LES/incompressible/DeardorffDiffStress/DeardorffDiffStress.C index 8ad2f76730..e963a81f73 100644 --- a/src/LESmodels/incompressible/DeardorffDiffStress/DeardorffDiffStress.C +++ b/src/turbulenceModels/LES/incompressible/DeardorffDiffStress/DeardorffDiffStress.C @@ -31,7 +31,7 @@ License namespace Foam { -namespace LESmodels +namespace LES { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -52,9 +52,11 @@ DeardorffDiffStress::DeardorffDiffStress LESmodel(typeName, U, phi, transport), GenSGSStress(U, phi, transport), - ck_(LESmodelProperties().lookup("ck")), - cm_(LESmodelProperties().lookup("cm")) -{} + ck_(LESmodelProperties().lookupOrAddDefault("ck", 0.094)), + cm_(LESmodelProperties().lookupOrAddDefault("cm", 4.13)) +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -89,12 +91,12 @@ void DeardorffDiffStress::correct(const tmp& tgradU) forAll(B_, celli) { - B_[celli].component(tensor::XX) = - max(B_[celli].component(tensor::XX), k0().value()); - B_[celli].component(tensor::YY) = - max(B_[celli].component(tensor::YY), k0().value()); - B_[celli].component(tensor::ZZ) = - max(B_[celli].component(tensor::ZZ), k0().value()); + B_[celli].component(symmTensor::XX) = + max(B_[celli].component(symmTensor::XX), k0().value()); + B_[celli].component(symmTensor::YY) = + max(B_[celli].component(symmTensor::YY), k0().value()); + B_[celli].component(symmTensor::ZZ) = + max(B_[celli].component(symmTensor::ZZ), k0().value()); } K = 0.5*tr(B_); @@ -109,8 +111,8 @@ bool DeardorffDiffStress::read() { if (GenSGSStress::read()) { - LESmodelProperties().lookup("ck") >> ck_; - LESmodelProperties().lookup("cm") >> cm_; + LESmodelProperties().readIfPresent("ck", ck_); + LESmodelProperties().readIfPresent("cm", cm_); return true; } @@ -123,7 +125,7 @@ bool DeardorffDiffStress::read() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // ************************************************************************* // diff --git a/src/LESmodels/incompressible/DeardorffDiffStress/DeardorffDiffStress.H b/src/turbulenceModels/LES/incompressible/DeardorffDiffStress/DeardorffDiffStress.H similarity index 97% rename from src/LESmodels/incompressible/DeardorffDiffStress/DeardorffDiffStress.H rename to src/turbulenceModels/LES/incompressible/DeardorffDiffStress/DeardorffDiffStress.H index be045adb83..54138e0df3 100644 --- a/src/LESmodels/incompressible/DeardorffDiffStress/DeardorffDiffStress.H +++ b/src/turbulenceModels/LES/incompressible/DeardorffDiffStress/DeardorffDiffStress.H @@ -60,7 +60,7 @@ SourceFiles namespace Foam { -namespace LESmodels +namespace LES { /*---------------------------------------------------------------------------*\ @@ -73,8 +73,8 @@ class DeardorffDiffStress { // Private data - dimensionedScalar ck_; - dimensionedScalar cm_; + scalar ck_; + scalar cm_; // Private Member Functions @@ -127,7 +127,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/LESmodels/incompressible/GenEddyVisc/GenEddyVisc.C b/src/turbulenceModels/LES/incompressible/GenEddyVisc/GenEddyVisc.C similarity index 93% rename from src/LESmodels/incompressible/GenEddyVisc/GenEddyVisc.C rename to src/turbulenceModels/LES/incompressible/GenEddyVisc/GenEddyVisc.C index 27e7317f4e..4087e21545 100644 --- a/src/LESmodels/incompressible/GenEddyVisc/GenEddyVisc.C +++ b/src/turbulenceModels/LES/incompressible/GenEddyVisc/GenEddyVisc.C @@ -30,7 +30,7 @@ License namespace Foam { -namespace LESmodels +namespace LES { // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -44,7 +44,7 @@ GenEddyVisc::GenEddyVisc : LESmodel(word("GenEddyVisc"), U, phi, transport), - ce_(LESmodelProperties().lookup("ce")), + ce_(LESmodelProperties().lookupOrAddDefault("ce", 1.048)), nuSgs_ ( @@ -58,7 +58,9 @@ GenEddyVisc::GenEddyVisc ), mesh_ ) -{} +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -94,7 +96,7 @@ bool GenEddyVisc::read() { if (LESmodel::read()) { - LESmodelProperties().lookup("ce") >> ce_; + LESmodelProperties().readIfPresent("ce", ce_); return true; } @@ -107,7 +109,7 @@ bool GenEddyVisc::read() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // ************************************************************************* // diff --git a/src/LESmodels/incompressible/GenEddyVisc/GenEddyVisc.H b/src/turbulenceModels/LES/incompressible/GenEddyVisc/GenEddyVisc.H similarity index 97% rename from src/LESmodels/incompressible/GenEddyVisc/GenEddyVisc.H rename to src/turbulenceModels/LES/incompressible/GenEddyVisc/GenEddyVisc.H index 54c02facb4..62cf67dc1c 100644 --- a/src/LESmodels/incompressible/GenEddyVisc/GenEddyVisc.H +++ b/src/turbulenceModels/LES/incompressible/GenEddyVisc/GenEddyVisc.H @@ -46,7 +46,7 @@ SourceFiles namespace Foam { -namespace LESmodels +namespace LES { /*---------------------------------------------------------------------------*\ @@ -66,7 +66,7 @@ class GenEddyVisc protected: - dimensionedScalar ce_; + scalar ce_; volScalarField nuSgs_; @@ -128,7 +128,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/LESmodels/incompressible/GenSGSStress/GenSGSStress.C b/src/turbulenceModels/LES/incompressible/GenSGSStress/GenSGSStress.C similarity index 82% rename from src/LESmodels/incompressible/GenSGSStress/GenSGSStress.C rename to src/turbulenceModels/LES/incompressible/GenSGSStress/GenSGSStress.C index 086267e798..f06fe00f53 100644 --- a/src/LESmodels/incompressible/GenSGSStress/GenSGSStress.C +++ b/src/turbulenceModels/LES/incompressible/GenSGSStress/GenSGSStress.C @@ -30,7 +30,7 @@ License namespace Foam { -namespace LESmodels +namespace LES { // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -44,8 +44,11 @@ GenSGSStress::GenSGSStress : LESmodel(word("GenSGSStress"), U, phi, transport), - ce_(LESmodelProperties().lookup("ce")), - couplingFactor_(0.0), + ce_(LESmodelProperties().lookupOrAddDefault("ce", 1.048)), + couplingFactor_ + ( + LESmodelProperties().lookupOrAddDefault("couplingFactor", 0.0) + ), B_ ( @@ -74,21 +77,16 @@ GenSGSStress::GenSGSStress B_.boundaryField().types() ) { - if (LESmodelProperties().found("couplingFactor")) + if (couplingFactor_ < 0.0 || couplingFactor_ > 1.0) { - LESmodelProperties().lookup("couplingFactor") >> couplingFactor_; - - if (couplingFactor_ < 0.0 || couplingFactor_ > 1.0) - { - FatalErrorIn - ( - "GenSGSStress::GenSGSStress" - "(const volVectorField& U, const surfaceScalarField& phi," - "transportModel& lamTransportModel)" - ) << "couplingFactor = " << couplingFactor_ - << " is not in range 0 - 1" - << exit(FatalError); - } + FatalErrorIn + ( + "GenSGSStress::GenSGSStress" + "(const volVectorField& U, const surfaceScalarField& phi," + "transportModel& lamTransportModel)" + ) << "couplingFactor = " << couplingFactor_ + << " is not in range 0 - 1" << nl + << exit(FatalError); } } @@ -148,9 +146,13 @@ bool GenSGSStress::read() { if (LESmodel::read()) { - LESmodelProperties().lookup("ce") >> ce_; + LESmodelProperties().readIfPresent("ce", ce_); - LESmodelProperties().lookup("couplingFactor") >> couplingFactor_; + LESmodelProperties().readIfPresent + ( + "couplingFactor", + couplingFactor_ + ); if (couplingFactor_ < 0.0 || couplingFactor_ > 1.0) { @@ -171,7 +173,7 @@ bool GenSGSStress::read() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // ************************************************************************* // diff --git a/src/LESmodels/incompressible/GenSGSStress/GenSGSStress.H b/src/turbulenceModels/LES/incompressible/GenSGSStress/GenSGSStress.H similarity index 98% rename from src/LESmodels/incompressible/GenSGSStress/GenSGSStress.H rename to src/turbulenceModels/LES/incompressible/GenSGSStress/GenSGSStress.H index cffcfb53e0..98f31d6aa8 100644 --- a/src/LESmodels/incompressible/GenSGSStress/GenSGSStress.H +++ b/src/turbulenceModels/LES/incompressible/GenSGSStress/GenSGSStress.H @@ -47,7 +47,7 @@ SourceFiles namespace Foam { -namespace LESmodels +namespace LES { /*---------------------------------------------------------------------------*\ @@ -67,7 +67,7 @@ class GenSGSStress protected: - dimensionedScalar ce_; + scalar ce_; scalar couplingFactor_; @@ -136,7 +136,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/LESmodels/incompressible/LESmodel/LESmodel.C b/src/turbulenceModels/LES/incompressible/LESmodel/LESmodel.C similarity index 89% rename from src/LESmodels/incompressible/LESmodel/LESmodel.C rename to src/turbulenceModels/LES/incompressible/LESmodel/LESmodel.C index 0d6dd2a5c9..5d045df287 100644 --- a/src/LESmodels/incompressible/LESmodel/LESmodel.C +++ b/src/turbulenceModels/LES/incompressible/LESmodel/LESmodel.C @@ -37,7 +37,19 @@ namespace Foam defineTypeNameAndDebug(LESmodel, 0); defineRunTimeSelectionTable(LESmodel, dictionary); -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // + +void LESmodel::printCoeffs() +{ + if (printCoeffs_) + { + Info<< type() << "Coeffs" << nl + << LESmodelProperties_; + } +} + + +// * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * * // LESmodel::LESmodel ( @@ -66,6 +78,8 @@ LESmodel::LESmodel phi_(phi), transport_(transport), + printCoeffs_(lookupOrDefault("printCoeffs", false)), + LESmodelProperties_(subDict(type + "Coeffs")), k0_("k0", dimVelocity*dimVelocity, SMALL), diff --git a/src/LESmodels/incompressible/LESmodel/LESmodel.H b/src/turbulenceModels/LES/incompressible/LESmodel/LESmodel.H similarity index 97% rename from src/LESmodels/incompressible/LESmodel/LESmodel.H rename to src/turbulenceModels/LES/incompressible/LESmodel/LESmodel.H index b0c89c26c2..2853e66d2d 100644 --- a/src/LESmodels/incompressible/LESmodel/LESmodel.H +++ b/src/turbulenceModels/LES/incompressible/LESmodel/LESmodel.H @@ -91,6 +91,7 @@ private: transportModel& transport_; + Switch printCoeffs_; dictionary LESmodelProperties_; dimensionedScalar k0_; @@ -105,6 +106,14 @@ private: LESmodel& operator=(const LESmodel&); +protected: + + // Protected member functions + + //- Print model coefficients + virtual void printCoeffs(); + + public: //- Runtime type information @@ -180,7 +189,7 @@ public: //- Access the dictionary which provides info. about choice of // models, and all related data (particularly model coefficients). - inline const dictionary& LESmodelProperties() + inline dictionary& LESmodelProperties() { return LESmodelProperties_; } diff --git a/src/LESmodels/incompressible/LESmodel/newLESmodel.C b/src/turbulenceModels/LES/incompressible/LESmodel/newLESmodel.C similarity index 100% rename from src/LESmodels/incompressible/LESmodel/newLESmodel.C rename to src/turbulenceModels/LES/incompressible/LESmodel/newLESmodel.C diff --git a/src/LESmodels/incompressible/LRRDiffStress/LRRDiffStress.C b/src/turbulenceModels/LES/incompressible/LRRDiffStress/LRRDiffStress.C similarity index 79% rename from src/LESmodels/incompressible/LRRDiffStress/LRRDiffStress.C rename to src/turbulenceModels/LES/incompressible/LRRDiffStress/LRRDiffStress.C index e05aa67a97..c7ef99d910 100644 --- a/src/LESmodels/incompressible/LRRDiffStress/LRRDiffStress.C +++ b/src/turbulenceModels/LES/incompressible/LRRDiffStress/LRRDiffStress.C @@ -31,7 +31,7 @@ License namespace Foam { -namespace LESmodels +namespace LES { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -52,10 +52,12 @@ LRRDiffStress::LRRDiffStress LESmodel(typeName, U, phi, transport), GenSGSStress(U, phi, transport), - ck_(LESmodelProperties().lookup("ck")), - c1_(LESmodelProperties().lookup("c1")), - c2_(LESmodelProperties().lookup("c2")) -{} + ck_(LESmodelProperties().lookupOrAddDefault("ck", 0.09)), + c1_(LESmodelProperties().lookupOrAddDefault("c1", 1.8)), + c2_(LESmodelProperties().lookupOrAddDefault("c2", 0.6)) +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -91,12 +93,12 @@ void LRRDiffStress::correct(const tmp& tgradU) forAll(B_, celli) { - B_[celli].component(tensor::XX) = - max(B_[celli].component(tensor::XX), k0().value()); - B_[celli].component(tensor::YY) = - max(B_[celli].component(tensor::YY), k0().value()); - B_[celli].component(tensor::ZZ) = - max(B_[celli].component(tensor::ZZ), k0().value()); + B_[celli].component(symmTensor::XX) = + max(B_[celli].component(symmTensor::XX), k0().value()); + B_[celli].component(symmTensor::YY) = + max(B_[celli].component(symmTensor::YY), k0().value()); + B_[celli].component(symmTensor::ZZ) = + max(B_[celli].component(symmTensor::ZZ), k0().value()); } K = 0.5*tr(B_); @@ -111,9 +113,9 @@ bool LRRDiffStress::read() { if (GenSGSStress::read()) { - LESmodelProperties().lookup("ck") >> ck_; - LESmodelProperties().lookup("c1") >> c1_; - LESmodelProperties().lookup("c2") >> c2_; + LESmodelProperties().readIfPresent("ck", ck_); + LESmodelProperties().readIfPresent("c1", c1_); + LESmodelProperties().readIfPresent("c2", c2_); return true; } @@ -126,7 +128,7 @@ bool LRRDiffStress::read() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // ************************************************************************* // diff --git a/src/LESmodels/incompressible/LRRDiffStress/LRRDiffStress.H b/src/turbulenceModels/LES/incompressible/LRRDiffStress/LRRDiffStress.H similarity index 96% rename from src/LESmodels/incompressible/LRRDiffStress/LRRDiffStress.H rename to src/turbulenceModels/LES/incompressible/LRRDiffStress/LRRDiffStress.H index 9d9c337c19..f9e5c057b8 100644 --- a/src/LESmodels/incompressible/LRRDiffStress/LRRDiffStress.H +++ b/src/turbulenceModels/LES/incompressible/LRRDiffStress/LRRDiffStress.H @@ -58,7 +58,7 @@ SourceFiles namespace Foam { -namespace LESmodels +namespace LES { /*---------------------------------------------------------------------------*\ @@ -71,9 +71,9 @@ class LRRDiffStress { // Private data - dimensionedScalar ck_; - dimensionedScalar c1_; - dimensionedScalar c2_; + scalar ck_; + scalar c1_; + scalar c2_; // Private Member Functions @@ -126,7 +126,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/LESmodels/incompressible/Make/files b/src/turbulenceModels/LES/incompressible/Make/files similarity index 100% rename from src/LESmodels/incompressible/Make/files rename to src/turbulenceModels/LES/incompressible/Make/files diff --git a/src/LESmodels/incompressible/Make/options b/src/turbulenceModels/LES/incompressible/Make/options similarity index 56% rename from src/LESmodels/incompressible/Make/options rename to src/turbulenceModels/LES/incompressible/Make/options index 0db4c24961..a2991710f1 100644 --- a/src/LESmodels/incompressible/Make/options +++ b/src/turbulenceModels/LES/incompressible/Make/options @@ -1,8 +1,8 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/LESmodels/LESdeltas/lnInclude \ - -I$(LIB_SRC)/LESmodels/LESfilters/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I../LESdeltas/lnInclude \ + -I../LESfilters/lnInclude \ -I$(LIB_SRC)/transportModels LIB_LIBS = \ diff --git a/src/LESmodels/incompressible/Smagorinsky/Smagorinsky.C b/src/turbulenceModels/LES/incompressible/Smagorinsky/Smagorinsky.C similarity index 93% rename from src/LESmodels/incompressible/Smagorinsky/Smagorinsky.C rename to src/turbulenceModels/LES/incompressible/Smagorinsky/Smagorinsky.C index b83e306902..ff626ed7b6 100644 --- a/src/LESmodels/incompressible/Smagorinsky/Smagorinsky.C +++ b/src/turbulenceModels/LES/incompressible/Smagorinsky/Smagorinsky.C @@ -31,7 +31,7 @@ License namespace Foam { -namespace LESmodels +namespace LES { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -51,7 +51,7 @@ Smagorinsky::Smagorinsky LESmodel(typeName, U, phi, transport), GenEddyVisc(U, phi, transport), - ck_(LESmodelProperties().lookup("ck")) + ck_(LESmodelProperties().lookupOrAddDefault("ck", 0.094)) {} @@ -70,7 +70,7 @@ bool Smagorinsky::read() { if (GenEddyVisc::read()) { - LESmodelProperties().lookup("ck") >> ck_; + LESmodelProperties().readIfPresent("ck", ck_); return true; } @@ -83,7 +83,7 @@ bool Smagorinsky::read() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // ************************************************************************* // diff --git a/src/LESmodels/incompressible/Smagorinsky/Smagorinsky.H b/src/turbulenceModels/LES/incompressible/Smagorinsky/Smagorinsky.H similarity index 97% rename from src/LESmodels/incompressible/Smagorinsky/Smagorinsky.H rename to src/turbulenceModels/LES/incompressible/Smagorinsky/Smagorinsky.H index d3419ea74e..9464b9b481 100644 --- a/src/LESmodels/incompressible/Smagorinsky/Smagorinsky.H +++ b/src/turbulenceModels/LES/incompressible/Smagorinsky/Smagorinsky.H @@ -57,7 +57,7 @@ SourceFiles namespace Foam { -namespace LESmodels +namespace LES { /*---------------------------------------------------------------------------*\ @@ -70,7 +70,7 @@ class Smagorinsky { // Private data - dimensionedScalar ck_; + scalar ck_; // Private Member Functions @@ -128,7 +128,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/LESmodels/incompressible/Smagorinsky2/Smagorinsky2.C b/src/turbulenceModels/LES/incompressible/Smagorinsky2/Smagorinsky2.C similarity index 93% rename from src/LESmodels/incompressible/Smagorinsky2/Smagorinsky2.C rename to src/turbulenceModels/LES/incompressible/Smagorinsky2/Smagorinsky2.C index e95ae845cb..dbb8dbce91 100644 --- a/src/LESmodels/incompressible/Smagorinsky2/Smagorinsky2.C +++ b/src/turbulenceModels/LES/incompressible/Smagorinsky2/Smagorinsky2.C @@ -31,7 +31,7 @@ License namespace Foam { -namespace LESmodels +namespace LES { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -51,8 +51,10 @@ Smagorinsky2::Smagorinsky2 LESmodel(typeName, U, phi, transport), Smagorinsky(U, phi, transport), - cD2_(LESmodelProperties().lookup("cD2")) -{} + cD2_(LESmodelProperties().lookupOrAddDefault("cD2", 0.02)) +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -92,7 +94,7 @@ bool Smagorinsky2::read() { if (Smagorinsky::read()) { - LESmodelProperties().lookup("cD2") >> cD2_; + LESmodelProperties().lookupOrDefault("cD2", cD2_); return true; } @@ -105,7 +107,7 @@ bool Smagorinsky2::read() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // ************************************************************************* // diff --git a/src/LESmodels/incompressible/Smagorinsky2/Smagorinsky2.H b/src/turbulenceModels/LES/incompressible/Smagorinsky2/Smagorinsky2.H similarity index 97% rename from src/LESmodels/incompressible/Smagorinsky2/Smagorinsky2.H rename to src/turbulenceModels/LES/incompressible/Smagorinsky2/Smagorinsky2.H index 41ce618016..3a682680fe 100644 --- a/src/LESmodels/incompressible/Smagorinsky2/Smagorinsky2.H +++ b/src/turbulenceModels/LES/incompressible/Smagorinsky2/Smagorinsky2.H @@ -56,7 +56,7 @@ SourceFiles namespace Foam { -namespace LESmodels +namespace LES { /*---------------------------------------------------------------------------*\ @@ -69,7 +69,7 @@ class Smagorinsky2 { // Private data - dimensionedScalar cD2_; + scalar cD2_; // Private Member Functions @@ -118,7 +118,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/LESmodels/incompressible/SpalartAllmaras/SpalartAllmaras.C b/src/turbulenceModels/LES/incompressible/SpalartAllmaras/SpalartAllmaras.C similarity index 79% rename from src/LESmodels/incompressible/SpalartAllmaras/SpalartAllmaras.C rename to src/turbulenceModels/LES/incompressible/SpalartAllmaras/SpalartAllmaras.C index 3c4c424b70..add91b8fb3 100644 --- a/src/LESmodels/incompressible/SpalartAllmaras/SpalartAllmaras.C +++ b/src/turbulenceModels/LES/incompressible/SpalartAllmaras/SpalartAllmaras.C @@ -32,7 +32,7 @@ License namespace Foam { -namespace LESmodels +namespace LES { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -101,17 +101,17 @@ SpalartAllmaras::SpalartAllmaras : LESmodel(typeName, U, phi, transport), - alphaNut_(LESmodelProperties().lookup("alphaNut")), - Cb1_(LESmodelProperties().lookup("Cb1")), - Cb2_(LESmodelProperties().lookup("Cb2")), - Cv1_(LESmodelProperties().lookup("Cv1")), - Cv2_(LESmodelProperties().lookup("Cv2")), - CDES_(LESmodelProperties().lookup("CDES")), - ck_(LESmodelProperties().lookup("ck")), - kappa_(lookup("kappa")), + alphaNut_(LESmodelProperties().lookupOrAddDefault("alphaNut", 1.5)), + Cb1_(LESmodelProperties().lookupOrAddDefault("Cb1", 0.1355)), + Cb2_(LESmodelProperties().lookupOrAddDefault("Cb2", 0.622)), + Cv1_(LESmodelProperties().lookupOrAddDefault("Cv1", 7.1)), + Cv2_(LESmodelProperties().lookupOrAddDefault("Cv2", 5.0)), + CDES_(LESmodelProperties().lookupOrAddDefault("CDES", 0.65)), + ck_(LESmodelProperties().lookupOrAddDefault("ck", 0.07)), + kappa_(lookupOrAddDefault("kappa", 0.4187)), Cw1_(Cb1_/sqr(kappa_) + alphaNut_*(1.0 + Cb2_)), - Cw2_(LESmodelProperties().lookup("Cw2")), - Cw3_(LESmodelProperties().lookup("Cw3")), + Cw2_(LESmodelProperties().lookupOrAddDefault("Cw2", 0.3)), + Cw3_(LESmodelProperties().lookupOrAddDefault("Cw3", 2.0)), nuTilda_ ( @@ -140,7 +140,9 @@ SpalartAllmaras::SpalartAllmaras ), mesh_ ) -{} +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -212,18 +214,18 @@ bool SpalartAllmaras::read() { if (LESmodel::read()) { - LESmodelProperties().lookup("alphaNut") >> alphaNut_; - LESmodelProperties().lookup("Cb1") >> Cb1_; - LESmodelProperties().lookup("Cb2") >> Cb2_; + LESmodelProperties().readIfPresent("alphaNut", alphaNut_); + LESmodelProperties().readIfPresent("Cb1", Cb1_); + LESmodelProperties().readIfPresent("Cb2", Cb2_); Cw1_ = Cb1_/sqr(kappa_) + alphaNut_*(1.0 + Cb2_); - LESmodelProperties().lookup("Cw2") >> Cw2_; - LESmodelProperties().lookup("Cw3") >> Cw3_; - LESmodelProperties().lookup("Cv1") >> Cv1_; - LESmodelProperties().lookup("Cv2") >> Cv2_; - LESmodelProperties().lookup("CDES") >> CDES_; - LESmodelProperties().lookup("ck") >> ck_; - lookup("kappa") >> kappa_; - + LESmodelProperties().readIfPresent("Cw2", Cw2_); + LESmodelProperties().readIfPresent("Cw3", Cw3_); + LESmodelProperties().readIfPresent("Cv1", Cv1_); + LESmodelProperties().readIfPresent("Cv2", Cv2_); + LESmodelProperties().readIfPresent("CDES", CDES_); + LESmodelProperties().readIfPresent("ck", ck_); + readIfPresent("kappa", kappa_); + return true; } else @@ -235,7 +237,7 @@ bool SpalartAllmaras::read() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // ************************************************************************* // diff --git a/src/LESmodels/incompressible/SpalartAllmaras/SpalartAllmaras.H b/src/turbulenceModels/LES/incompressible/SpalartAllmaras/SpalartAllmaras.H similarity index 89% rename from src/LESmodels/incompressible/SpalartAllmaras/SpalartAllmaras.H rename to src/turbulenceModels/LES/incompressible/SpalartAllmaras/SpalartAllmaras.H index 86ba82a7e0..459a9ab9db 100644 --- a/src/LESmodels/incompressible/SpalartAllmaras/SpalartAllmaras.H +++ b/src/turbulenceModels/LES/incompressible/SpalartAllmaras/SpalartAllmaras.H @@ -43,7 +43,7 @@ SourceFiles namespace Foam { -namespace LESmodels +namespace LES { /*---------------------------------------------------------------------------*\ @@ -56,18 +56,18 @@ class SpalartAllmaras { // Private data - dimensionedScalar alphaNut_; + scalar alphaNut_; - dimensionedScalar Cb1_; - dimensionedScalar Cb2_; - dimensionedScalar Cv1_; - dimensionedScalar Cv2_; - dimensionedScalar CDES_; - dimensionedScalar ck_; - dimensionedScalar kappa_; - dimensionedScalar Cw1_; - dimensionedScalar Cw2_; - dimensionedScalar Cw3_; + scalar Cb1_; + scalar Cb2_; + scalar Cv1_; + scalar Cv2_; + scalar CDES_; + scalar ck_; + scalar kappa_; + scalar Cw1_; + scalar Cw2_; + scalar Cw3_; // Private member functions @@ -79,7 +79,7 @@ class SpalartAllmaras // Disallow default bitwise copy construct and assignment SpalartAllmaras(const SpalartAllmaras&); - SpalartAllmaras& operator=(const SpalartAllmaras&); + SpalartAllmaras& operator=(const SpalartAllmaras&); volScalarField nuTilda_; volScalarField dTilda_; @@ -129,7 +129,7 @@ public: tmp nuSgs() const { return nuSgs_; - } + } //- Return the sub-grid stress tensor. tmp B() const; @@ -152,7 +152,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/LESmodels/incompressible/dynMixedSmagorinsky/dynMixedSmagorinsky.C b/src/turbulenceModels/LES/incompressible/dynMixedSmagorinsky/dynMixedSmagorinsky.C similarity index 98% rename from src/LESmodels/incompressible/dynMixedSmagorinsky/dynMixedSmagorinsky.C rename to src/turbulenceModels/LES/incompressible/dynMixedSmagorinsky/dynMixedSmagorinsky.C index 5780bbbb0c..f8eb662e2f 100644 --- a/src/LESmodels/incompressible/dynMixedSmagorinsky/dynMixedSmagorinsky.C +++ b/src/turbulenceModels/LES/incompressible/dynMixedSmagorinsky/dynMixedSmagorinsky.C @@ -31,7 +31,7 @@ License namespace Foam { -namespace LESmodels +namespace LES { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -51,7 +51,9 @@ dynMixedSmagorinsky::dynMixedSmagorinsky LESmodel(typeName, U, phi, transport), scaleSimilarity(U, phi, transport), dynSmagorinsky(U, phi, transport) -{} +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -131,7 +133,7 @@ bool dynMixedSmagorinsky::read() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // ************************************************************************* // diff --git a/src/LESmodels/incompressible/dynMixedSmagorinsky/dynMixedSmagorinsky.H b/src/turbulenceModels/LES/incompressible/dynMixedSmagorinsky/dynMixedSmagorinsky.H similarity index 98% rename from src/LESmodels/incompressible/dynMixedSmagorinsky/dynMixedSmagorinsky.H rename to src/turbulenceModels/LES/incompressible/dynMixedSmagorinsky/dynMixedSmagorinsky.H index 40bedf4243..b25ae74b62 100644 --- a/src/LESmodels/incompressible/dynMixedSmagorinsky/dynMixedSmagorinsky.H +++ b/src/turbulenceModels/LES/incompressible/dynMixedSmagorinsky/dynMixedSmagorinsky.H @@ -68,7 +68,7 @@ SourceFiles namespace Foam { -namespace LESmodels +namespace LES { /*---------------------------------------------------------------------------*\ @@ -137,7 +137,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/LESmodels/incompressible/dynOneEqEddy/dynOneEqEddy.C b/src/turbulenceModels/LES/incompressible/dynOneEqEddy/dynOneEqEddy.C similarity index 98% rename from src/LESmodels/incompressible/dynOneEqEddy/dynOneEqEddy.C rename to src/turbulenceModels/LES/incompressible/dynOneEqEddy/dynOneEqEddy.C index 68b2aac5fa..4c39778216 100644 --- a/src/LESmodels/incompressible/dynOneEqEddy/dynOneEqEddy.C +++ b/src/turbulenceModels/LES/incompressible/dynOneEqEddy/dynOneEqEddy.C @@ -31,7 +31,7 @@ License namespace Foam { -namespace LESmodels +namespace LES { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -117,7 +117,9 @@ dynOneEqEddy::dynOneEqEddy filterPtr_(LESfilter::New(U.mesh(), LESmodelProperties())), filter_(filterPtr_()) -{} +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // @@ -170,7 +172,7 @@ bool dynOneEqEddy::read() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // ************************************************************************* // diff --git a/src/LESmodels/incompressible/dynOneEqEddy/dynOneEqEddy.H b/src/turbulenceModels/LES/incompressible/dynOneEqEddy/dynOneEqEddy.H similarity index 98% rename from src/LESmodels/incompressible/dynOneEqEddy/dynOneEqEddy.H rename to src/turbulenceModels/LES/incompressible/dynOneEqEddy/dynOneEqEddy.H index 8618c220ad..84c8180233 100644 --- a/src/LESmodels/incompressible/dynOneEqEddy/dynOneEqEddy.H +++ b/src/turbulenceModels/LES/incompressible/dynOneEqEddy/dynOneEqEddy.H @@ -64,7 +64,7 @@ SourceFiles namespace Foam { -namespace LESmodels +namespace LES { /*---------------------------------------------------------------------------*\ @@ -142,7 +142,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/LESmodels/incompressible/dynSmagorinsky/dynSmagorinsky.C b/src/turbulenceModels/LES/incompressible/dynSmagorinsky/dynSmagorinsky.C similarity index 98% rename from src/LESmodels/incompressible/dynSmagorinsky/dynSmagorinsky.C rename to src/turbulenceModels/LES/incompressible/dynSmagorinsky/dynSmagorinsky.C index f541e1100f..85802cd231 100644 --- a/src/LESmodels/incompressible/dynSmagorinsky/dynSmagorinsky.C +++ b/src/turbulenceModels/LES/incompressible/dynSmagorinsky/dynSmagorinsky.C @@ -31,7 +31,7 @@ License namespace Foam { -namespace LESmodels +namespace LES { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -108,7 +108,9 @@ dynSmagorinsky::dynSmagorinsky filterPtr_(LESfilter::New(U.mesh(), LESmodelProperties())), filter_(filterPtr_()) -{} +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // @@ -150,7 +152,7 @@ bool dynSmagorinsky::read() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // ************************************************************************* // diff --git a/src/LESmodels/incompressible/dynSmagorinsky/dynSmagorinsky.H b/src/turbulenceModels/LES/incompressible/dynSmagorinsky/dynSmagorinsky.H similarity index 98% rename from src/LESmodels/incompressible/dynSmagorinsky/dynSmagorinsky.H rename to src/turbulenceModels/LES/incompressible/dynSmagorinsky/dynSmagorinsky.H index ccdbf5b48a..f4d44cf6e6 100644 --- a/src/LESmodels/incompressible/dynSmagorinsky/dynSmagorinsky.H +++ b/src/turbulenceModels/LES/incompressible/dynSmagorinsky/dynSmagorinsky.H @@ -73,7 +73,7 @@ SourceFiles namespace Foam { -namespace LESmodels +namespace LES { /*---------------------------------------------------------------------------*\ @@ -142,7 +142,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/LESmodels/incompressible/laminar/laminar.C b/src/turbulenceModels/LES/incompressible/laminar/laminar.C similarity index 98% rename from src/LESmodels/incompressible/laminar/laminar.C rename to src/turbulenceModels/LES/incompressible/laminar/laminar.C index 5d55ee8aea..92389fa94a 100644 --- a/src/LESmodels/incompressible/laminar/laminar.C +++ b/src/turbulenceModels/LES/incompressible/laminar/laminar.C @@ -32,7 +32,7 @@ License namespace Foam { -namespace LESmodels +namespace LES { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -157,7 +157,7 @@ bool laminar::read() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // ************************************************************************* // diff --git a/src/LESmodels/incompressible/laminar/laminar.H b/src/turbulenceModels/LES/incompressible/laminar/laminar.H similarity index 98% rename from src/LESmodels/incompressible/laminar/laminar.H rename to src/turbulenceModels/LES/incompressible/laminar/laminar.H index c65e7789e9..e4dc2fe252 100644 --- a/src/LESmodels/incompressible/laminar/laminar.H +++ b/src/turbulenceModels/LES/incompressible/laminar/laminar.H @@ -44,7 +44,7 @@ SourceFiles namespace Foam { -namespace LESmodels +namespace LES { /*---------------------------------------------------------------------------*\ @@ -117,7 +117,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/LESmodels/incompressible/locDynOneEqEddy/locDynOneEqEddy.C b/src/turbulenceModels/LES/incompressible/locDynOneEqEddy/locDynOneEqEddy.C similarity index 98% rename from src/LESmodels/incompressible/locDynOneEqEddy/locDynOneEqEddy.C rename to src/turbulenceModels/LES/incompressible/locDynOneEqEddy/locDynOneEqEddy.C index d84f1cd6c8..95c48f7fc7 100644 --- a/src/LESmodels/incompressible/locDynOneEqEddy/locDynOneEqEddy.C +++ b/src/turbulenceModels/LES/incompressible/locDynOneEqEddy/locDynOneEqEddy.C @@ -31,7 +31,7 @@ License namespace Foam { -namespace LESmodels +namespace LES { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -52,7 +52,7 @@ volScalarField locDynOneEqEddy::ck volSymmTensorField MM = simpleFilter_(-2.0*delta()*pow(KK, 0.5)*filter_(D)); - volScalarField ck = + volScalarField ck = simpleFilter_(0.5*(LL && MM)) /( simpleFilter_(magSqr(MM)) @@ -105,7 +105,9 @@ locDynOneEqEddy::locDynOneEqEddy simpleFilter_(U.mesh()), filterPtr_(LESfilter::New(U.mesh(), LESmodelProperties())), filter_(filterPtr_()) -{} +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // @@ -161,7 +163,7 @@ bool locDynOneEqEddy::read() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // ************************************************************************* // diff --git a/src/LESmodels/incompressible/locDynOneEqEddy/locDynOneEqEddy.H b/src/turbulenceModels/LES/incompressible/locDynOneEqEddy/locDynOneEqEddy.H similarity index 98% rename from src/LESmodels/incompressible/locDynOneEqEddy/locDynOneEqEddy.H rename to src/turbulenceModels/LES/incompressible/locDynOneEqEddy/locDynOneEqEddy.H index 391026bea5..8296e45f10 100644 --- a/src/LESmodels/incompressible/locDynOneEqEddy/locDynOneEqEddy.H +++ b/src/turbulenceModels/LES/incompressible/locDynOneEqEddy/locDynOneEqEddy.H @@ -72,7 +72,7 @@ SourceFiles namespace Foam { -namespace LESmodels +namespace LES { /*---------------------------------------------------------------------------*\ @@ -160,7 +160,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/LESmodels/incompressible/mixedSmagorinsky/mixedSmagorinsky.C b/src/turbulenceModels/LES/incompressible/mixedSmagorinsky/mixedSmagorinsky.C similarity index 98% rename from src/LESmodels/incompressible/mixedSmagorinsky/mixedSmagorinsky.C rename to src/turbulenceModels/LES/incompressible/mixedSmagorinsky/mixedSmagorinsky.C index 3cf5e144d3..e9f7093ef3 100644 --- a/src/LESmodels/incompressible/mixedSmagorinsky/mixedSmagorinsky.C +++ b/src/turbulenceModels/LES/incompressible/mixedSmagorinsky/mixedSmagorinsky.C @@ -31,7 +31,7 @@ License namespace Foam { -namespace LESmodels +namespace LES { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -51,7 +51,9 @@ mixedSmagorinsky::mixedSmagorinsky LESmodel(typeName, U, phi, transport), scaleSimilarity(U, phi, transport), Smagorinsky(U, phi, transport) -{} +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -134,7 +136,7 @@ bool mixedSmagorinsky::read() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // ************************************************************************* // diff --git a/src/LESmodels/incompressible/mixedSmagorinsky/mixedSmagorinsky.H b/src/turbulenceModels/LES/incompressible/mixedSmagorinsky/mixedSmagorinsky.H similarity index 98% rename from src/LESmodels/incompressible/mixedSmagorinsky/mixedSmagorinsky.H rename to src/turbulenceModels/LES/incompressible/mixedSmagorinsky/mixedSmagorinsky.H index 1cd7115f21..f6d95f3ee9 100644 --- a/src/LESmodels/incompressible/mixedSmagorinsky/mixedSmagorinsky.H +++ b/src/turbulenceModels/LES/incompressible/mixedSmagorinsky/mixedSmagorinsky.H @@ -67,7 +67,7 @@ SourceFiles namespace Foam { -namespace LESmodels +namespace LES { /*---------------------------------------------------------------------------*\ @@ -143,7 +143,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/LESmodels/incompressible/oneEqEddy/oneEqEddy.C b/src/turbulenceModels/LES/incompressible/oneEqEddy/oneEqEddy.C similarity index 93% rename from src/LESmodels/incompressible/oneEqEddy/oneEqEddy.C rename to src/turbulenceModels/LES/incompressible/oneEqEddy/oneEqEddy.C index 97156edec5..828d43cedd 100644 --- a/src/LESmodels/incompressible/oneEqEddy/oneEqEddy.C +++ b/src/turbulenceModels/LES/incompressible/oneEqEddy/oneEqEddy.C @@ -31,7 +31,7 @@ License namespace Foam { -namespace LESmodels +namespace LES { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -64,8 +64,10 @@ oneEqEddy::oneEqEddy mesh_ ), - ck_(LESmodelProperties().lookup("ck")) -{} + ck_(LESmodelProperties().lookupOrAddDefault("ck", 0.094)) +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -97,7 +99,7 @@ bool oneEqEddy::read() { if (GenEddyVisc::read()) { - LESmodelProperties().lookup("ck") >> ck_; + LESmodelProperties().readIfPresent("ck", ck_); return true; } @@ -110,7 +112,7 @@ bool oneEqEddy::read() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // ************************************************************************* // diff --git a/src/LESmodels/incompressible/oneEqEddy/oneEqEddy.H b/src/turbulenceModels/LES/incompressible/oneEqEddy/oneEqEddy.H similarity index 97% rename from src/LESmodels/incompressible/oneEqEddy/oneEqEddy.H rename to src/turbulenceModels/LES/incompressible/oneEqEddy/oneEqEddy.H index 6067c8c65c..ea6395c091 100644 --- a/src/LESmodels/incompressible/oneEqEddy/oneEqEddy.H +++ b/src/turbulenceModels/LES/incompressible/oneEqEddy/oneEqEddy.H @@ -61,7 +61,7 @@ SourceFiles namespace Foam { -namespace LESmodels +namespace LES { /*---------------------------------------------------------------------------*\ @@ -76,7 +76,7 @@ class oneEqEddy volScalarField k_; - dimensionedScalar ck_; + scalar ck_; // Private Member Functions @@ -135,7 +135,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/LESmodels/incompressible/scaleSimilarity/scaleSimilarity.C b/src/turbulenceModels/LES/incompressible/scaleSimilarity/scaleSimilarity.C similarity index 98% rename from src/LESmodels/incompressible/scaleSimilarity/scaleSimilarity.C rename to src/turbulenceModels/LES/incompressible/scaleSimilarity/scaleSimilarity.C index 7650e20624..fab13467a9 100644 --- a/src/LESmodels/incompressible/scaleSimilarity/scaleSimilarity.C +++ b/src/turbulenceModels/LES/incompressible/scaleSimilarity/scaleSimilarity.C @@ -30,7 +30,7 @@ License namespace Foam { -namespace LESmodels +namespace LES { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -49,7 +49,9 @@ scaleSimilarity::scaleSimilarity LESmodel(typeName, U, phi, transport), filterPtr_(LESfilter::New(U.mesh(), LESmodelProperties())), filter_(filterPtr_()) -{} +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // @@ -113,7 +115,7 @@ bool scaleSimilarity::read() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // ************************************************************************* // diff --git a/src/LESmodels/incompressible/scaleSimilarity/scaleSimilarity.H b/src/turbulenceModels/LES/incompressible/scaleSimilarity/scaleSimilarity.H similarity index 98% rename from src/LESmodels/incompressible/scaleSimilarity/scaleSimilarity.H rename to src/turbulenceModels/LES/incompressible/scaleSimilarity/scaleSimilarity.H index f909228f2b..71f8f3b4cc 100644 --- a/src/LESmodels/incompressible/scaleSimilarity/scaleSimilarity.H +++ b/src/turbulenceModels/LES/incompressible/scaleSimilarity/scaleSimilarity.H @@ -47,7 +47,7 @@ SourceFiles namespace Foam { -namespace LESmodels +namespace LES { /*---------------------------------------------------------------------------*\ @@ -121,7 +121,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/LESmodels/incompressible/spectEddyVisc/spectEddyVisc.C b/src/turbulenceModels/LES/incompressible/spectEddyVisc/spectEddyVisc.C similarity index 80% rename from src/LESmodels/incompressible/spectEddyVisc/spectEddyVisc.C rename to src/turbulenceModels/LES/incompressible/spectEddyVisc/spectEddyVisc.C index 8a5c78ff2b..da16b1a604 100644 --- a/src/LESmodels/incompressible/spectEddyVisc/spectEddyVisc.C +++ b/src/turbulenceModels/LES/incompressible/spectEddyVisc/spectEddyVisc.C @@ -31,7 +31,7 @@ License namespace Foam { -namespace LESmodels +namespace LES { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -52,12 +52,14 @@ spectEddyVisc::spectEddyVisc LESmodel(typeName, U, phi, transport), GenEddyVisc(U, phi, transport), - cB_(LESmodelProperties().lookup("cB")), - cK1_(LESmodelProperties().lookup("cK1")), - cK2_(LESmodelProperties().lookup("cK2")), - cK3_(LESmodelProperties().lookup("cK3")), - cK4_(LESmodelProperties().lookup("cK4")) -{} + cB_(LESmodelProperties().lookupOrAddDefault("cB", 8.22)), + cK1_(LESmodelProperties().lookupOrAddDefault("cK1", 0.83)), + cK2_(LESmodelProperties().lookupOrAddDefault("cK2", 1.03)), + cK3_(LESmodelProperties().lookupOrAddDefault("cK3", 4.75)), + cK4_(LESmodelProperties().lookupOrAddDefault("cK4", 2.55)) +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -82,7 +84,7 @@ void spectEddyVisc::correct(const tmp& gradU) for (label i=0; i<5; i++) { - nuSgs_ = + nuSgs_ = nu() /( scalar(1) @@ -98,11 +100,11 @@ bool spectEddyVisc::read() { if (GenEddyVisc::read()) { - LESmodelProperties().lookup("cB") >> cB_; - LESmodelProperties().lookup("cK1") >> cK1_; - LESmodelProperties().lookup("cK2") >> cK2_; - LESmodelProperties().lookup("cK3") >> cK3_; - LESmodelProperties().lookup("cK4") >> cK4_; + LESmodelProperties().readIfPresent("cB", cB_); + LESmodelProperties().readIfPresent("cK1", cK1_); + LESmodelProperties().readIfPresent("cK2", cK2_); + LESmodelProperties().readIfPresent("cK3", cK3_); + LESmodelProperties().readIfPresent("cK4", cK4_); return true; } @@ -115,7 +117,7 @@ bool spectEddyVisc::read() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // ************************************************************************* // diff --git a/src/LESmodels/incompressible/spectEddyVisc/spectEddyVisc.H b/src/turbulenceModels/LES/incompressible/spectEddyVisc/spectEddyVisc.H similarity index 94% rename from src/LESmodels/incompressible/spectEddyVisc/spectEddyVisc.H rename to src/turbulenceModels/LES/incompressible/spectEddyVisc/spectEddyVisc.H index 284b9f6f3a..928798d406 100644 --- a/src/LESmodels/incompressible/spectEddyVisc/spectEddyVisc.H +++ b/src/turbulenceModels/LES/incompressible/spectEddyVisc/spectEddyVisc.H @@ -61,7 +61,7 @@ SourceFiles namespace Foam { -namespace LESmodels +namespace LES { /*---------------------------------------------------------------------------*\ @@ -74,11 +74,11 @@ class spectEddyVisc { // Private data - dimensionedScalar cB_; - dimensionedScalar cK1_; - dimensionedScalar cK2_; - dimensionedScalar cK3_; - dimensionedScalar cK4_; + scalar cB_; + scalar cK1_; + scalar cK2_; + scalar cK3_; + scalar cK4_; // Private Member Functions @@ -125,7 +125,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/LESmodels/incompressible/vanDriestDelta/vanDriestDelta.C b/src/turbulenceModels/LES/incompressible/vanDriestDelta/vanDriestDelta.C similarity index 89% rename from src/LESmodels/incompressible/vanDriestDelta/vanDriestDelta.C rename to src/turbulenceModels/LES/incompressible/vanDriestDelta/vanDriestDelta.C index bdc974b2c0..96916c20e7 100644 --- a/src/LESmodels/incompressible/vanDriestDelta/vanDriestDelta.C +++ b/src/turbulenceModels/LES/incompressible/vanDriestDelta/vanDriestDelta.C @@ -35,7 +35,7 @@ License namespace Foam { -namespace LESmodels +namespace LES { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -105,15 +105,14 @@ vanDriestDelta::vanDriestDelta ( LESdelta::New("geometricDelta", mesh, dd.subDict(type() + "Coeffs")) ), - kappa_(dimensionedScalar(dd.lookup("kappa")).value()), + kappa_(dd.lookupOrDefault("kappa", 0.4187)), Aplus_ ( - dimensionedScalar(dd.subDict(type() + "Coeffs").lookup("Aplus")).value() + dd.subDict(type() + "Coeffs").lookupOrDefault("Aplus", 26.0) ), Cdelta_ ( - dimensionedScalar(dd.subDict(type() + "Coeffs").lookup("Cdelta")) - .value() + dd.subDict(type() + "Coeffs").lookupOrDefault("Cdelta", 0.158) ) { delta_ = geometricDelta_(); @@ -127,9 +126,9 @@ void vanDriestDelta::read(const dictionary& d) const dictionary& dd(d.subDict(type() + "Coeffs")); geometricDelta_().read(dd); - kappa_ = dimensionedScalar(d.lookup("kappa")).value(); - Aplus_ = dimensionedScalar(dd.lookup("Aplus")).value(); - Cdelta_ = dimensionedScalar(dd.lookup("Cdelta")).value(); + d.readIfPresent("kappa", kappa_); + dd.readIfPresent("Aplus", Aplus_); + dd.readIfPresent("Cdelta", Cdelta_); calcDelta(); } @@ -143,7 +142,7 @@ void vanDriestDelta::correct() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // ************************************************************************* // diff --git a/src/LESmodels/incompressible/vanDriestDelta/vanDriestDelta.H b/src/turbulenceModels/LES/incompressible/vanDriestDelta/vanDriestDelta.H similarity index 98% rename from src/LESmodels/incompressible/vanDriestDelta/vanDriestDelta.H rename to src/turbulenceModels/LES/incompressible/vanDriestDelta/vanDriestDelta.H index 98302062c6..ff96b5aaf5 100644 --- a/src/LESmodels/incompressible/vanDriestDelta/vanDriestDelta.H +++ b/src/turbulenceModels/LES/incompressible/vanDriestDelta/vanDriestDelta.H @@ -42,7 +42,7 @@ SourceFiles namespace Foam { -namespace LESmodels +namespace LES { /*---------------------------------------------------------------------------*\ @@ -101,7 +101,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/LESmodels/incompressible/wallFunc/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C b/src/turbulenceModels/LES/incompressible/wallFunc/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C similarity index 99% rename from src/LESmodels/incompressible/wallFunc/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/LES/incompressible/wallFunc/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C index e8ec8c7b9f..1c39967b7e 100644 --- a/src/LESmodels/incompressible/wallFunc/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/LES/incompressible/wallFunc/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C @@ -34,7 +34,7 @@ License namespace Foam { -namespace LESmodels +namespace LES { // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -171,7 +171,7 @@ makePatchTypeField(fvPatchScalarField, nuSgsWallFunctionFvPatchScalarField); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // ************************************************************************* // diff --git a/src/LESmodels/incompressible/wallFunc/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.H b/src/turbulenceModels/LES/incompressible/wallFunc/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.H similarity index 98% rename from src/LESmodels/incompressible/wallFunc/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/LES/incompressible/wallFunc/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.H index 66297125eb..5bf9968fe5 100644 --- a/src/LESmodels/incompressible/wallFunc/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/LES/incompressible/wallFunc/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.H @@ -42,7 +42,7 @@ SourceFiles namespace Foam { -namespace LESmodels +namespace LES { /*---------------------------------------------------------------------------*\ @@ -138,7 +138,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESmodels +} // End namespace LES } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/RAS/Allwmake b/src/turbulenceModels/RAS/Allwmake new file mode 100755 index 0000000000..5ccba2b371 --- /dev/null +++ b/src/turbulenceModels/RAS/Allwmake @@ -0,0 +1,5 @@ +#!/bin/sh +set -x + +wmake libso incompressible +wmake libso compressible diff --git a/src/turbulenceModels/compressible/LRR/LRR.C b/src/turbulenceModels/RAS/compressible/LRR/LRR.C similarity index 77% rename from src/turbulenceModels/compressible/LRR/LRR.C rename to src/turbulenceModels/RAS/compressible/LRR/LRR.C index 380baf2d6d..d2953fd33e 100644 --- a/src/turbulenceModels/compressible/LRR/LRR.C +++ b/src/turbulenceModels/RAS/compressible/LRR/LRR.C @@ -34,13 +34,13 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // defineTypeNameAndDebug(LRR, 0); -addToRunTimeSelectionTable(turbulenceModel, LRR, dictionary); +addToRunTimeSelectionTable(RASmodel, LRR, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -53,19 +53,25 @@ LRR::LRR basicThermo& thermophysicalModel ) : - turbulenceModel(typeName, rho, U, phi, thermophysicalModel), + RASmodel(typeName, rho, U, phi, thermophysicalModel), - Cmu(turbulenceModelCoeffs_.lookup("Cmu")), - Clrr1(turbulenceModelCoeffs_.lookup("Clrr1")), - Clrr2(turbulenceModelCoeffs_.lookup("Clrr2")), - C1(turbulenceModelCoeffs_.lookup("C1")), - C2(turbulenceModelCoeffs_.lookup("C2")), - Cs(turbulenceModelCoeffs_.lookup("Cs")), - Ceps(turbulenceModelCoeffs_.lookup("Ceps")), - couplingFactor_(0.0), - alphaR(turbulenceModelCoeffs_.lookup("alphaR")), - alphaEps(turbulenceModelCoeffs_.lookup("alphaEps")), - alphah(turbulenceModelCoeffs_.lookup("alphah")), + Cmu(RASmodelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), + Clrr1(RASmodelCoeffs_.lookupOrAddDefault("Clrr1", 1.8)), + Clrr2(RASmodelCoeffs_.lookupOrAddDefault("Clrr2", 0.6)), + C1(RASmodelCoeffs_.lookupOrAddDefault("C1", 1.44)), + C2(RASmodelCoeffs_.lookupOrAddDefault("C2", 1.92)), + Cs(RASmodelCoeffs_.lookupOrAddDefault("Cs", 0.25)), + Ceps(RASmodelCoeffs_.lookupOrAddDefault("Ceps", 0.15)), + couplingFactor_ + ( + RASmodelCoeffs_.lookupOrAddDefault("couplingFactor", 0.0) + ), + alphaR(RASmodelCoeffs_.lookupOrAddDefault("alphaR", 1.22)), + alphaEps + ( + RASmodelCoeffs_.lookupOrAddDefault("alphaEps", 0.76923) + ), + alphah(RASmodelCoeffs_.lookupOrAddDefault("alphah", 1.0)), R_ ( @@ -121,22 +127,19 @@ LRR::LRR { # include "wallViscosityI.H" - if (turbulenceModelCoeffs_.found("couplingFactor")) + if (couplingFactor_ < 0.0 || couplingFactor_ > 1.0) { - turbulenceModelCoeffs_.lookup("couplingFactor") >> couplingFactor_; - - if (couplingFactor_ < 0.0 || couplingFactor_ > 1.0) - { - FatalErrorIn - ( - "LRR::LRR" - "(const volVectorField& U, const surfaceScalarField& phi," - "incompressibleTransportModel& lamTransportModel)" - ) << "couplingFactor = " << couplingFactor_ - << " is not in range 0 - 1" - << exit(FatalError); - } + FatalErrorIn + ( + "LRR::LRR" + "(const volVectorField& U, const surfaceScalarField& phi," + "incompressibleTransportModel& lamTransportModel)" + ) << "couplingFactor = " << couplingFactor_ + << " is not in range 0 - 1" << nl + << exit(FatalError); } + + printCoeffs(); } @@ -189,26 +192,29 @@ tmp LRR::divDevRhoReff(volVectorField& U) const bool LRR::read() { - if (turbulenceModel::read()) + if (RASmodel::read()) { - turbulenceModelCoeffs_.lookup("Cmu") >> Cmu; - turbulenceModelCoeffs_.lookup("Clrr1") >> Clrr1; - turbulenceModelCoeffs_.lookup("Clrr2") >> Clrr2; - turbulenceModelCoeffs_.lookup("C1") >> C1; - turbulenceModelCoeffs_.lookup("C2") >> C2; - turbulenceModelCoeffs_.lookup("Cs") >> Cs; - turbulenceModelCoeffs_.lookup("Ceps") >> Ceps; - turbulenceModelCoeffs_.lookup("alphaR") >> alphaR; - turbulenceModelCoeffs_.lookup("alphaEps") >> alphaEps; - turbulenceModelCoeffs_.lookup("alphah") >> alphah; - - turbulenceModelCoeffs_.lookup("couplingFactor") >> couplingFactor_; + RASmodelCoeffs_.readIfPresent("Cmu", Cmu); + RASmodelCoeffs_.readIfPresent("Clrr1", Clrr1); + RASmodelCoeffs_.readIfPresent("Clrr2", Clrr2); + RASmodelCoeffs_.readIfPresent("C1", C1); + RASmodelCoeffs_.readIfPresent("C2", C2); + RASmodelCoeffs_.readIfPresent("Cs", Cs); + RASmodelCoeffs_.readIfPresent("Ceps", Ceps); + RASmodelCoeffs_.readIfPresent("alphaR", alphaR); + RASmodelCoeffs_.readIfPresent("alphaEps", alphaEps); + RASmodelCoeffs_.readIfPresent("alphah", alphah); + RASmodelCoeffs_.readIfPresent + ( + "couplingFactor", + couplingFactor_ + ); if (couplingFactor_ < 0.0 || couplingFactor_ > 1.0) { FatalErrorIn("LRR::read()") << "couplingFactor = " << couplingFactor_ - << " is not in range 0 - 1" + << " is not in range 0 - 1" << nl << exit(FatalError); } @@ -230,7 +236,7 @@ void LRR::correct() return; } - turbulenceModel::correct(); + RASmodel::correct(); volSymmTensorField P = -twoSymm(R_ & fvc::grad(U_)); volScalarField G = 0.5*tr(P); @@ -360,7 +366,7 @@ void LRR::correct() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS } // End namespace compressible } // End namespace Foam diff --git a/src/turbulenceModels/compressible/LRR/LRR.H b/src/turbulenceModels/RAS/compressible/LRR/LRR.H similarity index 87% rename from src/turbulenceModels/compressible/LRR/LRR.H rename to src/turbulenceModels/RAS/compressible/LRR/LRR.H index 772016594f..1c6dcf4888 100644 --- a/src/turbulenceModels/compressible/LRR/LRR.H +++ b/src/turbulenceModels/RAS/compressible/LRR/LRR.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::compressible::turbulenceModels::LRR + Foam::compressible::RAS::LRR Description Launder, Reece and Rodi Reynolds-stress turbulence model for @@ -38,7 +38,7 @@ SourceFiles #ifndef compressibleLRR_H #define compressibleLRR_H -#include "turbulenceModel.H" +#include "RASmodel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -46,7 +46,7 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -55,25 +55,25 @@ namespace turbulenceModels class LRR : - public turbulenceModel + public RASmodel { // Private data - dimensionedScalar Cmu; + scalar Cmu; - dimensionedScalar Clrr1; - dimensionedScalar Clrr2; + scalar Clrr1; + scalar Clrr2; - dimensionedScalar C1; - dimensionedScalar C2; - dimensionedScalar Cs; - dimensionedScalar Ceps; + scalar C1; + scalar C2; + scalar Cs; + scalar Ceps; scalar couplingFactor_; - dimensionedScalar alphaR; - dimensionedScalar alphaEps; - dimensionedScalar alphah; + scalar alphaR; + scalar alphaEps; + scalar alphah; volSymmTensorField R_; volScalarField k_; @@ -114,7 +114,7 @@ public: //- Return the effective diffusivity for R tmp DREff() const { - return tmp + return tmp ( new volScalarField("DREff", alphaR*mut_ + mu()) ); @@ -123,7 +123,7 @@ public: //- Return the effective diffusivity for epsilon tmp DepsilonEff() const { - return tmp + return tmp ( new volScalarField("DepsilonEff", alphaEps*mut_ + mu()) ); @@ -132,7 +132,7 @@ public: //- Return the effective turbulent thermal diffusivity tmp alphaEff() const { - return tmp + return tmp ( new volScalarField("alphaEff", alphah*mut_ + alpha()) ); @@ -172,7 +172,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS } // End namespace compressible } // End namespace Foam diff --git a/src/turbulenceModels/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C b/src/turbulenceModels/RAS/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C similarity index 76% rename from src/turbulenceModels/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C rename to src/turbulenceModels/RAS/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C index da59204bd1..cfc478e966 100644 --- a/src/turbulenceModels/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C +++ b/src/turbulenceModels/RAS/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C @@ -36,13 +36,13 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // defineTypeNameAndDebug(LaunderGibsonRSTM, 0); -addToRunTimeSelectionTable(turbulenceModel, LaunderGibsonRSTM, dictionary); +addToRunTimeSelectionTable(RASmodel, LaunderGibsonRSTM, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -55,21 +55,27 @@ LaunderGibsonRSTM::LaunderGibsonRSTM basicThermo& thermophysicalModel ) : - turbulenceModel(typeName, rho, U, phi, thermophysicalModel), + RASmodel(typeName, rho, U, phi, thermophysicalModel), - Cmu(turbulenceModelCoeffs_.lookup("Cmu")), - Clg1(turbulenceModelCoeffs_.lookup("Clg1")), - Clg2(turbulenceModelCoeffs_.lookup("Clg2")), - C1(turbulenceModelCoeffs_.lookup("C1")), - C2(turbulenceModelCoeffs_.lookup("C2")), - Cs(turbulenceModelCoeffs_.lookup("Cs")), - Ceps(turbulenceModelCoeffs_.lookup("Ceps")), - C1Ref(turbulenceModelCoeffs_.lookup("C1Ref")), - C2Ref(turbulenceModelCoeffs_.lookup("C2Ref")), - couplingFactor_(0.0), - alphaR(turbulenceModelCoeffs_.lookup("alphaR")), - alphaEps(turbulenceModelCoeffs_.lookup("alphaEps")), - alphah(turbulenceModelCoeffs_.lookup("alphah")), + Cmu(RASmodelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), + Clg1(RASmodelCoeffs_.lookupOrAddDefault("Clg1", 1.8)), + Clg2(RASmodelCoeffs_.lookupOrAddDefault("Clg2", 0.6)), + C1(RASmodelCoeffs_.lookupOrAddDefault("C1", 1.44)), + C2(RASmodelCoeffs_.lookupOrAddDefault("C2", 1.92)), + Cs(RASmodelCoeffs_.lookupOrAddDefault("Cs", 0.25)), + Ceps(RASmodelCoeffs_.lookupOrAddDefault("Ceps", 0.15)), + C1Ref(RASmodelCoeffs_.lookupOrAddDefault("C1Ref", 0.5)), + C2Ref(RASmodelCoeffs_.lookupOrAddDefault("C2Ref", 0.3)), + couplingFactor_ + ( + RASmodelCoeffs_.lookupOrAddDefault("couplingFactor", 0.0) + ), + alphaR(RASmodelCoeffs_.lookupOrAddDefault("alphaR", 1.22)), + alphaEps + ( + RASmodelCoeffs_.lookupOrAddDefault("alphaEps", 0.76923) + ), + alphah(RASmodelCoeffs_.lookupOrAddDefault("alphah", 1.0)), y_(mesh_), @@ -127,22 +133,19 @@ LaunderGibsonRSTM::LaunderGibsonRSTM { # include "wallViscosityI.H" - if (turbulenceModelCoeffs_.found("couplingFactor")) + if (couplingFactor_ < 0.0 || couplingFactor_ > 1.0) { - turbulenceModelCoeffs_.lookup("couplingFactor") >> couplingFactor_; - - if (couplingFactor_ < 0.0 || couplingFactor_ > 1.0) - { - FatalErrorIn - ( - "LaunderGibsonRSTM::LaunderGibsonRSTM" - "(const volVectorField& U, const surfaceScalarField& phi," - "incompressibleTransportModel& lamTransportModel)" - ) << "couplingFactor = " << couplingFactor_ - << " is not in range 0 - 1" - << exit(FatalError); - } + FatalErrorIn + ( + "LaunderGibsonRSTM::LaunderGibsonRSTM" + "(const volVectorField& U, const surfaceScalarField& phi," + "incompressibleTransportModel& lamTransportModel)" + ) << "couplingFactor = " << couplingFactor_ + << " is not in range 0 - 1" << nl + << exit(FatalError); } + + printCoeffs(); } @@ -195,28 +198,32 @@ tmp LaunderGibsonRSTM::divDevRhoReff(volVectorField& U) const bool LaunderGibsonRSTM::read() { - if (turbulenceModel::read()) + if (RASmodel::read()) { - turbulenceModelCoeffs_.lookup("Cmu") >> Cmu; - turbulenceModelCoeffs_.lookup("Clg1") >> Clg1; - turbulenceModelCoeffs_.lookup("Clg2") >> Clg2; - turbulenceModelCoeffs_.lookup("C1") >> C1; - turbulenceModelCoeffs_.lookup("C2") >> C2; - turbulenceModelCoeffs_.lookup("Cs") >> Cs; - turbulenceModelCoeffs_.lookup("Ceps") >> Ceps; - turbulenceModelCoeffs_.lookup("C1Ref") >> C1Ref; - turbulenceModelCoeffs_.lookup("C2Ref") >> C2Ref; - turbulenceModelCoeffs_.lookup("alphaR") >> alphaR; - turbulenceModelCoeffs_.lookup("alphaEps") >> alphaEps; - turbulenceModelCoeffs_.lookup("alphah") >> alphah; + RASmodelCoeffs_.readIfPresent("Cmu", Cmu); + RASmodelCoeffs_.readIfPresent("Clg1", Clg1); + RASmodelCoeffs_.readIfPresent("Clg2", Clg2); + RASmodelCoeffs_.readIfPresent("C1", C1); + RASmodelCoeffs_.readIfPresent("C2", C2); + RASmodelCoeffs_.readIfPresent("Cs", Cs); + RASmodelCoeffs_.readIfPresent("Ceps", Ceps); + RASmodelCoeffs_.readIfPresent("C1Ref", C1Ref); + RASmodelCoeffs_.readIfPresent("C2Ref", C2Ref); + RASmodelCoeffs_.readIfPresent("alphaR", alphaR); + RASmodelCoeffs_.readIfPresent("alphaEps", alphaEps); + RASmodelCoeffs_.readIfPresent("alphah", alphah); - turbulenceModelCoeffs_.lookup("couplingFactor") >> couplingFactor_; + RASmodelCoeffs_.readIfPresent + ( + "couplingFactor", + couplingFactor_ + ); if (couplingFactor_ < 0.0 || couplingFactor_ > 1.0) { FatalErrorIn("LaunderGibsonRSTM::read()") << "couplingFactor = " << couplingFactor_ - << " is not in range 0 - 1" + << " is not in range 0 - 1" << nl << exit(FatalError); } @@ -238,7 +245,7 @@ void LaunderGibsonRSTM::correct() return; } - turbulenceModel::correct(); + RASmodel::correct(); if (mesh_.changing()) { @@ -383,7 +390,7 @@ void LaunderGibsonRSTM::correct() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS } // End namespace compressible } // End namespace Foam diff --git a/src/turbulenceModels/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H b/src/turbulenceModels/RAS/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H similarity index 86% rename from src/turbulenceModels/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H rename to src/turbulenceModels/RAS/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H index c96037f420..3942243c9d 100644 --- a/src/turbulenceModels/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H +++ b/src/turbulenceModels/RAS/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::compressible::turbulenceModels::LaunderGibsonRSTM + Foam::compressible::RAS::LaunderGibsonRSTM Description Launder-Gibson Reynolds stress turbulence model for compressible flows. @@ -37,7 +37,7 @@ SourceFiles #ifndef compressibleLaunderGibsonRSTM_H #define compressibleLaunderGibsonRSTM_H -#include "turbulenceModel.H" +#include "RASmodel.H" #include "wallDistReflection.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -46,7 +46,7 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -55,28 +55,28 @@ namespace turbulenceModels class LaunderGibsonRSTM : - public turbulenceModel + public RASmodel { // Private data - dimensionedScalar Cmu; + scalar Cmu; - dimensionedScalar Clg1; - dimensionedScalar Clg2; + scalar Clg1; + scalar Clg2; - dimensionedScalar C1; - dimensionedScalar C2; - dimensionedScalar Cs; - dimensionedScalar Ceps; + scalar C1; + scalar C2; + scalar Cs; + scalar Ceps; - dimensionedScalar C1Ref; - dimensionedScalar C2Ref; + scalar C1Ref; + scalar C2Ref; scalar couplingFactor_; - dimensionedScalar alphaR; - dimensionedScalar alphaEps; - dimensionedScalar alphah; + scalar alphaR; + scalar alphaEps; + scalar alphah; wallDistReflection y_; @@ -121,7 +121,7 @@ public: //- Return the effective diffusivity for R tmp DREff() const { - return tmp + return tmp ( new volScalarField("DREff", alphaR*mut_ + mu()) ); @@ -130,7 +130,7 @@ public: //- Return the effective diffusivity for epsilon tmp DepsilonEff() const { - return tmp + return tmp ( new volScalarField("DepsilonEff", alphaEps*mut_ + mu()) ); @@ -139,7 +139,7 @@ public: //- Return the effective turbulent thermal diffusivity tmp alphaEff() const { - return tmp + return tmp ( new volScalarField("alphaEff", alphah*mut_ + alpha()) ); @@ -179,7 +179,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS } // End namespace compressible } // End namespace Foam diff --git a/src/turbulenceModels/compressible/LaunderSharmaKE/LaunderSharmaKE.C b/src/turbulenceModels/RAS/compressible/LaunderSharmaKE/LaunderSharmaKE.C similarity index 84% rename from src/turbulenceModels/compressible/LaunderSharmaKE/LaunderSharmaKE.C rename to src/turbulenceModels/RAS/compressible/LaunderSharmaKE/LaunderSharmaKE.C index 7e758e9d9d..d4a4f80f58 100644 --- a/src/turbulenceModels/compressible/LaunderSharmaKE/LaunderSharmaKE.C +++ b/src/turbulenceModels/RAS/compressible/LaunderSharmaKE/LaunderSharmaKE.C @@ -34,13 +34,13 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // defineTypeNameAndDebug(LaunderSharmaKE, 0); -addToRunTimeSelectionTable(turbulenceModel, LaunderSharmaKE, dictionary); +addToRunTimeSelectionTable(RASmodel, LaunderSharmaKE, dictionary); // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // @@ -52,7 +52,7 @@ tmp LaunderSharmaKE::fMu() const tmp LaunderSharmaKE::f2() const { - return + return scalar(1) - 0.3*exp(-min(sqr(rho_*sqr(k_)/(mu()*epsilon_)), scalar(50.0))); } @@ -69,15 +69,18 @@ LaunderSharmaKE::LaunderSharmaKE basicThermo& thermophysicalModel ) : - turbulenceModel(typeName, rho, U, phi, thermophysicalModel), + RASmodel(typeName, rho, U, phi, thermophysicalModel), - Cmu(turbulenceModelCoeffs_.lookup("Cmu")), - C1(turbulenceModelCoeffs_.lookup("C1")), - C2(turbulenceModelCoeffs_.lookup("C2")), - C3(turbulenceModelCoeffs_.lookup("C3")), - alphak(turbulenceModelCoeffs_.lookup("alphak")), - alphaEps(turbulenceModelCoeffs_.lookup("alphaEps")), - alphah(turbulenceModelCoeffs_.lookup("alphah")), + Cmu(RASmodelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), + C1(RASmodelCoeffs_.lookupOrAddDefault("C1", 1.44)), + C2(RASmodelCoeffs_.lookupOrAddDefault("C2", 1.92)), + C3(RASmodelCoeffs_.lookupOrAddDefault("C3", -0.33)), + alphak(RASmodelCoeffs_.lookupOrAddDefault("alphak", 1.0)), + alphaEps + ( + RASmodelCoeffs_.lookupOrAddDefault("alphaEps", 0.76923) + ), + alphah(RASmodelCoeffs_.lookupOrAddDefault("alphah", 1.0)), k_ ( @@ -117,7 +120,9 @@ LaunderSharmaKE::LaunderSharmaKE ), Cmu*fMu()*rho_*sqr(k_)/(epsilon_ + epsilonSmall_) ) -{} +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -174,14 +179,14 @@ tmp LaunderSharmaKE::divDevRhoReff(volVectorField& U) const bool LaunderSharmaKE::read() { - if (turbulenceModel::read()) + if (RASmodel::read()) { - turbulenceModelCoeffs_.lookup("Cmu") >> Cmu; - turbulenceModelCoeffs_.lookup("C1") >> C1; - turbulenceModelCoeffs_.lookup("C2") >> C2; - turbulenceModelCoeffs_.lookup("C3") >> C3; - turbulenceModelCoeffs_.lookup("alphaEps") >> alphaEps; - turbulenceModelCoeffs_.lookup("alphah") >> alphah; + RASmodelCoeffs_.readIfPresent("Cmu", Cmu); + RASmodelCoeffs_.readIfPresent("C1", C1); + RASmodelCoeffs_.readIfPresent("C2", C2); + RASmodelCoeffs_.readIfPresent("C3", C3); + RASmodelCoeffs_.readIfPresent("alphaEps", alphaEps); + RASmodelCoeffs_.readIfPresent("alphah", alphah); return true; } @@ -201,7 +206,7 @@ void LaunderSharmaKE::correct() return; } - turbulenceModel::correct(); + RASmodel::correct(); // Calculate parameters and coefficients for Launder-Sharma low-Reynolds // number model @@ -265,7 +270,7 @@ void LaunderSharmaKE::correct() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS } // End namespace compressible } // End namespace Foam diff --git a/src/turbulenceModels/compressible/LaunderSharmaKE/LaunderSharmaKE.H b/src/turbulenceModels/RAS/compressible/LaunderSharmaKE/LaunderSharmaKE.H similarity index 89% rename from src/turbulenceModels/compressible/LaunderSharmaKE/LaunderSharmaKE.H rename to src/turbulenceModels/RAS/compressible/LaunderSharmaKE/LaunderSharmaKE.H index b04d60e6bd..0ff1754957 100644 --- a/src/turbulenceModels/compressible/LaunderSharmaKE/LaunderSharmaKE.H +++ b/src/turbulenceModels/RAS/compressible/LaunderSharmaKE/LaunderSharmaKE.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::compressible::turbulenceModels::LaunderSharmaKE + Foam::compressible::RAS::LaunderSharmaKE Description Launder and Sharma low-Reynolds k-epsilon turbulence model for @@ -38,7 +38,7 @@ SourceFiles #ifndef compressibleLaunderSharmaKE_H #define compressibleLaunderSharmaKE_H -#include "turbulenceModel.H" +#include "RASmodel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -46,7 +46,7 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -55,17 +55,17 @@ namespace turbulenceModels class LaunderSharmaKE : - public turbulenceModel + public RASmodel { // Private data - dimensionedScalar Cmu; - dimensionedScalar C1; - dimensionedScalar C2; - dimensionedScalar C3; - dimensionedScalar alphak; - dimensionedScalar alphaEps; - dimensionedScalar alphah; + scalar Cmu; + scalar C1; + scalar C2; + scalar C3; + scalar alphak; + scalar alphaEps; + scalar alphah; volScalarField k_; volScalarField epsilon_; @@ -111,7 +111,7 @@ public: //- Return the effective diffusivity for k tmp DkEff() const { - return tmp + return tmp ( new volScalarField("DkEff", alphak*mut_ + mu()) ); @@ -120,7 +120,7 @@ public: //- Return the effective diffusivity for epsilon tmp DepsilonEff() const { - return tmp + return tmp ( new volScalarField("DepsilonEff", alphaEps*mut_ + mu()) ); @@ -129,7 +129,7 @@ public: //- Return the effective turbulent thermal diffusivity tmp alphaEff() const { - return tmp + return tmp ( new volScalarField("alphaEff", alphah*mut_ + alpha()) ); @@ -166,7 +166,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS } // End namespace compressible } // End namespace Foam diff --git a/src/turbulenceModels/compressible/LaunderSharmaKE/sourceFiles b/src/turbulenceModels/RAS/compressible/LaunderSharmaKE/sourceFiles similarity index 100% rename from src/turbulenceModels/compressible/LaunderSharmaKE/sourceFiles rename to src/turbulenceModels/RAS/compressible/LaunderSharmaKE/sourceFiles diff --git a/src/turbulenceModels/compressible/Make/files b/src/turbulenceModels/RAS/compressible/Make/files similarity index 84% rename from src/turbulenceModels/compressible/Make/files rename to src/turbulenceModels/RAS/compressible/Make/files index 7463160939..03430510a0 100644 --- a/src/turbulenceModels/compressible/Make/files +++ b/src/turbulenceModels/RAS/compressible/Make/files @@ -1,5 +1,5 @@ -turbulenceModel/turbulenceModel.C -turbulenceModel/newTurbulenceModel.C +RASmodel/RASmodel.C +RASmodel/newRASmodel.C laminar/laminar.C kEpsilon/kEpsilon.C RNGkEpsilon/RNGkEpsilon.C diff --git a/src/turbulenceModels/compressible/Make/options b/src/turbulenceModels/RAS/compressible/Make/options similarity index 100% rename from src/turbulenceModels/compressible/Make/options rename to src/turbulenceModels/RAS/compressible/Make/options diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C b/src/turbulenceModels/RAS/compressible/RASmodel/RASmodel.C similarity index 73% rename from src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C rename to src/turbulenceModels/RAS/compressible/RASmodel/RASmodel.C index 40ae474c06..ca5bc76411 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C +++ b/src/turbulenceModels/RAS/compressible/RASmodel/RASmodel.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ -#include "turbulenceModel.H" +#include "RASmodel.H" #include "wallDist.H" #include "wallFvPatch.H" #include "fixedValueFvPatchFields.H" @@ -38,12 +38,24 @@ namespace compressible // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(turbulenceModel, 0); -defineRunTimeSelectionTable(turbulenceModel, dictionary); +defineTypeNameAndDebug(RASmodel, 0); +defineRunTimeSelectionTable(RASmodel, dictionary); + +// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // + +void RASmodel::printCoeffs() +{ + if (printCoeffs_) + { + Info<< type() << "Coeffs" << nl + << RASmodelCoeffs_; + } +} + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -turbulenceModel::turbulenceModel +RASmodel::RASmodel ( const word& type, const volScalarField& rho, @@ -73,16 +85,18 @@ turbulenceModel::turbulenceModel thermophysicalModel_(thermophysicalModel), turbulence_(lookup("turbulence")), - turbulenceModelCoeffs_(subDict(type + "Coeffs")), + printCoeffs_(lookupOrDefault("printCoeffs", false)), + RASmodelCoeffs_(subDict(type + "Coeffs")), kappa_ ( - dimensionedScalar(subDict("wallFunctionCoeffs").lookup("kappa")).value() - ), - E_ - ( - dimensionedScalar(subDict("wallFunctionCoeffs").lookup("E")).value() + subDict("wallFunctionCoeffs").lookupOrAddDefault + ( + "kappa", + 0.4187 + ) ), + E_(subDict("wallFunctionCoeffs").lookupOrAddDefault("E", 9.0)), yPlusLam_(yPlusLam(kappa_, E_)), k0_("k0", dimVelocity*dimVelocity, SMALL), @@ -95,7 +109,7 @@ turbulenceModel::turbulenceModel // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -scalar turbulenceModel::yPlusLam(const scalar kappa, const scalar E) +scalar RASmodel::yPlusLam(const scalar kappa, const scalar E) { scalar ypl = 11.0; @@ -108,7 +122,7 @@ scalar turbulenceModel::yPlusLam(const scalar kappa, const scalar E) } -tmp turbulenceModel::yPlus(const label patchNo) const +tmp RASmodel::yPlus(const label patchNo) const { const fvPatch& curPatch = mesh_.boundary()[patchNo]; @@ -117,9 +131,9 @@ tmp turbulenceModel::yPlus(const label patchNo) const if (typeid(curPatch) == typeid(wallFvPatch)) { - dimensionedScalar Cmu(turbulenceModelCoeffs_.lookup("Cmu")); + scalar Cmu(readScalar(RASmodelCoeffs_.lookup("Cmu"))); - Yp = pow(Cmu.value(), 0.25) + Yp = pow(Cmu, 0.25) *y_[patchNo] *sqrt(k()().boundaryField()[patchNo].patchInternalField()) /( @@ -131,7 +145,7 @@ tmp turbulenceModel::yPlus(const label patchNo) const { WarningIn ( - "tmp turbulenceModel::yPlus(const label patchNo) const" + "tmp RASmodel::yPlus(const label patchNo) const" ) << "Patch " << patchNo << " is not a wall. Returning blank field" << endl; @@ -142,7 +156,7 @@ tmp turbulenceModel::yPlus(const label patchNo) const } -void turbulenceModel::correct() +void RASmodel::correct() { if (mesh_.changing()) { @@ -151,39 +165,21 @@ void turbulenceModel::correct() } -bool turbulenceModel::read() +bool RASmodel::read() { if (regIOobject::read()) { lookup("turbulence") >> turbulence_; - turbulenceModelCoeffs_ = subDict(type() + "Coeffs"); + RASmodelCoeffs_ = subDict(type() + "Coeffs"); - kappa_ = dimensionedScalar - ( - subDict("wallFunctionCoeffs").lookup("kappa") - ).value(); - - E_ = dimensionedScalar - ( - subDict("wallFunctionCoeffs").lookup("E") - ).value(); + subDict("wallFunctionCoeffs").lookup("kappa") >> kappa_; + subDict("wallFunctionCoeffs").lookup("E") >> E_; yPlusLam_ = yPlusLam(kappa_, E_); - if (found("k0")) - { - lookup("k0") >> k0_; - } - - if (found("epsilon0")) - { - lookup("epsilon0") >> epsilon0_; - } - - if (found("epsilonSmall")) - { - lookup("epsilonSmall") >> epsilonSmall_; - } + readIfPresent("k0", k0_); + readIfPresent("epsilon0", epsilon0_); + readIfPresent("epsilonSmall", epsilonSmall_); return true; } diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/RAS/compressible/RASmodel/RASmodel.H similarity index 91% rename from src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H rename to src/turbulenceModels/RAS/compressible/RASmodel/RASmodel.H index 4a757e152a..42a5f432a5 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H +++ b/src/turbulenceModels/RAS/compressible/RASmodel/RASmodel.H @@ -23,27 +23,27 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Namespace - Foam::compressible::turbulenceModels + Foam::compressible::RAS Description - Namespace for compressible turbulence models. + Namespace for compressible RAS turbulence models. Class - Foam::compressible::turbulenceModel + Foam::compressible::RASmodel Description Abstract base class for turbulence models for compressible and combusting flows. SourceFiles - turbulenceModel.C + RASmodel.C newTurbulenceModel.C \*---------------------------------------------------------------------------*/ -#ifndef compressibleTurbulenceModel_H -#define compressibleTurbulenceModel_H +#ifndef compressibleRASModel_H +#define compressibleRASModel_H #include "volFields.H" #include "surfaceFields.H" @@ -66,10 +66,10 @@ namespace compressible { /*---------------------------------------------------------------------------*\ - Class turbulenceModel Declaration + Class RASmodel Declaration \*---------------------------------------------------------------------------*/ -class turbulenceModel +class RASmodel : public IOdictionary { @@ -88,7 +88,8 @@ protected: basicThermo& thermophysicalModel_; Switch turbulence_; - dictionary turbulenceModelCoeffs_; + Switch printCoeffs_; + dictionary RASmodelCoeffs_; scalar kappa_; scalar E_; @@ -103,6 +104,11 @@ protected: nearWallDist y_; + // Protected member functions + + //- Print model coefficients + virtual void printCoeffs(); + //- Return the laminar thermal conductivity const volScalarField& alpha() const { @@ -115,16 +121,16 @@ private: // Private Member Functions //- Disallow default bitwise copy construct - turbulenceModel(const turbulenceModel&); + RASmodel(const RASmodel&); //- Disallow default bitwise assignment - void operator=(const turbulenceModel&); + void operator=(const RASmodel&); public: //- Runtime type information - TypeName("turbulenceModel"); + TypeName("RASmodel"); // Declare run-time constructor selection table @@ -132,7 +138,7 @@ public: declareRunTimeSelectionTable ( autoPtr, - turbulenceModel, + RASmodel, dictionary, ( const volScalarField& rho, @@ -147,7 +153,7 @@ public: // Constructors //- Construct from components - turbulenceModel + RASmodel ( const word& type, const volScalarField& rho, @@ -160,7 +166,7 @@ public: // Selectors //- Return a reference to the selected turbulence model - static autoPtr New + static autoPtr New ( const volScalarField& rho, const volVectorField& U, @@ -171,7 +177,7 @@ public: // Destructor - virtual ~turbulenceModel() + virtual ~RASmodel() {} diff --git a/src/turbulenceModels/compressible/turbulenceModel/newTurbulenceModel.C b/src/turbulenceModels/RAS/compressible/RASmodel/newRASmodel.C similarity index 79% rename from src/turbulenceModels/compressible/turbulenceModel/newTurbulenceModel.C rename to src/turbulenceModels/RAS/compressible/RASmodel/newRASmodel.C index a688aaeca9..ca151329ab 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/newTurbulenceModel.C +++ b/src/turbulenceModels/RAS/compressible/RASmodel/newRASmodel.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ -#include "turbulenceModel.H" +#include "RASmodel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -35,7 +35,7 @@ namespace compressible // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -autoPtr turbulenceModel::New +autoPtr RASmodel::New ( const volScalarField& rho, const volVectorField& U, @@ -43,10 +43,10 @@ autoPtr turbulenceModel::New basicThermo& thermophysicalModel ) { - word turbulenceModelTypeName; + word RASmodelTypeName; // Enclose the creation of the turbulencePropertiesDict to ensure it is - // deleted before the turbulenceModel is created otherwise the dictionary + // deleted before the RASmodel is created otherwise the dictionary // is entered in the database twice { IOdictionary turbulencePropertiesDict @@ -61,30 +61,30 @@ autoPtr turbulenceModel::New ) ); - turbulencePropertiesDict.lookup("turbulenceModel") - >> turbulenceModelTypeName; + turbulencePropertiesDict.lookup("RASmodel") + >> RASmodelTypeName; } - Info<< "Selecting turbulence model " << turbulenceModelTypeName << endl; + Info<< "Selecting turbulence model " << RASmodelTypeName << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(turbulenceModelTypeName); + dictionaryConstructorTablePtr_->find(RASmodelTypeName); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn ( - "turbulenceModel::New(const volScalarField& rho, " + "RASmodel::New(const volScalarField& rho, " "const volVectorField& U, const surfaceScalarField& phi, " "basicThermo&)" - ) << "Unknown turbulenceModel type " << turbulenceModelTypeName + ) << "Unknown RASmodel type " << RASmodelTypeName << endl << endl - << "Valid turbulenceModel types are :" << endl + << "Valid RASmodel types are :" << endl << dictionaryConstructorTablePtr_->toc() << exit(FatalError); } - return autoPtr + return autoPtr ( cstrIter()(rho, U, phi, thermophysicalModel) ); diff --git a/src/turbulenceModels/compressible/RNGkEpsilon/RNGkEpsilon.C b/src/turbulenceModels/RAS/compressible/RNGkEpsilon/RNGkEpsilon.C similarity index 79% rename from src/turbulenceModels/compressible/RNGkEpsilon/RNGkEpsilon.C rename to src/turbulenceModels/RAS/compressible/RNGkEpsilon/RNGkEpsilon.C index c37b3632e8..2865c989bf 100644 --- a/src/turbulenceModels/compressible/RNGkEpsilon/RNGkEpsilon.C +++ b/src/turbulenceModels/RAS/compressible/RNGkEpsilon/RNGkEpsilon.C @@ -34,13 +34,13 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // defineTypeNameAndDebug(RNGkEpsilon, 0); -addToRunTimeSelectionTable(turbulenceModel, RNGkEpsilon, dictionary); +addToRunTimeSelectionTable(RASmodel, RNGkEpsilon, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -53,17 +53,20 @@ RNGkEpsilon::RNGkEpsilon basicThermo& thermophysicalModel ) : - turbulenceModel(typeName, rho, U, phi, thermophysicalModel), + RASmodel(typeName, rho, U, phi, thermophysicalModel), - Cmu(turbulenceModelCoeffs_.lookup("Cmu")), - C1(turbulenceModelCoeffs_.lookup("C1")), - C2(turbulenceModelCoeffs_.lookup("C2")), - C3(turbulenceModelCoeffs_.lookup("C3")), - alphak(turbulenceModelCoeffs_.lookup("alphak")), - alphaEps(turbulenceModelCoeffs_.lookup("alphaEps")), - alphah(turbulenceModelCoeffs_.lookup("alphah")), - eta0(turbulenceModelCoeffs_.lookup("eta0")), - beta(turbulenceModelCoeffs_.lookup("beta")), + Cmu(RASmodelCoeffs_.lookupOrAddDefault("Cmu", 0.0845)), + C1(RASmodelCoeffs_.lookupOrAddDefault("C1", 1.42)), + C2(RASmodelCoeffs_.lookupOrAddDefault("C2", 1.68)), + C3(RASmodelCoeffs_.lookupOrAddDefault("C3", -0.33)), + alphak(RASmodelCoeffs_.lookupOrAddDefault("alphak", 1.39)), + alphaEps + ( + RASmodelCoeffs_.lookupOrAddDefault("alphaEps", 1.39) + ), + alphah(RASmodelCoeffs_.lookupOrAddDefault("alphah", 1.0)), + eta0(RASmodelCoeffs_.lookupOrAddDefault("eta0", 4.38)), + beta(RASmodelCoeffs_.lookupOrAddDefault("beta", 0.012)), k_ ( @@ -105,6 +108,8 @@ RNGkEpsilon::RNGkEpsilon ) { # include "wallViscosityI.H" + + printCoeffs(); } @@ -162,17 +167,17 @@ tmp RNGkEpsilon::divDevRhoReff(volVectorField& U) const bool RNGkEpsilon::read() { - if (turbulenceModel::read()) + if (RASmodel::read()) { - turbulenceModelCoeffs_.lookup("Cmu") >> Cmu; - turbulenceModelCoeffs_.lookup("C1") >> C1; - turbulenceModelCoeffs_.lookup("C2") >> C2; - turbulenceModelCoeffs_.lookup("C3") >> C3; - turbulenceModelCoeffs_.lookup("alphak") >> alphak; - turbulenceModelCoeffs_.lookup("alphaEps") >> alphaEps; - turbulenceModelCoeffs_.lookup("alphah") >> alphah; - turbulenceModelCoeffs_.lookup("eta0") >> eta0; - turbulenceModelCoeffs_.lookup("beta") >> beta; + RASmodelCoeffs_.readIfPresent("Cmu", Cmu); + RASmodelCoeffs_.readIfPresent("C1", C1); + RASmodelCoeffs_.readIfPresent("C2", C2); + RASmodelCoeffs_.readIfPresent("C3", C3); + RASmodelCoeffs_.readIfPresent("alphak", alphak); + RASmodelCoeffs_.readIfPresent("alphaEps", alphaEps); + RASmodelCoeffs_.readIfPresent("alphah", alphah); + RASmodelCoeffs_.readIfPresent("eta0", eta0); + RASmodelCoeffs_.readIfPresent("beta", beta); return true; } @@ -192,7 +197,7 @@ void RNGkEpsilon::correct() return; } - turbulenceModel::correct(); + RASmodel::correct(); volScalarField divU = fvc::div(phi_/fvc::interpolate(rho_)); @@ -210,7 +215,7 @@ void RNGkEpsilon::correct() volScalarField eta = sqrt(mag(S2))*k_/epsilon_; volScalarField eta3 = eta*sqr(eta); - volScalarField R = + volScalarField R = ((eta*(-eta/eta0 + scalar(1)))/(beta*eta3 + scalar(1))); # include "wallFunctionsI.H" @@ -262,7 +267,7 @@ void RNGkEpsilon::correct() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS } // End namespace compressible } // End namespace Foam diff --git a/src/turbulenceModels/compressible/RNGkEpsilon/RNGkEpsilon.H b/src/turbulenceModels/RAS/compressible/RNGkEpsilon/RNGkEpsilon.H similarity index 87% rename from src/turbulenceModels/compressible/RNGkEpsilon/RNGkEpsilon.H rename to src/turbulenceModels/RAS/compressible/RNGkEpsilon/RNGkEpsilon.H index 4f321579ee..2168a37504 100644 --- a/src/turbulenceModels/compressible/RNGkEpsilon/RNGkEpsilon.H +++ b/src/turbulenceModels/RAS/compressible/RNGkEpsilon/RNGkEpsilon.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::compressible::turbulenceModels::RNGkEpsilon + Foam::compressible::RAS::RNGkEpsilon Description Renormalisation group k-epsilon turbulence model for compressible flows. @@ -37,7 +37,7 @@ SourceFiles #ifndef compressibleRNGkEpsilon_H #define compressibleRNGkEpsilon_H -#include "turbulenceModel.H" +#include "RASmodel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -45,7 +45,7 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -54,19 +54,19 @@ namespace turbulenceModels class RNGkEpsilon : - public turbulenceModel + public RASmodel { // Private data - dimensionedScalar Cmu; - dimensionedScalar C1; - dimensionedScalar C2; - dimensionedScalar C3; - dimensionedScalar alphak; - dimensionedScalar alphaEps; - dimensionedScalar alphah; - dimensionedScalar eta0; - dimensionedScalar beta; + scalar Cmu; + scalar C1; + scalar C2; + scalar C3; + scalar alphak; + scalar alphaEps; + scalar alphah; + scalar eta0; + scalar beta; volScalarField k_; volScalarField epsilon_; @@ -106,7 +106,7 @@ public: //- Return the effective diffusivity for k tmp DkEff() const { - return tmp + return tmp ( new volScalarField("DkEff", alphak*mut_ + mu()) ); @@ -115,7 +115,7 @@ public: //- Return the effective diffusivity for epsilon tmp DepsilonEff() const { - return tmp + return tmp ( new volScalarField("DepsilonEff", alphaEps*mut_ + mu()) ); @@ -124,7 +124,7 @@ public: //- Return the effective turbulent thermal diffusivity tmp alphaEff() const { - return tmp + return tmp ( new volScalarField("alphaEff", alphah*mut_ + alpha()) ); @@ -161,7 +161,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS } // End namespace compressible } // End namespace Foam diff --git a/src/turbulenceModels/compressible/RNGkEpsilon/sourceFiles b/src/turbulenceModels/RAS/compressible/RNGkEpsilon/sourceFiles similarity index 100% rename from src/turbulenceModels/compressible/RNGkEpsilon/sourceFiles rename to src/turbulenceModels/RAS/compressible/RNGkEpsilon/sourceFiles diff --git a/src/turbulenceModels/compressible/SpalartAllmaras/SpalartAllmaras.C b/src/turbulenceModels/RAS/compressible/SpalartAllmaras/SpalartAllmaras.C similarity index 82% rename from src/turbulenceModels/compressible/SpalartAllmaras/SpalartAllmaras.C rename to src/turbulenceModels/RAS/compressible/SpalartAllmaras/SpalartAllmaras.C index a2ccbf80a4..a14780e0c6 100644 --- a/src/turbulenceModels/compressible/SpalartAllmaras/SpalartAllmaras.C +++ b/src/turbulenceModels/RAS/compressible/SpalartAllmaras/SpalartAllmaras.C @@ -34,13 +34,13 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // defineTypeNameAndDebug(SpalartAllmaras, 0); -addToRunTimeSelectionTable(turbulenceModel, SpalartAllmaras, dictionary); +addToRunTimeSelectionTable(RASmodel, SpalartAllmaras, dictionary); // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // @@ -113,18 +113,21 @@ SpalartAllmaras::SpalartAllmaras basicThermo& thermophysicalModel ) : - turbulenceModel(typeName, rho, U, phi, thermophysicalModel), + RASmodel(typeName, rho, U, phi, thermophysicalModel), - alphaNut(turbulenceModelCoeffs_.lookup("alphaNut")), - alphah(turbulenceModelCoeffs_.lookup("alphah")), + alphaNut + ( + RASmodelCoeffs_.lookupOrAddDefault("alphaNut", 1.5) + ), + alphah(RASmodelCoeffs_.lookupOrAddDefault("alphah", 1.0)), - Cb1(turbulenceModelCoeffs_.lookup("Cb1")), - Cb2(turbulenceModelCoeffs_.lookup("Cb2")), + Cb1(RASmodelCoeffs_.lookupOrAddDefault("Cb1", 0.1355)), + Cb2(RASmodelCoeffs_.lookupOrAddDefault("Cb2", 0.622)), Cw1(Cb1/sqr(kappa_) + alphaNut*(1.0 + Cb2)), - Cw2(turbulenceModelCoeffs_.lookup("Cw2")), - Cw3(turbulenceModelCoeffs_.lookup("Cw3")), - Cv1(turbulenceModelCoeffs_.lookup("Cv1")), - Cv2(turbulenceModelCoeffs_.lookup("Cv2")), + Cw2(RASmodelCoeffs_.lookupOrAddDefault("Cw2", 0.3)), + Cw3(RASmodelCoeffs_.lookupOrAddDefault("Cw3", 2.0)), + Cv1(RASmodelCoeffs_.lookupOrAddDefault("Cv1", 7.1)), + Cv2(RASmodelCoeffs_.lookupOrAddDefault("Cv2", 5.0)), nuTilda_ ( @@ -153,7 +156,9 @@ SpalartAllmaras::SpalartAllmaras ), d_(mesh_) -{} +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -212,18 +217,18 @@ tmp SpalartAllmaras::divDevRhoReff(volVectorField& U) const bool SpalartAllmaras::read() { - if (turbulenceModel::read()) + if (RASmodel::read()) { - turbulenceModelCoeffs_.lookup("alphaNut") >> alphaNut; - turbulenceModelCoeffs_.lookup("alphah") >> alphah; + RASmodelCoeffs_.readIfPresent("alphaNut", alphaNut); + RASmodelCoeffs_.readIfPresent("alphah", alphah); - turbulenceModelCoeffs_.lookup("Cb1") >> Cb1; - turbulenceModelCoeffs_.lookup("Cb2") >> Cb2; + RASmodelCoeffs_.readIfPresent("Cb1", Cb1); + RASmodelCoeffs_.readIfPresent("Cb2", Cb2); Cw1 = Cb1/sqr(kappa_) + alphaNut*(1.0 + Cb2); - turbulenceModelCoeffs_.lookup("Cw2") >> Cw2; - turbulenceModelCoeffs_.lookup("Cw3") >> Cw3; - turbulenceModelCoeffs_.lookup("Cv1") >> Cv1; - turbulenceModelCoeffs_.lookup("Cv2") >> Cv2; + RASmodelCoeffs_.readIfPresent("Cw2", Cw2); + RASmodelCoeffs_.readIfPresent("Cw3", Cw3); + RASmodelCoeffs_.readIfPresent("Cv1", Cv1); + RASmodelCoeffs_.readIfPresent("Cv2", Cv2); return true; } @@ -243,7 +248,7 @@ void SpalartAllmaras::correct() return; } - turbulenceModel::correct(); + RASmodel::correct(); if (mesh_.changing()) { @@ -280,7 +285,7 @@ void SpalartAllmaras::correct() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS } // End namespace compressible } // End namespace Foam diff --git a/src/turbulenceModels/compressible/SpalartAllmaras/SpalartAllmaras.H b/src/turbulenceModels/RAS/compressible/SpalartAllmaras/SpalartAllmaras.H similarity index 92% rename from src/turbulenceModels/compressible/SpalartAllmaras/SpalartAllmaras.H rename to src/turbulenceModels/RAS/compressible/SpalartAllmaras/SpalartAllmaras.H index db0639521b..4a70f0cb79 100644 --- a/src/turbulenceModels/compressible/SpalartAllmaras/SpalartAllmaras.H +++ b/src/turbulenceModels/RAS/compressible/SpalartAllmaras/SpalartAllmaras.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::compressible::turbulenceModels::SpalartAllmaras + Foam::compressible::RAS::SpalartAllmaras Description Spalart-Allmaras one-eqn mixing-length model for compressible @@ -53,7 +53,7 @@ SourceFiles #ifndef compressibleSpalartAllmaras_H #define combressibleSpalartAllmaras_H -#include "turbulenceModel.H" +#include "RASmodel.H" #include "wallDist.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -62,7 +62,7 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -71,20 +71,20 @@ namespace turbulenceModels class SpalartAllmaras : - public turbulenceModel + public RASmodel { // Private data - dimensionedScalar alphaNut; - dimensionedScalar alphah; + scalar alphaNut; + scalar alphah; - dimensionedScalar Cb1; - dimensionedScalar Cb2; - dimensionedScalar Cw1; - dimensionedScalar Cw2; - dimensionedScalar Cw3; - dimensionedScalar Cv1; - dimensionedScalar Cv2; + scalar Cb1; + scalar Cb2; + scalar Cw1; + scalar Cw2; + scalar Cw3; + scalar Cv1; + scalar Cv2; volScalarField nuTilda_; volScalarField mut_; @@ -215,7 +215,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS } // End namespace compressible } // End namespace Foam diff --git a/src/turbulenceModels/compressible/kEpsilon/kEpsilon.C b/src/turbulenceModels/RAS/compressible/kEpsilon/kEpsilon.C similarity index 82% rename from src/turbulenceModels/compressible/kEpsilon/kEpsilon.C rename to src/turbulenceModels/RAS/compressible/kEpsilon/kEpsilon.C index a4438c23ee..072b477b77 100644 --- a/src/turbulenceModels/compressible/kEpsilon/kEpsilon.C +++ b/src/turbulenceModels/RAS/compressible/kEpsilon/kEpsilon.C @@ -34,13 +34,13 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // defineTypeNameAndDebug(kEpsilon, 0); -addToRunTimeSelectionTable(turbulenceModel, kEpsilon, dictionary); +addToRunTimeSelectionTable(RASmodel, kEpsilon, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -52,15 +52,18 @@ kEpsilon::kEpsilon basicThermo& thermophysicalModel ) : - turbulenceModel(typeName, rho, U, phi, thermophysicalModel), + RASmodel(typeName, rho, U, phi, thermophysicalModel), - Cmu(turbulenceModelCoeffs_.lookup("Cmu")), - C1(turbulenceModelCoeffs_.lookup("C1")), - C2(turbulenceModelCoeffs_.lookup("C2")), - C3(turbulenceModelCoeffs_.lookup("C3")), - alphak(turbulenceModelCoeffs_.lookup("alphak")), - alphaEps(turbulenceModelCoeffs_.lookup("alphaEps")), - alphah(turbulenceModelCoeffs_.lookup("alphah")), + Cmu(RASmodelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), + C1(RASmodelCoeffs_.lookupOrAddDefault("C1", 1.44)), + C2(RASmodelCoeffs_.lookupOrAddDefault("C2", 1.92)), + C3(RASmodelCoeffs_.lookupOrAddDefault("C3", -0.33)), + alphak(RASmodelCoeffs_.lookupOrAddDefault("alphak", 1.0)), + alphaEps + ( + RASmodelCoeffs_.lookupOrAddDefault("alphaEps", 0.76923) + ), + alphah(RASmodelCoeffs_.lookupOrAddDefault("alphah", 1.0)), k_ ( @@ -102,6 +105,8 @@ kEpsilon::kEpsilon ) { # include "wallViscosityI.H" + + printCoeffs(); } @@ -160,15 +165,15 @@ tmp kEpsilon::divDevRhoReff(volVectorField& U) const bool kEpsilon::read() { - if (turbulenceModel::read()) + if (RASmodel::read()) { - turbulenceModelCoeffs_.lookup("Cmu") >> Cmu; - turbulenceModelCoeffs_.lookup("C1") >> C1; - turbulenceModelCoeffs_.lookup("C2") >> C2; - turbulenceModelCoeffs_.lookup("C3") >> C3; - turbulenceModelCoeffs_.lookup("alphak") >> alphak; - turbulenceModelCoeffs_.lookup("alphaEps") >> alphaEps; - turbulenceModelCoeffs_.lookup("alphah") >> alphah; + RASmodelCoeffs_.readIfPresent("Cmu", Cmu); + RASmodelCoeffs_.readIfPresent("C1", C1); + RASmodelCoeffs_.readIfPresent("C2", C2); + RASmodelCoeffs_.readIfPresent("C3", C3); + RASmodelCoeffs_.readIfPresent("alphak", alphak); + RASmodelCoeffs_.readIfPresent("alphaEps", alphaEps); + RASmodelCoeffs_.readIfPresent("alphah", alphah); return true; } @@ -189,7 +194,7 @@ void kEpsilon::correct() return; } - turbulenceModel::correct(); + RASmodel::correct(); volScalarField divU = fvc::div(phi_/fvc::interpolate(rho_)); @@ -232,7 +237,7 @@ void kEpsilon::correct() + fvm::div(phi_, k_) - fvm::laplacian(DkEff(), k_) == - G + G - fvm::SuSp((2.0/3.0)*rho_*divU, k_) - fvm::Sp(rho_*epsilon_/k_, k_) ); @@ -252,7 +257,7 @@ void kEpsilon::correct() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS } // End namespace compressible } // End namespace Foam diff --git a/src/turbulenceModels/compressible/kEpsilon/kEpsilon.H b/src/turbulenceModels/RAS/compressible/kEpsilon/kEpsilon.H similarity index 87% rename from src/turbulenceModels/compressible/kEpsilon/kEpsilon.H rename to src/turbulenceModels/RAS/compressible/kEpsilon/kEpsilon.H index 926539f9ed..35daac84c4 100644 --- a/src/turbulenceModels/compressible/kEpsilon/kEpsilon.H +++ b/src/turbulenceModels/RAS/compressible/kEpsilon/kEpsilon.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::compressible::turbulenceModels::kEpsilon + Foam::compressible::RAS::kEpsilon Description Standard k-epsilon turbulence model for compressible flows @@ -37,7 +37,7 @@ SourceFiles #ifndef compressiblekEpsilon_H #define compressiblekEpsilon_H -#include "turbulenceModel.H" +#include "RASmodel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -45,7 +45,7 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -54,21 +54,25 @@ namespace turbulenceModels class kEpsilon : - public turbulenceModel + public RASmodel { // Private data - dimensionedScalar Cmu; - dimensionedScalar C1; - dimensionedScalar C2; - dimensionedScalar C3; - dimensionedScalar alphak; - dimensionedScalar alphaEps; - dimensionedScalar alphah; + // Model coefficients - volScalarField k_; - volScalarField epsilon_; - volScalarField mut_; + scalar Cmu; + scalar C1; + scalar C2; + scalar C3; + scalar alphak; + scalar alphaEps; + scalar alphah; + + // Fields + + volScalarField k_; + volScalarField epsilon_; + volScalarField mut_; public: @@ -105,7 +109,7 @@ public: //- Return the effective diffusivity for k tmp DkEff() const { - return tmp + return tmp ( new volScalarField("DkEff", alphak*mut_ + mu()) ); @@ -114,7 +118,7 @@ public: //- Return the effective diffusivity for epsilon tmp DepsilonEff() const { - return tmp + return tmp ( new volScalarField("DepsilonEff", alphaEps*mut_ + mu()) ); @@ -123,7 +127,7 @@ public: //- Return the effective turbulent thermal diffusivity tmp alphaEff() const { - return tmp + return tmp ( new volScalarField("alphaEff", alphah*mut_ + alpha()) ); @@ -160,7 +164,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS } // End namespace compressible } // End namespace Foam diff --git a/src/turbulenceModels/compressible/kOmegaSST/checkkOmegaPatchFieldTypes.H b/src/turbulenceModels/RAS/compressible/kOmegaSST/checkkOmegaPatchFieldTypes.H similarity index 100% rename from src/turbulenceModels/compressible/kOmegaSST/checkkOmegaPatchFieldTypes.H rename to src/turbulenceModels/RAS/compressible/kOmegaSST/checkkOmegaPatchFieldTypes.H diff --git a/src/turbulenceModels/compressible/kOmegaSST/kOmegaSST.C b/src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaSST.C similarity index 76% rename from src/turbulenceModels/compressible/kOmegaSST/kOmegaSST.C rename to src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaSST.C index 4956b162be..390f47c9dc 100644 --- a/src/turbulenceModels/compressible/kOmegaSST/kOmegaSST.C +++ b/src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaSST.C @@ -34,13 +34,13 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // defineTypeNameAndDebug(kOmegaSST, 0); -addToRunTimeSelectionTable(turbulenceModel, kOmegaSST, dictionary); +addToRunTimeSelectionTable(RASmodel, kOmegaSST, dictionary); // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // @@ -95,25 +95,34 @@ kOmegaSST::kOmegaSST basicThermo& thermophysicalModel ) : - turbulenceModel(typeName, rho, U, phi, thermophysicalModel), + RASmodel(typeName, rho, U, phi, thermophysicalModel), - alphaK1(turbulenceModelCoeffs_.lookup("alphaK1")), - alphaK2(turbulenceModelCoeffs_.lookup("alphaK2")), - alphaOmega1(turbulenceModelCoeffs_.lookup("alphaOmega1")), - alphaOmega2(turbulenceModelCoeffs_.lookup("alphaOmega2")), - alphah(turbulenceModelCoeffs_.lookup("alphah")), - gamma1(turbulenceModelCoeffs_.lookup("gamma1")), - gamma2(turbulenceModelCoeffs_.lookup("gamma2")), - beta1(turbulenceModelCoeffs_.lookup("beta1")), - beta2(turbulenceModelCoeffs_.lookup("beta2")), - betaStar(turbulenceModelCoeffs_.lookup("betaStar")), - a1(turbulenceModelCoeffs_.lookup("a1")), - c1(turbulenceModelCoeffs_.lookup("c1")), + alphaK1 + ( + RASmodelCoeffs_.lookupOrAddDefault("alphaK1", 0.85034) + ), + alphaK2(RASmodelCoeffs_.lookupOrAddDefault("alphaK2", 1.0)), + alphaOmega1 + ( + RASmodelCoeffs_.lookupOrAddDefault("alphaOmega1", 0.5) + ), + alphaOmega2 + ( + RASmodelCoeffs_.lookupOrAddDefault("alphaOmega2", 0.85616) + ), + alphah(RASmodelCoeffs_.lookupOrAddDefault("alphah", 1.0)), + gamma1(RASmodelCoeffs_.lookupOrAddDefault("gamma1", 0.5532)), + gamma2(RASmodelCoeffs_.lookupOrAddDefault("gamma2", 0.4403)), + beta1(RASmodelCoeffs_.lookupOrAddDefault("beta1", 0.075)), + beta2(RASmodelCoeffs_.lookupOrAddDefault("beta2", 0.0828)), + betaStar(RASmodelCoeffs_.lookupOrAddDefault("betaStar", 0.09)), + a1(RASmodelCoeffs_.lookupOrAddDefault("a1", 0.31)), + c1(RASmodelCoeffs_.lookupOrAddDefault("c1", 10.0)), omega0_("omega0", dimless/dimTime, SMALL), omegaSmall_("omegaSmall", dimless/dimTime, SMALL), - Cmu(turbulenceModelCoeffs_.lookup("Cmu")), + Cmu(RASmodelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), y_(mesh_), @@ -157,6 +166,8 @@ kOmegaSST::kOmegaSST ) { # include "kOmegaWallViscosityI.H" + + printCoeffs(); } @@ -214,21 +225,29 @@ tmp kOmegaSST::divDevRhoReff(volVectorField& U) const bool kOmegaSST::read() { - if (turbulenceModel::read()) + if (RASmodel::read()) { - turbulenceModelCoeffs_.lookup("alphaK1") >> alphaK1; - turbulenceModelCoeffs_.lookup("alphaK2") >> alphaK2; - turbulenceModelCoeffs_.lookup("alphaOmega1") >> alphaOmega1; - turbulenceModelCoeffs_.lookup("alphaOmega2") >> alphaOmega2; - turbulenceModelCoeffs_.lookup("alphah") >> alphah; - turbulenceModelCoeffs_.lookup("gamma1") >> gamma1; - turbulenceModelCoeffs_.lookup("gamma2") >> gamma2; - turbulenceModelCoeffs_.lookup("beta1") >> beta1; - turbulenceModelCoeffs_.lookup("beta2") >> beta2; - turbulenceModelCoeffs_.lookup("betaStar") >> betaStar; - turbulenceModelCoeffs_.lookup("a1") >> a1; - turbulenceModelCoeffs_.lookup("c1") >> c1; - turbulenceModelCoeffs_.lookup("Cmu") >> Cmu; + RASmodelCoeffs_.readIfPresent("alphaK1", alphaK1); + RASmodelCoeffs_.readIfPresent("alphaK2", alphaK2); + RASmodelCoeffs_.readIfPresent + ( + "alphaOmega1", + alphaOmega1 + ); + RASmodelCoeffs_.readIfPresent + ( + "alphaOmega2", + alphaOmega2 + ); + RASmodelCoeffs_.readIfPresent("alphah", alphah); + RASmodelCoeffs_.readIfPresent("gamma1", gamma1); + RASmodelCoeffs_.readIfPresent("gamma2", gamma2); + RASmodelCoeffs_.readIfPresent("beta1", beta1); + RASmodelCoeffs_.readIfPresent("beta2", beta2); + RASmodelCoeffs_.readIfPresent("betaStar", betaStar); + RASmodelCoeffs_.readIfPresent("a1", a1); + RASmodelCoeffs_.readIfPresent("c1", c1); + RASmodelCoeffs_.readIfPresent("Cmu", Cmu); return true; } @@ -244,13 +263,13 @@ void kOmegaSST::correct() if (!turbulence_) { // Re-calculate viscosity - mut_ = + mut_ = a1*rho_*k_/max(a1*omega_, F2()*sqrt(magSqr(symm(fvc::grad(U_))))); # include "kOmegaWallViscosityI.H" return; } - turbulenceModel::correct(); + RASmodel::correct(); volScalarField divU = fvc::div(phi_/fvc::interpolate(rho_)); @@ -329,7 +348,7 @@ void kOmegaSST::correct() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS } // End namespace compressible } // End namespace Foam diff --git a/src/turbulenceModels/compressible/kOmegaSST/kOmegaSST.H b/src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaSST.H similarity index 92% rename from src/turbulenceModels/compressible/kOmegaSST/kOmegaSST.H rename to src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaSST.H index 070d9df5dc..e0f124dcbf 100644 --- a/src/turbulenceModels/compressible/kOmegaSST/kOmegaSST.H +++ b/src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaSST.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::compressible::turbulenceModels::kOmegaSST + Foam::compressible::RAS::kOmegaSST Description Implementation of the k-omega-SST turbulence model for compressible flows. @@ -63,7 +63,7 @@ SourceFiles #ifndef compressiblekOmegaSST_H #define compressiblekOmegaSST_H -#include "turbulenceModel.H" +#include "RASmodel.H" #include "wallDist.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -72,7 +72,7 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -81,33 +81,33 @@ namespace turbulenceModels class kOmegaSST : - public turbulenceModel + public RASmodel { // Private data - dimensionedScalar alphaK1; - dimensionedScalar alphaK2; + scalar alphaK1; + scalar alphaK2; - dimensionedScalar alphaOmega1; - dimensionedScalar alphaOmega2; + scalar alphaOmega1; + scalar alphaOmega2; - dimensionedScalar alphah; + scalar alphah; - dimensionedScalar gamma1; - dimensionedScalar gamma2; + scalar gamma1; + scalar gamma2; - dimensionedScalar beta1; - dimensionedScalar beta2; + scalar beta1; + scalar beta2; - dimensionedScalar betaStar; + scalar betaStar; - dimensionedScalar a1; - dimensionedScalar c1; + scalar a1; + scalar c1; dimensionedScalar omega0_; dimensionedScalar omegaSmall_; - dimensionedScalar Cmu; + scalar Cmu; wallDist y_; @@ -271,7 +271,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS } // End namespace compressible } // End namespace Foam diff --git a/src/turbulenceModels/compressible/kOmegaSST/kOmegaWallFunctionsI.H b/src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaWallFunctionsI.H similarity index 98% rename from src/turbulenceModels/compressible/kOmegaSST/kOmegaWallFunctionsI.H rename to src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaWallFunctionsI.H index 7044139788..c6c2574337 100644 --- a/src/turbulenceModels/compressible/kOmegaSST/kOmegaWallFunctionsI.H +++ b/src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaWallFunctionsI.H @@ -33,7 +33,7 @@ Description { labelList cellBoundaryFaceCount(omega_.size(), 0); - scalar Cmu25 = pow(Cmu.value(), 0.25); + scalar Cmu25 = pow(Cmu, 0.25); const fvPatchList& patches = mesh_.boundary(); diff --git a/src/turbulenceModels/compressible/kOmegaSST/kOmegaWallViscosityI.H b/src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaWallViscosityI.H similarity index 96% rename from src/turbulenceModels/compressible/kOmegaSST/kOmegaWallViscosityI.H rename to src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaWallViscosityI.H index 5b49f68a33..1e454d41d5 100644 --- a/src/turbulenceModels/compressible/kOmegaSST/kOmegaWallViscosityI.H +++ b/src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaWallViscosityI.H @@ -31,7 +31,7 @@ Description \*---------------------------------------------------------------------------*/ { - scalar Cmu25 = pow(Cmu.value(), 0.25); + scalar Cmu25 = pow(Cmu, 0.25); const fvPatchList& patches = mesh_.boundary(); @@ -56,7 +56,7 @@ Description if (yPlus > yPlusLam_) { - mutw[facei] = + mutw[facei] = muw[facei] *(yPlus*kappa_/log(E_*yPlus) - 1); } diff --git a/src/turbulenceModels/compressible/kOmegaSST/wallOmegaI.H b/src/turbulenceModels/RAS/compressible/kOmegaSST/wallOmegaI.H similarity index 100% rename from src/turbulenceModels/compressible/kOmegaSST/wallOmegaI.H rename to src/turbulenceModels/RAS/compressible/kOmegaSST/wallOmegaI.H diff --git a/src/turbulenceModels/compressible/laminar/laminar.C b/src/turbulenceModels/RAS/compressible/laminar/laminar.C similarity index 95% rename from src/turbulenceModels/compressible/laminar/laminar.C rename to src/turbulenceModels/RAS/compressible/laminar/laminar.C index 0a576c96ec..e325766e27 100644 --- a/src/turbulenceModels/compressible/laminar/laminar.C +++ b/src/turbulenceModels/RAS/compressible/laminar/laminar.C @@ -33,13 +33,13 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // defineTypeNameAndDebug(laminar, 0); -addToRunTimeSelectionTable(turbulenceModel, laminar, dictionary); +addToRunTimeSelectionTable(RASmodel, laminar, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -51,7 +51,7 @@ laminar::laminar basicThermo& thermophysicalModel ) : - turbulenceModel(typeName, rho, U, phi, thermophysicalModel) + RASmodel(typeName, rho, U, phi, thermophysicalModel) {} @@ -178,7 +178,7 @@ tmp laminar::divDevRhoReff(volVectorField& U) const bool laminar::read() { - return turbulenceModel::read(); + return RASmodel::read(); } @@ -188,7 +188,7 @@ void laminar::correct() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS } // End namespace compressible } // End namespace Foam diff --git a/src/turbulenceModels/compressible/laminar/laminar.H b/src/turbulenceModels/RAS/compressible/laminar/laminar.H similarity index 95% rename from src/turbulenceModels/compressible/laminar/laminar.H rename to src/turbulenceModels/RAS/compressible/laminar/laminar.H index e3c062878f..d9a3dd61fc 100644 --- a/src/turbulenceModels/compressible/laminar/laminar.H +++ b/src/turbulenceModels/RAS/compressible/laminar/laminar.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::compressible::turbulenceModels::laminar + Foam::compressible::RAS::laminar Description Dummy turbulence model for laminar compressible flow. @@ -37,7 +37,7 @@ SourceFiles #ifndef compressibleLaminar_H #define compressibleLaminar_H -#include "turbulenceModel.H" +#include "RASmodel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -45,7 +45,7 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -54,7 +54,7 @@ namespace turbulenceModels class laminar : - public turbulenceModel + public RASmodel { public: @@ -124,7 +124,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS } // End namespace compressible } // End namespace Foam diff --git a/src/turbulenceModels/compressible/realizableKE/realizableKE.C b/src/turbulenceModels/RAS/compressible/realizableKE/realizableKE.C similarity index 85% rename from src/turbulenceModels/compressible/realizableKE/realizableKE.C rename to src/turbulenceModels/RAS/compressible/realizableKE/realizableKE.C index 421fc4db4a..6f2030f389 100644 --- a/src/turbulenceModels/compressible/realizableKE/realizableKE.C +++ b/src/turbulenceModels/RAS/compressible/realizableKE/realizableKE.C @@ -34,13 +34,13 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // defineTypeNameAndDebug(realizableKE, 0); -addToRunTimeSelectionTable(turbulenceModel, realizableKE, dictionary); +addToRunTimeSelectionTable(RASmodel, realizableKE, dictionary); // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // @@ -54,7 +54,7 @@ tmp realizableKE::rCmu tmp tS = dev(symm(gradU)); const volSymmTensorField& S = tS(); - volScalarField W = + volScalarField W = (2*sqrt(2.0))*((S&S)&&S) /( magS*S2 @@ -63,7 +63,7 @@ tmp realizableKE::rCmu tS.clear(); - volScalarField phis = + volScalarField phis = (1.0/3.0)*acos(min(max(sqrt(6.0)*W, -scalar(1)), scalar(1))); volScalarField As = sqrt(6.0)*cos(phis); volScalarField Us = sqrt(S2/2.0 + magSqr(skew(gradU))); @@ -93,14 +93,17 @@ realizableKE::realizableKE basicThermo& thermophysicalModel ) : - turbulenceModel(typeName, rho, U, phi, thermophysicalModel), - - Cmu(turbulenceModelCoeffs_.lookup("Cmu")), - A0(turbulenceModelCoeffs_.lookup("A0")), - C2(turbulenceModelCoeffs_.lookup("C2")), - alphak(turbulenceModelCoeffs_.lookup("alphak")), - alphaEps(turbulenceModelCoeffs_.lookup("alphaEps")), - alphah(turbulenceModelCoeffs_.lookup("alphah")), + RASmodel(typeName, rho, U, phi, thermophysicalModel), + + Cmu(RASmodelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), + A0(RASmodelCoeffs_.lookupOrAddDefault("A0", 4.0)), + C2(RASmodelCoeffs_.lookupOrAddDefault("C2", 1.9)), + alphak(RASmodelCoeffs_.lookupOrAddDefault("alphak", 1.0)), + alphaEps + ( + RASmodelCoeffs_.lookupOrAddDefault("alphaEps", 0.833333) + ), + alphah(RASmodelCoeffs_.lookupOrAddDefault("alphah", 1.0)), k_ ( @@ -144,6 +147,8 @@ realizableKE::realizableKE bound(k_, k0_); bound(epsilon_, epsilon0_); # include "wallViscosityI.H" + + printCoeffs(); } @@ -201,14 +206,14 @@ tmp realizableKE::divDevRhoReff(volVectorField& U) const bool realizableKE::read() { - if (turbulenceModel::read()) + if (RASmodel::read()) { - turbulenceModelCoeffs_.lookup("Cmu") >> Cmu; - turbulenceModelCoeffs_.lookup("A0") >> A0; - turbulenceModelCoeffs_.lookup("C2") >> C2; - turbulenceModelCoeffs_.lookup("alphak") >> alphak; - turbulenceModelCoeffs_.lookup("alphaEps") >> alphaEps; - turbulenceModelCoeffs_.lookup("alphah") >> alphah; + RASmodelCoeffs_.readIfPresent("Cmu", Cmu); + RASmodelCoeffs_.readIfPresent("A0", A0); + RASmodelCoeffs_.readIfPresent("C2", C2); + RASmodelCoeffs_.readIfPresent("alphak", alphak); + RASmodelCoeffs_.readIfPresent("alphaEps", alphaEps); + RASmodelCoeffs_.readIfPresent("alphah", alphah); return true; } @@ -228,7 +233,7 @@ void realizableKE::correct() return; } - turbulenceModel::correct(); + RASmodel::correct(); volScalarField divU = fvc::div(phi_/fvc::interpolate(rho_)); @@ -240,10 +245,10 @@ void realizableKE::correct() volTensorField gradU = fvc::grad(U_); volScalarField S2 = 2*magSqr(dev(symm(gradU))); volScalarField magS = sqrt(S2); - + volScalarField eta = magS*k_/epsilon_; volScalarField C1 = max(eta/(scalar(5) + eta), scalar(0.43)); - + volScalarField G = mut_*(gradU && dev(twoSymm(gradU))); # include "wallFunctionsI.H" @@ -286,7 +291,7 @@ void realizableKE::correct() kEqn().relax(); solve(kEqn); bound(k_, k0_); - + // Re-calculate viscosity mut_ = rCmu(gradU, S2, magS)*rho_*sqr(k_)/epsilon_; @@ -297,7 +302,7 @@ void realizableKE::correct() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS } // End namespace compressible } // End namespace Foam diff --git a/src/turbulenceModels/compressible/realizableKE/realizableKE.H b/src/turbulenceModels/RAS/compressible/realizableKE/realizableKE.H similarity index 92% rename from src/turbulenceModels/compressible/realizableKE/realizableKE.H rename to src/turbulenceModels/RAS/compressible/realizableKE/realizableKE.H index ce38735214..3b4b7d340a 100644 --- a/src/turbulenceModels/compressible/realizableKE/realizableKE.H +++ b/src/turbulenceModels/RAS/compressible/realizableKE/realizableKE.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::compressible::turbulenceModels::realizableKE + Foam::compressible::RAS::realizableKE Description Realizable k-epsilon turbulence model for compressible flows. @@ -47,7 +47,7 @@ SourceFiles #ifndef realizableKE_H #define realizableKE_H -#include "turbulenceModel.H" +#include "RASmodel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -55,7 +55,7 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -64,16 +64,16 @@ namespace turbulenceModels class realizableKE : - public turbulenceModel + public RASmodel { // Private data - dimensionedScalar Cmu; - dimensionedScalar A0; - dimensionedScalar C2; - dimensionedScalar alphak; - dimensionedScalar alphaEps; - dimensionedScalar alphah; + scalar Cmu; + scalar A0; + scalar C2; + scalar alphak; + scalar alphaEps; + scalar alphah; volScalarField k_; volScalarField epsilon_; @@ -179,7 +179,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS } // End namespace compressible } // End namespace Foam diff --git a/src/turbulenceModels/compressible/wallFunctions/mutWallFunctions/mutStandardRoughWallFunction/mutStandardRoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/RAS/compressible/wallFunctions/mutWallFunctions/mutStandardRoughWallFunction/mutStandardRoughWallFunctionFvPatchScalarField.C similarity index 98% rename from src/turbulenceModels/compressible/wallFunctions/mutWallFunctions/mutStandardRoughWallFunction/mutStandardRoughWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/RAS/compressible/wallFunctions/mutWallFunctions/mutStandardRoughWallFunction/mutStandardRoughWallFunctionFvPatchScalarField.C index 3c69402750..487a50f696 100644 --- a/src/turbulenceModels/compressible/wallFunctions/mutWallFunctions/mutStandardRoughWallFunction/mutStandardRoughWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/RAS/compressible/wallFunctions/mutWallFunctions/mutStandardRoughWallFunction/mutStandardRoughWallFunctionFvPatchScalarField.C @@ -25,7 +25,7 @@ License \*---------------------------------------------------------------------------*/ #include "mutStandardRoughWallFunctionFvPatchScalarField.H" -#include "turbulenceModel.H" +#include "RASmodel.H" #include "fvPatchFieldMapper.H" #include "volFields.H" #include "addToRunTimeSelectionTable.H" @@ -36,7 +36,7 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -120,8 +120,8 @@ void mutStandardRoughWallFunctionFvPatchScalarField::evaluate const Pstream::commsTypes ) { - const turbulenceModel& rasModel - = db().lookupObject("turbulenceProperties"); + const RASmodel& rasModel + = db().lookupObject("turbulenceProperties"); const scalar kappa = rasModel.kappa(); const scalar E = rasModel.E(); @@ -304,7 +304,7 @@ makePatchTypeField // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS } // End namespace compressible } // End namespace Foam diff --git a/src/turbulenceModels/compressible/wallFunctions/mutWallFunctions/mutStandardRoughWallFunction/mutStandardRoughWallFunctionFvPatchScalarField.H b/src/turbulenceModels/RAS/compressible/wallFunctions/mutWallFunctions/mutStandardRoughWallFunction/mutStandardRoughWallFunctionFvPatchScalarField.H similarity index 97% rename from src/turbulenceModels/compressible/wallFunctions/mutWallFunctions/mutStandardRoughWallFunction/mutStandardRoughWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/RAS/compressible/wallFunctions/mutWallFunctions/mutStandardRoughWallFunction/mutStandardRoughWallFunctionFvPatchScalarField.H index faba6f3e97..081f68ae67 100644 --- a/src/turbulenceModels/compressible/wallFunctions/mutWallFunctions/mutStandardRoughWallFunction/mutStandardRoughWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/RAS/compressible/wallFunctions/mutWallFunctions/mutStandardRoughWallFunction/mutStandardRoughWallFunctionFvPatchScalarField.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::compressible::turbulenceModels::mutStandardRoughWallFunctionFvPatchScalarField + Foam::compressible::RAS::mutStandardRoughWallFunctionFvPatchScalarField Description Wall function boundary condition for rough walls @@ -44,7 +44,7 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -189,7 +189,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS } // End namespace compressible } // End namespace Foam diff --git a/src/turbulenceModels/compressible/wallFunctions/wallDissipationI.H b/src/turbulenceModels/RAS/compressible/wallFunctions/wallDissipationI.H similarity index 100% rename from src/turbulenceModels/compressible/wallFunctions/wallDissipationI.H rename to src/turbulenceModels/RAS/compressible/wallFunctions/wallDissipationI.H diff --git a/src/turbulenceModels/compressible/wallFunctions/wallFunctionsI.H b/src/turbulenceModels/RAS/compressible/wallFunctions/wallFunctionsI.H similarity index 93% rename from src/turbulenceModels/compressible/wallFunctions/wallFunctionsI.H rename to src/turbulenceModels/RAS/compressible/wallFunctions/wallFunctionsI.H index abdfa559fc..b234ffa06b 100644 --- a/src/turbulenceModels/compressible/wallFunctions/wallFunctionsI.H +++ b/src/turbulenceModels/RAS/compressible/wallFunctions/wallFunctionsI.H @@ -33,8 +33,8 @@ Description { labelList cellBoundaryFaceCount(epsilon_.size(), 0); - scalar Cmu25 = pow(Cmu.value(), 0.25); - scalar Cmu75 = pow(Cmu.value(), 0.75); + scalar Cmu25 = pow(Cmu, 0.25); + scalar Cmu75 = pow(Cmu, 0.75); const fvPatchList& patches = mesh_.boundary(); @@ -78,7 +78,7 @@ Description label faceCelli = curPatch.faceCells()[facei]; scalar yPlus = - Cmu25*turbulenceModel::y_[patchi][facei] + Cmu25*RASmodel::y_[patchi][facei] *sqrt(k_[faceCelli]) /(muw[facei]/rhow[facei]); @@ -90,7 +90,7 @@ Description epsilon_[faceCelli] += Cmu75*pow(k_[faceCelli], 1.5) - /(kappa_*turbulenceModel::y_[patchi][facei]); + /(kappa_*RASmodel::y_[patchi][facei]); if (yPlus > yPlusLam_) { @@ -98,7 +98,7 @@ Description (mutw[facei] + muw[facei]) *magFaceGradU[facei] *Cmu25*sqrt(k_[faceCelli]) - /(kappa_*turbulenceModel::y_[patchi][facei]); + /(kappa_*RASmodel::y_[patchi][facei]); } } } diff --git a/src/turbulenceModels/compressible/wallFunctions/wallViscosityI.H b/src/turbulenceModels/RAS/compressible/wallFunctions/wallViscosityI.H similarity index 94% rename from src/turbulenceModels/compressible/wallFunctions/wallViscosityI.H rename to src/turbulenceModels/RAS/compressible/wallFunctions/wallViscosityI.H index bacc50e92c..e60a34d594 100644 --- a/src/turbulenceModels/compressible/wallFunctions/wallViscosityI.H +++ b/src/turbulenceModels/RAS/compressible/wallFunctions/wallViscosityI.H @@ -31,7 +31,7 @@ Description \*---------------------------------------------------------------------------*/ { - scalar Cmu25 = pow(Cmu.value(), 0.25); + scalar Cmu25 = pow(Cmu, 0.25); const fvPatchList& patches = mesh_.boundary(); @@ -51,12 +51,12 @@ Description label faceCelli = curPatch.faceCells()[facei]; scalar yPlus = - Cmu25*turbulenceModel::y_[patchi][facei] + Cmu25*RASmodel::y_[patchi][facei] *sqrt(k_[faceCelli])/(muw[facei]/rhow[facei]); if (yPlus > yPlusLam_) { - mutw[facei] = + mutw[facei] = muw[facei] *(yPlus*kappa_/log(E_*yPlus) - 1); } diff --git a/src/turbulenceModels/incompressible/LRR/LRR.C b/src/turbulenceModels/RAS/incompressible/LRR/LRR.C similarity index 78% rename from src/turbulenceModels/incompressible/LRR/LRR.C rename to src/turbulenceModels/RAS/incompressible/LRR/LRR.C index 1c37f360f7..b0e3cea24b 100644 --- a/src/turbulenceModels/incompressible/LRR/LRR.C +++ b/src/turbulenceModels/RAS/incompressible/LRR/LRR.C @@ -32,13 +32,15 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // defineTypeNameAndDebug(LRR, 0); -addToRunTimeSelectionTable(turbulenceModel, LRR, dictionary); +addToRunTimeSelectionTable(RASmodel, LRR, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -50,17 +52,23 @@ LRR::LRR transportModel& lamTransportModel ) : - turbulenceModel(typeName, U, phi, lamTransportModel), + RASmodel(typeName, U, phi, lamTransportModel), - Cmu(turbulenceModelCoeffs_.lookup("Cmu")), - Clrr1(turbulenceModelCoeffs_.lookup("Clrr1")), - Clrr2(turbulenceModelCoeffs_.lookup("Clrr2")), - C1(turbulenceModelCoeffs_.lookup("C1")), - C2(turbulenceModelCoeffs_.lookup("C2")), - Cs(turbulenceModelCoeffs_.lookup("Cs")), - Ceps(turbulenceModelCoeffs_.lookup("Ceps")), - alphaEps(turbulenceModelCoeffs_.lookup("alphaEps")), - couplingFactor_(0.0), + Cmu(RASmodelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), + Clrr1(RASmodelCoeffs_.lookupOrAddDefault("Clrr1", 1.8)), + Clrr2(RASmodelCoeffs_.lookupOrAddDefault("Clrr2", 0.6)), + C1(RASmodelCoeffs_.lookupOrAddDefault("C1", 1.44)), + C2(RASmodelCoeffs_.lookupOrAddDefault("C2", 1.92)), + Cs(RASmodelCoeffs_.lookupOrAddDefault("Cs", 0.25)), + Ceps(RASmodelCoeffs_.lookupOrAddDefault("Ceps", 0.15)), + alphaEps + ( + RASmodelCoeffs_.lookupOrAddDefault("alphaEps", 0.76923) + ), + couplingFactor_ + ( + RASmodelCoeffs_.lookupOrAddDefault("couplingFactor", 0.0) + ), R_ ( @@ -105,22 +113,19 @@ LRR::LRR { # include "wallViscosityI.H" - if (turbulenceModelCoeffs_.found("couplingFactor")) + if (couplingFactor_ < 0.0 || couplingFactor_ > 1.0) { - turbulenceModelCoeffs_.lookup("couplingFactor") >> couplingFactor_; - - if (couplingFactor_ < 0.0 || couplingFactor_ > 1.0) - { - FatalErrorIn - ( - "LRR::LRR" - "(const volVectorField& U, const surfaceScalarField& phi," - "transportModel& lamTransportModel)" - ) << "couplingFactor = " << couplingFactor_ - << " is not in range 0 - 1" - << exit(FatalError); - } + FatalErrorIn + ( + "LRR::LRR" + "(const volVectorField& U, const surfaceScalarField& phi," + "transportModel& lamTransportModel)" + ) << "couplingFactor = " << couplingFactor_ + << " is not in range 0 - 1" << nl + << exit(FatalError); } + + printCoeffs(); } @@ -171,18 +176,22 @@ tmp LRR::divDevReff(volVectorField& U) const bool LRR::read() { - if (turbulenceModel::read()) + if (RASmodel::read()) { - turbulenceModelCoeffs_.lookup("Cmu") >> Cmu; - turbulenceModelCoeffs_.lookup("Clrr1") >> Clrr1; - turbulenceModelCoeffs_.lookup("Clrr2") >> Clrr2; - turbulenceModelCoeffs_.lookup("C1") >> C1; - turbulenceModelCoeffs_.lookup("C2") >> C2; - turbulenceModelCoeffs_.lookup("Cs") >> Cs; - turbulenceModelCoeffs_.lookup("Ceps") >> Ceps; - turbulenceModelCoeffs_.lookup("alphaEps") >> alphaEps; + RASmodelCoeffs_.readIfPresent("Cmu", Cmu); + RASmodelCoeffs_.readIfPresent("Clrr1", Clrr1); + RASmodelCoeffs_.readIfPresent("Clrr2", Clrr2); + RASmodelCoeffs_.readIfPresent("C1", C1); + RASmodelCoeffs_.readIfPresent("C2", C2); + RASmodelCoeffs_.readIfPresent("Cs", Cs); + RASmodelCoeffs_.readIfPresent("Ceps", Ceps); + RASmodelCoeffs_.readIfPresent("alphaEps", alphaEps); - turbulenceModelCoeffs_.lookup("couplingFactor") >> couplingFactor_; + RASmodelCoeffs_.readIfPresent + ( + "couplingFactor", + couplingFactor_ + ); if (couplingFactor_ < 0.0 || couplingFactor_ > 1.0) { @@ -210,7 +219,7 @@ void LRR::correct() return; } - turbulenceModel::correct(); + RASmodel::correct(); volSymmTensorField P = -twoSymm(R_ & fvc::grad(U_)); volScalarField G = 0.5*tr(P); @@ -339,7 +348,8 @@ void LRR::correct() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LRR/LRR.H b/src/turbulenceModels/RAS/incompressible/LRR/LRR.H similarity index 90% rename from src/turbulenceModels/incompressible/LRR/LRR.H rename to src/turbulenceModels/RAS/incompressible/LRR/LRR.H index 04cec06c38..5384420a05 100644 --- a/src/turbulenceModels/incompressible/LRR/LRR.H +++ b/src/turbulenceModels/RAS/incompressible/LRR/LRR.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::turbulenceModels::LRR + Foam::incompressible::RAS::LRR Description Launder, Reece and Rodi Reynolds-stress turbulence model for @@ -37,13 +37,15 @@ SourceFiles #ifndef LRR_H #define LRR_H -#include "turbulenceModel.H" +#include "RASmodel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -52,20 +54,20 @@ namespace turbulenceModels class LRR : - public turbulenceModel + public RASmodel { // Private data - dimensionedScalar Cmu; + scalar Cmu; - dimensionedScalar Clrr1; - dimensionedScalar Clrr2; + scalar Clrr1; + scalar Clrr2; - dimensionedScalar C1; - dimensionedScalar C2; - dimensionedScalar Cs; - dimensionedScalar Ceps; - dimensionedScalar alphaEps; + scalar C1; + scalar C2; + scalar Cs; + scalar Ceps; + scalar alphaEps; scalar couplingFactor_; @@ -157,7 +159,8 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/incompressible/LamBremhorstKE/LamBremhorstKE.C b/src/turbulenceModels/RAS/incompressible/LamBremhorstKE/LamBremhorstKE.C similarity index 86% rename from src/turbulenceModels/incompressible/LamBremhorstKE/LamBremhorstKE.C rename to src/turbulenceModels/RAS/incompressible/LamBremhorstKE/LamBremhorstKE.C index bb506dc999..562a1640df 100644 --- a/src/turbulenceModels/incompressible/LamBremhorstKE/LamBremhorstKE.C +++ b/src/turbulenceModels/RAS/incompressible/LamBremhorstKE/LamBremhorstKE.C @@ -31,13 +31,15 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // defineTypeNameAndDebug(LamBremhorstKE, 0); -addToRunTimeSelectionTable(turbulenceModel, LamBremhorstKE, dictionary); +addToRunTimeSelectionTable(RASmodel, LamBremhorstKE, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -49,12 +51,15 @@ LamBremhorstKE::LamBremhorstKE transportModel& lamTransportModel ) : - turbulenceModel(typeName, U, phi, lamTransportModel), + RASmodel(typeName, U, phi, lamTransportModel), - Cmu(turbulenceModelCoeffs_.lookup("Cmu")), - C1(turbulenceModelCoeffs_.lookup("C1")), - C2(turbulenceModelCoeffs_.lookup("C2")), - alphaEps(turbulenceModelCoeffs_.lookup("alphaEps")), + Cmu(RASmodelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), + C1(RASmodelCoeffs_.lookupOrAddDefault("C1", 1.44)), + C2(RASmodelCoeffs_.lookupOrAddDefault("C2", 1.92)), + alphaEps + ( + RASmodelCoeffs_.lookupOrAddDefault("alphaEps", 0.76923) + ), k_ ( @@ -93,7 +98,9 @@ LamBremhorstKE::LamBremhorstKE ), nut_(Cmu*fMu_*sqr(k_)/(epsilon_ + epsilonSmall_)) -{} +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -151,12 +158,12 @@ tmp LamBremhorstKE::divDevReff(volVectorField& U) const bool LamBremhorstKE::read() { - if (turbulenceModel::read()) + if (RASmodel::read()) { - turbulenceModelCoeffs_.lookup("Cmu") >> Cmu; - turbulenceModelCoeffs_.lookup("C1") >> C1; - turbulenceModelCoeffs_.lookup("C2") >> C2; - turbulenceModelCoeffs_.lookup("alphaEps") >> alphaEps; + RASmodelCoeffs_.readIfPresent("Cmu", Cmu); + RASmodelCoeffs_.readIfPresent("C1", C1); + RASmodelCoeffs_.readIfPresent("C2", C2); + RASmodelCoeffs_.readIfPresent("alphaEps", alphaEps); return true; } @@ -176,7 +183,7 @@ void LamBremhorstKE::correct() return; } - turbulenceModel::correct(); + RASmodel::correct(); if (mesh_.changing()) { @@ -237,7 +244,8 @@ void LamBremhorstKE::correct() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LamBremhorstKE/LamBremhorstKE.H b/src/turbulenceModels/RAS/incompressible/LamBremhorstKE/LamBremhorstKE.H similarity index 91% rename from src/turbulenceModels/incompressible/LamBremhorstKE/LamBremhorstKE.H rename to src/turbulenceModels/RAS/incompressible/LamBremhorstKE/LamBremhorstKE.H index e791c01538..ef44721350 100644 --- a/src/turbulenceModels/incompressible/LamBremhorstKE/LamBremhorstKE.H +++ b/src/turbulenceModels/RAS/incompressible/LamBremhorstKE/LamBremhorstKE.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::turbulenceModels::LamBremhorstKE + Foam::incompressible::RAS::LamBremhorstKE Description Lam and Bremhorst low-Reynolds number k-epsilon turbulence model @@ -37,14 +37,16 @@ SourceFiles #ifndef LamBremhorstKE_H #define LamBremhorstKE_H -#include "turbulenceModel.H" +#include "RASmodel.H" #include "wallDist.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -53,14 +55,14 @@ namespace turbulenceModels class LamBremhorstKE : - public turbulenceModel + public RASmodel { // Private data - dimensionedScalar Cmu; - dimensionedScalar C1; - dimensionedScalar C2; - dimensionedScalar alphaEps; + scalar Cmu; + scalar C1; + scalar C2; + scalar alphaEps; volScalarField k_; volScalarField epsilon_; @@ -106,7 +108,7 @@ public: //- Return the effective diffusivity for k tmp DkEff() const { - return tmp + return tmp ( new volScalarField("DkEff", nut_ + nu()) ); @@ -115,7 +117,7 @@ public: //- Return the effective diffusivity for epsilon tmp DepsilonEff() const { - return tmp + return tmp ( new volScalarField("DepsilonEff", alphaEps*nut_ + nu()) ); @@ -152,7 +154,8 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C b/src/turbulenceModels/RAS/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C similarity index 76% rename from src/turbulenceModels/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C rename to src/turbulenceModels/RAS/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C index b01febba7b..0e9346319c 100644 --- a/src/turbulenceModels/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C +++ b/src/turbulenceModels/RAS/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C @@ -32,13 +32,15 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // defineTypeNameAndDebug(LaunderGibsonRSTM, 0); -addToRunTimeSelectionTable(turbulenceModel, LaunderGibsonRSTM, dictionary); +addToRunTimeSelectionTable(RASmodel, LaunderGibsonRSTM, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -50,20 +52,26 @@ LaunderGibsonRSTM::LaunderGibsonRSTM transportModel& lamTransportModel ) : - turbulenceModel(typeName, U, phi, lamTransportModel), + RASmodel(typeName, U, phi, lamTransportModel), - Cmu(turbulenceModelCoeffs_.lookup("Cmu")), - Clg1(turbulenceModelCoeffs_.lookup("Clg1")), - Clg2(turbulenceModelCoeffs_.lookup("Clg2")), - C1(turbulenceModelCoeffs_.lookup("C1")), - C2(turbulenceModelCoeffs_.lookup("C2")), - Cs(turbulenceModelCoeffs_.lookup("Cs")), - Ceps(turbulenceModelCoeffs_.lookup("Ceps")), - alphaR(turbulenceModelCoeffs_.lookup("alphaR")), - alphaEps(turbulenceModelCoeffs_.lookup("alphaEps")), - C1Ref(turbulenceModelCoeffs_.lookup("C1Ref")), - C2Ref(turbulenceModelCoeffs_.lookup("C2Ref")), - couplingFactor_(0.0), + Cmu(RASmodelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), + Clg1(RASmodelCoeffs_.lookupOrAddDefault("Clg1", 1.8)), + Clg2(RASmodelCoeffs_.lookupOrAddDefault("Clg2", 0.6)), + C1(RASmodelCoeffs_.lookupOrAddDefault("C1", 1.44)), + C2(RASmodelCoeffs_.lookupOrAddDefault("C2", 1.92)), + Cs(RASmodelCoeffs_.lookupOrAddDefault("Cs", 0.25)), + Ceps(RASmodelCoeffs_.lookupOrAddDefault("Ceps", 0.15)), + alphaR(RASmodelCoeffs_.lookupOrAddDefault("alphaR", 1.22)), + alphaEps + ( + RASmodelCoeffs_.lookupOrAddDefault("alphaEps", 0.76923) + ), + C1Ref(RASmodelCoeffs_.lookupOrAddDefault("C1Ref", 0.5)), + C2Ref(RASmodelCoeffs_.lookupOrAddDefault("C2Ref", 0.3)), + couplingFactor_ + ( + RASmodelCoeffs_.lookupOrAddDefault("couplingFactor", 0.0) + ), yr_(mesh_), @@ -110,22 +118,19 @@ LaunderGibsonRSTM::LaunderGibsonRSTM { # include "wallViscosityI.H" - if (turbulenceModelCoeffs_.found("couplingFactor")) + if (couplingFactor_ < 0.0 || couplingFactor_ > 1.0) { - turbulenceModelCoeffs_.lookup("couplingFactor") >> couplingFactor_; - - if (couplingFactor_ < 0.0 || couplingFactor_ > 1.0) - { - FatalErrorIn - ( - "LaunderGibsonRSTM::LaunderGibsonRSTM" - "(const volVectorField& U, const surfaceScalarField& phi," - "transportModel& lamTransportModel)" - ) << "couplingFactor = " << couplingFactor_ - << " is not in range 0 - 1" - << exit(FatalError); - } + FatalErrorIn + ( + "LaunderGibsonRSTM::LaunderGibsonRSTM" + "(const volVectorField& U, const surfaceScalarField& phi," + "transportModel& lamTransportModel)" + ) << "couplingFactor = " << couplingFactor_ + << " is not in range 0 - 1" << nl + << exit(FatalError); } + + printCoeffs(); } @@ -176,21 +181,25 @@ tmp LaunderGibsonRSTM::divDevReff(volVectorField& U) const bool LaunderGibsonRSTM::read() { - if (turbulenceModel::read()) + if (RASmodel::read()) { - turbulenceModelCoeffs_.lookup("Cmu") >> Cmu; - turbulenceModelCoeffs_.lookup("Clg1") >> Clg1; - turbulenceModelCoeffs_.lookup("Clg2") >> Clg2; - turbulenceModelCoeffs_.lookup("C1") >> C1; - turbulenceModelCoeffs_.lookup("C2") >> C2; - turbulenceModelCoeffs_.lookup("Cs") >> Cs; - turbulenceModelCoeffs_.lookup("Ceps") >> Ceps; - turbulenceModelCoeffs_.lookup("alphaR") >> alphaR; - turbulenceModelCoeffs_.lookup("alphaEps") >> alphaEps; - turbulenceModelCoeffs_.lookup("C1Ref") >> C1Ref; - turbulenceModelCoeffs_.lookup("C2Ref") >> C2Ref; + RASmodelCoeffs_.readIfPresent("Cmu", Cmu); + RASmodelCoeffs_.readIfPresent("Clg1", Clg1); + RASmodelCoeffs_.readIfPresent("Clg2", Clg2); + RASmodelCoeffs_.readIfPresent("C1", C1); + RASmodelCoeffs_.readIfPresent("C2", C2); + RASmodelCoeffs_.readIfPresent("Cs", Cs); + RASmodelCoeffs_.readIfPresent("Ceps", Ceps); + RASmodelCoeffs_.readIfPresent("alphaR", alphaR); + RASmodelCoeffs_.readIfPresent("alphaEps", alphaEps); + RASmodelCoeffs_.readIfPresent("C1Ref", C1Ref); + RASmodelCoeffs_.readIfPresent("C2Ref", C2Ref); - turbulenceModelCoeffs_.lookup("couplingFactor") >> couplingFactor_; + RASmodelCoeffs_.readIfPresent + ( + "couplingFactor", + couplingFactor_ + ); if (couplingFactor_ < 0.0 || couplingFactor_ > 1.0) { @@ -218,7 +227,7 @@ void LaunderGibsonRSTM::correct() return; } - turbulenceModel::correct(); + RASmodel::correct(); if (mesh_.changing()) { @@ -362,7 +371,8 @@ void LaunderGibsonRSTM::correct() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H b/src/turbulenceModels/RAS/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H similarity index 87% rename from src/turbulenceModels/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H rename to src/turbulenceModels/RAS/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H index fcce180317..27ea7bec61 100644 --- a/src/turbulenceModels/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H +++ b/src/turbulenceModels/RAS/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::turbulenceModels::LaunderGibsonRSTM + Foam::incompressible::RAS::LaunderGibsonRSTM Description Launder-Gibson Reynolds stress turbulence model for incompressible flows. @@ -36,14 +36,16 @@ SourceFiles #ifndef LaunderGibsonRSTM_H #define LaunderGibsonRSTM_H -#include "turbulenceModel.H" +#include "RASmodel.H" #include "wallDistReflection.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -52,24 +54,24 @@ namespace turbulenceModels class LaunderGibsonRSTM : - public turbulenceModel + public RASmodel { // Private data - dimensionedScalar Cmu; + scalar Cmu; - dimensionedScalar Clg1; - dimensionedScalar Clg2; + scalar Clg1; + scalar Clg2; - dimensionedScalar C1; - dimensionedScalar C2; - dimensionedScalar Cs; - dimensionedScalar Ceps; - dimensionedScalar alphaR; - dimensionedScalar alphaEps; + scalar C1; + scalar C2; + scalar Cs; + scalar Ceps; + scalar alphaR; + scalar alphaEps; - dimensionedScalar C1Ref; - dimensionedScalar C2Ref; + scalar C1Ref; + scalar C2Ref; scalar couplingFactor_; @@ -114,7 +116,7 @@ public: //- Return the effective diffusivity for R tmp DREff() const { - return tmp + return tmp ( new volScalarField("DREff", alphaR*nut_ + nu()) ); @@ -123,7 +125,7 @@ public: //- Return the effective diffusivity for epsilon tmp DepsilonEff() const { - return tmp + return tmp ( new volScalarField("DepsilonEff", alphaEps*nut_ + nu()) ); @@ -163,7 +165,8 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/incompressible/LaunderSharmaKE/LaunderSharmaKE.C b/src/turbulenceModels/RAS/incompressible/LaunderSharmaKE/LaunderSharmaKE.C similarity index 86% rename from src/turbulenceModels/incompressible/LaunderSharmaKE/LaunderSharmaKE.C rename to src/turbulenceModels/RAS/incompressible/LaunderSharmaKE/LaunderSharmaKE.C index f6d08178b3..4f69418ef3 100644 --- a/src/turbulenceModels/incompressible/LaunderSharmaKE/LaunderSharmaKE.C +++ b/src/turbulenceModels/RAS/incompressible/LaunderSharmaKE/LaunderSharmaKE.C @@ -31,13 +31,15 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // defineTypeNameAndDebug(LaunderSharmaKE, 0); -addToRunTimeSelectionTable(turbulenceModel, LaunderSharmaKE, dictionary); +addToRunTimeSelectionTable(RASmodel, LaunderSharmaKE, dictionary); // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // @@ -64,12 +66,15 @@ LaunderSharmaKE::LaunderSharmaKE transportModel& lamTransportModel ) : - turbulenceModel(typeName, U, phi, lamTransportModel), + RASmodel(typeName, U, phi, lamTransportModel), - Cmu(turbulenceModelCoeffs_.lookup("Cmu")), - C1(turbulenceModelCoeffs_.lookup("C1")), - C2(turbulenceModelCoeffs_.lookup("C2")), - alphaEps(turbulenceModelCoeffs_.lookup("alphaEps")), + Cmu(RASmodelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), + C1(RASmodelCoeffs_.lookupOrAddDefault("C1", 1.44)), + C2(RASmodelCoeffs_.lookupOrAddDefault("C2", 1.92)), + alphaEps + ( + RASmodelCoeffs_.lookupOrAddDefault("alphaEps", 0.76923) + ), k_ ( @@ -98,7 +103,9 @@ LaunderSharmaKE::LaunderSharmaKE ), nut_(Cmu*fMu()*sqr(k_)/(epsilonTilda_ + epsilonSmall_)) -{} +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -156,12 +163,12 @@ tmp LaunderSharmaKE::divDevReff(volVectorField& U) const bool LaunderSharmaKE::read() { - if (turbulenceModel::read()) + if (RASmodel::read()) { - turbulenceModelCoeffs_.lookup("Cmu") >> Cmu; - turbulenceModelCoeffs_.lookup("C1") >> C1; - turbulenceModelCoeffs_.lookup("C2") >> C2; - turbulenceModelCoeffs_.lookup("alphaEps") >> alphaEps; + RASmodelCoeffs_.readIfPresent("Cmu", Cmu); + RASmodelCoeffs_.readIfPresent("C1", C1); + RASmodelCoeffs_.readIfPresent("C2", C2); + RASmodelCoeffs_.readIfPresent("alphaEps", alphaEps); return true; } @@ -181,7 +188,7 @@ void LaunderSharmaKE::correct() return; } - turbulenceModel::correct(); + RASmodel::correct(); volScalarField S2 = 2*magSqr(symm(fvc::grad(U_))); @@ -232,7 +239,8 @@ void LaunderSharmaKE::correct() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LaunderSharmaKE/LaunderSharmaKE.H b/src/turbulenceModels/RAS/incompressible/LaunderSharmaKE/LaunderSharmaKE.H similarity index 91% rename from src/turbulenceModels/incompressible/LaunderSharmaKE/LaunderSharmaKE.H rename to src/turbulenceModels/RAS/incompressible/LaunderSharmaKE/LaunderSharmaKE.H index 34a03c4027..a43dbfd5da 100644 --- a/src/turbulenceModels/incompressible/LaunderSharmaKE/LaunderSharmaKE.H +++ b/src/turbulenceModels/RAS/incompressible/LaunderSharmaKE/LaunderSharmaKE.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::turbulenceModels::LaunderSharmaKE + Foam::incompressible::RAS::LaunderSharmaKE Description Launder and Sharma low-Reynolds k-epsilon turbulence model for @@ -37,13 +37,15 @@ SourceFiles #ifndef LaunderSharmaKE_H #define LaunderSharmaKE_H -#include "turbulenceModel.H" +#include "RASmodel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -52,14 +54,14 @@ namespace turbulenceModels class LaunderSharmaKE : - public turbulenceModel + public RASmodel { // Private data - dimensionedScalar Cmu; - dimensionedScalar C1; - dimensionedScalar C2; - dimensionedScalar alphaEps; + scalar Cmu; + scalar C1; + scalar C2; + scalar alphaEps; volScalarField k_; volScalarField epsilonTilda_; @@ -106,7 +108,7 @@ public: //- Return the effective diffusivity for k tmp DkEff() const { - return tmp + return tmp ( new volScalarField("DkEff", nut_ + nu()) ); @@ -115,7 +117,7 @@ public: //- Return the effective diffusivity for epsilon tmp DepsilonEff() const { - return tmp + return tmp ( new volScalarField("DepsilonEff", alphaEps*nut_ + nu()) ); @@ -153,7 +155,8 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/incompressible/LienCubicKE/LienCubicKE.C b/src/turbulenceModels/RAS/incompressible/LienCubicKE/LienCubicKE.C similarity index 81% rename from src/turbulenceModels/incompressible/LienCubicKE/LienCubicKE.C rename to src/turbulenceModels/RAS/incompressible/LienCubicKE/LienCubicKE.C index a64913bda7..6f4c71588b 100644 --- a/src/turbulenceModels/incompressible/LienCubicKE/LienCubicKE.C +++ b/src/turbulenceModels/RAS/incompressible/LienCubicKE/LienCubicKE.C @@ -32,13 +32,15 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // defineTypeNameAndDebug(LienCubicKE, 0); -addToRunTimeSelectionTable(turbulenceModel, LienCubicKE, dictionary); +addToRunTimeSelectionTable(RASmodel, LienCubicKE, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -50,18 +52,21 @@ LienCubicKE::LienCubicKE transportModel& lamTransportModel ) : - turbulenceModel(typeName, U, phi, lamTransportModel), + RASmodel(typeName, U, phi, lamTransportModel), - C1(turbulenceModelCoeffs_.lookup("C1")), - C2(turbulenceModelCoeffs_.lookup("C2")), - alphak(turbulenceModelCoeffs_.lookup("alphak")), - alphaEps(turbulenceModelCoeffs_.lookup("alphaEps")), - A1(turbulenceModelCoeffs_.lookup("A1")), - A2(turbulenceModelCoeffs_.lookup("A2")), - Ctau1(turbulenceModelCoeffs_.lookup("Ctau1")), - Ctau2(turbulenceModelCoeffs_.lookup("Ctau2")), - Ctau3(turbulenceModelCoeffs_.lookup("Ctau3")), - alphaKsi(turbulenceModelCoeffs_.lookup("alphaKsi")), + C1(RASmodelCoeffs_.lookupOrAddDefault("C1", 1.44)), + C2(RASmodelCoeffs_.lookupOrAddDefault("C2", 1.92)), + alphak(RASmodelCoeffs_.lookupOrAddDefault("alphak", 1.0)), + alphaEps + ( + RASmodelCoeffs_.lookupOrAddDefault("alphaEps", 0.76923) + ), + A1(RASmodelCoeffs_.lookupOrAddDefault("A1", 1.25)), + A2(RASmodelCoeffs_.lookupOrAddDefault("A2", 1000.0)), + Ctau1(RASmodelCoeffs_.lookupOrAddDefault("Ctau1", -4.0)), + Ctau2(RASmodelCoeffs_.lookupOrAddDefault("Ctau2", 13.0)), + Ctau3(RASmodelCoeffs_.lookupOrAddDefault("Ctau3", -2.0)), + alphaKsi(RASmodelCoeffs_.lookupOrAddDefault("alphaKsi", 0.9)), k_ ( @@ -134,6 +139,8 @@ LienCubicKE::LienCubicKE ) { # include "wallNonlinearViscosityI.H" + + printCoeffs(); } @@ -193,18 +200,18 @@ tmp LienCubicKE::divDevReff(volVectorField& U) const bool LienCubicKE::read() { - if (turbulenceModel::read()) + if (RASmodel::read()) { - turbulenceModelCoeffs_.lookup("C1") >> C1; - turbulenceModelCoeffs_.lookup("C2") >> C2; - turbulenceModelCoeffs_.lookup("alphak") >> alphak; - turbulenceModelCoeffs_.lookup("alphaEps") >> alphaEps; - turbulenceModelCoeffs_.lookup("A1") >> A1; - turbulenceModelCoeffs_.lookup("A2") >> A2; - turbulenceModelCoeffs_.lookup("Ctau1") >> Ctau1; - turbulenceModelCoeffs_.lookup("Ctau2") >> Ctau2; - turbulenceModelCoeffs_.lookup("Ctau3") >> Ctau3; - turbulenceModelCoeffs_.lookup("alphaKsi") >> alphaKsi; + RASmodelCoeffs_.readIfPresent("C1", C1); + RASmodelCoeffs_.readIfPresent("C2", C2); + RASmodelCoeffs_.readIfPresent("alphak", alphak); + RASmodelCoeffs_.readIfPresent("alphaEps", alphaEps); + RASmodelCoeffs_.readIfPresent("A1", A1); + RASmodelCoeffs_.readIfPresent("A2", A2); + RASmodelCoeffs_.readIfPresent("Ctau1", Ctau1); + RASmodelCoeffs_.readIfPresent("Ctau2", Ctau2); + RASmodelCoeffs_.readIfPresent("Ctau3", Ctau3); + RASmodelCoeffs_.readIfPresent("alphaKsi", alphaKsi); return true; } @@ -224,7 +231,7 @@ void LienCubicKE::correct() return; } - turbulenceModel::correct(); + RASmodel::correct(); gradU = fvc::grad(U_); @@ -314,7 +321,8 @@ void LienCubicKE::correct() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LienCubicKE/LienCubicKE.H b/src/turbulenceModels/RAS/incompressible/LienCubicKE/LienCubicKE.H similarity index 87% rename from src/turbulenceModels/incompressible/LienCubicKE/LienCubicKE.H rename to src/turbulenceModels/RAS/incompressible/LienCubicKE/LienCubicKE.H index 59429c0bd1..798655e1b5 100644 --- a/src/turbulenceModels/incompressible/LienCubicKE/LienCubicKE.H +++ b/src/turbulenceModels/RAS/incompressible/LienCubicKE/LienCubicKE.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::turbulenceModels::LienCubicKE + Foam::incompressible::RAS::LienCubicKE Description Lien cubic non-linear k-epsilon turbulence model for incompressible flows. @@ -36,13 +36,15 @@ SourceFiles #ifndef LienCubicKE_H #define LienCubicKE_H -#include "turbulenceModel.H" +#include "RASmodel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -51,20 +53,20 @@ namespace turbulenceModels class LienCubicKE : - public turbulenceModel + public RASmodel { // Private data - dimensionedScalar C1; - dimensionedScalar C2; - dimensionedScalar alphak; - dimensionedScalar alphaEps; - dimensionedScalar A1; - dimensionedScalar A2; - dimensionedScalar Ctau1; - dimensionedScalar Ctau2; - dimensionedScalar Ctau3; - dimensionedScalar alphaKsi; + scalar C1; + scalar C2; + scalar alphak; + scalar alphaEps; + scalar A1; + scalar A2; + scalar Ctau1; + scalar Ctau2; + scalar Ctau3; + scalar alphaKsi; volScalarField k_; volScalarField epsilon_; @@ -114,7 +116,7 @@ public: //- Return the effective diffusivity for k tmp DkEff() const { - return tmp + return tmp ( new volScalarField("DkEff", alphak*nut_ + nu()) ); @@ -123,7 +125,7 @@ public: //- Return the effective diffusivity for epsilon tmp DepsilonEff() const { - return tmp + return tmp ( new volScalarField("DepsilonEff", alphaEps*nut_ + nu()) ); @@ -160,7 +162,8 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/incompressible/LienCubicKELowRe/LienCubicKELowRe.C b/src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowRe.C similarity index 79% rename from src/turbulenceModels/incompressible/LienCubicKELowRe/LienCubicKELowRe.C rename to src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowRe.C index b72ee3cf14..ba18e63bb5 100644 --- a/src/turbulenceModels/incompressible/LienCubicKELowRe/LienCubicKELowRe.C +++ b/src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowRe.C @@ -32,13 +32,15 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // defineTypeNameAndDebug(LienCubicKELowRe, 0); -addToRunTimeSelectionTable(turbulenceModel, LienCubicKELowRe, dictionary); +addToRunTimeSelectionTable(RASmodel, LienCubicKELowRe, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -50,22 +52,28 @@ LienCubicKELowRe::LienCubicKELowRe transportModel& lamTransportModel ) : - turbulenceModel(typeName, U, phi, lamTransportModel), + RASmodel(typeName, U, phi, lamTransportModel), - C1(turbulenceModelCoeffs_.lookup("C1")), - C2(turbulenceModelCoeffs_.lookup("C2")), - alphak(turbulenceModelCoeffs_.lookup("alphak")), - alphaEps(turbulenceModelCoeffs_.lookup("alphaEps")), - A1(turbulenceModelCoeffs_.lookup("A1")), - A2(turbulenceModelCoeffs_.lookup("A2")), - Ctau1(turbulenceModelCoeffs_.lookup("Ctau1")), - Ctau2(turbulenceModelCoeffs_.lookup("Ctau2")), - Ctau3(turbulenceModelCoeffs_.lookup("Ctau3")), - alphaKsi(turbulenceModelCoeffs_.lookup("alphaKsi")), - CmuWall(turbulenceModelCoeffs_.lookup("Cmu")), - Am(turbulenceModelCoeffs_.lookup("Am")), - Aepsilon(turbulenceModelCoeffs_.lookup("Aepsilon")), - Amu(turbulenceModelCoeffs_.lookup("Amu")), + C1(RASmodelCoeffs_.lookupOrAddDefault("C1", 1.44)), + C2(RASmodelCoeffs_.lookupOrAddDefault("C2", 1.92)), + alphak(RASmodelCoeffs_.lookupOrAddDefault("alphak", 1.0)), + alphaEps + ( + RASmodelCoeffs_.lookupOrAddDefault("alphaEps", 0.76923) + ), + A1(RASmodelCoeffs_.lookupOrAddDefault("A1", 1.25)), + A2(RASmodelCoeffs_.lookupOrAddDefault("A2", 1000.0)), + Ctau1(RASmodelCoeffs_.lookupOrAddDefault("Ctau1", -4.0)), + Ctau2(RASmodelCoeffs_.lookupOrAddDefault("Ctau2", 13.0)), + Ctau3(RASmodelCoeffs_.lookupOrAddDefault("Ctau3", -2.0)), + alphaKsi(RASmodelCoeffs_.lookupOrAddDefault("alphaKsi", 0.9)), + CmuWall(RASmodelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), + Am(RASmodelCoeffs_.lookupOrAddDefault("Am", 0.016)), + Aepsilon + ( + RASmodelCoeffs_.lookupOrAddDefault("Aepsilon", 0.263) + ), + Amu(RASmodelCoeffs_.lookupOrAddDefault("Amu", 0.00222)), k_ ( @@ -159,7 +167,9 @@ LienCubicKELowRe::LienCubicKELowRe )*gradU ) ) -{} +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -218,22 +228,22 @@ tmp LienCubicKELowRe::divDevReff(volVectorField& U) const bool LienCubicKELowRe::read() { - if (turbulenceModel::read()) + if (RASmodel::read()) { - turbulenceModelCoeffs_.lookup("C1") >> C1; - turbulenceModelCoeffs_.lookup("C2") >> C2; - turbulenceModelCoeffs_.lookup("alphak") >> alphak; - turbulenceModelCoeffs_.lookup("alphaEps") >> alphaEps; - turbulenceModelCoeffs_.lookup("A1") >> A1; - turbulenceModelCoeffs_.lookup("A2") >> A2; - turbulenceModelCoeffs_.lookup("Ctau1") >> Ctau1; - turbulenceModelCoeffs_.lookup("Ctau2") >> Ctau2; - turbulenceModelCoeffs_.lookup("Ctau3") >> Ctau3; - turbulenceModelCoeffs_.lookup("alphaKsi") >> alphaKsi; - turbulenceModelCoeffs_.lookup("Cmu") >> CmuWall; - turbulenceModelCoeffs_.lookup("Am") >> Am; - turbulenceModelCoeffs_.lookup("Aepsilon") >> Aepsilon; - turbulenceModelCoeffs_.lookup("Amu") >> Amu; + RASmodelCoeffs_.readIfPresent("C1", C1); + RASmodelCoeffs_.readIfPresent("C2", C2); + RASmodelCoeffs_.readIfPresent("alphak", alphak); + RASmodelCoeffs_.readIfPresent("alphaEps", alphaEps); + RASmodelCoeffs_.readIfPresent("A1", A1); + RASmodelCoeffs_.readIfPresent("A2", A2); + RASmodelCoeffs_.readIfPresent("Ctau1", Ctau1); + RASmodelCoeffs_.readIfPresent("Ctau2", Ctau2); + RASmodelCoeffs_.readIfPresent("Ctau3", Ctau3); + RASmodelCoeffs_.readIfPresent("alphaKsi", alphaKsi); + RASmodelCoeffs_.readIfPresent("Cmu", CmuWall); + RASmodelCoeffs_.readIfPresent("Am", Am); + RASmodelCoeffs_.readIfPresent("Aepsilon", Aepsilon); + RASmodelCoeffs_.readIfPresent("Amu", Amu); return true; } @@ -253,7 +263,7 @@ void LienCubicKELowRe::correct() return; } - turbulenceModel::correct(); + RASmodel::correct(); if (mesh_.changing()) { @@ -372,7 +382,8 @@ void LienCubicKELowRe::correct() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LienCubicKELowRe/LienCubicKELowRe.H b/src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowRe.H similarity index 88% rename from src/turbulenceModels/incompressible/LienCubicKELowRe/LienCubicKELowRe.H rename to src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowRe.H index e6978eea9a..c366422bdb 100644 --- a/src/turbulenceModels/incompressible/LienCubicKELowRe/LienCubicKELowRe.H +++ b/src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowRe.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::turbulenceModels::LienCubicKELowRe + Foam::incompressible::RAS::LienCubicKELowRe Description Lien cubic non-linear low-Reynolds k-epsilon turbulence models for @@ -51,14 +51,16 @@ SourceFiles #ifndef LienCubicKELowRe_H #define LienCubicKELowRe_H -#include "turbulenceModel.H" +#include "RASmodel.H" #include "wallDist.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -67,26 +69,26 @@ namespace turbulenceModels class LienCubicKELowRe : - public turbulenceModel + public RASmodel { // Private data - dimensionedScalar C1; - dimensionedScalar C2; - dimensionedScalar alphak; - dimensionedScalar alphaEps; - dimensionedScalar A1; - dimensionedScalar A2; - dimensionedScalar Ctau1; - dimensionedScalar Ctau2; - dimensionedScalar Ctau3; - dimensionedScalar alphaKsi; + scalar C1; + scalar C2; + scalar alphak; + scalar alphaEps; + scalar A1; + scalar A2; + scalar Ctau1; + scalar Ctau2; + scalar Ctau3; + scalar alphaKsi; - dimensionedScalar CmuWall; + scalar CmuWall; - dimensionedScalar Am; - dimensionedScalar Aepsilon; - dimensionedScalar Amu; + scalar Am; + scalar Aepsilon; + scalar Amu; volScalarField k_; volScalarField epsilon_; @@ -185,7 +187,8 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // Edn namespace incompressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/incompressible/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H b/src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H similarity index 90% rename from src/turbulenceModels/incompressible/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H rename to src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H index f4b7dfc5c3..f3bb91f17e 100644 --- a/src/turbulenceModels/incompressible/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H +++ b/src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H @@ -5,7 +5,7 @@ labelList cellBoundaryFaceCount(epsilon_.size(), 0); //- use constant Cmu for epsilon in the near-wall cell - scalar Cmu75 = pow(CmuWall.value(), 0.75); + scalar Cmu75 = pow(CmuWall, 0.75); const fvPatchList& patches = mesh_.boundary(); @@ -44,9 +44,9 @@ Cmu75*pow(k_[faceCelli], 1.5) /( kappa_*y_[faceCelli] - *(1.0 - exp(-Aepsilon.value()*yStar[faceCelli])) + *(1.0 - exp(-Aepsilon*yStar[faceCelli])) ) - *exp(-Amu.value()*sqr(yStar[faceCelli])); + *exp(-Amu*sqr(yStar[faceCelli])); } } diff --git a/src/turbulenceModels/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.C b/src/turbulenceModels/RAS/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.C similarity index 79% rename from src/turbulenceModels/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.C rename to src/turbulenceModels/RAS/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.C index 1dbba5a001..119f7ca262 100644 --- a/src/turbulenceModels/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.C +++ b/src/turbulenceModels/RAS/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.C @@ -32,13 +32,15 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // defineTypeNameAndDebug(LienLeschzinerLowRe, 0); -addToRunTimeSelectionTable(turbulenceModel, LienLeschzinerLowRe, dictionary); +addToRunTimeSelectionTable(RASmodel, LienLeschzinerLowRe, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -50,16 +52,22 @@ LienLeschzinerLowRe::LienLeschzinerLowRe transportModel& lamTransportModel ) : - turbulenceModel(typeName, U, phi, lamTransportModel), + RASmodel(typeName, U, phi, lamTransportModel), - C1(turbulenceModelCoeffs_.lookup("C1")), - C2(turbulenceModelCoeffs_.lookup("C2")), - alphak(turbulenceModelCoeffs_.lookup("alphak")), - alphaEps(turbulenceModelCoeffs_.lookup("alphaEps")), - Cmu(turbulenceModelCoeffs_.lookup("Cmu")), - Am(turbulenceModelCoeffs_.lookup("Am")), - Aepsilon(turbulenceModelCoeffs_.lookup("Aepsilon")), - Amu(turbulenceModelCoeffs_.lookup("Amu")), + C1(RASmodelCoeffs_.lookupOrAddDefault("C1", 1.44)), + C2(RASmodelCoeffs_.lookupOrAddDefault("C2", 1.92)), + alphak(RASmodelCoeffs_.lookupOrAddDefault("alphak", 1.0)), + alphaEps + ( + RASmodelCoeffs_.lookupOrAddDefault("alphaEps", 0.76923) + ), + Cmu(RASmodelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), + Am(RASmodelCoeffs_.lookupOrAddDefault("Am", 0.016)), + Aepsilon + ( + RASmodelCoeffs_.lookupOrAddDefault("Aepsilon", 0.263) + ), + Amu(RASmodelCoeffs_.lookupOrAddDefault("Amu", 0.00222)), k_ ( @@ -97,7 +105,9 @@ LienLeschzinerLowRe::LienLeschzinerLowRe /(scalar(1) - exp(-Aepsilon*yStar_) + SMALL)*sqr(k_) /(epsilon_ + epsilonSmall_) ) -{} +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -158,16 +168,16 @@ tmp LienLeschzinerLowRe::divDevReff(volVectorField& U) const bool LienLeschzinerLowRe::read() { - if (turbulenceModel::read()) + if (RASmodel::read()) { - turbulenceModelCoeffs_.lookup("C1") >> C1; - turbulenceModelCoeffs_.lookup("C2") >> C2; - turbulenceModelCoeffs_.lookup("alphak") >> alphak; - turbulenceModelCoeffs_.lookup("alphaEps") >> alphaEps; - turbulenceModelCoeffs_.lookup("Cmu") >> Cmu; - turbulenceModelCoeffs_.lookup("Am") >> Am; - turbulenceModelCoeffs_.lookup("Aepsilon") >> Aepsilon; - turbulenceModelCoeffs_.lookup("Amu") >> Amu; + RASmodelCoeffs_.readIfPresent("C1", C1); + RASmodelCoeffs_.readIfPresent("C2", C2); + RASmodelCoeffs_.readIfPresent("alphak", alphak); + RASmodelCoeffs_.readIfPresent("alphaEps", alphaEps); + RASmodelCoeffs_.readIfPresent("Cmu", Cmu); + RASmodelCoeffs_.readIfPresent("Am", Am); + RASmodelCoeffs_.readIfPresent("Aepsilon", Aepsilon); + RASmodelCoeffs_.readIfPresent("Amu", Amu); return true; } @@ -187,14 +197,14 @@ void LienLeschzinerLowRe::correct() return; } - turbulenceModel::correct(); + RASmodel::correct(); if (mesh_.changing()) { y_.correct(); } - scalar Cmu75 = pow(Cmu.value(), 0.75); + scalar Cmu75 = pow(Cmu, 0.75); volTensorField gradU = fvc::grad(U_); @@ -261,7 +271,8 @@ void LienLeschzinerLowRe::correct() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.H b/src/turbulenceModels/RAS/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.H similarity index 88% rename from src/turbulenceModels/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.H rename to src/turbulenceModels/RAS/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.H index 815f38e79d..8ecbf82744 100644 --- a/src/turbulenceModels/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.H +++ b/src/turbulenceModels/RAS/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::turbulenceModels::LienLeschzinerLowRe + Foam::incompressible::RAS::LienLeschzinerLowRe Description Lien and Leschziner low-Reynolds k-epsilon turbulence model for @@ -37,14 +37,16 @@ SourceFiles #ifndef LienLeschzinerLowRe_H #define LienLeschzinerLowRe_H -#include "turbulenceModel.H" +#include "RASmodel.H" #include "wallDist.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -53,19 +55,19 @@ namespace turbulenceModels class LienLeschzinerLowRe : - public turbulenceModel + public RASmodel { // Private data - dimensionedScalar C1; - dimensionedScalar C2; - dimensionedScalar alphak; - dimensionedScalar alphaEps; - dimensionedScalar Cmu; + scalar C1; + scalar C2; + scalar alphak; + scalar alphaEps; + scalar Cmu; - dimensionedScalar Am; - dimensionedScalar Aepsilon; - dimensionedScalar Amu; + scalar Am; + scalar Aepsilon; + scalar Amu; volScalarField k_; volScalarField epsilon_; @@ -109,7 +111,7 @@ public: //- Return the effective diffusivity for k tmp DkEff() const { - return tmp + return tmp ( new volScalarField("DkEff", alphak*nut_ + nu()) ); @@ -118,7 +120,7 @@ public: //- Return the effective diffusivity for epsilon tmp DepsilonEff() const { - return tmp + return tmp ( new volScalarField("DepsilonEff", alphaEps*nut_ + nu()) ); @@ -155,7 +157,8 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/incompressible/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H b/src/turbulenceModels/RAS/incompressible/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H similarity index 90% rename from src/turbulenceModels/incompressible/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H rename to src/turbulenceModels/RAS/incompressible/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H index 437fa55785..cfda062b59 100644 --- a/src/turbulenceModels/incompressible/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H +++ b/src/turbulenceModels/RAS/incompressible/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H @@ -5,7 +5,7 @@ labelList cellBoundaryFaceCount(epsilon_.size(), 0); //- use constant Cmu for epsilon in the near-wall cell - scalar Cmu75 = pow(Cmu.value(), 0.75); + scalar Cmu75 = pow(Cmu, 0.75); const fvPatchList& patches = mesh_.boundary(); @@ -44,9 +44,9 @@ Cmu75*pow(k_[faceCelli], 1.5) /( kappa_*y_[faceCelli] - *(1.0 - exp(-Aepsilon.value()*yStar_[faceCelli])) + *(1.0 - exp(-Aepsilon*yStar_[faceCelli])) ) - *exp(-Amu.value()*sqr(yStar_[faceCelli])); + *exp(-Amu*sqr(yStar_[faceCelli])); } } diff --git a/src/turbulenceModels/incompressible/Make/files b/src/turbulenceModels/RAS/incompressible/Make/files similarity index 91% rename from src/turbulenceModels/incompressible/Make/files rename to src/turbulenceModels/RAS/incompressible/Make/files index e22ea7b007..a8f6b81c88 100644 --- a/src/turbulenceModels/incompressible/Make/files +++ b/src/turbulenceModels/RAS/incompressible/Make/files @@ -1,5 +1,5 @@ -turbulenceModel/turbulenceModel.C -turbulenceModel/newTurbulenceModel.C +RASmodel/RASmodel.C +RASmodel/newRASmodel.C laminar/laminar.C kEpsilon/kEpsilon.C RNGkEpsilon/RNGkEpsilon.C diff --git a/src/turbulenceModels/incompressible/Make/options b/src/turbulenceModels/RAS/incompressible/Make/options similarity index 100% rename from src/turbulenceModels/incompressible/Make/options rename to src/turbulenceModels/RAS/incompressible/Make/options diff --git a/src/turbulenceModels/incompressible/NonlinearKEShih/NonlinearKEShih.C b/src/turbulenceModels/RAS/incompressible/NonlinearKEShih/NonlinearKEShih.C similarity index 78% rename from src/turbulenceModels/incompressible/NonlinearKEShih/NonlinearKEShih.C rename to src/turbulenceModels/RAS/incompressible/NonlinearKEShih/NonlinearKEShih.C index 6d6d904c62..56885340f0 100644 --- a/src/turbulenceModels/incompressible/NonlinearKEShih/NonlinearKEShih.C +++ b/src/turbulenceModels/RAS/incompressible/NonlinearKEShih/NonlinearKEShih.C @@ -32,13 +32,15 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // defineTypeNameAndDebug(NonlinearKEShih, 0); -addToRunTimeSelectionTable(turbulenceModel, NonlinearKEShih, dictionary); +addToRunTimeSelectionTable(RASmodel, NonlinearKEShih, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -50,18 +52,24 @@ NonlinearKEShih::NonlinearKEShih transportModel& lamTransportModel ) : - turbulenceModel(typeName, U, phi, lamTransportModel), + RASmodel(typeName, U, phi, lamTransportModel), - C1(turbulenceModelCoeffs_.lookup("C1")), - C2(turbulenceModelCoeffs_.lookup("C2")), - alphak(turbulenceModelCoeffs_.lookup("alphak")), - alphaEps(turbulenceModelCoeffs_.lookup("alphaEps")), - A1(turbulenceModelCoeffs_.lookup("A1")), - A2(turbulenceModelCoeffs_.lookup("A2")), - Ctau1(turbulenceModelCoeffs_.lookup("Ctau1")), - Ctau2(turbulenceModelCoeffs_.lookup("Ctau2")), - Ctau3(turbulenceModelCoeffs_.lookup("Ctau3")), - alphaKsi(turbulenceModelCoeffs_.lookup("alphaKsi")), + C1(RASmodelCoeffs_.lookupOrAddDefault("C1", 1.44)), + C2(RASmodelCoeffs_.lookupOrAddDefault("C2", 1.92)), + alphak(RASmodelCoeffs_.lookupOrAddDefault("alphak", 1.0)), + alphaEps + ( + RASmodelCoeffs_.lookupOrAddDefault("alphaEps", 0.76923) + ), + A1(RASmodelCoeffs_.lookupOrAddDefault("A1", 1.25)), + A2(RASmodelCoeffs_.lookupOrAddDefault("A2", 1000.0)), + Ctau1(RASmodelCoeffs_.lookupOrAddDefault("Ctau1", -4.0)), + Ctau2(RASmodelCoeffs_.lookupOrAddDefault("Ctau2", 13.0)), + Ctau3(RASmodelCoeffs_.lookupOrAddDefault("Ctau3", -2.0)), + alphaKsi + ( + RASmodelCoeffs_.lookupOrAddDefault("alphaKsi", 0.9) + ), k_ ( @@ -116,6 +124,8 @@ NonlinearKEShih::NonlinearKEShih ) { # include "wallNonlinearViscosityI.H" + + printCoeffs(); } @@ -177,18 +187,18 @@ tmp NonlinearKEShih::divDevReff(volVectorField& U) const bool NonlinearKEShih::read() { - if (turbulenceModel::read()) + if (RASmodel::read()) { - turbulenceModelCoeffs_.lookup("C1") >> C1; - turbulenceModelCoeffs_.lookup("C2") >> C2; - turbulenceModelCoeffs_.lookup("alphak") >> alphak; - turbulenceModelCoeffs_.lookup("alphaEps") >> alphaEps; - turbulenceModelCoeffs_.lookup("A1") >> A1; - turbulenceModelCoeffs_.lookup("A2") >> A2; - turbulenceModelCoeffs_.lookup("Ctau1") >> Ctau1; - turbulenceModelCoeffs_.lookup("Ctau2") >> Ctau2; - turbulenceModelCoeffs_.lookup("Ctau3") >> Ctau3; - turbulenceModelCoeffs_.lookup("alphaKsi") >> alphaKsi; + RASmodelCoeffs_.readIfPresent("C1", C1); + RASmodelCoeffs_.readIfPresent("C2", C2); + RASmodelCoeffs_.readIfPresent("alphak", alphak); + RASmodelCoeffs_.readIfPresent("alphaEps", alphaEps); + RASmodelCoeffs_.readIfPresent("A1", A1); + RASmodelCoeffs_.readIfPresent("A2", A2); + RASmodelCoeffs_.readIfPresent("Ctau1", Ctau1); + RASmodelCoeffs_.readIfPresent("Ctau2", Ctau2); + RASmodelCoeffs_.readIfPresent("Ctau3", Ctau3); + RASmodelCoeffs_.readIfPresent("alphaKsi", alphaKsi); return true; } @@ -208,7 +218,7 @@ void NonlinearKEShih::correct() return; } - turbulenceModel::correct(); + RASmodel::correct(); gradU = fvc::grad(U_); @@ -286,7 +296,8 @@ void NonlinearKEShih::correct() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/NonlinearKEShih/NonlinearKEShih.H b/src/turbulenceModels/RAS/incompressible/NonlinearKEShih/NonlinearKEShih.H similarity index 89% rename from src/turbulenceModels/incompressible/NonlinearKEShih/NonlinearKEShih.H rename to src/turbulenceModels/RAS/incompressible/NonlinearKEShih/NonlinearKEShih.H index 82e21a1c8e..bb17f69ea7 100644 --- a/src/turbulenceModels/incompressible/NonlinearKEShih/NonlinearKEShih.H +++ b/src/turbulenceModels/RAS/incompressible/NonlinearKEShih/NonlinearKEShih.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::turbulenceModels::NonlinearKEShih + Foam::incompressible::RAS::NonlinearKEShih Description Shih's quadratic non-linear k-epsilon turbulence model for @@ -37,13 +37,15 @@ SourceFiles #ifndef NonlinearKEShih_H #define NonlinearKEShih_H -#include "turbulenceModel.H" +#include "RASmodel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -52,20 +54,20 @@ namespace turbulenceModels class NonlinearKEShih : - public turbulenceModel + public RASmodel { // Private data - dimensionedScalar C1; - dimensionedScalar C2; - dimensionedScalar alphak; - dimensionedScalar alphaEps; - dimensionedScalar A1; - dimensionedScalar A2; - dimensionedScalar Ctau1; - dimensionedScalar Ctau2; - dimensionedScalar Ctau3; - dimensionedScalar alphaKsi; + scalar C1; + scalar C2; + scalar alphak; + scalar alphaEps; + scalar A1; + scalar A2; + scalar Ctau1; + scalar Ctau2; + scalar Ctau3; + scalar alphaKsi; volScalarField k_; volScalarField epsilon_; @@ -159,7 +161,8 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/incompressible/QZeta/QZeta.C b/src/turbulenceModels/RAS/incompressible/QZeta/QZeta.C similarity index 84% rename from src/turbulenceModels/incompressible/QZeta/QZeta.C rename to src/turbulenceModels/RAS/incompressible/QZeta/QZeta.C index dcafe71f59..07e6dce444 100644 --- a/src/turbulenceModels/incompressible/QZeta/QZeta.C +++ b/src/turbulenceModels/RAS/incompressible/QZeta/QZeta.C @@ -31,13 +31,15 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // defineTypeNameAndDebug(QZeta, 0); -addToRunTimeSelectionTable(turbulenceModel, QZeta, dictionary); +addToRunTimeSelectionTable(RASmodel, QZeta, dictionary); // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // @@ -51,7 +53,7 @@ tmp QZeta::fMu() const } else { - return + return exp(-6.0/sqr(scalar(1) + Rt/50.0)) *(scalar(1) + 3.0*exp(-Rt/10.0)); } @@ -75,13 +77,19 @@ QZeta::QZeta transportModel& lamTransportModel ) : - turbulenceModel(typeName, U, phi, lamTransportModel), + RASmodel(typeName, U, phi, lamTransportModel), - Cmu(turbulenceModelCoeffs_.lookup("Cmu")), - C1(turbulenceModelCoeffs_.lookup("C1")), - C2(turbulenceModelCoeffs_.lookup("C2")), - alphaZeta(turbulenceModelCoeffs_.lookup("alphaZeta")), - Anisotropic(turbulenceModelCoeffs_.lookup("anisotropic")), + Cmu(RASmodelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), + C1(RASmodelCoeffs_.lookupOrAddDefault("C1", 1.44)), + C2(RASmodelCoeffs_.lookupOrAddDefault("C2", 1.92)), + alphaZeta + ( + RASmodelCoeffs_.lookupOrAddDefault("alphaZeta", 0.76923) + ), + Anisotropic + ( + RASmodelCoeffs_.lookupOrAddDefault("anisotropic", false) + ), k_ ( @@ -138,7 +146,9 @@ QZeta::QZeta ), nut_(Cmu*fMu()*sqr(k_)/(epsilon_ + epsilonSmall_)) -{} +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -196,13 +206,17 @@ tmp QZeta::divDevReff(volVectorField& U) const bool QZeta::read() { - if (turbulenceModel::read()) + if (RASmodel::read()) { - turbulenceModelCoeffs_.lookup("Cmu") >> Cmu; - turbulenceModelCoeffs_.lookup("C1") >> C1; - turbulenceModelCoeffs_.lookup("C2") >> C2; - turbulenceModelCoeffs_.lookup("alphaZeta") >> alphaZeta; - turbulenceModelCoeffs_.lookup("anisotropic") >> Anisotropic; + RASmodelCoeffs_.readIfPresent("Cmu", Cmu); + RASmodelCoeffs_.readIfPresent("C1", C1); + RASmodelCoeffs_.readIfPresent("C2", C2); + RASmodelCoeffs_.readIfPresent("alphaZeta", alphaZeta); + RASmodelCoeffs_.readIfPresent + ( + "anisotropic", + Anisotropic + ); return true; } @@ -222,7 +236,7 @@ void QZeta::correct() return; } - turbulenceModel::correct(); + RASmodel::correct(); volScalarField S2 = 2*magSqr(symm(fvc::grad(U_))); @@ -279,7 +293,8 @@ void QZeta::correct() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/QZeta/QZeta.H b/src/turbulenceModels/RAS/incompressible/QZeta/QZeta.H similarity index 91% rename from src/turbulenceModels/incompressible/QZeta/QZeta.H rename to src/turbulenceModels/RAS/incompressible/QZeta/QZeta.H index 4776dfc9f0..c7cd31a13f 100644 --- a/src/turbulenceModels/incompressible/QZeta/QZeta.H +++ b/src/turbulenceModels/RAS/incompressible/QZeta/QZeta.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::turbulenceModels::QZeta + Foam::incompressible::RAS::QZeta Description Gibson and Dafa'Alla's q-zeta two-equation low-Re turbulence model @@ -37,13 +37,15 @@ SourceFiles #ifndef QZeta_H #define QZeta_H -#include "turbulenceModel.H" +#include "RASmodel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -52,15 +54,15 @@ namespace turbulenceModels class QZeta : - public turbulenceModel + public RASmodel { // Private data - dimensionedScalar Cmu; - dimensionedScalar C1; - dimensionedScalar C2; - dimensionedScalar alphaZeta; - Switch Anisotropic; + scalar Cmu; + scalar C1; + scalar C2; + scalar alphaZeta; + Switch Anisotropic; volScalarField k_; volScalarField epsilon_; @@ -110,7 +112,7 @@ public: //- Return the effective diffusivity for q tmp DqEff() const { - return tmp + return tmp ( new volScalarField("DqEff", nut_ + nu()) ); @@ -119,7 +121,7 @@ public: //- Return the effective diffusivity for epsilon tmp DzetaEff() const { - return tmp + return tmp ( new volScalarField("DzetaEff", alphaZeta*nut_ + nu()) ); @@ -166,7 +168,8 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C b/src/turbulenceModels/RAS/incompressible/RASmodel/RASmodel.C similarity index 71% rename from src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C rename to src/turbulenceModels/RAS/incompressible/RASmodel/RASmodel.C index 0c19ae8fd7..e1c09563fa 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C +++ b/src/turbulenceModels/RAS/incompressible/RASmodel/RASmodel.C @@ -24,22 +24,36 @@ License \*---------------------------------------------------------------------------*/ -#include "turbulenceModel.H" +#include "RASmodel.H" #include "wallFvPatch.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { +namespace incompressible +{ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -defineTypeNameAndDebug(turbulenceModel, 0); -defineRunTimeSelectionTable(turbulenceModel, dictionary); +defineTypeNameAndDebug(RASmodel, 0); +defineRunTimeSelectionTable(RASmodel, dictionary); + +// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // + +void RASmodel::printCoeffs() +{ + if (printCoeffs_) + { + Info<< type() << "Coeffs" << nl + << RASmodelCoeffs_; + } +} + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -turbulenceModel::turbulenceModel +RASmodel::RASmodel ( const word& type, const volVectorField& U, @@ -67,16 +81,18 @@ turbulenceModel::turbulenceModel transportModel_(lamTransportModel), turbulence_(lookup("turbulence")), - turbulenceModelCoeffs_(subDict(type + "Coeffs")), + printCoeffs_(lookupOrDefault("printCoeffs", false)), + RASmodelCoeffs_(subDict(type + "Coeffs")), kappa_ ( - dimensionedScalar(subDict("wallFunctionCoeffs").lookup("kappa")).value() - ), - E_ - ( - dimensionedScalar(subDict("wallFunctionCoeffs").lookup("E")).value() + subDict("wallFunctionCoeffs").lookupOrAddDefault + ( + "kappa", + 0.4187 + ) ), + E_(subDict("wallFunctionCoeffs").lookupOrAddDefault("E", 9.0)), yPlusLam_(yPlusLam(kappa_, E_)), k0_("k0", dimVelocity*dimVelocity, SMALL), @@ -87,13 +103,13 @@ turbulenceModel::turbulenceModel {} -turbulenceModel::~turbulenceModel() +RASmodel::~RASmodel() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -scalar turbulenceModel::yPlusLam(const scalar kappa, const scalar E) +scalar RASmodel::yPlusLam(const scalar kappa, const scalar E) { scalar ypl = 11.0; @@ -106,7 +122,7 @@ scalar turbulenceModel::yPlusLam(const scalar kappa, const scalar E) } -tmp turbulenceModel::yPlus(const label patchNo) const +tmp RASmodel::yPlus(const label patchNo) const { const fvPatch& curPatch = mesh_.boundary()[patchNo]; @@ -115,9 +131,9 @@ tmp turbulenceModel::yPlus(const label patchNo) const if (typeid(curPatch) == typeid(wallFvPatch)) { - dimensionedScalar Cmu(turbulenceModelCoeffs_.lookup("Cmu")); + scalar Cmu(readScalar(RASmodelCoeffs_.lookup("Cmu"))); - Yp = pow(Cmu.value(), 0.25)*y_[patchNo] + Yp = pow(Cmu, 0.25)*y_[patchNo] *sqrt(k()().boundaryField()[patchNo].patchInternalField()) /nu().boundaryField()[patchNo]; } @@ -125,7 +141,7 @@ tmp turbulenceModel::yPlus(const label patchNo) const { WarningIn ( - "tmp turbulenceModel::yPlus(const label patchNo)" + "tmp RASmodel::yPlus(const label patchNo)" ) << "const : " << endl << "Patch " << patchNo << " is not a wall. Returning blank field" << endl; @@ -137,7 +153,7 @@ tmp turbulenceModel::yPlus(const label patchNo) const } -void turbulenceModel::correct() +void RASmodel::correct() { if (mesh_.changing()) { @@ -146,39 +162,21 @@ void turbulenceModel::correct() } -bool turbulenceModel::read() +bool RASmodel::read() { if (regIOobject::read()) { lookup("turbulence") >> turbulence_; - turbulenceModelCoeffs_ = subDict(type() + "Coeffs"); + RASmodelCoeffs_ = subDict(type() + "Coeffs"); - kappa_ = dimensionedScalar - ( - subDict("wallFunctionCoeffs").lookup("kappa") - ).value(); - - E_ = dimensionedScalar - ( - subDict("wallFunctionCoeffs").lookup("E") - ).value(); + subDict("wallFunctionCoeffs").lookup("kappa") >> kappa_; + subDict("wallFunctionCoeffs").lookup("E") >> E_; yPlusLam_ = yPlusLam(kappa_, E_); - if (found("k0")) - { - lookup("k0") >> k0_; - } - - if (found("epsilon0")) - { - lookup("epsilon0") >> epsilon0_; - } - - if (found("epsilonSmall")) - { - lookup("epsilonSmall") >> epsilonSmall_; - } + readIfPresent("k0", k0_); + readIfPresent("epsilon0", epsilon0_); + readIfPresent("epsilonSmall", epsilonSmall_); return true; } @@ -191,6 +189,7 @@ bool turbulenceModel::read() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +} // End namespace incompressible } // End namespace Foam // ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/RAS/incompressible/RASmodel/RASmodel.H similarity index 90% rename from src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H rename to src/turbulenceModels/RAS/incompressible/RASmodel/RASmodel.H index f3400d0950..d6e0bd6173 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H +++ b/src/turbulenceModels/RAS/incompressible/RASmodel/RASmodel.H @@ -23,26 +23,25 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Namespace - Foam::turbulenceModels + Foam::incompressible Description - Namespace for incompressible turbulence models. - + Namespace for incompressible RAS turbulence models. Class - Foam::turbulenceModel + Foam::incompressible::RASmodel Description Abstract base class for incompressible turbulence models. SourceFiles - turbulenceModel.C + RASmodel.C newTurbulenceModel.C \*---------------------------------------------------------------------------*/ -#ifndef turbulenceModel_H -#define turbulenceModel_H +#ifndef RASmodel_H +#define RASmodel_H #include "volFields.H" #include "surfaceFields.H" @@ -61,12 +60,14 @@ SourceFiles namespace Foam { +namespace incompressible +{ /*---------------------------------------------------------------------------*\ - Class turbulenceModel Declaration + Class RASmodel Declaration \*---------------------------------------------------------------------------*/ -class turbulenceModel +class RASmodel : public IOdictionary { @@ -84,7 +85,8 @@ protected: transportModel& transportModel_; Switch turbulence_; - dictionary turbulenceModelCoeffs_; + Switch printCoeffs_; + dictionary RASmodelCoeffs_; scalar kappa_; scalar E_; @@ -99,21 +101,27 @@ protected: nearWallDist y_; + // Protected member functions + + //- Print model coefficients + virtual void printCoeffs(); + + private: // Private Member Functions //- Disallow default bitwise copy construct - turbulenceModel(const turbulenceModel&); + RASmodel(const RASmodel&); //- Disallow default bitwise assignment - void operator=(const turbulenceModel&); + void operator=(const RASmodel&); public: //- Runtime type information - TypeName("turbulenceModel"); + TypeName("RASmodel"); // Declare run-time constructor selection table @@ -121,7 +129,7 @@ public: declareRunTimeSelectionTable ( autoPtr, - turbulenceModel, + RASmodel, dictionary, ( const volVectorField& U, @@ -135,7 +143,7 @@ public: // Constructors //- Construct from components - turbulenceModel + RASmodel ( const word& type, const volVectorField& U, @@ -147,7 +155,7 @@ public: // Selectors //- Return a reference to the selected turbulence model - static autoPtr New + static autoPtr New ( const volVectorField& U, const surfaceScalarField& phi, @@ -157,7 +165,7 @@ public: // Destructor - virtual ~turbulenceModel(); + virtual ~RASmodel(); // Member Functions @@ -236,7 +244,7 @@ public: //- Return the effective viscosity virtual tmp nuEff() const { - return tmp + return tmp ( new volScalarField("nuEff", nut() + nu()) ); @@ -270,6 +278,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +} // End namespace incompressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/incompressible/turbulenceModel/checkIncompressibleTurbulenceModelsLock.C b/src/turbulenceModels/RAS/incompressible/RASmodel/checkIncompressibleTurbulenceModelsLock.C similarity index 100% rename from src/turbulenceModels/incompressible/turbulenceModel/checkIncompressibleTurbulenceModelsLock.C rename to src/turbulenceModels/RAS/incompressible/RASmodel/checkIncompressibleTurbulenceModelsLock.C diff --git a/src/turbulenceModels/incompressible/turbulenceModel/newTurbulenceModel.C b/src/turbulenceModels/RAS/incompressible/RASmodel/newRASmodel.C similarity index 77% rename from src/turbulenceModels/incompressible/turbulenceModel/newTurbulenceModel.C rename to src/turbulenceModels/RAS/incompressible/RASmodel/newRASmodel.C index bed073afa8..5eb569274c 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/newTurbulenceModel.C +++ b/src/turbulenceModels/RAS/incompressible/RASmodel/newRASmodel.C @@ -26,26 +26,28 @@ License #include "error.H" -#include "turbulenceModel.H" +#include "RASmodel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { +namespace incompressible +{ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -autoPtr turbulenceModel::New +autoPtr RASmodel::New ( const volVectorField& U, const surfaceScalarField& phi, transportModel& transport ) { - word turbulenceModelTypeName; + word RASmodelTypeName; // Enclose the creation of the turbulencePropertiesDict to ensure it is - // deleted before the turbulenceModel is created otherwise the dictionary + // deleted before the RASmodel is created otherwise the dictionary // is entered in the database twice { IOdictionary turbulencePropertiesDict @@ -60,34 +62,35 @@ autoPtr turbulenceModel::New ) ); - turbulencePropertiesDict.lookup("turbulenceModel") - >> turbulenceModelTypeName; + turbulencePropertiesDict.lookup("RASmodel") + >> RASmodelTypeName; } - Info<< "Selecting turbulence model " << turbulenceModelTypeName << endl; + Info<< "Selecting turbulence model " << RASmodelTypeName << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(turbulenceModelTypeName); + dictionaryConstructorTablePtr_->find(RASmodelTypeName); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn ( - "turbulenceModel::New(const volVectorField&, " + "RASmodel::New(const volVectorField&, " "const surfaceScalarField&, transportModel&)" - ) << "Unknown turbulenceModel type " << turbulenceModelTypeName + ) << "Unknown RASmodel type " << RASmodelTypeName << endl << endl - << "Valid turbulenceModel types are :" << endl + << "Valid RASmodel types are :" << endl << dictionaryConstructorTablePtr_->toc() << exit(FatalError); } - return autoPtr(cstrIter()(U, phi, transport)); + return autoPtr(cstrIter()(U, phi, transport)); } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +} // End namespace incompressible } // End namespace Foam // ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RNGkEpsilon/RNGkEpsilon.C b/src/turbulenceModels/RAS/incompressible/RNGkEpsilon/RNGkEpsilon.C similarity index 79% rename from src/turbulenceModels/incompressible/RNGkEpsilon/RNGkEpsilon.C rename to src/turbulenceModels/RAS/incompressible/RNGkEpsilon/RNGkEpsilon.C index 05fd38e9f0..f053c2cf57 100644 --- a/src/turbulenceModels/incompressible/RNGkEpsilon/RNGkEpsilon.C +++ b/src/turbulenceModels/RAS/incompressible/RNGkEpsilon/RNGkEpsilon.C @@ -32,13 +32,15 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // defineTypeNameAndDebug(RNGkEpsilon, 0); -addToRunTimeSelectionTable(turbulenceModel, RNGkEpsilon, dictionary); +addToRunTimeSelectionTable(RASmodel, RNGkEpsilon, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -49,15 +51,18 @@ RNGkEpsilon::RNGkEpsilon transportModel& lamTransportModel ) : - turbulenceModel(typeName, U, phi, lamTransportModel), + RASmodel(typeName, U, phi, lamTransportModel), - Cmu(turbulenceModelCoeffs_.lookup("Cmu")), - C1(turbulenceModelCoeffs_.lookup("C1")), - C2(turbulenceModelCoeffs_.lookup("C2")), - alphak(turbulenceModelCoeffs_.lookup("alphak")), - alphaEps(turbulenceModelCoeffs_.lookup("alphaEps")), - eta0(turbulenceModelCoeffs_.lookup("eta0")), - beta(turbulenceModelCoeffs_.lookup("beta")), + Cmu(RASmodelCoeffs_.lookupOrAddDefault("Cmu", 0.0845)), + C1(RASmodelCoeffs_.lookupOrAddDefault("C1", 1.42)), + C2(RASmodelCoeffs_.lookupOrAddDefault("C2", 1.68)), + alphak(RASmodelCoeffs_.lookupOrAddDefault("alphak", 1.39)), + alphaEps + ( + RASmodelCoeffs_.lookupOrAddDefault("alphaEps", 1.39) + ), + eta0(RASmodelCoeffs_.lookupOrAddDefault("eta0", 4.38)), + beta(RASmodelCoeffs_.lookupOrAddDefault("beta", 0.012)), k_ ( @@ -88,6 +93,8 @@ RNGkEpsilon::RNGkEpsilon nut_(Cmu*sqr(k_)/(epsilon_ + epsilonSmall_)) { # include "wallViscosityI.H" + + printCoeffs(); } @@ -147,15 +154,15 @@ tmp RNGkEpsilon::divDevReff(volVectorField& U) const bool RNGkEpsilon::read() { - if (turbulenceModel::read()) + if (RASmodel::read()) { - turbulenceModelCoeffs_.lookup("Cmu") >> Cmu; - turbulenceModelCoeffs_.lookup("C1") >> C1; - turbulenceModelCoeffs_.lookup("C2") >> C2; - turbulenceModelCoeffs_.lookup("alphak") >> alphak; - turbulenceModelCoeffs_.lookup("alphaEps") >> alphaEps; - turbulenceModelCoeffs_.lookup("eta0") >> eta0; - turbulenceModelCoeffs_.lookup("beta") >> beta; + RASmodelCoeffs_.readIfPresent("Cmu", Cmu); + RASmodelCoeffs_.readIfPresent("C1", C1); + RASmodelCoeffs_.readIfPresent("C2", C2); + RASmodelCoeffs_.readIfPresent("alphak", alphak); + RASmodelCoeffs_.readIfPresent("alphaEps", alphaEps); + RASmodelCoeffs_.readIfPresent("eta0", eta0); + RASmodelCoeffs_.readIfPresent("beta", beta); return true; } @@ -175,14 +182,14 @@ void RNGkEpsilon::correct() return; } - turbulenceModel::correct(); + RASmodel::correct(); volScalarField S2 = 2*magSqr(symm(fvc::grad(U_))); volScalarField G = nut_*S2; volScalarField eta = sqrt(S2)*k_/epsilon_; - volScalarField R = + volScalarField R = ((eta*(scalar(1) - eta/eta0))/(scalar(1) + beta*eta*sqr(eta))); # include "wallFunctionsI.H" @@ -233,7 +240,8 @@ void RNGkEpsilon::correct() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RNGkEpsilon/RNGkEpsilon.H b/src/turbulenceModels/RAS/incompressible/RNGkEpsilon/RNGkEpsilon.H similarity index 89% rename from src/turbulenceModels/incompressible/RNGkEpsilon/RNGkEpsilon.H rename to src/turbulenceModels/RAS/incompressible/RNGkEpsilon/RNGkEpsilon.H index ac317cb42a..6753c114ad 100644 --- a/src/turbulenceModels/incompressible/RNGkEpsilon/RNGkEpsilon.H +++ b/src/turbulenceModels/RAS/incompressible/RNGkEpsilon/RNGkEpsilon.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::turbulenceModels::RNGkEpsilon + Foam::incompressible::RAS::RNGkEpsilon Description Renormalisation group k-epsilon turbulence model for incompressible flows. @@ -36,13 +36,15 @@ SourceFiles #ifndef RNGkEpsilon_H #define RNGkEpsilon_H -#include "turbulenceModel.H" +#include "RASmodel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -51,17 +53,17 @@ namespace turbulenceModels class RNGkEpsilon : - public turbulenceModel + public RASmodel { // Private data - dimensionedScalar Cmu; - dimensionedScalar C1; - dimensionedScalar C2; - dimensionedScalar alphak; - dimensionedScalar alphaEps; - dimensionedScalar eta0; - dimensionedScalar beta; + scalar Cmu; + scalar C1; + scalar C2; + scalar alphak; + scalar alphaEps; + scalar eta0; + scalar beta; volScalarField k_; volScalarField epsilon_; @@ -101,7 +103,7 @@ public: //- Return the effective diffusivity for k tmp DkEff() const { - return tmp + return tmp ( new volScalarField("DkEff", alphak*nut_ + nu()) ); @@ -110,7 +112,7 @@ public: //- Return the effective diffusivity for epsilon tmp DepsilonEff() const { - return tmp + return tmp ( new volScalarField("DepsilonEff", alphaEps*nut_ + nu()) ); @@ -147,7 +149,8 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/incompressible/SpalartAllmaras/SpalartAllmaras.C b/src/turbulenceModels/RAS/incompressible/SpalartAllmaras/SpalartAllmaras.C similarity index 85% rename from src/turbulenceModels/incompressible/SpalartAllmaras/SpalartAllmaras.C rename to src/turbulenceModels/RAS/incompressible/SpalartAllmaras/SpalartAllmaras.C index 3523ba2a48..80fd745e78 100644 --- a/src/turbulenceModels/incompressible/SpalartAllmaras/SpalartAllmaras.C +++ b/src/turbulenceModels/RAS/incompressible/SpalartAllmaras/SpalartAllmaras.C @@ -32,13 +32,15 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // defineTypeNameAndDebug(SpalartAllmaras, 0); -addToRunTimeSelectionTable(turbulenceModel, SpalartAllmaras, dictionary); +addToRunTimeSelectionTable(RASmodel, SpalartAllmaras, dictionary); // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // @@ -110,17 +112,17 @@ SpalartAllmaras::SpalartAllmaras transportModel& lamTransportModel ) : - turbulenceModel(typeName, U, phi, lamTransportModel), + RASmodel(typeName, U, phi, lamTransportModel), - alphaNut(turbulenceModelCoeffs_.lookup("alphaNut")), + alphaNut(RASmodelCoeffs_.lookupOrAddDefault("alphaNut", 1.5)), - Cb1(turbulenceModelCoeffs_.lookup("Cb1")), - Cb2(turbulenceModelCoeffs_.lookup("Cb2")), + Cb1(RASmodelCoeffs_.lookupOrAddDefault("Cb1", 0.1355)), + Cb2(RASmodelCoeffs_.lookupOrAddDefault("Cb2", 0.622)), Cw1(Cb1/sqr(kappa_) + alphaNut*(1.0 + Cb2)), - Cw2(turbulenceModelCoeffs_.lookup("Cw2")), - Cw3(turbulenceModelCoeffs_.lookup("Cw3")), - Cv1(turbulenceModelCoeffs_.lookup("Cv1")), - Cv2(turbulenceModelCoeffs_.lookup("Cv2")), + Cw2(RASmodelCoeffs_.lookupOrAddDefault("Cw2", 0.3)), + Cw3(RASmodelCoeffs_.lookupOrAddDefault("Cw3", 2.0)), + Cv1(RASmodelCoeffs_.lookupOrAddDefault("Cv1", 7.1)), + Cv2(RASmodelCoeffs_.lookupOrAddDefault("Cv2", 5.0)), nuTilda_ ( @@ -149,7 +151,9 @@ SpalartAllmaras::SpalartAllmaras ), d_(mesh_) -{} +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -255,17 +259,17 @@ tmp SpalartAllmaras::divDevReff(volVectorField& U) const bool SpalartAllmaras::read() { - if (turbulenceModel::read()) + if (RASmodel::read()) { - turbulenceModelCoeffs_.lookup("alphaNut") >> alphaNut; + RASmodelCoeffs_.readIfPresent("alphaNut", alphaNut); - turbulenceModelCoeffs_.lookup("Cb1") >> Cb1; - turbulenceModelCoeffs_.lookup("Cb2") >> Cb2; + RASmodelCoeffs_.readIfPresent("Cb1", Cb1); + RASmodelCoeffs_.readIfPresent("Cb2", Cb2); Cw1 = Cb1/sqr(kappa_) + alphaNut*(1.0 + Cb2); - turbulenceModelCoeffs_.lookup("Cw2") >> Cw2; - turbulenceModelCoeffs_.lookup("Cw3") >> Cw3; - turbulenceModelCoeffs_.lookup("Cv1") >> Cv1; - turbulenceModelCoeffs_.lookup("Cv2") >> Cv2; + RASmodelCoeffs_.readIfPresent("Cw2", Cw2); + RASmodelCoeffs_.readIfPresent("Cw3", Cw3); + RASmodelCoeffs_.readIfPresent("Cv1", Cv1); + RASmodelCoeffs_.readIfPresent("Cv2", Cv2); return true; } @@ -285,7 +289,7 @@ void SpalartAllmaras::correct() return; } - turbulenceModel::correct(); + RASmodel::correct(); if (mesh_.changing()) { @@ -323,7 +327,8 @@ void SpalartAllmaras::correct() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/SpalartAllmaras/SpalartAllmaras.H b/src/turbulenceModels/RAS/incompressible/SpalartAllmaras/SpalartAllmaras.H similarity index 91% rename from src/turbulenceModels/incompressible/SpalartAllmaras/SpalartAllmaras.H rename to src/turbulenceModels/RAS/incompressible/SpalartAllmaras/SpalartAllmaras.H index f87b8ad7ed..67b9b2bf2f 100644 --- a/src/turbulenceModels/incompressible/SpalartAllmaras/SpalartAllmaras.H +++ b/src/turbulenceModels/RAS/incompressible/SpalartAllmaras/SpalartAllmaras.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::turbulenceModels::SpalartAllmaras + Foam::incompressible::RAS::SpalartAllmaras Description Spalart-Allmaras 1-eqn mixing-length model for incompressible external @@ -52,14 +52,16 @@ SourceFiles #ifndef SpalartAllmaras_H #define SpalartAllmaras_H -#include "turbulenceModel.H" +#include "RASmodel.H" #include "wallDist.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -68,19 +70,19 @@ namespace turbulenceModels class SpalartAllmaras : - public turbulenceModel + public RASmodel { // Private data - dimensionedScalar alphaNut; + scalar alphaNut; - dimensionedScalar Cb1; - dimensionedScalar Cb2; - dimensionedScalar Cw1; - dimensionedScalar Cw2; - dimensionedScalar Cw3; - dimensionedScalar Cv1; - dimensionedScalar Cv2; + scalar Cb1; + scalar Cb2; + scalar Cw1; + scalar Cw2; + scalar Cw3; + scalar Cv1; + scalar Cv2; volScalarField nuTilda_; volScalarField nut_; @@ -164,7 +166,8 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/incompressible/kEpsilon/kEpsilon.C b/src/turbulenceModels/RAS/incompressible/kEpsilon/kEpsilon.C similarity index 85% rename from src/turbulenceModels/incompressible/kEpsilon/kEpsilon.C rename to src/turbulenceModels/RAS/incompressible/kEpsilon/kEpsilon.C index 901887c54a..b44b57fe81 100644 --- a/src/turbulenceModels/incompressible/kEpsilon/kEpsilon.C +++ b/src/turbulenceModels/RAS/incompressible/kEpsilon/kEpsilon.C @@ -32,13 +32,15 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // defineTypeNameAndDebug(kEpsilon, 0); -addToRunTimeSelectionTable(turbulenceModel, kEpsilon, dictionary); +addToRunTimeSelectionTable(RASmodel, kEpsilon, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -50,12 +52,15 @@ kEpsilon::kEpsilon transportModel& lamTransportModel ) : - turbulenceModel(typeName, U, phi, lamTransportModel), + RASmodel(typeName, U, phi, lamTransportModel), - Cmu(turbulenceModelCoeffs_.lookup("Cmu")), - C1(turbulenceModelCoeffs_.lookup("C1")), - C2(turbulenceModelCoeffs_.lookup("C2")), - alphaEps(turbulenceModelCoeffs_.lookup("alphaEps")), + Cmu(RASmodelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), + C1(RASmodelCoeffs_.lookupOrAddDefault("C1", 1.44)), + C2(RASmodelCoeffs_.lookupOrAddDefault("C2", 1.92)), + alphaEps + ( + RASmodelCoeffs_.lookupOrAddDefault("alphaEps", 0.76923) + ), k_ ( @@ -86,6 +91,8 @@ kEpsilon::kEpsilon nut_(Cmu*sqr(k_)/(epsilon_ + epsilonSmall_)) { # include "wallViscosityI.H" + + printCoeffs(); } @@ -144,12 +151,12 @@ tmp kEpsilon::divDevReff(volVectorField& U) const bool kEpsilon::read() { - if (turbulenceModel::read()) + if (RASmodel::read()) { - turbulenceModelCoeffs_.lookup("Cmu") >> Cmu; - turbulenceModelCoeffs_.lookup("C1") >> C1; - turbulenceModelCoeffs_.lookup("C2") >> C2; - turbulenceModelCoeffs_.lookup("alphaEps") >> alphaEps; + RASmodelCoeffs_.readIfPresent("Cmu", Cmu); + RASmodelCoeffs_.readIfPresent("C1", C1); + RASmodelCoeffs_.readIfPresent("C2", C2); + RASmodelCoeffs_.readIfPresent("alphaEps", alphaEps); return true; } @@ -169,7 +176,7 @@ void kEpsilon::correct() return; } - turbulenceModel::correct(); + RASmodel::correct(); volScalarField G = nut_*2*magSqr(symm(fvc::grad(U_))); @@ -222,7 +229,8 @@ void kEpsilon::correct() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/kEpsilon/kEpsilon.H b/src/turbulenceModels/RAS/incompressible/kEpsilon/kEpsilon.H similarity index 88% rename from src/turbulenceModels/incompressible/kEpsilon/kEpsilon.H rename to src/turbulenceModels/RAS/incompressible/kEpsilon/kEpsilon.H index f64e0c8aab..7f9dd06b35 100644 --- a/src/turbulenceModels/incompressible/kEpsilon/kEpsilon.H +++ b/src/turbulenceModels/RAS/incompressible/kEpsilon/kEpsilon.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::turbulenceModels::kEpsilon + Foam::incompressible::RAS::kEpsilon Description Standard k-epsilon turbulence model for incompressible flows. @@ -36,13 +36,15 @@ SourceFiles #ifndef kEpsilon_H #define kEpsilon_H -#include "turbulenceModel.H" +#include "RASmodel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -51,18 +53,23 @@ namespace turbulenceModels class kEpsilon : - public turbulenceModel + public RASmodel { // Private data - dimensionedScalar Cmu; - dimensionedScalar C1; - dimensionedScalar C2; - dimensionedScalar alphaEps; + // Model coefficients - volScalarField k_; - volScalarField epsilon_; - volScalarField nut_; + scalar Cmu; + scalar C1; + scalar C2; + scalar alphaEps; + + + // Fields + + volScalarField k_; + volScalarField epsilon_; + volScalarField nut_; public: @@ -98,7 +105,7 @@ public: //- Return the effective diffusivity for k tmp DkEff() const { - return tmp + return tmp ( new volScalarField("DkEff", nut_ + nu()) ); @@ -107,7 +114,7 @@ public: //- Return the effective diffusivity for epsilon tmp DepsilonEff() const { - return tmp + return tmp ( new volScalarField("DepsilonEff", alphaEps*nut_ + nu()) ); @@ -144,7 +151,8 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/incompressible/kOmegaSST/checkkOmegaPatchFieldTypes.H b/src/turbulenceModels/RAS/incompressible/kOmegaSST/checkkOmegaPatchFieldTypes.H similarity index 100% rename from src/turbulenceModels/incompressible/kOmegaSST/checkkOmegaPatchFieldTypes.H rename to src/turbulenceModels/RAS/incompressible/kOmegaSST/checkkOmegaPatchFieldTypes.H diff --git a/src/turbulenceModels/incompressible/kOmegaSST/kOmegaSST.C b/src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaSST.C similarity index 74% rename from src/turbulenceModels/incompressible/kOmegaSST/kOmegaSST.C rename to src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaSST.C index 70c5e70ebe..8f364e2fce 100644 --- a/src/turbulenceModels/incompressible/kOmegaSST/kOmegaSST.C +++ b/src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaSST.C @@ -32,13 +32,15 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // defineTypeNameAndDebug(kOmegaSST, 0); -addToRunTimeSelectionTable(turbulenceModel, kOmegaSST, dictionary); +addToRunTimeSelectionTable(RASmodel, kOmegaSST, dictionary); // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // @@ -92,24 +94,36 @@ kOmegaSST::kOmegaSST transportModel& lamTransportModel ) : - turbulenceModel(typeName, U, phi, lamTransportModel), + RASmodel(typeName, U, phi, lamTransportModel), - alphaK1(turbulenceModelCoeffs_.lookup("alphaK1")), - alphaK2(turbulenceModelCoeffs_.lookup("alphaK2")), - alphaOmega1(turbulenceModelCoeffs_.lookup("alphaOmega1")), - alphaOmega2(turbulenceModelCoeffs_.lookup("alphaOmega2")), - gamma1(turbulenceModelCoeffs_.lookup("gamma1")), - gamma2(turbulenceModelCoeffs_.lookup("gamma2")), - beta1(turbulenceModelCoeffs_.lookup("beta1")), - beta2(turbulenceModelCoeffs_.lookup("beta2")), - betaStar(turbulenceModelCoeffs_.lookup("betaStar")), - a1(turbulenceModelCoeffs_.lookup("a1")), - c1(turbulenceModelCoeffs_.lookup("c1")), + alphaK1 + ( + RASmodelCoeffs_.lookupOrAddDefault("alphaK1", 0.85034) + ), + alphaK2(RASmodelCoeffs_.lookupOrAddDefault("alphaK2", 1.0)), + alphaOmega1 + ( + RASmodelCoeffs_.lookupOrAddDefault("alphaOmega1", 0.5) + ), + alphaOmega2 + ( + RASmodelCoeffs_.lookupOrAddDefault("alphaOmega2", 0.85616) + ), + gamma1(RASmodelCoeffs_.lookupOrAddDefault("gamma1", 0.5532)), + gamma2(RASmodelCoeffs_.lookupOrAddDefault("gamma2", 0.4403)), + beta1(RASmodelCoeffs_.lookupOrAddDefault("beta1", 0.075)), + beta2(RASmodelCoeffs_.lookupOrAddDefault("beta2", 0.0828)), + betaStar + ( + RASmodelCoeffs_.lookupOrAddDefault("betaStar", 0.09) + ), + a1(RASmodelCoeffs_.lookupOrAddDefault("a1", 0.31)), + c1(RASmodelCoeffs_.lookupOrAddDefault("c1", 10.0)), omega0_("omega0", dimless/dimTime, SMALL), omegaSmall_("omegaSmall", dimless/dimTime, SMALL), - Cmu(turbulenceModelCoeffs_.lookup("Cmu")), + Cmu(RASmodelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), y_(mesh_), @@ -142,6 +156,8 @@ kOmegaSST::kOmegaSST nut_(a1*k_/max(a1*(omega_ + omegaSmall_), F2()*mag(symm(fvc::grad(U_))))) { # include "kOmegaWallViscosityI.H" + + printCoeffs(); } @@ -200,20 +216,28 @@ tmp kOmegaSST::divDevReff(volVectorField& U) const bool kOmegaSST::read() { - if (turbulenceModel::read()) + if (RASmodel::read()) { - turbulenceModelCoeffs_.lookup("alphaK1") >> alphaK1; - turbulenceModelCoeffs_.lookup("alphaK2") >> alphaK2; - turbulenceModelCoeffs_.lookup("alphaOmega1") >> alphaOmega1; - turbulenceModelCoeffs_.lookup("alphaOmega2") >> alphaOmega2; - turbulenceModelCoeffs_.lookup("gamma1") >> gamma1; - turbulenceModelCoeffs_.lookup("gamma2") >> gamma2; - turbulenceModelCoeffs_.lookup("beta1") >> beta1; - turbulenceModelCoeffs_.lookup("beta2") >> beta2; - turbulenceModelCoeffs_.lookup("betaStar") >> betaStar; - turbulenceModelCoeffs_.lookup("a1") >> a1; - turbulenceModelCoeffs_.lookup("c1") >> c1; - turbulenceModelCoeffs_.lookup("Cmu") >> Cmu; + RASmodelCoeffs_.readIfPresent("alphaK1", alphaK1); + RASmodelCoeffs_.readIfPresent("alphaK2", alphaK2); + RASmodelCoeffs_.readIfPresent + ( + "alphaOmega1", + alphaOmega1 + ); + RASmodelCoeffs_.readIfPresent + ( + "alphaOmega2", + alphaOmega2 + ); + RASmodelCoeffs_.readIfPresent("gamma1", gamma1); + RASmodelCoeffs_.readIfPresent("gamma2", gamma2); + RASmodelCoeffs_.readIfPresent("beta1", beta1); + RASmodelCoeffs_.readIfPresent("beta2", beta2); + RASmodelCoeffs_.readIfPresent("betaStar", betaStar); + RASmodelCoeffs_.readIfPresent("a1", a1); + RASmodelCoeffs_.readIfPresent("c1", c1); + RASmodelCoeffs_.readIfPresent("Cmu", Cmu); return true; } @@ -233,7 +257,7 @@ void kOmegaSST::correct() return; } - turbulenceModel::correct(); + RASmodel::correct(); if (mesh_.changing()) { @@ -301,7 +325,8 @@ void kOmegaSST::correct() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/kOmegaSST/kOmegaSST.H b/src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaSST.H similarity index 92% rename from src/turbulenceModels/incompressible/kOmegaSST/kOmegaSST.H rename to src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaSST.H index da5db280d8..13be4a234a 100644 --- a/src/turbulenceModels/incompressible/kOmegaSST/kOmegaSST.H +++ b/src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaSST.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::turbulenceModels::kOmegaSST + Foam::incompressible::RAS::kOmegaSST Description Implementation of the k-omega-SST turbulence model for incompressible @@ -64,14 +64,16 @@ SourceFiles #ifndef kOmegaSST_H #define kOmegaSST_H -#include "turbulenceModel.H" +#include "RASmodel.H" #include "wallDist.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -80,31 +82,31 @@ namespace turbulenceModels class kOmegaSST : - public turbulenceModel + public RASmodel { // Private data - dimensionedScalar alphaK1; - dimensionedScalar alphaK2; + scalar alphaK1; + scalar alphaK2; - dimensionedScalar alphaOmega1; - dimensionedScalar alphaOmega2; + scalar alphaOmega1; + scalar alphaOmega2; - dimensionedScalar gamma1; - dimensionedScalar gamma2; + scalar gamma1; + scalar gamma2; - dimensionedScalar beta1; - dimensionedScalar beta2; + scalar beta1; + scalar beta2; - dimensionedScalar betaStar; + scalar betaStar; - dimensionedScalar a1; - dimensionedScalar c1; + scalar a1; + scalar c1; dimensionedScalar omega0_; dimensionedScalar omegaSmall_; - dimensionedScalar Cmu; + scalar Cmu; wallDist y_; @@ -259,7 +261,8 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // namespace incompressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/incompressible/kOmegaSST/kOmegaWallFunctionsI.H b/src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaWallFunctionsI.H similarity index 98% rename from src/turbulenceModels/incompressible/kOmegaSST/kOmegaWallFunctionsI.H rename to src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaWallFunctionsI.H index 2c94b5ae36..3bb8a4afd6 100644 --- a/src/turbulenceModels/incompressible/kOmegaSST/kOmegaWallFunctionsI.H +++ b/src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaWallFunctionsI.H @@ -33,7 +33,7 @@ Description { labelList cellBoundaryFaceCount(omega_.size(), 0); - scalar Cmu25 = pow(Cmu.value(), 0.25); + scalar Cmu25 = pow(Cmu, 0.25); const fvPatchList& patches = mesh_.boundary(); diff --git a/src/turbulenceModels/incompressible/kOmegaSST/kOmegaWallViscosityI.H b/src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaWallViscosityI.H similarity index 96% rename from src/turbulenceModels/incompressible/kOmegaSST/kOmegaWallViscosityI.H rename to src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaWallViscosityI.H index 0bdaa5549d..18f699ba74 100644 --- a/src/turbulenceModels/incompressible/kOmegaSST/kOmegaWallViscosityI.H +++ b/src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaWallViscosityI.H @@ -31,7 +31,7 @@ Description \*---------------------------------------------------------------------------*/ { - scalar Cmu25 = pow(Cmu.value(), 0.25); + scalar Cmu25 = pow(Cmu, 0.25); const fvPatchList& patches = mesh_.boundary(); @@ -53,7 +53,7 @@ Description if (yPlus > yPlusLam_) { - nutw[facei] = + nutw[facei] = nuw[facei] *(yPlus*kappa_/log(E_*yPlus) - 1); } diff --git a/src/turbulenceModels/incompressible/kOmegaSST/wallOmegaI.H b/src/turbulenceModels/RAS/incompressible/kOmegaSST/wallOmegaI.H similarity index 100% rename from src/turbulenceModels/incompressible/kOmegaSST/wallOmegaI.H rename to src/turbulenceModels/RAS/incompressible/kOmegaSST/wallOmegaI.H diff --git a/src/turbulenceModels/incompressible/laminar/laminar.C b/src/turbulenceModels/RAS/incompressible/laminar/laminar.C similarity index 95% rename from src/turbulenceModels/incompressible/laminar/laminar.C rename to src/turbulenceModels/RAS/incompressible/laminar/laminar.C index 23096bae43..f97260a35a 100644 --- a/src/turbulenceModels/incompressible/laminar/laminar.C +++ b/src/turbulenceModels/RAS/incompressible/laminar/laminar.C @@ -31,13 +31,15 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // defineTypeNameAndDebug(laminar, 0); -addToRunTimeSelectionTable(turbulenceModel, laminar, dictionary); +addToRunTimeSelectionTable(RASmodel, laminar, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -48,7 +50,7 @@ laminar::laminar transportModel& lamTransportModel ) : - turbulenceModel(typeName, U, phi, lamTransportModel) + RASmodel(typeName, U, phi, lamTransportModel) {} @@ -182,7 +184,7 @@ tmp laminar::divDevReff(volVectorField& U) const bool laminar::read() { - return turbulenceModel::read(); + return RASmodel::read(); } @@ -194,7 +196,8 @@ void laminar::correct() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/laminar/laminar.H b/src/turbulenceModels/RAS/incompressible/laminar/laminar.H similarity index 94% rename from src/turbulenceModels/incompressible/laminar/laminar.H rename to src/turbulenceModels/RAS/incompressible/laminar/laminar.H index 60ec7e3e3d..5546e7d330 100644 --- a/src/turbulenceModels/incompressible/laminar/laminar.H +++ b/src/turbulenceModels/RAS/incompressible/laminar/laminar.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::turbulenceModels::laminar + Foam::incompressible::RAS::laminar Description Dummy turbulence model for laminar incompressible flow. @@ -36,13 +36,15 @@ SourceFiles #ifndef laminar_H #define laminar_H -#include "turbulenceModel.H" +#include "RASmodel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -51,7 +53,7 @@ namespace turbulenceModels class laminar : - public turbulenceModel + public RASmodel { public: @@ -110,7 +112,8 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/incompressible/realizableKE/realizableKE.C b/src/turbulenceModels/RAS/incompressible/realizableKE/realizableKE.C similarity index 86% rename from src/turbulenceModels/incompressible/realizableKE/realizableKE.C rename to src/turbulenceModels/RAS/incompressible/realizableKE/realizableKE.C index 45f82cb3a7..b5b9a7e592 100644 --- a/src/turbulenceModels/incompressible/realizableKE/realizableKE.C +++ b/src/turbulenceModels/RAS/incompressible/realizableKE/realizableKE.C @@ -32,13 +32,15 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // defineTypeNameAndDebug(realizableKE, 0); -addToRunTimeSelectionTable(turbulenceModel, realizableKE, dictionary); +addToRunTimeSelectionTable(RASmodel, realizableKE, dictionary); // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // @@ -90,14 +92,17 @@ realizableKE::realizableKE transportModel& lamTransportModel ) : - turbulenceModel(typeName, U, phi, lamTransportModel), + RASmodel(typeName, U, phi, lamTransportModel), - Cmu(turbulenceModelCoeffs_.lookup("Cmu")), - A0(turbulenceModelCoeffs_.lookup("A0")), - C2(turbulenceModelCoeffs_.lookup("C2")), - alphak(turbulenceModelCoeffs_.lookup("alphak")), - alphaEps(turbulenceModelCoeffs_.lookup("alphaEps")), + Cmu(RASmodelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), + A0(RASmodelCoeffs_.lookupOrAddDefault("A0", 4.0)), + C2(RASmodelCoeffs_.lookupOrAddDefault("C2", 1.9)), + alphak(RASmodelCoeffs_.lookupOrAddDefault("alphak", 1.0)), + alphaEps + ( + RASmodelCoeffs_.lookupOrAddDefault("alphaEps", 0.833333) + ), k_ ( @@ -130,6 +135,8 @@ realizableKE::realizableKE bound(k_, k0_); bound(epsilon_, epsilon0_); # include "wallViscosityI.H" + + printCoeffs(); } @@ -188,13 +195,13 @@ tmp realizableKE::divDevReff(volVectorField& U) const bool realizableKE::read() { - if (turbulenceModel::read()) + if (RASmodel::read()) { - turbulenceModelCoeffs_.lookup("Cmu") >> Cmu; - turbulenceModelCoeffs_.lookup("A0") >> A0; - turbulenceModelCoeffs_.lookup("C2") >> C2; - turbulenceModelCoeffs_.lookup("alphak") >> alphak; - turbulenceModelCoeffs_.lookup("alphaEps") >> alphaEps; + RASmodelCoeffs_.readIfPresent("Cmu", Cmu); + RASmodelCoeffs_.readIfPresent("A0", A0); + RASmodelCoeffs_.readIfPresent("C2", C2); + RASmodelCoeffs_.readIfPresent("alphak", alphak); + RASmodelCoeffs_.readIfPresent("alphaEps", alphaEps); return true; } @@ -214,7 +221,7 @@ void realizableKE::correct() return; } - turbulenceModel::correct(); + RASmodel::correct(); volTensorField gradU = fvc::grad(U_); volScalarField S2 = 2*magSqr(dev(symm(gradU))); @@ -278,7 +285,8 @@ void realizableKE::correct() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/realizableKE/realizableKE.H b/src/turbulenceModels/RAS/incompressible/realizableKE/realizableKE.H similarity index 93% rename from src/turbulenceModels/incompressible/realizableKE/realizableKE.H rename to src/turbulenceModels/RAS/incompressible/realizableKE/realizableKE.H index cc6d714bc4..bc4ee34cbc 100644 --- a/src/turbulenceModels/incompressible/realizableKE/realizableKE.H +++ b/src/turbulenceModels/RAS/incompressible/realizableKE/realizableKE.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::turbulenceModels::realizableKE + Foam::incompressible::RAS::realizableKE Description Realizable k-epsilon turbulence model for incompressible flows. @@ -48,13 +48,15 @@ SourceFiles #ifndef realizableKE_H #define realizableKE_H -#include "turbulenceModel.H" +#include "RASmodel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -63,15 +65,15 @@ namespace turbulenceModels class realizableKE : - public turbulenceModel + public RASmodel { // Private data - dimensionedScalar Cmu; - dimensionedScalar A0; - dimensionedScalar C2; - dimensionedScalar alphak; - dimensionedScalar alphaEps; + scalar Cmu; + scalar A0; + scalar C2; + scalar alphak; + scalar alphaEps; volScalarField k_; volScalarField epsilon_; @@ -168,7 +170,8 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/incompressible/wallFunctions/nonLinearWallFunctionsI.H b/src/turbulenceModels/RAS/incompressible/wallFunctions/nonLinearWallFunctionsI.H similarity index 100% rename from src/turbulenceModels/incompressible/wallFunctions/nonLinearWallFunctionsI.H rename to src/turbulenceModels/RAS/incompressible/wallFunctions/nonLinearWallFunctionsI.H diff --git a/src/turbulenceModels/incompressible/wallFunctions/nutWallFunctions/nutStandardRoughWallFunction/nutStandardRoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutStandardRoughWallFunction/nutStandardRoughWallFunctionFvPatchScalarField.C similarity index 96% rename from src/turbulenceModels/incompressible/wallFunctions/nutWallFunctions/nutStandardRoughWallFunction/nutStandardRoughWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutStandardRoughWallFunction/nutStandardRoughWallFunctionFvPatchScalarField.C index 90553c8466..0e23cdb23c 100644 --- a/src/turbulenceModels/incompressible/wallFunctions/nutWallFunctions/nutStandardRoughWallFunction/nutStandardRoughWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutStandardRoughWallFunction/nutStandardRoughWallFunctionFvPatchScalarField.C @@ -25,7 +25,7 @@ License \*---------------------------------------------------------------------------*/ #include "nutStandardRoughWallFunctionFvPatchScalarField.H" -#include "turbulenceModel.H" +#include "RASmodel.H" #include "fvPatchFieldMapper.H" #include "volFields.H" #include "addToRunTimeSelectionTable.H" @@ -34,7 +34,9 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -118,8 +120,8 @@ void nutStandardRoughWallFunctionFvPatchScalarField::evaluate const Pstream::commsTypes ) { - const turbulenceModel& rasModel - = db().lookupObject("turbulenceProperties"); + const RASmodel& rasModel + = db().lookupObject("turbulenceProperties"); const scalar kappa = rasModel.kappa(); const scalar E = rasModel.E(); @@ -128,13 +130,13 @@ void nutStandardRoughWallFunctionFvPatchScalarField::evaluate // The reciprical of the distance to the adjacent cell centre. const scalarField& ry = patch().deltaCoeffs(); - const fvPatchVectorField& U = + const fvPatchVectorField& U = patch().lookupPatchField("U"); // The flow velocity at the adjacent cell centre. scalarField magUp = mag(U.patchInternalField() - U); - const scalarField& nuw = + const scalarField& nuw = patch().lookupPatchField("nu"); scalarField& nutw = *this; @@ -150,7 +152,7 @@ void nutStandardRoughWallFunctionFvPatchScalarField::evaluate //if (KsPlusBasedOnYPlus_) { - // If KsPlus is based on YPlus the extra term added to the law + // If KsPlus is based on YPlus the extra term added to the law // of the wall will depend on yPlus. forAll(nutw, facei) { @@ -201,7 +203,7 @@ void nutStandardRoughWallFunctionFvPatchScalarField::evaluate const scalar sint_2 = sin(t_2); const scalar logt_1 = log(t_1); G = logt_1*sint_2; - yPlusGPrime = + yPlusGPrime = (c_1*sint_2*KsPlus/t_1) + (c_3*logt_1*cos(t_2)); } @@ -255,7 +257,7 @@ void nutStandardRoughWallFunctionFvPatchScalarField::evaluate yPlus = (kappaRe + yPlus)/(1.0 + log(E*yPlus)); } while(mag(ryPlusLam*(yPlus - yPlusLast)) > 0.0001 && ++iter < 10); - + if (yPlus > yPlusLam) { nutw[facei] = nuw[facei]*(yPlus*yPlus/Re - 1); @@ -278,7 +280,7 @@ void nutStandardRoughWallFunctionFvPatchScalarField::write(Ostream& os) const << roughnessConstant_ << token::END_STATEMENT << nl; os.writeKeyword("roughnessFudgeFactor") << roughnessFudgeFactor_ << token::END_STATEMENT << nl; -} +} // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -291,7 +293,8 @@ makePatchTypeField // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/wallFunctions/nutWallFunctions/nutStandardRoughWallFunction/nutStandardRoughWallFunctionFvPatchScalarField.H b/src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutStandardRoughWallFunction/nutStandardRoughWallFunctionFvPatchScalarField.H similarity index 96% rename from src/turbulenceModels/incompressible/wallFunctions/nutWallFunctions/nutStandardRoughWallFunction/nutStandardRoughWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutStandardRoughWallFunction/nutStandardRoughWallFunctionFvPatchScalarField.H index 8fba38d8cd..b782fd83f5 100644 --- a/src/turbulenceModels/incompressible/wallFunctions/nutWallFunctions/nutStandardRoughWallFunction/nutStandardRoughWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutStandardRoughWallFunction/nutStandardRoughWallFunctionFvPatchScalarField.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::turbulenceModels::nutStandardRoughWallFunctionFvPatchScalarField + Foam::incompressible::RAS::nutStandardRoughWallFunctionFvPatchScalarField Description Wall function boundary condition for rough walls @@ -42,7 +42,9 @@ SourceFiles namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -83,7 +85,7 @@ public: const dictionary& ); - //- Construct by mapping given + //- Construct by mapping given // nutStandardRoughWallFunctionFvPatchScalarField // onto a new patch nutStandardRoughWallFunctionFvPatchScalarField @@ -187,7 +189,8 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/incompressible/wallFunctions/nutWallFunctions/nutStandardWallFunction/nutStandardWallFunctionFvPatchScalarField.C b/src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutStandardWallFunction/nutStandardWallFunctionFvPatchScalarField.C similarity index 94% rename from src/turbulenceModels/incompressible/wallFunctions/nutWallFunctions/nutStandardWallFunction/nutStandardWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutStandardWallFunction/nutStandardWallFunctionFvPatchScalarField.C index 95dc6ffdf2..71bb6f4cd6 100644 --- a/src/turbulenceModels/incompressible/wallFunctions/nutWallFunctions/nutStandardWallFunction/nutStandardWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutStandardWallFunction/nutStandardWallFunctionFvPatchScalarField.C @@ -25,7 +25,7 @@ License \*---------------------------------------------------------------------------*/ #include "nutStandardWallFunctionFvPatchScalarField.H" -#include "turbulenceModel.H" +#include "RASmodel.H" #include "fvPatchFieldMapper.H" #include "volFields.H" #include "addToRunTimeSelectionTable.H" @@ -34,7 +34,9 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -103,8 +105,8 @@ void nutStandardWallFunctionFvPatchScalarField::evaluate const Pstream::commsTypes ) { - const turbulenceModel& rasModel - = db().lookupObject("turbulenceProperties"); + const RASmodel& rasModel + = db().lookupObject("turbulenceProperties"); scalar kappa = rasModel.kappa(); scalar E = rasModel.E(); @@ -112,12 +114,12 @@ void nutStandardWallFunctionFvPatchScalarField::evaluate const scalarField& ry = patch().deltaCoeffs(); - const fvPatchVectorField& U = + const fvPatchVectorField& U = patch().lookupPatchField("U"); scalarField magUp = mag(U.patchInternalField() - U); - const scalarField& nuw = + const scalarField& nuw = patch().lookupPatchField("nu"); scalarField& nutw = *this; @@ -141,7 +143,7 @@ void nutStandardWallFunctionFvPatchScalarField::evaluate yPlus = (kappaRe + yPlus)/(1.0 + log(E*yPlus)); } while(mag(ryPlusLam*(yPlus - yPlusLast)) > 0.01 && ++iter < 10 ); - + if (yPlus > yPlusLam) { nutw[facei] = nuw[facei]*(yPlus*kappa/log(E*yPlus) - 1); @@ -160,7 +162,8 @@ makePatchTypeField(fvPatchScalarField, nutStandardWallFunctionFvPatchScalarField // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/wallFunctions/nutWallFunctions/nutStandardWallFunction/nutStandardWallFunctionFvPatchScalarField.H b/src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutStandardWallFunction/nutStandardWallFunctionFvPatchScalarField.H similarity index 96% rename from src/turbulenceModels/incompressible/wallFunctions/nutWallFunctions/nutStandardWallFunction/nutStandardWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutStandardWallFunction/nutStandardWallFunctionFvPatchScalarField.H index 29a1866687..b2b2509e79 100644 --- a/src/turbulenceModels/incompressible/wallFunctions/nutWallFunctions/nutStandardWallFunction/nutStandardWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutStandardWallFunction/nutStandardWallFunctionFvPatchScalarField.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::turbulenceModels::nutStandardWallFunctionFvPatchScalarField + Foam::incompressible::RAS::nutStandardWallFunctionFvPatchScalarField Description Wall function boundary condition for walls @@ -42,7 +42,9 @@ SourceFiles namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -138,7 +140,8 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/incompressible/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C b/src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C similarity index 93% rename from src/turbulenceModels/incompressible/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C index fee8408704..2029cd5d71 100644 --- a/src/turbulenceModels/incompressible/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C @@ -25,7 +25,7 @@ License \*---------------------------------------------------------------------------*/ #include "nutWallFunctionFvPatchScalarField.H" -#include "turbulenceModel.H" +#include "RASmodel.H" #include "fvPatchFieldMapper.H" #include "volFields.H" #include "addToRunTimeSelectionTable.H" @@ -34,7 +34,9 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -95,20 +97,20 @@ nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField void nutWallFunctionFvPatchScalarField::evaluate(const Pstream::commsTypes) { - const turbulenceModel& rasModel - = db().lookupObject("turbulenceProperties"); + const RASmodel& rasModel + = db().lookupObject("turbulenceProperties"); scalar kappa = rasModel.kappa(); scalar E = rasModel.E(); const scalarField& ry = patch().deltaCoeffs(); - const fvPatchVectorField& U = + const fvPatchVectorField& U = patch().lookupPatchField("U"); scalarField magUp = mag(U.patchInternalField() - U); - const scalarField& nuw = + const scalarField& nuw = patch().lookupPatchField("nu"); scalarField& nutw = *this; @@ -133,7 +135,7 @@ void nutWallFunctionFvPatchScalarField::evaluate(const Pstream::commsTypes) scalar f = - utau/(ry[facei]*nuw[facei]) - + magUpara/utau + + magUpara/utau + 1/E*(fkUu - 1.0/6.0*kUu*sqr(kUu)); scalar df = @@ -147,7 +149,7 @@ void nutWallFunctionFvPatchScalarField::evaluate(const Pstream::commsTypes) } while (utau > VSMALL && err > 0.01 && ++iter < 10); - nutw[facei] = + nutw[facei] = max(sqr(max(utau, 0))/magFaceGradU[facei] - nuw[facei], 0.0); } else @@ -164,7 +166,8 @@ makePatchTypeField(fvPatchScalarField, nutWallFunctionFvPatchScalarField); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H b/src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H similarity index 96% rename from src/turbulenceModels/incompressible/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H index d6e4c8bd26..ba56ff00de 100644 --- a/src/turbulenceModels/incompressible/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::turbulenceModels::nutWallFunctionFvPatchScalarField + Foam::incompressible::RAS::nutWallFunctionFvPatchScalarField Description Wall function boundary condition for walls @@ -42,7 +42,9 @@ SourceFiles namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -138,7 +140,8 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/incompressible/wallFunctions/wallDissipationI.H b/src/turbulenceModels/RAS/incompressible/wallFunctions/wallDissipationI.H similarity index 100% rename from src/turbulenceModels/incompressible/wallFunctions/wallDissipationI.H rename to src/turbulenceModels/RAS/incompressible/wallFunctions/wallDissipationI.H diff --git a/src/turbulenceModels/incompressible/wallFunctions/wallFunctionsI.H b/src/turbulenceModels/RAS/incompressible/wallFunctions/wallFunctionsI.H similarity index 93% rename from src/turbulenceModels/incompressible/wallFunctions/wallFunctionsI.H rename to src/turbulenceModels/RAS/incompressible/wallFunctions/wallFunctionsI.H index d17b7eb27e..151866c683 100644 --- a/src/turbulenceModels/incompressible/wallFunctions/wallFunctionsI.H +++ b/src/turbulenceModels/RAS/incompressible/wallFunctions/wallFunctionsI.H @@ -33,8 +33,8 @@ Description { labelList cellBoundaryFaceCount(epsilon_.size(), 0); - scalar Cmu25 = pow(Cmu.value(), 0.25); - scalar Cmu75 = pow(Cmu.value(), 0.75); + scalar Cmu25 = pow(Cmu, 0.25); + scalar Cmu75 = pow(Cmu, 0.75); const fvPatchList& patches = mesh_.boundary(); @@ -76,7 +76,7 @@ Description label faceCelli = curPatch.faceCells()[facei]; scalar yPlus = - Cmu25*turbulenceModel::y_[patchi][facei] + Cmu25*RASmodel::y_[patchi][facei] *sqrt(k_[faceCelli]) /nuw[facei]; @@ -88,7 +88,7 @@ Description epsilon_[faceCelli] += Cmu75*pow(k_[faceCelli], 1.5) - /(kappa_*turbulenceModel::y_[patchi][facei]); + /(kappa_*RASmodel::y_[patchi][facei]); if (yPlus > yPlusLam_) { @@ -96,7 +96,7 @@ Description (nutw[facei] + nuw[facei]) *magFaceGradU[facei] *Cmu25*sqrt(k_[faceCelli]) - /(kappa_*turbulenceModel::y_[patchi][facei]); + /(kappa_*RASmodel::y_[patchi][facei]); } } } diff --git a/src/turbulenceModels/incompressible/wallFunctions/wallNonlinearViscosityI.H b/src/turbulenceModels/RAS/incompressible/wallFunctions/wallNonlinearViscosityI.H similarity index 100% rename from src/turbulenceModels/incompressible/wallFunctions/wallNonlinearViscosityI.H rename to src/turbulenceModels/RAS/incompressible/wallFunctions/wallNonlinearViscosityI.H diff --git a/src/turbulenceModels/incompressible/wallFunctions/wallViscosityI.H b/src/turbulenceModels/RAS/incompressible/wallFunctions/wallViscosityI.H similarity index 96% rename from src/turbulenceModels/incompressible/wallFunctions/wallViscosityI.H rename to src/turbulenceModels/RAS/incompressible/wallFunctions/wallViscosityI.H index d7283346d9..f1fa326303 100644 --- a/src/turbulenceModels/incompressible/wallFunctions/wallViscosityI.H +++ b/src/turbulenceModels/RAS/incompressible/wallFunctions/wallViscosityI.H @@ -31,7 +31,7 @@ Description \*---------------------------------------------------------------------------*/ { - scalar Cmu25 = pow(Cmu.value(), 0.25); + scalar Cmu25 = pow(Cmu, 0.25); const fvPatchList& patches = mesh_.boundary(); @@ -53,7 +53,7 @@ Description if (yPlus > yPlusLam_) { - nutw[facei] = + nutw[facei] = nuw[facei] *(yPlus*kappa_/log(E_*yPlus) - 1); } diff --git a/tutorials/MRFSimpleFoam/MRFSimpleFoam/MRFSimpleFoam.C b/tutorials/MRFSimpleFoam/MRFSimpleFoam/MRFSimpleFoam.C index 9cf66cc3b3..af20a46ea9 100644 --- a/tutorials/MRFSimpleFoam/MRFSimpleFoam/MRFSimpleFoam.C +++ b/tutorials/MRFSimpleFoam/MRFSimpleFoam/MRFSimpleFoam.C @@ -33,7 +33,7 @@ Description #include "fvCFD.H" #include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" -#include "incompressible/turbulenceModel/turbulenceModel.H" +#include "incompressible/RASmodel/RASmodel.H" #include "MRFZones.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/MRFSimpleFoam/MRFSimpleFoam/Make/options b/tutorials/MRFSimpleFoam/MRFSimpleFoam/Make/options index b0e647e10a..6437903e0c 100644 --- a/tutorials/MRFSimpleFoam/MRFSimpleFoam/Make/options +++ b/tutorials/MRFSimpleFoam/MRFSimpleFoam/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/RAS \ -I$(LIB_SRC)/transportModels EXE_LIBS = \ diff --git a/tutorials/MRFSimpleFoam/MRFSimpleFoam/createFields.H b/tutorials/MRFSimpleFoam/MRFSimpleFoam/createFields.H index 1ae8c416d8..fc1c30b19f 100644 --- a/tutorials/MRFSimpleFoam/MRFSimpleFoam/createFields.H +++ b/tutorials/MRFSimpleFoam/MRFSimpleFoam/createFields.H @@ -36,9 +36,9 @@ singlePhaseTransportModel laminarTransport(U, phi); - autoPtr turbulence + autoPtr turbulence ( - turbulenceModel::New(U, phi, laminarTransport) + incompressible::RASmodel::New(U, phi, laminarTransport) ); diff --git a/tutorials/MRFSimpleFoam/mixerVessel2D/constant/turbulenceProperties b/tutorials/MRFSimpleFoam/mixerVessel2D/constant/turbulenceProperties index 733a114ddb..ca792d9f45 100644 --- a/tutorials/MRFSimpleFoam/mixerVessel2D/constant/turbulenceProperties +++ b/tutorials/MRFSimpleFoam/mixerVessel2D/constant/turbulenceProperties @@ -22,7 +22,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -turbulenceModel kEpsilon; +RASmodel kEpsilon; turbulence on; @@ -32,166 +32,166 @@ laminarCoeffs kEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; } RNGkEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.0845; - C1 C1 [0 0 0 0 0 0 0] 1.42; - C2 C2 [0 0 0 0 0 0 0] 1.68; - alphak alphaK [0 0 0 0 0 0 0] 1.39; - alphaEps alphaEps [0 0 0 0 0 0 0] 1.39; - eta0 eta0 [0 0 0 0 0 0 0] 4.38; - beta beta [0 0 0 0 0 0 0] 0.012; + Cmu 0.0845; + C1 1.42; + C2 1.68; + alphak 1.39; + alphaEps 1.39; + eta0 4.38; + beta 0.012; } kOmegaSSTCoeffs { - alphaK1 alphaK1 [0 0 0 0 0 0 0] 0.85034; - alphaK2 alphaK1 [0 0 0 0 0 0 0] 1.0; - alphaOmega1 alphaOmega1 [0 0 0 0 0 0 0] 0.5; - alphaOmega2 alphaOmega2 [0 0 0 0 0 0 0] 0.85616; - gamma1 gamma1 [0 0 0 0 0 0 0] 0.5532; - gamma2 gamma2 [0 0 0 0 0 0 0] 0.4403; - beta1 beta1 [0 0 0 0 0 0 0] 0.0750; - beta2 beta2 [0 0 0 0 0 0 0] 0.0828; - betaStar betaStar [0 0 0 0 0 0 0] 0.09; - a1 a1 [0 0 0 0 0 0 0] 0.31; - c1 c1 [0 0 0 0 0 0 0] 10; + alphaK1 0.85034; + alphaK2 1.0; + alphaOmega1 0.5; + alphaOmega2 0.85616; + gamma1 0.5532; + gamma2 0.4403; + beta1 0.0750; + beta2 0.0828; + betaStar 0.09; + a1 0.31; + c1 10; - Cmu Cmu [0 0 0 0 0 0 0] 0.09; + Cmu 0.09; } NonlinearKEShihCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76932; - A1 A1 [0 0 0 0 0 0 0] 1.25; - A2 A2 [0 0 0 0 0 0 0] 1000; - Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; - Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; - Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; - alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76932; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; } LienCubicKECoeffs { - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - A1 A1 [0 0 0 0 0 0 0] 1.25; - A2 A2 [0 0 0 0 0 0 0] 1000; - Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; - Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; - Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; - alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; } QZetaCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaZeta alphaZeta [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaZeta 0.76923; anisotropic no; } LaunderSharmaKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; } LamBremhorstKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; } LienCubicKELowReCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - A1 A1 [0 0 0 0 0 0 0] 1.25; - A2 A2 [0 0 0 0 0 0 0] 1000; - Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; - Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; - Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; - alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; - Am Am [0 0 0 0 0 0 0] 0.016; - Aepsilon Aepsilon [0 0 0 0 0 0 0] 0.263; - Amu Amu [0 0 0 0 0 0 0] 0.00222; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; + Am 0.016; + Aepsilon 0.263; + Amu 0.00222; } LienLeschzinerLowReCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - Am Am [0 0 0 0 0 0 0] 0.016; - Aepsilon Aepsilon [0 0 0 0 0 0 0] 0.263; - Amu Amu [0 0 0 0 0 0 0] 0.00222; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + Am 0.016; + Aepsilon 0.263; + Amu 0.00222; } LRRCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clrr1 Clrr1 [0 0 0 0 0 0 0] 1.8; - Clrr2 Clrr2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + Clrr1 1.8; + Clrr2 0.6; + C1 1.44; + C2 1.92; + Cs 0.25; + Ceps 0.15; + alphaEps 0.76923; } LaunderGibsonRSTMCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clg1 Clg1 [0 0 0 0 0 0 0] 1.8; - Clg2 Clg2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C1Ref C1Ref [0 0 0 0 0 0 0] 0.5; - C2Ref C2Ref [0 0 0 0 0 0 0] 0.3; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - alphaR alphaR [0 0 0 0 0 0 0] 1.22; + Cmu 0.09; + Clg1 1.8; + Clg2 0.6; + C1 1.44; + C2 1.92; + C1Ref 0.5; + C2Ref 0.3; + Cs 0.25; + Ceps 0.15; + alphaEps 0.76923; + alphaR 1.22; } SpalartAllmarasCoeffs { - alphaNut alphaNut [0 0 0 0 0 0 0] 1.5; - Cb1 Cb1 [0 0 0 0 0 0 0] 0.1355; - Cb2 Cb2 [0 0 0 0 0 0 0] 0.622; - Cw2 Cw2 [0 0 0 0 0 0 0] 0.3; - Cw3 Cw3 [0 0 0 0 0 0 0] 2; - Cv1 Cv1 [0 0 0 0 0 0 0] 7.1; - Cv2 Cv2 [0 0 0 0 0 0 0] 5.0; + alphaNut 1.5; + Cb1 0.1355; + Cb2 0.622; + Cw2 0.3; + Cw3 2; + Cv1 7.1; + Cv2 5.0; } wallFunctionCoeffs { - kappa kappa [0 0 0 0 0 0 0] 0.4187; - E E [0 0 0 0 0 0 0] 9; + kappa 0.4187; + E 9; } diff --git a/tutorials/XiFoam/moriyoshiHomogeneous/constant/turbulenceProperties b/tutorials/XiFoam/moriyoshiHomogeneous/constant/turbulenceProperties index 10111c9951..ba6e807f82 100644 --- a/tutorials/XiFoam/moriyoshiHomogeneous/constant/turbulenceProperties +++ b/tutorials/XiFoam/moriyoshiHomogeneous/constant/turbulenceProperties @@ -22,7 +22,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -turbulenceModel LaunderSharmaKE; +RASmodel LaunderSharmaKE; turbulence on; @@ -32,73 +32,73 @@ laminarCoeffs kEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C3 C3 [0 0 0 0 0 0 0] 0; - alphah alphah [0 0 0 0 0 0 0] 1.111; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 0; + alphah 1.111; + alphak 1; + alphaEps 0.76923; } RNGkEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.0845; - C1 C1 [0 0 0 0 0 0 0] 1.42; - C2 C2 [0 0 0 0 0 0 0] 1.68; - C3 C3 [0 0 0 0 0 0 0] 0; - alphah alphah [0 0 0 0 0 0 0] 1.111; - alphak alphaK [0 0 0 0 0 0 0] 1.39; - alphaEps alphaEps [0 0 0 0 0 0 0] 1.39; - eta0 eta0 [0 0 0 0 0 0 0] 4.38; - beta beta [0 0 0 0 0 0 0] 0.012; + Cmu 0.0845; + C1 1.42; + C2 1.68; + C3 0; + alphah 1.111; + alphak 1.39; + alphaEps 1.39; + eta0 4.38; + beta 0.012; } LaunderSharmaKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C3 C3 [0 0 0 0 0 0 0] 0; - alphah alphah [0 0 0 0 0 0 0] 1.111; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 0; + alphah 1.111; + alphak 1; + alphaEps 0.76923; } LRRCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clrr1 Clrr1 [0 0 0 0 0 0 0] 1.8; - Clrr2 Clrr2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphah alphah [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - alphaR alphaR [0 0 0 0 0 0 0] 1.22; + Cmu 0.09; + Clrr1 1.8; + Clrr2 0.6; + C1 1.44; + C2 1.92; + Cs 0.25; + Ceps 0.15; + alphah 1; + alphaEps 0.76923; + alphaR 1.22; } LaunderGibsonRSTMCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clg1 Clg1 [0 0 0 0 0 0 0] 1.8; - Clg2 Clg2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C1Ref C1Ref [0 0 0 0 0 0 0] 0.5; - C2Ref C2Ref [0 0 0 0 0 0 0] 0.3; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphah alphah [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - alphaR alphaR [0 0 0 0 0 0 0] 1.22; + Cmu 0.09; + Clg1 1.8; + Clg2 0.6; + C1 1.44; + C2 1.92; + C1Ref 0.5; + C2Ref 0.3; + Cs 0.25; + Ceps 0.15; + alphah 1; + alphaEps 0.76923; + alphaR 1.22; } wallFunctionCoeffs { - kappa kappa [0 0 0 0 0 0 0] 0.4187; - E E [0 0 0 0 0 0 0] 9; + kappa 0.4187; + E 9; } diff --git a/tutorials/Xoodles/pitzDaily/constant/turbulenceProperties b/tutorials/Xoodles/pitzDaily/constant/turbulenceProperties index 1fb585840f..21fc8a8a02 100644 --- a/tutorials/Xoodles/pitzDaily/constant/turbulenceProperties +++ b/tutorials/Xoodles/pitzDaily/constant/turbulenceProperties @@ -32,34 +32,34 @@ laminarCoeffs oneEqEddyCoeffs { - ce ce [0 0 0 0 0 0 0] 1.048; - ck ck [0 0 0 0 0 0 0] 0.094; + ce 1.048; + ck 0.094; } dynOneEqEddyCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; + ce 1.05; filter simple; } lowReOneEqEddyCoeffs { - ck ck [0 0 0 0 0 0 0] 0.07; - ce ce [0 0 0 0 0 0 0] 1.05; - beta beta [0 0 0 0 0 0 0] 0.01; + ck 0.07; + ce 1.05; + beta 0.01; } SmagorinskyCoeffs { - ck ck [0 0 0 0 0 0 0] 0.02; - ce ce [0 0 0 0 0 0 0] 0.202; + ck 0.02; + ce 0.202; } DeardorffDiffStressCoeffs { - ce ce [0 0 0 0 0 0 0] 1.048; - ck ck [0 0 0 0 0 0 0] 0.094; - cm cm [0 0 0 0 0 0 0] 4.13; + ce 1.048; + ck 0.094; + cm 4.13; } cubeRootVolCoeffs @@ -83,7 +83,7 @@ PrandtlCoeffs } maxDeltaRatio 1.1; } - Cdelta Cdelta [0 0 0 0 0 0 0] 0.158; + Cdelta 0.158; } vanDriestCoeffs @@ -102,8 +102,8 @@ vanDriestCoeffs } maxDeltaRatio 1.1; } - Aplus Aplus [0 0 0 0 0 0 0] 26; - Cdelta Cdelta [0 0 0 0 0 0 0] 0.158; + Aplus 26; + Cdelta 0.158; } smoothCoeffs @@ -116,11 +116,11 @@ smoothCoeffs maxDeltaRatio 1.1; } -kappa kappa [0 0 0 0 0 0 0] 0.4187; +kappa 0.4187; wallFunctionCoeffs { - E E [0 0 0 0 0 0 0] 9; + E 9; } diff --git a/tutorials/Xoodles/pitzDaily3D/constant/turbulenceProperties b/tutorials/Xoodles/pitzDaily3D/constant/turbulenceProperties index 1fb585840f..21fc8a8a02 100644 --- a/tutorials/Xoodles/pitzDaily3D/constant/turbulenceProperties +++ b/tutorials/Xoodles/pitzDaily3D/constant/turbulenceProperties @@ -32,34 +32,34 @@ laminarCoeffs oneEqEddyCoeffs { - ce ce [0 0 0 0 0 0 0] 1.048; - ck ck [0 0 0 0 0 0 0] 0.094; + ce 1.048; + ck 0.094; } dynOneEqEddyCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; + ce 1.05; filter simple; } lowReOneEqEddyCoeffs { - ck ck [0 0 0 0 0 0 0] 0.07; - ce ce [0 0 0 0 0 0 0] 1.05; - beta beta [0 0 0 0 0 0 0] 0.01; + ck 0.07; + ce 1.05; + beta 0.01; } SmagorinskyCoeffs { - ck ck [0 0 0 0 0 0 0] 0.02; - ce ce [0 0 0 0 0 0 0] 0.202; + ck 0.02; + ce 0.202; } DeardorffDiffStressCoeffs { - ce ce [0 0 0 0 0 0 0] 1.048; - ck ck [0 0 0 0 0 0 0] 0.094; - cm cm [0 0 0 0 0 0 0] 4.13; + ce 1.048; + ck 0.094; + cm 4.13; } cubeRootVolCoeffs @@ -83,7 +83,7 @@ PrandtlCoeffs } maxDeltaRatio 1.1; } - Cdelta Cdelta [0 0 0 0 0 0 0] 0.158; + Cdelta 0.158; } vanDriestCoeffs @@ -102,8 +102,8 @@ vanDriestCoeffs } maxDeltaRatio 1.1; } - Aplus Aplus [0 0 0 0 0 0 0] 26; - Cdelta Cdelta [0 0 0 0 0 0 0] 0.158; + Aplus 26; + Cdelta 0.158; } smoothCoeffs @@ -116,11 +116,11 @@ smoothCoeffs maxDeltaRatio 1.1; } -kappa kappa [0 0 0 0 0 0 0] 0.4187; +kappa 0.4187; wallFunctionCoeffs { - E E [0 0 0 0 0 0 0] 9; + E 9; } diff --git a/tutorials/boundaryFoam/boundaryLaunderSharma/constant/turbulenceProperties b/tutorials/boundaryFoam/boundaryLaunderSharma/constant/turbulenceProperties index 54288e0783..3e1e16755c 100644 --- a/tutorials/boundaryFoam/boundaryLaunderSharma/constant/turbulenceProperties +++ b/tutorials/boundaryFoam/boundaryLaunderSharma/constant/turbulenceProperties @@ -22,7 +22,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -turbulenceModel LaunderSharmaKE; +RASmodel LaunderSharmaKE; turbulence on; @@ -32,166 +32,166 @@ laminarCoeffs kEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; } RNGkEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.0845; - C1 C1 [0 0 0 0 0 0 0] 1.42; - C2 C2 [0 0 0 0 0 0 0] 1.68; - alphak alphaK [0 0 0 0 0 0 0] 1.39; - alphaEps alphaEps [0 0 0 0 0 0 0] 1.39; - eta0 eta0 [0 0 0 0 0 0 0] 4.38; - beta beta [0 0 0 0 0 0 0] 0.012; + Cmu 0.0845; + C1 1.42; + C2 1.68; + alphak 1.39; + alphaEps 1.39; + eta0 4.38; + beta 0.012; } kOmegaSSTCoeffs { - alphaK1 alphaK1 [0 0 0 0 0 0 0] 0.85034; - alphaK2 alphaK1 [0 0 0 0 0 0 0] 1.0; - alphaOmega1 alphaOmega1 [0 0 0 0 0 0 0] 0.5; - alphaOmega2 alphaOmega2 [0 0 0 0 0 0 0] 0.85616; - gamma1 gamma1 [0 0 0 0 0 0 0] 0.5532; - gamma2 gamma2 [0 0 0 0 0 0 0] 0.4403; - beta1 beta1 [0 0 0 0 0 0 0] 0.0750; - beta2 beta2 [0 0 0 0 0 0 0] 0.0828; - betaStar betaStar [0 0 0 0 0 0 0] 0.09; - a1 a1 [0 0 0 0 0 0 0] 0.31; - c1 c1 [0 0 0 0 0 0 0] 10; + alphaK1 0.85034; + alphaK2 1.0; + alphaOmega1 0.5; + alphaOmega2 0.85616; + gamma1 0.5532; + gamma2 0.4403; + beta1 0.0750; + beta2 0.0828; + betaStar 0.09; + a1 0.31; + c1 10; - Cmu Cmu [0 0 0 0 0 0 0] 0.09; + Cmu 0.09; } NonlinearKEShihCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76932; - A1 A1 [0 0 0 0 0 0 0] 1.25; - A2 A2 [0 0 0 0 0 0 0] 1000; - Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; - Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; - Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; - alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76932; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; } LienCubicKECoeffs { - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - A1 A1 [0 0 0 0 0 0 0] 1.25; - A2 A2 [0 0 0 0 0 0 0] 1000; - Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; - Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; - Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; - alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; } QZetaCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaZeta alphaZeta [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaZeta 0.76923; anisotropic no; } LaunderSharmaKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; } LamBremhorstKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; } LienCubicKELowReCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - A1 A1 [0 0 0 0 0 0 0] 1.25; - A2 A2 [0 0 0 0 0 0 0] 1000; - Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; - Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; - Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; - alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; - Am Am [0 0 0 0 0 0 0] 0.016; - Aepsilon Aepsilon [0 0 0 0 0 0 0] 0.263; - Amu Amu [0 0 0 0 0 0 0] 0.00222; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; + Am 0.016; + Aepsilon 0.263; + Amu 0.00222; } LienLeschzinerLowReCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - Am Am [0 0 0 0 0 0 0] 0.016; - Aepsilon Aepsilon [0 0 0 0 0 0 0] 0.263; - Amu Amu [0 0 0 0 0 0 0] 0.00222; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + Am 0.016; + Aepsilon 0.263; + Amu 0.00222; } LRRCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clrr1 Clrr1 [0 0 0 0 0 0 0] 1.8; - Clrr2 Clrr2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + Clrr1 1.8; + Clrr2 0.6; + C1 1.44; + C2 1.92; + Cs 0.25; + Ceps 0.15; + alphaEps 0.76923; } LaunderGibsonRSTMCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clg1 Clg1 [0 0 0 0 0 0 0] 1.8; - Clg2 Clg2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C1Ref C1Ref [0 0 0 0 0 0 0] 0.5; - C2Ref C2Ref [0 0 0 0 0 0 0] 0.3; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - alphaR alphaR [0 0 0 0 0 0 0] 1.22; + Cmu 0.09; + Clg1 1.8; + Clg2 0.6; + C1 1.44; + C2 1.92; + C1Ref 0.5; + C2Ref 0.3; + Cs 0.25; + Ceps 0.15; + alphaEps 0.76923; + alphaR 1.22; } SpalartAllmarasCoeffs { - alphaNut alphaNut [0 0 0 0 0 0 0] 1.5; - Cb1 Cb1 [0 0 0 0 0 0 0] 0.1355; - Cb2 Cb2 [0 0 0 0 0 0 0] 0.622; - Cw2 Cw2 [0 0 0 0 0 0 0] 0.3; - Cw3 Cw3 [0 0 0 0 0 0 0] 2; - Cv1 Cv1 [0 0 0 0 0 0 0] 7.1; - Cv2 Cv2 [0 0 0 0 0 0 0] 5.0; + alphaNut 1.5; + Cb1 0.1355; + Cb2 0.622; + Cw2 0.3; + Cw3 2; + Cv1 7.1; + Cv2 5.0; } wallFunctionCoeffs { - kappa kappa [0 0 0 0 0 0 0] 0.4187; - E E [0 0 0 0 0 0 0] 9; + kappa 0.4187; + E 9; } diff --git a/tutorials/boundaryFoam/boundaryWallFunctions/constant/turbulenceProperties b/tutorials/boundaryFoam/boundaryWallFunctions/constant/turbulenceProperties index 1a7b122ced..f979cb3a80 100644 --- a/tutorials/boundaryFoam/boundaryWallFunctions/constant/turbulenceProperties +++ b/tutorials/boundaryFoam/boundaryWallFunctions/constant/turbulenceProperties @@ -24,7 +24,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Turbulence model selection -turbulenceModel kEpsilon; +RASmodel kEpsilon; // Do you wish to calculate turbulence? turbulence on; @@ -38,115 +38,115 @@ laminarCoeffs kEpsilonCoeffs { // Cmu - Cmu Cmu [0 0 0 0 0 0 0] 0.09; + Cmu 0.09; // C1 - C1 C1 [0 0 0 0 0 0 0] 1.44; + C1 1.44; // C2 - C2 C2 [0 0 0 0 0 0 0] 1.92; + C2 1.92; // alphaEps - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + alphaEps 0.76923; } // RNG k-epsilon model coefficients RNGkEpsilonCoeffs { // Cmu - Cmu Cmu [0 0 0 0 0 0 0] 0.0845; + Cmu 0.0845; // C1 - C1 C1 [0 0 0 0 0 0 0] 1.42; + C1 1.42; // C2 - C2 C2 [0 0 0 0 0 0 0] 1.68; + C2 1.68; // alphak - alphak alphaK [0 0 0 0 0 0 0] 1.39; + alphak 1.39; // alphaEps - alphaEps alphaEps [0 0 0 0 0 0 0] 1.39; + alphaEps 1.39; // eta0 - eta0 eta0 [0 0 0 0 0 0 0] 4.38; + eta0 4.38; // beta - beta beta [0 0 0 0 0 0 0] 0.012; + beta 0.012; } // k-omega-SST model coefficients kOmegaSSTCoeffs { - alphaK1 alphaK1 [0 0 0 0 0 0 0] 0.85034; - alphaK2 alphaK1 [0 0 0 0 0 0 0] 1.0; - alphaOmega1 alphaOmega1 [0 0 0 0 0 0 0] 0.5; - alphaOmega2 alphaOmega2 [0 0 0 0 0 0 0] 0.85616; - gamma1 gamma1 [0 0 0 0 0 0 0] 0.5532; - gamma2 gamma2 [0 0 0 0 0 0 0] 0.4403; - beta1 beta1 [0 0 0 0 0 0 0] 0.0750; - beta2 beta2 [0 0 0 0 0 0 0] 0.0828; - betaStar betaStar [0 0 0 0 0 0 0] 0.09; - a1 a1 [0 0 0 0 0 0 0] 0.31; - c1 c1 [0 0 0 0 0 0 0] 10; + alphaK1 0.85034; + alphaK2 1.0; + alphaOmega1 0.5; + alphaOmega2 0.85616; + gamma1 0.5532; + gamma2 0.4403; + beta1 0.0750; + beta2 0.0828; + betaStar 0.09; + a1 0.31; + c1 10; - Cmu Cmu [0 0 0 0 0 0 0] 0.09; + Cmu 0.09; } // Shih non-Linear k-epsilon model coefficients NonlinearKEShihCoeffs { // Cmu - Cmu Cmu [0 0 0 0 0 0 0] 0.09; + Cmu 0.09; // C1 - C1 C1 [0 0 0 0 0 0 0] 1.44; + C1 1.44; // C2 - C2 C2 [0 0 0 0 0 0 0] 1.92; + C2 1.92; // alphak - alphak alphak [0 0 0 0 0 0 0] 1; + alphak 1; // alphaEps - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76932; + alphaEps 0.76932; // A1 - A1 A1 [0 0 0 0 0 0 0] 1.25; + A1 1.25; // A2 - A2 A2 [0 0 0 0 0 0 0] 1000; + A2 1000; // Ctau1 - Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; + Ctau1 -4; // Ctau2 - Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; + Ctau2 13; // Ctau3 - Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; + Ctau3 -2; // alphaKsi - alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; + alphaKsi 0.9; } // Lien non-Linear cubic k-epsilon model coefficients LienCubicKECoeffs { // C1 - C1 C1 [0 0 0 0 0 0 0] 1.44; + C1 1.44; // C2 - C2 C2 [0 0 0 0 0 0 0] 1.92; + C2 1.92; // alphak - alphak alphak [0 0 0 0 0 0 0] 1; + alphak 1; // alphaEps - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + alphaEps 0.76923; // A1 - A1 A1 [0 0 0 0 0 0 0] 1.25; + A1 1.25; // A2 - A2 A2 [0 0 0 0 0 0 0] 1000; + A2 1000; // Ctau1 - Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; + Ctau1 -4; // Ctau2 - Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; + Ctau2 13; // Ctau3 - Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; + Ctau3 -2; // alphaKsi - alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; + alphaKsi 0.9; } // Gibson's q-zeta low Reynolds number k-epsilon model coefficients QZetaCoeffs { // Cmu - Cmu Cmu [0 0 0 0 0 0 0] 0.09; + Cmu 0.09; // C1 - C1 C1 [0 0 0 0 0 0 0] 1.44; + C1 1.44; // C2 - C2 C2 [0 0 0 0 0 0 0] 1.92; + C2 1.92; // alphaZeta - alphaZeta alphaZeta [0 0 0 0 0 0 0] 0.76923; + alphaZeta 0.76923; // anisotropic? anisotropic no; } @@ -155,155 +155,155 @@ QZetaCoeffs LaunderSharmaKECoeffs { // Cmu - Cmu Cmu [0 0 0 0 0 0 0] 0.09; + Cmu 0.09; // C1 - C1 C1 [0 0 0 0 0 0 0] 1.44; + C1 1.44; // C2 - C2 C2 [0 0 0 0 0 0 0] 1.92; + C2 1.92; // alphaEps - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + alphaEps 0.76923; } // Lam-Bremhorst low Reynolds number k-Epsilon model coefficients LamBremhorstKECoeffs { // Cmu - Cmu Cmu [0 0 0 0 0 0 0] 0.09; + Cmu 0.09; // C1 - C1 C1 [0 0 0 0 0 0 0] 1.44; + C1 1.44; // C2 - C2 C2 [0 0 0 0 0 0 0] 1.92; + C2 1.92; // alphaEps - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + alphaEps 0.76923; } // Lien-Leschziner low Reynolds number cubic k-epsilon model coefficients LienCubicKELowReCoeffs { // Cmu - Cmu Cmu [0 0 0 0 0 0 0] 0.09; + Cmu 0.09; // C1 - C1 C1 [0 0 0 0 0 0 0] 1.44; + C1 1.44; // C2 - C2 C2 [0 0 0 0 0 0 0] 1.92; + C2 1.92; // alphak - alphak alphak [0 0 0 0 0 0 0] 1; + alphak 1; // alphaEps - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + alphaEps 0.76923; // A1 - A1 A1 [0 0 0 0 0 0 0] 1.25; + A1 1.25; // A2 - A2 A2 [0 0 0 0 0 0 0] 1000; + A2 1000; // Ctau1 - Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; + Ctau1 -4; // Ctau2 - Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; + Ctau2 13; // Ctau3 - Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; + Ctau3 -2; // alphaKsi - alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; + alphaKsi 0.9; // Am - Am Am [0 0 0 0 0 0 0] 0.016; + Am 0.016; // Aepsilon - Aepsilon Aepsilon [0 0 0 0 0 0 0] 0.263; + Aepsilon 0.263; // Amu - Amu Amu [0 0 0 0 0 0 0] 0.00222; + Amu 0.00222; } // Lien-Leschziner low Reynolds number cubic k-epsilon model coefficients LienLeschzinerLowReCoeffs { // Cmu - Cmu Cmu [0 0 0 0 0 0 0] 0.09; + Cmu 0.09; // C1 - C1 C1 [0 0 0 0 0 0 0] 1.44; + C1 1.44; // C2 - C2 C2 [0 0 0 0 0 0 0] 1.92; + C2 1.92; // alphak - alphak alphak [0 0 0 0 0 0 0] 1; + alphak 1; // alphaEps - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + alphaEps 0.76923; // Am - Am Am [0 0 0 0 0 0 0] 0.016; + Am 0.016; // Aepsilon - Aepsilon Aepsilon [0 0 0 0 0 0 0] 0.263; + Aepsilon 0.263; // Amu - Amu Amu [0 0 0 0 0 0 0] 0.00222; + Amu 0.00222; } // Launder-Reece-Rodi RSTM with wall functions model coefficients LRRCoeffs { // Cmu - Cmu Cmu [0 0 0 0 0 0 0] 0.09; + Cmu 0.09; // Clrr1 - Clrr1 Clrr1 [0 0 0 0 0 0 0] 1.8; + Clrr1 1.8; // Clrr2 - Clrr2 Clrr2 [0 0 0 0 0 0 0] 0.6; + Clrr2 0.6; // C1 - C1 C1 [0 0 0 0 0 0 0] 1.44; + C1 1.44; // C2 - C2 C2 [0 0 0 0 0 0 0] 1.92; + C2 1.92; // Cs - Cs Cs [0 0 0 0 0 0 0] 0.25; + Cs 0.25; // Ceps - Ceps Ceps [0 0 0 0 0 0 0] 0.15; + Ceps 0.15; // alphaEps - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + alphaEps 0.76923; } // Launder-Gibson RSTM with wall reflection and wall functions model coefficients LaunderGibsonRSTMCoeffs { // Cmu - Cmu Cmu [0 0 0 0 0 0 0] 0.09; + Cmu 0.09; // Clg1 - Clg1 Clg1 [0 0 0 0 0 0 0] 1.8; + Clg1 1.8; // Clg2 - Clg2 Clg2 [0 0 0 0 0 0 0] 0.6; + Clg2 0.6; // C1 - C1 C1 [0 0 0 0 0 0 0] 1.44; + C1 1.44; // C2 - C2 C2 [0 0 0 0 0 0 0] 1.92; + C2 1.92; // C1Ref - C1Ref C1Ref [0 0 0 0 0 0 0] 0.5; + C1Ref 0.5; // C2Ref - C2Ref C2Ref [0 0 0 0 0 0 0] 0.3; + C2Ref 0.3; // Cs - Cs Cs [0 0 0 0 0 0 0] 0.25; + Cs 0.25; // Ceps - Ceps Ceps [0 0 0 0 0 0 0] 0.15; + Ceps 0.15; // alphaEps - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + alphaEps 0.76923; // alphaR - alphaR alphaR [0 0 0 0 0 0 0] 1.22; + alphaR 1.22; } // Standard Spalart-Allmaras model coefficients SpalartAllmarasCoeffs { // alphaNut - alphaNut alphaNut [0 0 0 0 0 0 0] 1.5; + alphaNut 1.5; // Cb1 - Cb1 Cb1 [0 0 0 0 0 0 0] 0.1355; + Cb1 0.1355; // Cb2 - Cb2 Cb2 [0 0 0 0 0 0 0] 0.622; + Cb2 0.622; // Cw2 - Cw2 Cw2 [0 0 0 0 0 0 0] 0.3; + Cw2 0.3; // Cw3 - Cw3 Cw3 [0 0 0 0 0 0 0] 2; + Cw3 2; // Cv1 - Cv1 Cv1 [0 0 0 0 0 0 0] 7.1; - Cv2 Cv2 [0 0 0 0 0 0 0] 5.0; + Cv1 7.1; + Cv2 5.0; } // Wall function coefficients wallFunctionCoeffs { // kappa - kappa kappa [0 0 0 0 0 0 0] 0.4187; + kappa 0.4187; // E - E E [0 0 0 0 0 0 0] 9; + E 9; } diff --git a/tutorials/bubbleFoam/bubbleColumn/constant/turbulenceProperties b/tutorials/bubbleFoam/bubbleColumn/constant/turbulenceProperties index 0956e1957f..df50c86414 100644 --- a/tutorials/bubbleFoam/bubbleColumn/constant/turbulenceProperties +++ b/tutorials/bubbleFoam/bubbleColumn/constant/turbulenceProperties @@ -22,7 +22,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -turbulenceModel laminar; +RASmodel laminar; turbulence off; @@ -32,17 +32,17 @@ laminarCoeffs kEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; } wallFunctionCoeffs { - kappa kappa [0 0 0 0 0 0 0] 0.4187; - E E [0 0 0 0 0 0 0] 9; + kappa 0.4187; + E 9; } diff --git a/tutorials/buoyantFoam/hotRoom/constant/turbulenceProperties b/tutorials/buoyantFoam/hotRoom/constant/turbulenceProperties index 48be4c9034..7128f95ea1 100644 --- a/tutorials/buoyantFoam/hotRoom/constant/turbulenceProperties +++ b/tutorials/buoyantFoam/hotRoom/constant/turbulenceProperties @@ -22,7 +22,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -turbulenceModel kEpsilon; +RASmodel kEpsilon; turbulence on; @@ -32,73 +32,73 @@ laminarCoeffs kEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C3 C3 [0 0 0 0 0 0 0] 0.85; - alphah alphah [0 0 0 0 0 0 0] 1; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 0.85; + alphah 1; + alphak 1; + alphaEps 0.76923; } RNGkEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.0845; - C1 C1 [0 0 0 0 0 0 0] 1.42; - C2 C2 [0 0 0 0 0 0 0] 1.68; - C3 C3 [0 0 0 0 0 0 0] -0.33; - alphah alphah [0 0 0 0 0 0 0] 1; - alphak alphaK [0 0 0 0 0 0 0] 1.39; - alphaEps alphaEps [0 0 0 0 0 0 0] 1.39; - eta0 eta0 [0 0 0 0 0 0 0] 4.38; - beta beta [0 0 0 0 0 0 0] 0.012; + Cmu 0.0845; + C1 1.42; + C2 1.68; + C3 -0.33; + alphah 1; + alphak 1.39; + alphaEps 1.39; + eta0 4.38; + beta 0.012; } LaunderSharmaKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C3 C3 [0 0 0 0 0 0 0] -0.33; - alphah alphah [0 0 0 0 0 0 0] 1; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 -0.33; + alphah 1; + alphak 1; + alphaEps 0.76923; } LRRCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clrr1 Clrr1 [0 0 0 0 0 0 0] 1.8; - Clrr2 Clrr2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphah alphah [0 0 0 0 0 0 0] 1; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphaR alphaR [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + Clrr1 1.8; + Clrr2 0.6; + C1 1.44; + C2 1.92; + alphah 1; + Cs 0.25; + Ceps 0.15; + alphaR 1; + alphaEps 0.76923; } LaunderGibsonRSTMCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clg1 Clg1 [0 0 0 0 0 0 0] 1.8; - Clg2 Clg2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphah alphah [0 0 0 0 0 0 0] 1; - C1Ref C1Ref [0 0 0 0 0 0 0] 0.5; - C2Ref C2Ref [0 0 0 0 0 0 0] 0.3; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphaR alphaR [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + Clg1 1.8; + Clg2 0.6; + C1 1.44; + C2 1.92; + alphah 1; + C1Ref 0.5; + C2Ref 0.3; + Cs 0.25; + Ceps 0.15; + alphaR 1; + alphaEps 0.76923; } wallFunctionCoeffs { - kappa kappa [0 0 0 0 0 0 0] 0.4187; - E E [0 0 0 0 0 0 0] 9; + kappa 0.4187; + E 9; } diff --git a/tutorials/buoyantSimpleFoam/hotRoom/constant/turbulenceProperties b/tutorials/buoyantSimpleFoam/hotRoom/constant/turbulenceProperties index 48be4c9034..7128f95ea1 100644 --- a/tutorials/buoyantSimpleFoam/hotRoom/constant/turbulenceProperties +++ b/tutorials/buoyantSimpleFoam/hotRoom/constant/turbulenceProperties @@ -22,7 +22,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -turbulenceModel kEpsilon; +RASmodel kEpsilon; turbulence on; @@ -32,73 +32,73 @@ laminarCoeffs kEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C3 C3 [0 0 0 0 0 0 0] 0.85; - alphah alphah [0 0 0 0 0 0 0] 1; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 0.85; + alphah 1; + alphak 1; + alphaEps 0.76923; } RNGkEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.0845; - C1 C1 [0 0 0 0 0 0 0] 1.42; - C2 C2 [0 0 0 0 0 0 0] 1.68; - C3 C3 [0 0 0 0 0 0 0] -0.33; - alphah alphah [0 0 0 0 0 0 0] 1; - alphak alphaK [0 0 0 0 0 0 0] 1.39; - alphaEps alphaEps [0 0 0 0 0 0 0] 1.39; - eta0 eta0 [0 0 0 0 0 0 0] 4.38; - beta beta [0 0 0 0 0 0 0] 0.012; + Cmu 0.0845; + C1 1.42; + C2 1.68; + C3 -0.33; + alphah 1; + alphak 1.39; + alphaEps 1.39; + eta0 4.38; + beta 0.012; } LaunderSharmaKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C3 C3 [0 0 0 0 0 0 0] -0.33; - alphah alphah [0 0 0 0 0 0 0] 1; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 -0.33; + alphah 1; + alphak 1; + alphaEps 0.76923; } LRRCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clrr1 Clrr1 [0 0 0 0 0 0 0] 1.8; - Clrr2 Clrr2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphah alphah [0 0 0 0 0 0 0] 1; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphaR alphaR [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + Clrr1 1.8; + Clrr2 0.6; + C1 1.44; + C2 1.92; + alphah 1; + Cs 0.25; + Ceps 0.15; + alphaR 1; + alphaEps 0.76923; } LaunderGibsonRSTMCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clg1 Clg1 [0 0 0 0 0 0 0] 1.8; - Clg2 Clg2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphah alphah [0 0 0 0 0 0 0] 1; - C1Ref C1Ref [0 0 0 0 0 0 0] 0.5; - C2Ref C2Ref [0 0 0 0 0 0 0] 0.3; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphaR alphaR [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + Clg1 1.8; + Clg2 0.6; + C1 1.44; + C2 1.92; + alphah 1; + C1Ref 0.5; + C2Ref 0.3; + Cs 0.25; + Ceps 0.15; + alphaR 1; + alphaEps 0.76923; } wallFunctionCoeffs { - kappa kappa [0 0 0 0 0 0 0] 0.4187; - E E [0 0 0 0 0 0 0] 9; + kappa 0.4187; + E 9; } diff --git a/tutorials/buoyantSimpleRadiationFoam/hotRadiationRoom/constant/turbulenceProperties b/tutorials/buoyantSimpleRadiationFoam/hotRadiationRoom/constant/turbulenceProperties index 48be4c9034..7128f95ea1 100644 --- a/tutorials/buoyantSimpleRadiationFoam/hotRadiationRoom/constant/turbulenceProperties +++ b/tutorials/buoyantSimpleRadiationFoam/hotRadiationRoom/constant/turbulenceProperties @@ -22,7 +22,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -turbulenceModel kEpsilon; +RASmodel kEpsilon; turbulence on; @@ -32,73 +32,73 @@ laminarCoeffs kEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C3 C3 [0 0 0 0 0 0 0] 0.85; - alphah alphah [0 0 0 0 0 0 0] 1; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 0.85; + alphah 1; + alphak 1; + alphaEps 0.76923; } RNGkEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.0845; - C1 C1 [0 0 0 0 0 0 0] 1.42; - C2 C2 [0 0 0 0 0 0 0] 1.68; - C3 C3 [0 0 0 0 0 0 0] -0.33; - alphah alphah [0 0 0 0 0 0 0] 1; - alphak alphaK [0 0 0 0 0 0 0] 1.39; - alphaEps alphaEps [0 0 0 0 0 0 0] 1.39; - eta0 eta0 [0 0 0 0 0 0 0] 4.38; - beta beta [0 0 0 0 0 0 0] 0.012; + Cmu 0.0845; + C1 1.42; + C2 1.68; + C3 -0.33; + alphah 1; + alphak 1.39; + alphaEps 1.39; + eta0 4.38; + beta 0.012; } LaunderSharmaKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C3 C3 [0 0 0 0 0 0 0] -0.33; - alphah alphah [0 0 0 0 0 0 0] 1; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 -0.33; + alphah 1; + alphak 1; + alphaEps 0.76923; } LRRCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clrr1 Clrr1 [0 0 0 0 0 0 0] 1.8; - Clrr2 Clrr2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphah alphah [0 0 0 0 0 0 0] 1; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphaR alphaR [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + Clrr1 1.8; + Clrr2 0.6; + C1 1.44; + C2 1.92; + alphah 1; + Cs 0.25; + Ceps 0.15; + alphaR 1; + alphaEps 0.76923; } LaunderGibsonRSTMCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clg1 Clg1 [0 0 0 0 0 0 0] 1.8; - Clg2 Clg2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphah alphah [0 0 0 0 0 0 0] 1; - C1Ref C1Ref [0 0 0 0 0 0 0] 0.5; - C2Ref C2Ref [0 0 0 0 0 0 0] 0.3; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphaR alphaR [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + Clg1 1.8; + Clg2 0.6; + C1 1.44; + C2 1.92; + alphah 1; + C1Ref 0.5; + C2Ref 0.3; + Cs 0.25; + Ceps 0.15; + alphaR 1; + alphaEps 0.76923; } wallFunctionCoeffs { - kappa kappa [0 0 0 0 0 0 0] 0.4187; - E E [0 0 0 0 0 0 0] 9; + kappa 0.4187; + E 9; } diff --git a/tutorials/channelOodles/channel395/constant/turbulenceProperties b/tutorials/channelOodles/channel395/constant/turbulenceProperties index c785596513..3478ac639c 100644 --- a/tutorials/channelOodles/channel395/constant/turbulenceProperties +++ b/tutorials/channelOodles/channel395/constant/turbulenceProperties @@ -32,90 +32,90 @@ laminarCoeffs oneEqEddyCoeffs { - ck ck [0 0 0 0 0 0 0] 0.07; - ce ce [0 0 0 0 0 0 0] 1.05; + ck 0.07; + ce 1.05; } dynOneEqEddyCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; + ce 1.05; filter simple; } locDynOneEqEddyCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; + ce 1.05; filter simple; } SmagorinskyCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; - ck ck [0 0 0 0 0 0 0] 0.07; + ce 1.05; + ck 0.07; } Smagorinsky2Coeffs { - ce ce [0 0 0 0 0 0 0] 1.05; - ck ck [0 0 0 0 0 0 0] 0.07; - cD2 cD2 [0 1 0 0 0 0 0] 0.02; + ce 1.05; + ck 0.07; + cD2 0.02; } spectEddyViscCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; - cB cB [0 0 0 0 0 0 0] 8.22; - cK1 cK1 [0 0 0 0 0 0 0] 0.83; - cK2 cK2 [0 0 0 0 0 0 0] 1.03; - cK3 cK3 [0 0 0 0 0 0 0] 4.75; - cK4 cK4 [0 0 0 0 0 0 0] 2.55; + ce 1.05; + cB 8.22; + cK1 0.83; + cK2 1.03; + cK3 4.75; + cK4 2.55; } dynSmagorinskyCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; + ce 1.05; filter simple; } mixedSmagorinskyCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; - ck ck [0 0 0 0 0 0 0] 0.07; + ce 1.05; + ck 0.07; filter simple; } dynMixedSmagorinskyCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; + ce 1.05; filter simple; } LRRDiffStressCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; - ck ck [0 0 0 0 0 0 0] 0.09; - c1 c1 [0 0 0 0 0 0 0] 1.8; - c2 c2 [0 0 0 0 0 0 0] 0.6; + ce 1.05; + ck 0.09; + c1 1.8; + c2 0.6; } DeardorffDiffStressCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; - ck ck [0 0 0 0 0 0 0] 0.09; - cm cm [0 0 0 0 0 0 0] 4.13; + ce 1.05; + ck 0.09; + cm 4.13; } SpalartAllmarasCoeffs { - alphaNut alphaNut [0 0 0 0 0 0 0] 1.5; - Cb1 Cb1 [0 0 0 0 0 0 0] 0.1355; - Cb2 Cb2 [0 0 0 0 0 0 0] 0.622; - Cw2 Cw2 [0 0 0 0 0 0 0] 0.3; - Cw3 Cw3 [0 0 0 0 0 0 0] 2; - Cv1 Cv1 [0 0 0 0 0 0 0] 7.1; - Cv2 Cv2 [0 0 0 0 0 0 0] 5.0; - CDES CDES [0 0 0 0 0 0 0] 0.65; - ck ck [0 0 0 0 0 0 0] 0.07; + alphaNut 1.5; + Cb1 0.1355; + Cb2 0.622; + Cw2 0.3; + Cw3 2; + Cv1 7.1; + Cv2 5.0; + CDES 0.65; + ck 0.07; } cubeRootVolCoeffs @@ -139,7 +139,7 @@ PrandtlCoeffs } maxDeltaRatio 1.1; } - Cdelta Cdelta [0 0 0 0 0 0 0] 0.158; + Cdelta 0.158; } vanDriestCoeffs @@ -158,8 +158,8 @@ vanDriestCoeffs } maxDeltaRatio 1.1; } - Aplus Aplus [0 0 0 0 0 0 0] 26; - Cdelta Cdelta [0 0 0 0 0 0 0] 0.158; + Aplus 26; + Cdelta 0.158; } smoothCoeffs @@ -172,11 +172,11 @@ smoothCoeffs maxDeltaRatio 1.1; } -kappa kappa [0 0 0 0 0 0 0] 0.4187; +kappa 0.4187; wallFunctionCoeffs { - E E [0 0 0 0 0 0 0] 9; + E 9; } diff --git a/tutorials/coodles/pitzDaily/constant/turbulenceProperties b/tutorials/coodles/pitzDaily/constant/turbulenceProperties index 1fb585840f..21fc8a8a02 100644 --- a/tutorials/coodles/pitzDaily/constant/turbulenceProperties +++ b/tutorials/coodles/pitzDaily/constant/turbulenceProperties @@ -32,34 +32,34 @@ laminarCoeffs oneEqEddyCoeffs { - ce ce [0 0 0 0 0 0 0] 1.048; - ck ck [0 0 0 0 0 0 0] 0.094; + ce 1.048; + ck 0.094; } dynOneEqEddyCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; + ce 1.05; filter simple; } lowReOneEqEddyCoeffs { - ck ck [0 0 0 0 0 0 0] 0.07; - ce ce [0 0 0 0 0 0 0] 1.05; - beta beta [0 0 0 0 0 0 0] 0.01; + ck 0.07; + ce 1.05; + beta 0.01; } SmagorinskyCoeffs { - ck ck [0 0 0 0 0 0 0] 0.02; - ce ce [0 0 0 0 0 0 0] 0.202; + ck 0.02; + ce 0.202; } DeardorffDiffStressCoeffs { - ce ce [0 0 0 0 0 0 0] 1.048; - ck ck [0 0 0 0 0 0 0] 0.094; - cm cm [0 0 0 0 0 0 0] 4.13; + ce 1.048; + ck 0.094; + cm 4.13; } cubeRootVolCoeffs @@ -83,7 +83,7 @@ PrandtlCoeffs } maxDeltaRatio 1.1; } - Cdelta Cdelta [0 0 0 0 0 0 0] 0.158; + Cdelta 0.158; } vanDriestCoeffs @@ -102,8 +102,8 @@ vanDriestCoeffs } maxDeltaRatio 1.1; } - Aplus Aplus [0 0 0 0 0 0 0] 26; - Cdelta Cdelta [0 0 0 0 0 0 0] 0.158; + Aplus 26; + Cdelta 0.158; } smoothCoeffs @@ -116,11 +116,11 @@ smoothCoeffs maxDeltaRatio 1.1; } -kappa kappa [0 0 0 0 0 0 0] 0.4187; +kappa 0.4187; wallFunctionCoeffs { - E E [0 0 0 0 0 0 0] 9; + E 9; } diff --git a/tutorials/dieselFoam/aachenBomb/constant/thermophysicalProperties b/tutorials/dieselFoam/aachenBomb/constant/thermophysicalProperties index f3643830b8..46a5780227 100644 --- a/tutorials/dieselFoam/aachenBomb/constant/thermophysicalProperties +++ b/tutorials/dieselFoam/aachenBomb/constant/thermophysicalProperties @@ -32,7 +32,6 @@ liquidComponents liquidProperties { C7H16 C7H16 defaultCoeffs; - C7H16 } /*********************************************************************/ diff --git a/tutorials/dieselFoam/aachenBomb/constant/turbulenceProperties b/tutorials/dieselFoam/aachenBomb/constant/turbulenceProperties index 80f2b97b30..b14ec53716 100644 --- a/tutorials/dieselFoam/aachenBomb/constant/turbulenceProperties +++ b/tutorials/dieselFoam/aachenBomb/constant/turbulenceProperties @@ -16,7 +16,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -turbulenceModel kEpsilon; +RASmodel kEpsilon; turbulence on; @@ -26,74 +26,74 @@ laminarCoeffs kEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C3 C3 [0 0 0 0 0 0 0] -0.33; - alphah alphah [0 0 0 0 0 0 0] 1; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 -0.33; + alphah 1; + alphak 1; + alphaEps 0.76923; muLimiter on; - Lsgs Lsgs [0 1 0 0 0 0 0] 0.0002; + Lsgs 0.0002; } RNGkEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.0845; - C1 C1 [0 0 0 0 0 0 0] 1.42; - C2 C2 [0 0 0 0 0 0 0] 1.68; - C3 C3 [0 0 0 0 0 0 0] -0.33; - alphah alphah [0 0 0 0 0 0 0] 1; - alphak alphaK [0 0 0 0 0 0 0] 1.39; - alphaEps alphaEps [0 0 0 0 0 0 0] 1.39; - eta0 eta0 [0 0 0 0 0 0 0] 4.38; - beta beta [0 0 0 0 0 0 0] 0.012; + Cmu 0.0845; + C1 1.42; + C2 1.68; + C3 -0.33; + alphah 1; + alphak 1.39; + alphaEps 1.39; + eta0 4.38; + beta 0.012; } LaunderSharmaKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C3 C3 [0 0 0 0 0 0 0] -0.33; - alphah alphah [0 0 0 0 0 0 0] 1; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 -0.33; + alphah 1; + alphak 1; + alphaEps 0.76923; } LRRCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clrr1 Clrr1 [0 0 0 0 0 0 0] 1.8; - Clrr2 Clrr2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C3 C3 [0 0 0 0 0 0 0] -0.33; - alphah alphah [0 0 0 0 0 0 0] 1; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; + Cmu 0.09; + Clrr1 1.8; + Clrr2 0.6; + C1 1.44; + C2 1.92; + C3 -0.33; + alphah 1; + Cs 0.25; + Ceps 0.15; } LaunderGibsonRSTMCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clg1 Clg1 [0 0 0 0 0 0 0] 1.8; - Clg2 Clg2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C3 C3 [0 0 0 0 0 0 0] -0.33; - alphah alphah [0 0 0 0 0 0 0] 1; - C1Ref C1Ref [0 0 0 0 0 0 0] 0.5; - C2Ref C2Ref [0 0 0 0 0 0 0] 0.3; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; + Cmu 0.09; + Clg1 1.8; + Clg2 0.6; + C1 1.44; + C2 1.92; + C3 -0.33; + alphah 1; + C1Ref 0.5; + C2Ref 0.3; + Cs 0.25; + Ceps 0.15; } wallFunctionCoeffs { - kappa kappa [0 0 0 0 0 0 0] 0.4187; - E E [0 0 0 0 0 0 0] 9; + kappa 0.4187; + E 9; } diff --git a/tutorials/engineFoam/kivaTest/constant/turbulenceProperties b/tutorials/engineFoam/kivaTest/constant/turbulenceProperties index b882072a2e..68a30fe751 100644 --- a/tutorials/engineFoam/kivaTest/constant/turbulenceProperties +++ b/tutorials/engineFoam/kivaTest/constant/turbulenceProperties @@ -22,7 +22,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -turbulenceModel kEpsilon; +RASmodel kEpsilon; turbulence on; @@ -32,73 +32,73 @@ laminarCoeffs kEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C3 C3 [0 0 0 0 0 0 0] 0; - alphah alphah [0 0 0 0 0 0 0] 1.111; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 0; + alphah 1.111; + alphak 1; + alphaEps 0.76923; } RNGkEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.0845; - C1 C1 [0 0 0 0 0 0 0] 1.42; - C2 C2 [0 0 0 0 0 0 0] 1.68; - C3 C3 [0 0 0 0 0 0 0] -0.33; - alphah alphah [0 0 0 0 0 0 0] 1; - alphak alphaK [0 0 0 0 0 0 0] 1.39; - alphaEps alphaEps [0 0 0 0 0 0 0] 1.39; - eta0 eta0 [0 0 0 0 0 0 0] 4.38; - beta beta [0 0 0 0 0 0 0] 0.012; + Cmu 0.0845; + C1 1.42; + C2 1.68; + C3 -0.33; + alphah 1; + alphak 1.39; + alphaEps 1.39; + eta0 4.38; + beta 0.012; } LaunderSharmaKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C3 C3 [0 0 0 0 0 0 0] -0.33; - alphah alphah [0 0 0 0 0 0 0] 1; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 -0.33; + alphah 1; + alphak 1; + alphaEps 0.76923; } LRRCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clrr1 Clrr1 [0 0 0 0 0 0 0] 1.8; - Clrr2 Clrr2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphah alphah [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - alphaR alphaR [0 0 0 0 0 0 0] 1.22; + Cmu 0.09; + Clrr1 1.8; + Clrr2 0.6; + C1 1.44; + C2 1.92; + Cs 0.25; + Ceps 0.15; + alphah 1; + alphaEps 0.76923; + alphaR 1.22; } LaunderGibsonRSTMCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clg1 Clg1 [0 0 0 0 0 0 0] 1.8; - Clg2 Clg2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C1Ref C1Ref [0 0 0 0 0 0 0] 0.5; - C2Ref C2Ref [0 0 0 0 0 0 0] 0.3; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphah alphah [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - alphaR alphaR [0 0 0 0 0 0 0] 1.22; + Cmu 0.09; + Clg1 1.8; + Clg2 0.6; + C1 1.44; + C2 1.92; + C1Ref 0.5; + C2Ref 0.3; + Cs 0.25; + Ceps 0.15; + alphah 1; + alphaEps 0.76923; + alphaR 1.22; } wallFunctionCoeffs { - kappa kappa [0 0 0 0 0 0 0] 0.4187; - E E [0 0 0 0 0 0 0] 9; + kappa 0.4187; + E 9; } diff --git a/tutorials/icoFoam/Allrun b/tutorials/icoFoam/Allrun index bbb56eb55c..fcea17d98e 100755 --- a/tutorials/icoFoam/Allrun +++ b/tutorials/icoFoam/Allrun @@ -10,13 +10,13 @@ cavityCases="cavity cavityFine cavityGrade cavityHighRe cavityClipped" runMapFields () { echo "Running mapFields from $1 to $2" - mapFields -source $1 -case $2 -sourceTime latestTime > $2/log.mapFields 2>&1 + mapFields $1 -case $2 -sourceTime latestTime > $2/log.mapFields 2>&1 } runMapFieldsConsistent () { echo "Running mapFields from $1 to $2" - mapFields -source $1 -case $2 -sourceTime latestTime -consistent > $2/log.mapFields 2>&1 + mapFields $1 -case $2 -sourceTime latestTime -consistent > $2/log.mapFields 2>&1 } runFluentMeshToFoam () diff --git a/tutorials/interDyMFoam/damBreakWithObstacle/constant/turbulenceProperties b/tutorials/interDyMFoam/damBreakWithObstacle/constant/turbulenceProperties index c2ac53a768..c0e5f76583 100644 --- a/tutorials/interDyMFoam/damBreakWithObstacle/constant/turbulenceProperties +++ b/tutorials/interDyMFoam/damBreakWithObstacle/constant/turbulenceProperties @@ -22,8 +22,8 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -// turbulenceModel kEpsilon; -turbulenceModel laminar; +// RASmodel kEpsilon; +RASmodel laminar; turbulence off; @@ -33,149 +33,149 @@ laminarCoeffs kEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; } RNGkEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.0845; - C1 C1 [0 0 0 0 0 0 0] 1.42; - C2 C2 [0 0 0 0 0 0 0] 1.68; - alphak alphaK [0 0 0 0 0 0 0] 1.39; - alphaEps alphaEps [0 0 0 0 0 0 0] 1.39; - eta0 eta0 [0 0 0 0 0 0 0] 4.38; - beta beta [0 0 0 0 0 0 0] 0.012; + Cmu 0.0845; + C1 1.42; + C2 1.68; + alphak 1.39; + alphaEps 1.39; + eta0 4.38; + beta 0.012; } NonlinearKEShihCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76932; - A1 A1 [0 0 0 0 0 0 0] 1.25; - A2 A2 [0 0 0 0 0 0 0] 1000; - Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; - Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; - Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; - alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76932; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; } LienCubicKECoeffs { - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - A1 A1 [0 0 0 0 0 0 0] 1.25; - A2 A2 [0 0 0 0 0 0 0] 1000; - Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; - Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; - Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; - alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; } QZetaCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaZeta alphaZeta [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaZeta 0.76923; anisotropic no; } LaunderSharmaKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; } LamBremhorstKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; } LienCubicKELowReCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - A1 A1 [0 0 0 0 0 0 0] 1.25; - A2 A2 [0 0 0 0 0 0 0] 1000; - Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; - Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; - Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; - alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; - Am Am [0 0 0 0 0 0 0] 0.016; - Aepsilon Aepsilon [0 0 0 0 0 0 0] 0.263; - Amu Amu [0 0 0 0 0 0 0] 0.00222; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; + Am 0.016; + Aepsilon 0.263; + Amu 0.00222; } LienLeschzinerLowReCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - Am Am [0 0 0 0 0 0 0] 0.016; - Aepsilon Aepsilon [0 0 0 0 0 0 0] 0.263; - Amu Amu [0 0 0 0 0 0 0] 0.00222; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + Am 0.016; + Aepsilon 0.263; + Amu 0.00222; } LRRCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clrr1 Clrr1 [0 0 0 0 0 0 0] 1.8; - Clrr2 Clrr2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + Clrr1 1.8; + Clrr2 0.6; + C1 1.44; + C2 1.92; + Cs 0.25; + Ceps 0.15; + alphaEps 0.76923; } LaunderGibsonRSTMCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clg1 Clg1 [0 0 0 0 0 0 0] 1.8; - Clg2 Clg2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C1Ref C1Ref [0 0 0 0 0 0 0] 0.5; - C2Ref C2Ref [0 0 0 0 0 0 0] 0.3; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - alphaR alphaR [0 0 0 0 0 0 0] 1.22; + Cmu 0.09; + Clg1 1.8; + Clg2 0.6; + C1 1.44; + C2 1.92; + C1Ref 0.5; + C2Ref 0.3; + Cs 0.25; + Ceps 0.15; + alphaEps 0.76923; + alphaR 1.22; } SpalartAllmarasCoeffs { - alphaNut alphaNut [0 0 0 0 0 0 0] 1.5; - Cb1 Cb1 [0 0 0 0 0 0 0] 0.1355; - Cb2 Cb2 [0 0 0 0 0 0 0] 0.622; - Cw2 Cw2 [0 0 0 0 0 0 0] 0.3; - Cw3 Cw3 [0 0 0 0 0 0 0] 2; - Cv1 Cv1 [0 0 0 0 0 0 0] 7.1; - Cv2 Cv2 [0 0 0 0 0 0 0] 5.0; + alphaNut 1.5; + Cb1 0.1355; + Cb2 0.622; + Cw2 0.3; + Cw3 2; + Cv1 7.1; + Cv2 5.0; } wallFunctionCoeffs { - kappa kappa [0 0 0 0 0 0 0] 0.4187; - E E [0 0 0 0 0 0 0] 9; + kappa 0.4187; + E 9; } diff --git a/tutorials/lesInterFoam/nozzleFlow2D/constant/turbulenceProperties b/tutorials/lesInterFoam/nozzleFlow2D/constant/turbulenceProperties index 6c86af54a6..4719424842 100644 --- a/tutorials/lesInterFoam/nozzleFlow2D/constant/turbulenceProperties +++ b/tutorials/lesInterFoam/nozzleFlow2D/constant/turbulenceProperties @@ -32,90 +32,90 @@ laminarCoeffs oneEqEddyCoeffs { - ck ck [0 0 0 0 0 0 0] 0.07; - ce ce [0 0 0 0 0 0 0] 1.05; + ck 0.07; + ce 1.05; } dynOneEqEddyCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; + ce 1.05; filter simple; } locDynOneEqEddyCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; + ce 1.05; filter simple; } SmagorinskyCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; - ck ck [0 0 0 0 0 0 0] 0.07; + ce 1.05; + ck 0.07; } Smagorinsky2Coeffs { - ce ce [0 0 0 0 0 0 0] 1.05; - ck ck [0 0 0 0 0 0 0] 0.07; - cD2 cD2 [0 1 0 0 0 0 0] 0.02; + ce 1.05; + ck 0.07; + cD2 0.02; } spectEddyViscCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; - cB cB [0 0 0 0 0 0 0] 8.22; - cK1 cK1 [0 0 0 0 0 0 0] 0.83; - cK2 cK2 [0 0 0 0 0 0 0] 1.03; - cK3 cK3 [0 0 0 0 0 0 0] 4.75; - cK4 cK4 [0 0 0 0 0 0 0] 2.55; + ce 1.05; + cB 8.22; + cK1 0.83; + cK2 1.03; + cK3 4.75; + cK4 2.55; } dynSmagorinskyCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; + ce 1.05; filter simple; } mixedSmagorinskyCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; - ck ck [0 0 0 0 0 0 0] 0.07; + ce 1.05; + ck 0.07; filter simple; } dynMixedSmagorinskyCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; + ce 1.05; filter simple; } LRRDiffStressCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; - ck ck [0 0 0 0 0 0 0] 0.09; - c1 c1 [0 0 0 0 0 0 0] 1.8; - c2 c2 [0 0 0 0 0 0 0] 0.6; + ce 1.05; + ck 0.09; + c1 1.8; + c2 0.6; } DeardorffDiffStressCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; - ck ck [0 0 0 0 0 0 0] 0.09; - cm cm [0 0 0 0 0 0 0] 4.13; + ce 1.05; + ck 0.09; + cm 4.13; } SpalartAllmarasCoeffs { - alphaNut alphaNut [0 0 0 0 0 0 0] 1.5; - Cb1 Cb1 [0 0 0 0 0 0 0] 0.1355; - Cb2 Cb2 [0 0 0 0 0 0 0] 0.622; - Cw2 Cw2 [0 0 0 0 0 0 0] 0.3; - Cw3 Cw3 [0 0 0 0 0 0 0] 2; - Cv1 Cv1 [0 0 0 0 0 0 0] 7.1; - Cv2 Cv2 [0 0 0 0 0 0 0] 5.0; - CDES CDES [0 0 0 0 0 0 0] 0.65; - ck ck [0 0 0 0 0 0 0] 0.07; + alphaNut 1.5; + Cb1 0.1355; + Cb2 0.622; + Cw2 0.3; + Cw3 2; + Cv1 7.1; + Cv2 5.0; + CDES 0.65; + ck 0.07; } cubeRootVolCoeffs @@ -139,7 +139,7 @@ PrandtlCoeffs } maxDeltaRatio 1.1; } - Cdelta Cdelta [0 0 0 0 0 0 0] 0.158; + Cdelta 0.158; } vanDriestCoeffs @@ -158,8 +158,8 @@ vanDriestCoeffs } maxDeltaRatio 1.1; } - Aplus Aplus [0 0 0 0 0 0 0] 26; - Cdelta Cdelta [0 0 0 0 0 0 0] 0.158; + Aplus 26; + Cdelta 0.158; } smoothCoeffs @@ -172,11 +172,11 @@ smoothCoeffs maxDeltaRatio 1.1; } -kappa kappa [0 0 0 0 0 0 0] 0.4187; +kappa 0.4187; wallFunctionCoeffs { - E E [0 0 0 0 0 0 0] 9; + E 9; } diff --git a/tutorials/mhdFoam/hartmann/Allclean b/tutorials/mhdFoam/Allclean similarity index 60% rename from tutorials/mhdFoam/hartmann/Allclean rename to tutorials/mhdFoam/Allclean index eac022838c..b30c90e13b 100755 --- a/tutorials/mhdFoam/hartmann/Allclean +++ b/tutorials/mhdFoam/Allclean @@ -3,5 +3,5 @@ # Source tutorial clean functions . $WM_PROJECT_DIR/bin/tools/CleanFunctions -cleanCase -cleanSamples +(cd hartmann && cleanCase) +(cd hartmann && cleanSamples) diff --git a/tutorials/solidDisplacementFoam/plateHole/Allrun b/tutorials/mhdFoam/Allrun similarity index 54% rename from tutorials/solidDisplacementFoam/plateHole/Allrun rename to tutorials/mhdFoam/Allrun index 0cb054ecaa..57065d0204 100755 --- a/tutorials/solidDisplacementFoam/plateHole/Allrun +++ b/tutorials/mhdFoam/Allrun @@ -5,6 +5,6 @@ # Get application name from directory application=`basename $PWD` -runApplication blockMesh -runApplication $application -runApplication sample +(cd hartmann && runApplication blockMesh) +(cd hartmann && runApplication $application) +(cd hartmann && runApplication sample) diff --git a/tutorials/mhdFoam/hartmann/Allrun b/tutorials/mhdFoam/hartmann/Allrun deleted file mode 100755 index 0cb054ecaa..0000000000 --- a/tutorials/mhdFoam/hartmann/Allrun +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -# Source tutorial run functions -. $WM_PROJECT_DIR/bin/tools/RunFunctions - -# Get application name from directory -application=`basename $PWD` - -runApplication blockMesh -runApplication $application -runApplication sample diff --git a/tutorials/oodles/pitzDaily/constant/turbulenceProperties b/tutorials/oodles/pitzDaily/constant/turbulenceProperties index d492f77b72..ce1b97ca73 100644 --- a/tutorials/oodles/pitzDaily/constant/turbulenceProperties +++ b/tutorials/oodles/pitzDaily/constant/turbulenceProperties @@ -32,90 +32,90 @@ laminarCoeffs oneEqEddyCoeffs { - ck ck [0 0 0 0 0 0 0] 0.07; - ce ce [0 0 0 0 0 0 0] 1.05; + ck 0.07; + ce 1.05; } dynOneEqEddyCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; + ce 1.05; filter simple; } locDynOneEqEddyCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; + ce 1.05; filter simple; } SmagorinskyCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; - ck ck [0 0 0 0 0 0 0] 0.07; + ce 1.05; + ck 0.07; } Smagorinsky2Coeffs { - ce ce [0 0 0 0 0 0 0] 1.05; - ck ck [0 0 0 0 0 0 0] 0.07; - cD2 cD2 [0 1 0 0 0 0 0] 0.02; + ce 1.05; + ck 0.07; + cD2 0.02; } spectEddyViscCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; - cB cB [0 0 0 0 0 0 0] 8.22; - cK1 cK1 [0 0 0 0 0 0 0] 0.83; - cK2 cK2 [0 0 0 0 0 0 0] 1.03; - cK3 cK3 [0 0 0 0 0 0 0] 4.75; - cK4 cK4 [0 0 0 0 0 0 0] 2.55; + ce 1.05; + cB 8.22; + cK1 0.83; + cK2 1.03; + cK3 4.75; + cK4 2.55; } dynSmagorinskyCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; + ce 1.05; filter simple; } mixedSmagorinskyCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; - ck ck [0 0 0 0 0 0 0] 0.07; + ce 1.05; + ck 0.07; filter simple; } dynMixedSmagorinskyCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; + ce 1.05; filter simple; } LRRDiffStressCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; - ck ck [0 0 0 0 0 0 0] 0.09; - c1 c1 [0 0 0 0 0 0 0] 1.8; - c2 c2 [0 0 0 0 0 0 0] 0.6; + ce 1.05; + ck 0.09; + c1 1.8; + c2 0.6; } DeardorffDiffStressCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; - ck ck [0 0 0 0 0 0 0] 0.09; - cm cm [0 0 0 0 0 0 0] 4.13; + ce 1.05; + ck 0.09; + cm 4.13; } SpalartAllmarasCoeffs { - alphaNut alphaNut [0 0 0 0 0 0 0] 1.5; - Cb1 Cb1 [0 0 0 0 0 0 0] 0.1355; - Cb2 Cb2 [0 0 0 0 0 0 0] 0.622; - Cw2 Cw2 [0 0 0 0 0 0 0] 0.3; - Cw3 Cw3 [0 0 0 0 0 0 0] 2; - Cv1 Cv1 [0 0 0 0 0 0 0] 7.1; - Cv2 Cv2 [0 0 0 0 0 0 0] 5.0; - CDES CDES [0 0 0 0 0 0 0] 0.65; - ck ck [0 0 0 0 0 0 0] 0.07; + alphaNut 1.5; + Cb1 0.1355; + Cb2 0.622; + Cw2 0.3; + Cw3 2; + Cv1 7.1; + Cv2 5.0; + CDES 0.65; + ck 0.07; } cubeRootVolCoeffs @@ -139,7 +139,7 @@ PrandtlCoeffs } maxDeltaRatio 1.1; } - Cdelta Cdelta [0 0 0 0 0 0 0] 0.158; + Cdelta 0.158; } vanDriestCoeffs @@ -158,8 +158,8 @@ vanDriestCoeffs } maxDeltaRatio 1.1; } - Aplus Aplus [0 0 0 0 0 0 0] 26; - Cdelta Cdelta [0 0 0 0 0 0 0] 0.158; + Aplus 26; + Cdelta 0.158; } smoothCoeffs @@ -172,11 +172,11 @@ smoothCoeffs maxDeltaRatio 1.1; } -kappa kappa [0 0 0 0 0 0 0] 0.4187; +kappa 0.4187; wallFunctionCoeffs { - E E [0 0 0 0 0 0 0] 9; + E 9; } diff --git a/tutorials/oodles/pitzDailyDirectMapped/constant/turbulenceProperties b/tutorials/oodles/pitzDailyDirectMapped/constant/turbulenceProperties index d492f77b72..ce1b97ca73 100644 --- a/tutorials/oodles/pitzDailyDirectMapped/constant/turbulenceProperties +++ b/tutorials/oodles/pitzDailyDirectMapped/constant/turbulenceProperties @@ -32,90 +32,90 @@ laminarCoeffs oneEqEddyCoeffs { - ck ck [0 0 0 0 0 0 0] 0.07; - ce ce [0 0 0 0 0 0 0] 1.05; + ck 0.07; + ce 1.05; } dynOneEqEddyCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; + ce 1.05; filter simple; } locDynOneEqEddyCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; + ce 1.05; filter simple; } SmagorinskyCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; - ck ck [0 0 0 0 0 0 0] 0.07; + ce 1.05; + ck 0.07; } Smagorinsky2Coeffs { - ce ce [0 0 0 0 0 0 0] 1.05; - ck ck [0 0 0 0 0 0 0] 0.07; - cD2 cD2 [0 1 0 0 0 0 0] 0.02; + ce 1.05; + ck 0.07; + cD2 0.02; } spectEddyViscCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; - cB cB [0 0 0 0 0 0 0] 8.22; - cK1 cK1 [0 0 0 0 0 0 0] 0.83; - cK2 cK2 [0 0 0 0 0 0 0] 1.03; - cK3 cK3 [0 0 0 0 0 0 0] 4.75; - cK4 cK4 [0 0 0 0 0 0 0] 2.55; + ce 1.05; + cB 8.22; + cK1 0.83; + cK2 1.03; + cK3 4.75; + cK4 2.55; } dynSmagorinskyCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; + ce 1.05; filter simple; } mixedSmagorinskyCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; - ck ck [0 0 0 0 0 0 0] 0.07; + ce 1.05; + ck 0.07; filter simple; } dynMixedSmagorinskyCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; + ce 1.05; filter simple; } LRRDiffStressCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; - ck ck [0 0 0 0 0 0 0] 0.09; - c1 c1 [0 0 0 0 0 0 0] 1.8; - c2 c2 [0 0 0 0 0 0 0] 0.6; + ce 1.05; + ck 0.09; + c1 1.8; + c2 0.6; } DeardorffDiffStressCoeffs { - ce ce [0 0 0 0 0 0 0] 1.05; - ck ck [0 0 0 0 0 0 0] 0.09; - cm cm [0 0 0 0 0 0 0] 4.13; + ce 1.05; + ck 0.09; + cm 4.13; } SpalartAllmarasCoeffs { - alphaNut alphaNut [0 0 0 0 0 0 0] 1.5; - Cb1 Cb1 [0 0 0 0 0 0 0] 0.1355; - Cb2 Cb2 [0 0 0 0 0 0 0] 0.622; - Cw2 Cw2 [0 0 0 0 0 0 0] 0.3; - Cw3 Cw3 [0 0 0 0 0 0 0] 2; - Cv1 Cv1 [0 0 0 0 0 0 0] 7.1; - Cv2 Cv2 [0 0 0 0 0 0 0] 5.0; - CDES CDES [0 0 0 0 0 0 0] 0.65; - ck ck [0 0 0 0 0 0 0] 0.07; + alphaNut 1.5; + Cb1 0.1355; + Cb2 0.622; + Cw2 0.3; + Cw3 2; + Cv1 7.1; + Cv2 5.0; + CDES 0.65; + ck 0.07; } cubeRootVolCoeffs @@ -139,7 +139,7 @@ PrandtlCoeffs } maxDeltaRatio 1.1; } - Cdelta Cdelta [0 0 0 0 0 0 0] 0.158; + Cdelta 0.158; } vanDriestCoeffs @@ -158,8 +158,8 @@ vanDriestCoeffs } maxDeltaRatio 1.1; } - Aplus Aplus [0 0 0 0 0 0 0] 26; - Cdelta Cdelta [0 0 0 0 0 0 0] 0.158; + Aplus 26; + Cdelta 0.158; } smoothCoeffs @@ -172,11 +172,11 @@ smoothCoeffs maxDeltaRatio 1.1; } -kappa kappa [0 0 0 0 0 0 0] 0.4187; +kappa 0.4187; wallFunctionCoeffs { - E E [0 0 0 0 0 0 0] 9; + E 9; } diff --git a/tutorials/rasInterFoam/damBreak/constant/turbulenceProperties b/tutorials/rasInterFoam/damBreak/constant/turbulenceProperties index 7448d3acc9..6f67a329b1 100644 --- a/tutorials/rasInterFoam/damBreak/constant/turbulenceProperties +++ b/tutorials/rasInterFoam/damBreak/constant/turbulenceProperties @@ -22,7 +22,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -turbulenceModel kEpsilon; +RASmodel kEpsilon; turbulence on; @@ -32,158 +32,158 @@ laminarCoeffs kEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; } RNGkEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.0845; - C1 C1 [0 0 0 0 0 0 0] 1.42; - C2 C2 [0 0 0 0 0 0 0] 1.68; - alphak alphaK [0 0 0 0 0 0 0] 1.39; - alphaEps alphaEps [0 0 0 0 0 0 0] 1.39; - eta0 eta0 [0 0 0 0 0 0 0] 4.38; - beta beta [0 0 0 0 0 0 0] 0.012; + Cmu 0.0845; + C1 1.42; + C2 1.68; + alphak 1.39; + alphaEps 1.39; + eta0 4.38; + beta 0.012; } realizableKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - A0 A0 [0 0 0 0 0 0 0] 4.0; - C2 C2 [0 0 0 0 0 0 0] 1.9; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.833333; + Cmu 0.09; + A0 4.0; + C2 1.9; + alphak 1; + alphaEps 0.833333; } NonlinearKEShihCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76932; - A1 A1 [0 0 0 0 0 0 0] 1.25; - A2 A2 [0 0 0 0 0 0 0] 1000; - Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; - Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; - Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; - alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76932; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; } LienCubicKECoeffs { - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - A1 A1 [0 0 0 0 0 0 0] 1.25; - A2 A2 [0 0 0 0 0 0 0] 1000; - Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; - Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; - Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; - alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; } QZetaCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaZeta alphaZeta [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaZeta 0.76923; anisotropic no; } LaunderSharmaKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; } LamBremhorstKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; } LienCubicKELowReCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - A1 A1 [0 0 0 0 0 0 0] 1.25; - A2 A2 [0 0 0 0 0 0 0] 1000; - Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; - Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; - Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; - alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; - Am Am [0 0 0 0 0 0 0] 0.016; - Aepsilon Aepsilon [0 0 0 0 0 0 0] 0.263; - Amu Amu [0 0 0 0 0 0 0] 0.00222; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; + Am 0.016; + Aepsilon 0.263; + Amu 0.00222; } LienLeschzinerLowReCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - Am Am [0 0 0 0 0 0 0] 0.016; - Aepsilon Aepsilon [0 0 0 0 0 0 0] 0.263; - Amu Amu [0 0 0 0 0 0 0] 0.00222; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + Am 0.016; + Aepsilon 0.263; + Amu 0.00222; } LRRCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clrr1 Clrr1 [0 0 0 0 0 0 0] 1.8; - Clrr2 Clrr2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + Clrr1 1.8; + Clrr2 0.6; + C1 1.44; + C2 1.92; + Cs 0.25; + Ceps 0.15; + alphaEps 0.76923; } LaunderGibsonRSTMCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clg1 Clg1 [0 0 0 0 0 0 0] 1.8; - Clg2 Clg2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C1Ref C1Ref [0 0 0 0 0 0 0] 0.5; - C2Ref C2Ref [0 0 0 0 0 0 0] 0.3; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - alphaR alphaR [0 0 0 0 0 0 0] 1.22; + Cmu 0.09; + Clg1 1.8; + Clg2 0.6; + C1 1.44; + C2 1.92; + C1Ref 0.5; + C2Ref 0.3; + Cs 0.25; + Ceps 0.15; + alphaEps 0.76923; + alphaR 1.22; } SpalartAllmarasCoeffs { - alphaNut alphaNut [0 0 0 0 0 0 0] 1.5; - Cb1 Cb1 [0 0 0 0 0 0 0] 0.1355; - Cb2 Cb2 [0 0 0 0 0 0 0] 0.622; - Cw2 Cw2 [0 0 0 0 0 0 0] 0.3; - Cw3 Cw3 [0 0 0 0 0 0 0] 2; - Cv1 Cv1 [0 0 0 0 0 0 0] 7.1; - Cv2 Cv2 [0 0 0 0 0 0 0] 5.0; + alphaNut 1.5; + Cb1 0.1355; + Cb2 0.622; + Cw2 0.3; + Cw3 2; + Cv1 7.1; + Cv2 5.0; } wallFunctionCoeffs { - kappa kappa [0 0 0 0 0 0 0] 0.4187; - E E [0 0 0 0 0 0 0] 9; + kappa 0.4187; + E 9; } diff --git a/tutorials/rhoPimpleFoam/angledDuct/constant/turbulenceProperties b/tutorials/rhoPimpleFoam/angledDuct/constant/turbulenceProperties index aea6b61008..a10685dcae 100644 --- a/tutorials/rhoPimpleFoam/angledDuct/constant/turbulenceProperties +++ b/tutorials/rhoPimpleFoam/angledDuct/constant/turbulenceProperties @@ -16,7 +16,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -turbulenceModel kEpsilon; +RASmodel kEpsilon; turbulence on; laminarCoeffs @@ -25,73 +25,73 @@ laminarCoeffs kEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C3 C3 [0 0 0 0 0 0 0] -0.33; - alphah alphah [0 0 0 0 0 0 0] 1; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 -0.33; + alphah 1; + alphak 1; + alphaEps 0.76923; } RNGkEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.0845; - C1 C1 [0 0 0 0 0 0 0] 1.42; - C2 C2 [0 0 0 0 0 0 0] 1.68; - C3 C3 [0 0 0 0 0 0 0] -0.33; - alphah alphah [0 0 0 0 0 0 0] 1; - alphak alphaK [0 0 0 0 0 0 0] 1.39; - alphaEps alphaEps [0 0 0 0 0 0 0] 1.39; - eta0 eta0 [0 0 0 0 0 0 0] 4.38; - beta beta [0 0 0 0 0 0 0] 0.012; + Cmu 0.0845; + C1 1.42; + C2 1.68; + C3 -0.33; + alphah 1; + alphak 1.39; + alphaEps 1.39; + eta0 4.38; + beta 0.012; } LaunderSharmaKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C3 C3 [0 0 0 0 0 0 0] -0.33; - alphah alphah [0 0 0 0 0 0 0] 1; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 -0.33; + alphah 1; + alphak 1; + alphaEps 0.76923; } LRRCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clrr1 Clrr1 [0 0 0 0 0 0 0] 1.8; - Clrr2 Clrr2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphah alphah [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - alphaR alphaR [0 0 0 0 0 0 0] 1.22; + Cmu 0.09; + Clrr1 1.8; + Clrr2 0.6; + C1 1.44; + C2 1.92; + Cs 0.25; + Ceps 0.15; + alphah 1; + alphaEps 0.76923; + alphaR 1.22; } LaunderGibsonRSTMCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clg1 Clg1 [0 0 0 0 0 0 0] 1.8; - Clg2 Clg2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C1Ref C1Ref [0 0 0 0 0 0 0] 0.5; - C2Ref C2Ref [0 0 0 0 0 0 0] 0.3; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphah alphah [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - alphaR alphaR [0 0 0 0 0 0 0] 1.22; + Cmu 0.09; + Clg1 1.8; + Clg2 0.6; + C1 1.44; + C2 1.92; + C1Ref 0.5; + C2Ref 0.3; + Cs 0.25; + Ceps 0.15; + alphah 1; + alphaEps 0.76923; + alphaR 1.22; } wallFunctionCoeffs { - kappa kappa [0 0 0 0 0 0 0] 0.4187; - E E [0 0 0 0 0 0 0] 9; + kappa 0.4187; + E 9; } // ************************************************************************* // diff --git a/tutorials/rhoPorousSimpleFoam/angledDuctImplicit/constant/turbulenceProperties b/tutorials/rhoPorousSimpleFoam/angledDuctImplicit/constant/turbulenceProperties index aea6b61008..a10685dcae 100644 --- a/tutorials/rhoPorousSimpleFoam/angledDuctImplicit/constant/turbulenceProperties +++ b/tutorials/rhoPorousSimpleFoam/angledDuctImplicit/constant/turbulenceProperties @@ -16,7 +16,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -turbulenceModel kEpsilon; +RASmodel kEpsilon; turbulence on; laminarCoeffs @@ -25,73 +25,73 @@ laminarCoeffs kEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C3 C3 [0 0 0 0 0 0 0] -0.33; - alphah alphah [0 0 0 0 0 0 0] 1; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 -0.33; + alphah 1; + alphak 1; + alphaEps 0.76923; } RNGkEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.0845; - C1 C1 [0 0 0 0 0 0 0] 1.42; - C2 C2 [0 0 0 0 0 0 0] 1.68; - C3 C3 [0 0 0 0 0 0 0] -0.33; - alphah alphah [0 0 0 0 0 0 0] 1; - alphak alphaK [0 0 0 0 0 0 0] 1.39; - alphaEps alphaEps [0 0 0 0 0 0 0] 1.39; - eta0 eta0 [0 0 0 0 0 0 0] 4.38; - beta beta [0 0 0 0 0 0 0] 0.012; + Cmu 0.0845; + C1 1.42; + C2 1.68; + C3 -0.33; + alphah 1; + alphak 1.39; + alphaEps 1.39; + eta0 4.38; + beta 0.012; } LaunderSharmaKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C3 C3 [0 0 0 0 0 0 0] -0.33; - alphah alphah [0 0 0 0 0 0 0] 1; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 -0.33; + alphah 1; + alphak 1; + alphaEps 0.76923; } LRRCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clrr1 Clrr1 [0 0 0 0 0 0 0] 1.8; - Clrr2 Clrr2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphah alphah [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - alphaR alphaR [0 0 0 0 0 0 0] 1.22; + Cmu 0.09; + Clrr1 1.8; + Clrr2 0.6; + C1 1.44; + C2 1.92; + Cs 0.25; + Ceps 0.15; + alphah 1; + alphaEps 0.76923; + alphaR 1.22; } LaunderGibsonRSTMCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clg1 Clg1 [0 0 0 0 0 0 0] 1.8; - Clg2 Clg2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C1Ref C1Ref [0 0 0 0 0 0 0] 0.5; - C2Ref C2Ref [0 0 0 0 0 0 0] 0.3; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphah alphah [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - alphaR alphaR [0 0 0 0 0 0 0] 1.22; + Cmu 0.09; + Clg1 1.8; + Clg2 0.6; + C1 1.44; + C2 1.92; + C1Ref 0.5; + C2Ref 0.3; + Cs 0.25; + Ceps 0.15; + alphah 1; + alphaEps 0.76923; + alphaR 1.22; } wallFunctionCoeffs { - kappa kappa [0 0 0 0 0 0 0] 0.4187; - E E [0 0 0 0 0 0 0] 9; + kappa 0.4187; + E 9; } // ************************************************************************* // diff --git a/tutorials/rhoSonicFoam/shockTube/Allclean b/tutorials/rhoSonicFoam/shockTube/Allclean deleted file mode 100755 index c8dbbe4c95..0000000000 --- a/tutorials/rhoSonicFoam/shockTube/Allclean +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -# Source tutorial clean functions -. $WM_PROJECT_DIR/bin/tools/CleanFunctions - -cleanCase -rm -rf 0 -cp -r 0.org 0 -cleanSamples diff --git a/tutorials/rhoSonicFoam/shockTube/Allrun b/tutorials/rhoSonicFoam/shockTube/Allrun deleted file mode 100755 index 326fa2b564..0000000000 --- a/tutorials/rhoSonicFoam/shockTube/Allrun +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# Source tutorial run functions -. $WM_PROJECT_DIR/bin/tools/RunFunctions - -# Get application name from directory -application=`basename $PWD` - -runApplication blockMesh -runApplication setFields -runApplication $application -runApplication foamCalc mag U -runApplication sample diff --git a/tutorials/rhoTurbFoam/cavity/constant/turbulenceProperties b/tutorials/rhoTurbFoam/cavity/constant/turbulenceProperties index 84c9c7ba36..aa269bc9b6 100644 --- a/tutorials/rhoTurbFoam/cavity/constant/turbulenceProperties +++ b/tutorials/rhoTurbFoam/cavity/constant/turbulenceProperties @@ -24,7 +24,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Turbulence model selection -turbulenceModel kOmegaSST; //kEpsilon; +RASmodel kOmegaSST; //kEpsilon; // Do you wish to calculate turbulence? turbulence on; @@ -38,143 +38,143 @@ laminarCoeffs kEpsilonCoeffs { // Cmu - Cmu Cmu [0 0 0 0 0 0 0] 0.09; + Cmu 0.09; // C1 - C1 C1 [0 0 0 0 0 0 0] 1.44; + C1 1.44; // C2 - C2 C2 [0 0 0 0 0 0 0] 1.92; + C2 1.92; // C3 - C3 C3 [0 0 0 0 0 0 0] -0.33; + C3 -0.33; // alphah - alphah alphah [0 0 0 0 0 0 0] 1; + alphah 1; // alphak - alphak alphak [0 0 0 0 0 0 0] 1; + alphak 1; // alphaEps - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + alphaEps 0.76923; } // RNG k-epsilon model coefficients RNGkEpsilonCoeffs { // Cmu - Cmu Cmu [0 0 0 0 0 0 0] 0.0845; + Cmu 0.0845; // C1 - C1 C1 [0 0 0 0 0 0 0] 1.42; + C1 1.42; // C2 - C2 C2 [0 0 0 0 0 0 0] 1.68; + C2 1.68; // C3 - C3 C3 [0 0 0 0 0 0 0] -0.33; + C3 -0.33; // alphah - alphah alphah [0 0 0 0 0 0 0] 1; + alphah 1; // alphak - alphak alphaK [0 0 0 0 0 0 0] 1.39; + alphak 1.39; // alphaEps - alphaEps alphaEps [0 0 0 0 0 0 0] 1.39; + alphaEps 1.39; // eta0 - eta0 eta0 [0 0 0 0 0 0 0] 4.38; + eta0 4.38; // beta - beta beta [0 0 0 0 0 0 0] 0.012; + beta 0.012; } // Launder-Sharma low Reynolds number k-epsilon model coefficients LaunderSharmaKECoeffs { // Cmu - Cmu Cmu [0 0 0 0 0 0 0] 0.09; + Cmu 0.09; // C1 - C1 C1 [0 0 0 0 0 0 0] 1.44; + C1 1.44; // C2 - C2 C2 [0 0 0 0 0 0 0] 1.92; + C2 1.92; // C3 - C3 C3 [0 0 0 0 0 0 0] -0.33; + C3 -0.33; // alphah - alphah alphah [0 0 0 0 0 0 0] 1; + alphah 1; // alphak - alphak alphak [0 0 0 0 0 0 0] 1; + alphak 1; // alphaEps - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + alphaEps 0.76923; } // Launder-Reece-Rodi RSTM with wall functions model coefficients LRRCoeffs { // Cmu - Cmu Cmu [0 0 0 0 0 0 0] 0.09; + Cmu 0.09; // Clrr1 - Clrr1 Clrr1 [0 0 0 0 0 0 0] 1.8; + Clrr1 1.8; // Clrr2 - Clrr2 Clrr2 [0 0 0 0 0 0 0] 0.6; + Clrr2 0.6; // C1 - C1 C1 [0 0 0 0 0 0 0] 1.44; + C1 1.44; // C2 - C2 C2 [0 0 0 0 0 0 0] 1.92; + C2 1.92; // Cs - Cs Cs [0 0 0 0 0 0 0] 0.25; + Cs 0.25; // Ceps - Ceps Ceps [0 0 0 0 0 0 0] 0.15; + Ceps 0.15; // alphah - alphah alphah [0 0 0 0 0 0 0] 1; + alphah 1; // alphaEps - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + alphaEps 0.76923; // alphaR - alphaR alphaR [0 0 0 0 0 0 0] 1.22; + alphaR 1.22; } // Launder-Gibson RSTM with wall reflection and wall functions model coefficients LaunderGibsonRSTMCoeffs { // Cmu - Cmu Cmu [0 0 0 0 0 0 0] 0.09; + Cmu 0.09; // Clg1 - Clg1 Clg1 [0 0 0 0 0 0 0] 1.8; + Clg1 1.8; // Clg2 - Clg2 Clg2 [0 0 0 0 0 0 0] 0.6; + Clg2 0.6; // C1 - C1 C1 [0 0 0 0 0 0 0] 1.44; + C1 1.44; // C2 - C2 C2 [0 0 0 0 0 0 0] 1.92; + C2 1.92; // C1Ref - C1Ref C1Ref [0 0 0 0 0 0 0] 0.5; + C1Ref 0.5; // C2Ref - C2Ref C2Ref [0 0 0 0 0 0 0] 0.3; + C2Ref 0.3; // Cs - Cs Cs [0 0 0 0 0 0 0] 0.25; + Cs 0.25; // Ceps - Ceps Ceps [0 0 0 0 0 0 0] 0.15; + Ceps 0.15; // alphah - alphah alphah [0 0 0 0 0 0 0] 1; + alphah 1; // alphaEps - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + alphaEps 0.76923; // alphaR - alphaR alphaR [0 0 0 0 0 0 0] 1.22; + alphaR 1.22; } kOmegaSSTCoeffs { - alphaK1 alphaK1 [0 0 0 0 0 0 0] 0.85034; - alphaK2 alphaK1 [0 0 0 0 0 0 0] 1.0; - alphaOmega1 alphaOmega1 [0 0 0 0 0 0 0] 0.5; - alphaOmega2 alphaOmega2 [0 0 0 0 0 0 0] 0.85616; - gamma1 gamma1 [0 0 0 0 0 0 0] 0.5532; - gamma2 gamma2 [0 0 0 0 0 0 0] 0.4403; - beta1 beta1 [0 0 0 0 0 0 0] 0.0750; - beta2 beta2 [0 0 0 0 0 0 0] 0.0828; - betaStar betaStar [0 0 0 0 0 0 0] 0.09; - a1 a1 [0 0 0 0 0 0 0] 0.31; - c1 c1 [0 0 0 0 0 0 0] 10; + alphaK1 0.85034; + alphaK2 1.0; + alphaOmega1 0.5; + alphaOmega2 0.85616; + gamma1 0.5532; + gamma2 0.4403; + beta1 0.0750; + beta2 0.0828; + betaStar 0.09; + a1 0.31; + c1 10; - Cmu Cmu [0 0 0 0 0 0 0] 0.09; + Cmu 0.09; - alphah alphah [0 0 0 0 0 0 0] 1; + alphah 1; } // Wall function coefficients wallFunctionCoeffs { // kappa - kappa kappa [0 0 0 0 0 0 0] 0.4187; + kappa 0.4187; // E - E E [0 0 0 0 0 0 0] 9; + E 9; } diff --git a/tutorials/rhoTurbTwinParcelFoam/rhoTurbTwinParcelFoam/Make/options b/tutorials/rhoTurbTwinParcelFoam/rhoTurbTwinParcelFoam/Make/options index 4af7133ad3..ac65c845e2 100644 --- a/tutorials/rhoTurbTwinParcelFoam/rhoTurbTwinParcelFoam/Make/options +++ b/tutorials/rhoTurbTwinParcelFoam/rhoTurbTwinParcelFoam/Make/options @@ -6,7 +6,7 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ - -I$(LIB_SRC)/turbulenceModels + -I$(LIB_SRC)/turbulenceModels/RAS EXE_LIBS = \ -llagrangian \ diff --git a/tutorials/rhoTurbTwinParcelFoam/rhoTurbTwinParcelFoam/createFields.H b/tutorials/rhoTurbTwinParcelFoam/rhoTurbTwinParcelFoam/createFields.H index 1191d94b02..dba0679738 100644 --- a/tutorials/rhoTurbTwinParcelFoam/rhoTurbTwinParcelFoam/createFields.H +++ b/tutorials/rhoTurbTwinParcelFoam/rhoTurbTwinParcelFoam/createFields.H @@ -41,9 +41,9 @@ Info<< "Creating turbulence model\n" << endl; - autoPtr turbulence + autoPtr turbulence ( - compressible::turbulenceModel::New + compressible::RASmodel::New ( rho, U, diff --git a/tutorials/rhoTurbTwinParcelFoam/rhoTurbTwinParcelFoam/rhoTurbTwinParcelFoam.C b/tutorials/rhoTurbTwinParcelFoam/rhoTurbTwinParcelFoam/rhoTurbTwinParcelFoam.C index 0b9edd0b3c..91af3c9dc9 100644 --- a/tutorials/rhoTurbTwinParcelFoam/rhoTurbTwinParcelFoam/rhoTurbTwinParcelFoam.C +++ b/tutorials/rhoTurbTwinParcelFoam/rhoTurbTwinParcelFoam/rhoTurbTwinParcelFoam.C @@ -32,7 +32,7 @@ Description #include "fvCFD.H" #include "basicThermo.H" -#include "compressible/turbulenceModel/turbulenceModel.H" +#include "compressible/RASmodel/RASmodel.H" #include "basicThermoCloud.H" #include "basicKinematicCloud.H" diff --git a/tutorials/rhoTurbTwinParcelFoam/simplifiedSiwek/constant/turbulenceProperties b/tutorials/rhoTurbTwinParcelFoam/simplifiedSiwek/constant/turbulenceProperties index eb33720fe8..038378f511 100644 --- a/tutorials/rhoTurbTwinParcelFoam/simplifiedSiwek/constant/turbulenceProperties +++ b/tutorials/rhoTurbTwinParcelFoam/simplifiedSiwek/constant/turbulenceProperties @@ -24,7 +24,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Turbulence model selection -turbulenceModel kEpsilon; +RASmodel kEpsilon; // Do you wish to calculate turbulence? turbulence on; @@ -38,124 +38,124 @@ laminarCoeffs kEpsilonCoeffs { // Cmu - Cmu Cmu [0 0 0 0 0 0 0] 0.09; + Cmu 0.09; // C1 - C1 C1 [0 0 0 0 0 0 0] 1.44; + C1 1.44; // C2 - C2 C2 [0 0 0 0 0 0 0] 1.92; + C2 1.92; // C3 - C3 C3 [0 0 0 0 0 0 0] -0.33; + C3 -0.33; // alphah - alphah alphah [0 0 0 0 0 0 0] 1; + alphah 1; // alphak - alphak alphak [0 0 0 0 0 0 0] 1; + alphak 1; // alphaEps - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + alphaEps 0.76923; } // RNG k-epsilon model coefficients RNGkEpsilonCoeffs { // Cmu - Cmu Cmu [0 0 0 0 0 0 0] 0.0845; + Cmu 0.0845; // C1 - C1 C1 [0 0 0 0 0 0 0] 1.42; + C1 1.42; // C2 - C2 C2 [0 0 0 0 0 0 0] 1.68; + C2 1.68; // C3 - C3 C3 [0 0 0 0 0 0 0] -0.33; + C3 -0.33; // alphah - alphah alphah [0 0 0 0 0 0 0] 1; + alphah 1; // alphak - alphak alphaK [0 0 0 0 0 0 0] 1.39; + alphak 1.39; // alphaEps - alphaEps alphaEps [0 0 0 0 0 0 0] 1.39; + alphaEps 1.39; // eta0 - eta0 eta0 [0 0 0 0 0 0 0] 4.38; + eta0 4.38; // beta - beta beta [0 0 0 0 0 0 0] 0.012; + beta 0.012; } // Launder-Sharma low Reynolds number k-epsilon model coefficients LaunderSharmaKECoeffs { // Cmu - Cmu Cmu [0 0 0 0 0 0 0] 0.09; + Cmu 0.09; // C1 - C1 C1 [0 0 0 0 0 0 0] 1.44; + C1 1.44; // C2 - C2 C2 [0 0 0 0 0 0 0] 1.92; + C2 1.92; // C3 - C3 C3 [0 0 0 0 0 0 0] -0.33; + C3 -0.33; // alphah - alphah alphah [0 0 0 0 0 0 0] 1; + alphah 1; // alphak - alphak alphak [0 0 0 0 0 0 0] 1; + alphak 1; // alphaEps - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + alphaEps 0.76923; } // Launder-Reece-Rodi RSTM with wall functions model coefficients LRRCoeffs { // Cmu - Cmu Cmu [0 0 0 0 0 0 0] 0.09; + Cmu 0.09; // Clrr1 - Clrr1 Clrr1 [0 0 0 0 0 0 0] 1.8; + Clrr1 1.8; // Clrr2 - Clrr2 Clrr2 [0 0 0 0 0 0 0] 0.6; + Clrr2 0.6; // C1 - C1 C1 [0 0 0 0 0 0 0] 1.44; + C1 1.44; // C2 - C2 C2 [0 0 0 0 0 0 0] 1.92; + C2 1.92; // Cs - Cs Cs [0 0 0 0 0 0 0] 0.25; + Cs 0.25; // Ceps - Ceps Ceps [0 0 0 0 0 0 0] 0.15; + Ceps 0.15; // alphah - alphah alphah [0 0 0 0 0 0 0] 1; + alphah 1; // alphaEps - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + alphaEps 0.76923; // alphaR - alphaR alphaR [0 0 0 0 0 0 0] 1.22; + alphaR 1.22; } // Launder-Gibson RSTM with wall reflection and wall functions model coefficients LaunderGibsonRSTMCoeffs { // Cmu - Cmu Cmu [0 0 0 0 0 0 0] 0.09; + Cmu 0.09; // Clg1 - Clg1 Clg1 [0 0 0 0 0 0 0] 1.8; + Clg1 1.8; // Clg2 - Clg2 Clg2 [0 0 0 0 0 0 0] 0.6; + Clg2 0.6; // C1 - C1 C1 [0 0 0 0 0 0 0] 1.44; + C1 1.44; // C2 - C2 C2 [0 0 0 0 0 0 0] 1.92; + C2 1.92; // C1Ref - C1Ref C1Ref [0 0 0 0 0 0 0] 0.5; + C1Ref 0.5; // C2Ref - C2Ref C2Ref [0 0 0 0 0 0 0] 0.3; + C2Ref 0.3; // Cs - Cs Cs [0 0 0 0 0 0 0] 0.25; + Cs 0.25; // Ceps - Ceps Ceps [0 0 0 0 0 0 0] 0.15; + Ceps 0.15; // alphah - alphah alphah [0 0 0 0 0 0 0] 1; + alphah 1; // alphaEps - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + alphaEps 0.76923; // alphaR - alphaR alphaR [0 0 0 0 0 0 0] 1.22; + alphaR 1.22; } // Wall function coefficients wallFunctionCoeffs { // kappa - kappa kappa [0 0 0 0 0 0 0] 0.4187; + kappa 0.4187; // E - E E [0 0 0 0 0 0 0] 9; + E 9; } diff --git a/tutorials/settlingFoam/dahl/constant/turbulenceProperties b/tutorials/settlingFoam/dahl/constant/turbulenceProperties index ef545fe3bd..e1c73326f9 100644 --- a/tutorials/settlingFoam/dahl/constant/turbulenceProperties +++ b/tutorials/settlingFoam/dahl/constant/turbulenceProperties @@ -22,7 +22,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -turbulenceModel kEpsilon; +RASmodel kEpsilon; turbulence on; @@ -32,18 +32,18 @@ laminarCoeffs kEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C3 C3 [0 0 0 0 0 0 0] 0.85; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 0.85; + alphak 1; + alphaEps 0.76923; } wallFunctionCoeffs { - kappa kappa [0 0 0 0 0 0 0] 0.4187; - E E [0 0 0 0 0 0 0] 9; + kappa 0.4187; + E 9; } diff --git a/tutorials/settlingFoam/tank3D/constant/turbulenceProperties b/tutorials/settlingFoam/tank3D/constant/turbulenceProperties index ef545fe3bd..e1c73326f9 100644 --- a/tutorials/settlingFoam/tank3D/constant/turbulenceProperties +++ b/tutorials/settlingFoam/tank3D/constant/turbulenceProperties @@ -22,7 +22,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -turbulenceModel kEpsilon; +RASmodel kEpsilon; turbulence on; @@ -32,18 +32,18 @@ laminarCoeffs kEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C3 C3 [0 0 0 0 0 0 0] 0.85; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 0.85; + alphak 1; + alphaEps 0.76923; } wallFunctionCoeffs { - kappa kappa [0 0 0 0 0 0 0] 0.4187; - E E [0 0 0 0 0 0 0] 9; + kappa 0.4187; + E 9; } diff --git a/tutorials/simpleFoam/pitzDaily/constant/turbulenceProperties b/tutorials/simpleFoam/pitzDaily/constant/turbulenceProperties index 5af0c608eb..283f8136c9 100644 --- a/tutorials/simpleFoam/pitzDaily/constant/turbulenceProperties +++ b/tutorials/simpleFoam/pitzDaily/constant/turbulenceProperties @@ -22,7 +22,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -turbulenceModel kEpsilon; +RASmodel kEpsilon; turbulence on; @@ -32,175 +32,175 @@ laminarCoeffs kEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; } RNGkEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.0845; - C1 C1 [0 0 0 0 0 0 0] 1.42; - C2 C2 [0 0 0 0 0 0 0] 1.68; - alphak alphaK [0 0 0 0 0 0 0] 1.39; - alphaEps alphaEps [0 0 0 0 0 0 0] 1.39; - eta0 eta0 [0 0 0 0 0 0 0] 4.38; - beta beta [0 0 0 0 0 0 0] 0.012; + Cmu 0.0845; + C1 1.42; + C2 1.68; + alphak 1.39; + alphaEps 1.39; + eta0 4.38; + beta 0.012; } realizableKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - A0 A0 [0 0 0 0 0 0 0] 4.0; - C2 C2 [0 0 0 0 0 0 0] 1.9; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.833333; + Cmu 0.09; + A0 4.0; + C2 1.9; + alphak 1; + alphaEps 0.833333; } kOmegaSSTCoeffs { - alphaK1 alphaK1 [0 0 0 0 0 0 0] 0.85034; - alphaK2 alphaK1 [0 0 0 0 0 0 0] 1.0; - alphaOmega1 alphaOmega1 [0 0 0 0 0 0 0] 0.5; - alphaOmega2 alphaOmega2 [0 0 0 0 0 0 0] 0.85616; - gamma1 gamma1 [0 0 0 0 0 0 0] 0.5532; - gamma2 gamma2 [0 0 0 0 0 0 0] 0.4403; - beta1 beta1 [0 0 0 0 0 0 0] 0.0750; - beta2 beta2 [0 0 0 0 0 0 0] 0.0828; - betaStar betaStar [0 0 0 0 0 0 0] 0.09; - a1 a1 [0 0 0 0 0 0 0] 0.31; - c1 c1 [0 0 0 0 0 0 0] 10; + alphaK1 0.85034; + alphaK2 1.0; + alphaOmega1 0.5; + alphaOmega2 0.85616; + gamma1 0.5532; + gamma2 0.4403; + beta1 0.0750; + beta2 0.0828; + betaStar 0.09; + a1 0.31; + c1 10; - Cmu Cmu [0 0 0 0 0 0 0] 0.09; + Cmu 0.09; } NonlinearKEShihCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76932; - A1 A1 [0 0 0 0 0 0 0] 1.25; - A2 A2 [0 0 0 0 0 0 0] 1000; - Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; - Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; - Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; - alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76932; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; } LienCubicKECoeffs { - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - A1 A1 [0 0 0 0 0 0 0] 1.25; - A2 A2 [0 0 0 0 0 0 0] 1000; - Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; - Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; - Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; - alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; } QZetaCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaZeta alphaZeta [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaZeta 0.76923; anisotropic no; } LaunderSharmaKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; } LamBremhorstKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; } LienCubicKELowReCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - A1 A1 [0 0 0 0 0 0 0] 1.25; - A2 A2 [0 0 0 0 0 0 0] 1000; - Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; - Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; - Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; - alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; - Am Am [0 0 0 0 0 0 0] 0.016; - Aepsilon Aepsilon [0 0 0 0 0 0 0] 0.263; - Amu Amu [0 0 0 0 0 0 0] 0.00222; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; + Am 0.016; + Aepsilon 0.263; + Amu 0.00222; } LienLeschzinerLowReCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - Am Am [0 0 0 0 0 0 0] 0.016; - Aepsilon Aepsilon [0 0 0 0 0 0 0] 0.263; - Amu Amu [0 0 0 0 0 0 0] 0.00222; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + Am 0.016; + Aepsilon 0.263; + Amu 0.00222; } LRRCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clrr1 Clrr1 [0 0 0 0 0 0 0] 1.8; - Clrr2 Clrr2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + Clrr1 1.8; + Clrr2 0.6; + C1 1.44; + C2 1.92; + Cs 0.25; + Ceps 0.15; + alphaEps 0.76923; } LaunderGibsonRSTMCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clg1 Clg1 [0 0 0 0 0 0 0] 1.8; - Clg2 Clg2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C1Ref C1Ref [0 0 0 0 0 0 0] 0.5; - C2Ref C2Ref [0 0 0 0 0 0 0] 0.3; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - alphaR alphaR [0 0 0 0 0 0 0] 1.22; + Cmu 0.09; + Clg1 1.8; + Clg2 0.6; + C1 1.44; + C2 1.92; + C1Ref 0.5; + C2Ref 0.3; + Cs 0.25; + Ceps 0.15; + alphaEps 0.76923; + alphaR 1.22; } SpalartAllmarasCoeffs { - alphaNut alphaNut [0 0 0 0 0 0 0] 1.5; - Cb1 Cb1 [0 0 0 0 0 0 0] 0.1355; - Cb2 Cb2 [0 0 0 0 0 0 0] 0.622; - Cw2 Cw2 [0 0 0 0 0 0 0] 0.3; - Cw3 Cw3 [0 0 0 0 0 0 0] 2; - Cv1 Cv1 [0 0 0 0 0 0 0] 7.1; - Cv2 Cv2 [0 0 0 0 0 0 0] 5.0; + alphaNut 1.5; + Cb1 0.1355; + Cb2 0.622; + Cw2 0.3; + Cw3 2; + Cv1 7.1; + Cv2 5.0; } wallFunctionCoeffs { - kappa kappa [0 0 0 0 0 0 0] 0.4187; - E E [0 0 0 0 0 0 0] 9; + kappa 0.4187; + E 9; } diff --git a/tutorials/simpleFoam/pitzDaily3Blocks/constant/turbulenceProperties b/tutorials/simpleFoam/pitzDaily3Blocks/constant/turbulenceProperties index 5af0c608eb..283f8136c9 100644 --- a/tutorials/simpleFoam/pitzDaily3Blocks/constant/turbulenceProperties +++ b/tutorials/simpleFoam/pitzDaily3Blocks/constant/turbulenceProperties @@ -22,7 +22,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -turbulenceModel kEpsilon; +RASmodel kEpsilon; turbulence on; @@ -32,175 +32,175 @@ laminarCoeffs kEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; } RNGkEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.0845; - C1 C1 [0 0 0 0 0 0 0] 1.42; - C2 C2 [0 0 0 0 0 0 0] 1.68; - alphak alphaK [0 0 0 0 0 0 0] 1.39; - alphaEps alphaEps [0 0 0 0 0 0 0] 1.39; - eta0 eta0 [0 0 0 0 0 0 0] 4.38; - beta beta [0 0 0 0 0 0 0] 0.012; + Cmu 0.0845; + C1 1.42; + C2 1.68; + alphak 1.39; + alphaEps 1.39; + eta0 4.38; + beta 0.012; } realizableKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - A0 A0 [0 0 0 0 0 0 0] 4.0; - C2 C2 [0 0 0 0 0 0 0] 1.9; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.833333; + Cmu 0.09; + A0 4.0; + C2 1.9; + alphak 1; + alphaEps 0.833333; } kOmegaSSTCoeffs { - alphaK1 alphaK1 [0 0 0 0 0 0 0] 0.85034; - alphaK2 alphaK1 [0 0 0 0 0 0 0] 1.0; - alphaOmega1 alphaOmega1 [0 0 0 0 0 0 0] 0.5; - alphaOmega2 alphaOmega2 [0 0 0 0 0 0 0] 0.85616; - gamma1 gamma1 [0 0 0 0 0 0 0] 0.5532; - gamma2 gamma2 [0 0 0 0 0 0 0] 0.4403; - beta1 beta1 [0 0 0 0 0 0 0] 0.0750; - beta2 beta2 [0 0 0 0 0 0 0] 0.0828; - betaStar betaStar [0 0 0 0 0 0 0] 0.09; - a1 a1 [0 0 0 0 0 0 0] 0.31; - c1 c1 [0 0 0 0 0 0 0] 10; + alphaK1 0.85034; + alphaK2 1.0; + alphaOmega1 0.5; + alphaOmega2 0.85616; + gamma1 0.5532; + gamma2 0.4403; + beta1 0.0750; + beta2 0.0828; + betaStar 0.09; + a1 0.31; + c1 10; - Cmu Cmu [0 0 0 0 0 0 0] 0.09; + Cmu 0.09; } NonlinearKEShihCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76932; - A1 A1 [0 0 0 0 0 0 0] 1.25; - A2 A2 [0 0 0 0 0 0 0] 1000; - Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; - Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; - Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; - alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76932; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; } LienCubicKECoeffs { - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - A1 A1 [0 0 0 0 0 0 0] 1.25; - A2 A2 [0 0 0 0 0 0 0] 1000; - Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; - Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; - Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; - alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; } QZetaCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaZeta alphaZeta [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaZeta 0.76923; anisotropic no; } LaunderSharmaKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; } LamBremhorstKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; } LienCubicKELowReCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - A1 A1 [0 0 0 0 0 0 0] 1.25; - A2 A2 [0 0 0 0 0 0 0] 1000; - Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; - Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; - Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; - alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; - Am Am [0 0 0 0 0 0 0] 0.016; - Aepsilon Aepsilon [0 0 0 0 0 0 0] 0.263; - Amu Amu [0 0 0 0 0 0 0] 0.00222; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; + Am 0.016; + Aepsilon 0.263; + Amu 0.00222; } LienLeschzinerLowReCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - Am Am [0 0 0 0 0 0 0] 0.016; - Aepsilon Aepsilon [0 0 0 0 0 0 0] 0.263; - Amu Amu [0 0 0 0 0 0 0] 0.00222; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + Am 0.016; + Aepsilon 0.263; + Amu 0.00222; } LRRCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clrr1 Clrr1 [0 0 0 0 0 0 0] 1.8; - Clrr2 Clrr2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + Clrr1 1.8; + Clrr2 0.6; + C1 1.44; + C2 1.92; + Cs 0.25; + Ceps 0.15; + alphaEps 0.76923; } LaunderGibsonRSTMCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clg1 Clg1 [0 0 0 0 0 0 0] 1.8; - Clg2 Clg2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C1Ref C1Ref [0 0 0 0 0 0 0] 0.5; - C2Ref C2Ref [0 0 0 0 0 0 0] 0.3; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - alphaR alphaR [0 0 0 0 0 0 0] 1.22; + Cmu 0.09; + Clg1 1.8; + Clg2 0.6; + C1 1.44; + C2 1.92; + C1Ref 0.5; + C2Ref 0.3; + Cs 0.25; + Ceps 0.15; + alphaEps 0.76923; + alphaR 1.22; } SpalartAllmarasCoeffs { - alphaNut alphaNut [0 0 0 0 0 0 0] 1.5; - Cb1 Cb1 [0 0 0 0 0 0 0] 0.1355; - Cb2 Cb2 [0 0 0 0 0 0 0] 0.622; - Cw2 Cw2 [0 0 0 0 0 0 0] 0.3; - Cw3 Cw3 [0 0 0 0 0 0 0] 2; - Cv1 Cv1 [0 0 0 0 0 0 0] 7.1; - Cv2 Cv2 [0 0 0 0 0 0 0] 5.0; + alphaNut 1.5; + Cb1 0.1355; + Cb2 0.622; + Cw2 0.3; + Cw3 2; + Cv1 7.1; + Cv2 5.0; } wallFunctionCoeffs { - kappa kappa [0 0 0 0 0 0 0] 0.4187; - E E [0 0 0 0 0 0 0] 9; + kappa 0.4187; + E 9; } diff --git a/tutorials/simpleFoam/pitzDailyExptInlet/constant/turbulenceProperties b/tutorials/simpleFoam/pitzDailyExptInlet/constant/turbulenceProperties index 5af0c608eb..283f8136c9 100644 --- a/tutorials/simpleFoam/pitzDailyExptInlet/constant/turbulenceProperties +++ b/tutorials/simpleFoam/pitzDailyExptInlet/constant/turbulenceProperties @@ -22,7 +22,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -turbulenceModel kEpsilon; +RASmodel kEpsilon; turbulence on; @@ -32,175 +32,175 @@ laminarCoeffs kEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; } RNGkEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.0845; - C1 C1 [0 0 0 0 0 0 0] 1.42; - C2 C2 [0 0 0 0 0 0 0] 1.68; - alphak alphaK [0 0 0 0 0 0 0] 1.39; - alphaEps alphaEps [0 0 0 0 0 0 0] 1.39; - eta0 eta0 [0 0 0 0 0 0 0] 4.38; - beta beta [0 0 0 0 0 0 0] 0.012; + Cmu 0.0845; + C1 1.42; + C2 1.68; + alphak 1.39; + alphaEps 1.39; + eta0 4.38; + beta 0.012; } realizableKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - A0 A0 [0 0 0 0 0 0 0] 4.0; - C2 C2 [0 0 0 0 0 0 0] 1.9; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.833333; + Cmu 0.09; + A0 4.0; + C2 1.9; + alphak 1; + alphaEps 0.833333; } kOmegaSSTCoeffs { - alphaK1 alphaK1 [0 0 0 0 0 0 0] 0.85034; - alphaK2 alphaK1 [0 0 0 0 0 0 0] 1.0; - alphaOmega1 alphaOmega1 [0 0 0 0 0 0 0] 0.5; - alphaOmega2 alphaOmega2 [0 0 0 0 0 0 0] 0.85616; - gamma1 gamma1 [0 0 0 0 0 0 0] 0.5532; - gamma2 gamma2 [0 0 0 0 0 0 0] 0.4403; - beta1 beta1 [0 0 0 0 0 0 0] 0.0750; - beta2 beta2 [0 0 0 0 0 0 0] 0.0828; - betaStar betaStar [0 0 0 0 0 0 0] 0.09; - a1 a1 [0 0 0 0 0 0 0] 0.31; - c1 c1 [0 0 0 0 0 0 0] 10; + alphaK1 0.85034; + alphaK2 1.0; + alphaOmega1 0.5; + alphaOmega2 0.85616; + gamma1 0.5532; + gamma2 0.4403; + beta1 0.0750; + beta2 0.0828; + betaStar 0.09; + a1 0.31; + c1 10; - Cmu Cmu [0 0 0 0 0 0 0] 0.09; + Cmu 0.09; } NonlinearKEShihCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76932; - A1 A1 [0 0 0 0 0 0 0] 1.25; - A2 A2 [0 0 0 0 0 0 0] 1000; - Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; - Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; - Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; - alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76932; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; } LienCubicKECoeffs { - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - A1 A1 [0 0 0 0 0 0 0] 1.25; - A2 A2 [0 0 0 0 0 0 0] 1000; - Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; - Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; - Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; - alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; } QZetaCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaZeta alphaZeta [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaZeta 0.76923; anisotropic no; } LaunderSharmaKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; } LamBremhorstKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; } LienCubicKELowReCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - A1 A1 [0 0 0 0 0 0 0] 1.25; - A2 A2 [0 0 0 0 0 0 0] 1000; - Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; - Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; - Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; - alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; - Am Am [0 0 0 0 0 0 0] 0.016; - Aepsilon Aepsilon [0 0 0 0 0 0 0] 0.263; - Amu Amu [0 0 0 0 0 0 0] 0.00222; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; + Am 0.016; + Aepsilon 0.263; + Amu 0.00222; } LienLeschzinerLowReCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - Am Am [0 0 0 0 0 0 0] 0.016; - Aepsilon Aepsilon [0 0 0 0 0 0 0] 0.263; - Amu Amu [0 0 0 0 0 0 0] 0.00222; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + Am 0.016; + Aepsilon 0.263; + Amu 0.00222; } LRRCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clrr1 Clrr1 [0 0 0 0 0 0 0] 1.8; - Clrr2 Clrr2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + Clrr1 1.8; + Clrr2 0.6; + C1 1.44; + C2 1.92; + Cs 0.25; + Ceps 0.15; + alphaEps 0.76923; } LaunderGibsonRSTMCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clg1 Clg1 [0 0 0 0 0 0 0] 1.8; - Clg2 Clg2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C1Ref C1Ref [0 0 0 0 0 0 0] 0.5; - C2Ref C2Ref [0 0 0 0 0 0 0] 0.3; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - alphaR alphaR [0 0 0 0 0 0 0] 1.22; + Cmu 0.09; + Clg1 1.8; + Clg2 0.6; + C1 1.44; + C2 1.92; + C1Ref 0.5; + C2Ref 0.3; + Cs 0.25; + Ceps 0.15; + alphaEps 0.76923; + alphaR 1.22; } SpalartAllmarasCoeffs { - alphaNut alphaNut [0 0 0 0 0 0 0] 1.5; - Cb1 Cb1 [0 0 0 0 0 0 0] 0.1355; - Cb2 Cb2 [0 0 0 0 0 0 0] 0.622; - Cw2 Cw2 [0 0 0 0 0 0 0] 0.3; - Cw3 Cw3 [0 0 0 0 0 0 0] 2; - Cv1 Cv1 [0 0 0 0 0 0 0] 7.1; - Cv2 Cv2 [0 0 0 0 0 0 0] 5.0; + alphaNut 1.5; + Cb1 0.1355; + Cb2 0.622; + Cw2 0.3; + Cw3 2; + Cv1 7.1; + Cv2 5.0; } wallFunctionCoeffs { - kappa kappa [0 0 0 0 0 0 0] 0.4187; - E E [0 0 0 0 0 0 0] 9; + kappa 0.4187; + E 9; } diff --git a/tutorials/simpleSRFFoam/mixer/constant/turbulenceProperties b/tutorials/simpleSRFFoam/mixer/constant/turbulenceProperties index 65b42f0063..4f812b18a7 100644 --- a/tutorials/simpleSRFFoam/mixer/constant/turbulenceProperties +++ b/tutorials/simpleSRFFoam/mixer/constant/turbulenceProperties @@ -22,7 +22,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -turbulenceModel kOmegaSST; +RASmodel kOmegaSST; turbulence on; @@ -32,166 +32,166 @@ laminarCoeffs kEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; } RNGkEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.0845; - C1 C1 [0 0 0 0 0 0 0] 1.42; - C2 C2 [0 0 0 0 0 0 0] 1.68; - alphak alphaK [0 0 0 0 0 0 0] 1.39; - alphaEps alphaEps [0 0 0 0 0 0 0] 1.39; - eta0 eta0 [0 0 0 0 0 0 0] 4.38; - beta beta [0 0 0 0 0 0 0] 0.012; + Cmu 0.0845; + C1 1.42; + C2 1.68; + alphak 1.39; + alphaEps 1.39; + eta0 4.38; + beta 0.012; } kOmegaSSTCoeffs { - alphaK1 alphaK1 [0 0 0 0 0 0 0] 0.85034; - alphaK2 alphaK1 [0 0 0 0 0 0 0] 1.0; - alphaOmega1 alphaOmega1 [0 0 0 0 0 0 0] 0.5; - alphaOmega2 alphaOmega2 [0 0 0 0 0 0 0] 0.85616; - gamma1 gamma1 [0 0 0 0 0 0 0] 0.5532; - gamma2 gamma2 [0 0 0 0 0 0 0] 0.4403; - beta1 beta1 [0 0 0 0 0 0 0] 0.0750; - beta2 beta2 [0 0 0 0 0 0 0] 0.0828; - betaStar betaStar [0 0 0 0 0 0 0] 0.09; - a1 a1 [0 0 0 0 0 0 0] 0.31; - c1 c1 [0 0 0 0 0 0 0] 10; + alphaK1 0.85034; + alphaK2 1.0; + alphaOmega1 0.5; + alphaOmega2 0.85616; + gamma1 0.5532; + gamma2 0.4403; + beta1 0.0750; + beta2 0.0828; + betaStar 0.09; + a1 0.31; + c1 10; - Cmu Cmu [0 0 0 0 0 0 0] 0.09; + Cmu 0.09; } NonlinearKEShihCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76932; - A1 A1 [0 0 0 0 0 0 0] 1.25; - A2 A2 [0 0 0 0 0 0 0] 1000; - Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; - Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; - Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; - alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76932; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; } LienCubicKECoeffs { - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - A1 A1 [0 0 0 0 0 0 0] 1.25; - A2 A2 [0 0 0 0 0 0 0] 1000; - Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; - Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; - Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; - alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; } QZetaCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaZeta alphaZeta [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaZeta 0.76923; anisotropic no; } LaunderSharmaKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; } LamBremhorstKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; } LienCubicKELowReCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - A1 A1 [0 0 0 0 0 0 0] 1.25; - A2 A2 [0 0 0 0 0 0 0] 1000; - Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; - Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; - Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; - alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; - Am Am [0 0 0 0 0 0 0] 0.016; - Aepsilon Aepsilon [0 0 0 0 0 0 0] 0.263; - Amu Amu [0 0 0 0 0 0 0] 0.00222; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; + Am 0.016; + Aepsilon 0.263; + Amu 0.00222; } LienLeschzinerLowReCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - Am Am [0 0 0 0 0 0 0] 0.016; - Aepsilon Aepsilon [0 0 0 0 0 0 0] 0.263; - Amu Amu [0 0 0 0 0 0 0] 0.00222; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + Am 0.016; + Aepsilon 0.263; + Amu 0.00222; } LRRCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clrr1 Clrr1 [0 0 0 0 0 0 0] 1.8; - Clrr2 Clrr2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + Clrr1 1.8; + Clrr2 0.6; + C1 1.44; + C2 1.92; + Cs 0.25; + Ceps 0.15; + alphaEps 0.76923; } LaunderGibsonRSTMCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clg1 Clg1 [0 0 0 0 0 0 0] 1.8; - Clg2 Clg2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C1Ref C1Ref [0 0 0 0 0 0 0] 0.5; - C2Ref C2Ref [0 0 0 0 0 0 0] 0.3; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - alphaR alphaR [0 0 0 0 0 0 0] 1.22; + Cmu 0.09; + Clg1 1.8; + Clg2 0.6; + C1 1.44; + C2 1.92; + C1Ref 0.5; + C2Ref 0.3; + Cs 0.25; + Ceps 0.15; + alphaEps 0.76923; + alphaR 1.22; } SpalartAllmarasCoeffs { - alphaNut alphaNut [0 0 0 0 0 0 0] 1.5; - Cb1 Cb1 [0 0 0 0 0 0 0] 0.1355; - Cb2 Cb2 [0 0 0 0 0 0 0] 0.622; - Cw2 Cw2 [0 0 0 0 0 0 0] 0.3; - Cw3 Cw3 [0 0 0 0 0 0 0] 2; - Cv1 Cv1 [0 0 0 0 0 0 0] 7.1; - Cv2 Cv2 [0 0 0 0 0 0 0] 5.0; + alphaNut 1.5; + Cb1 0.1355; + Cb2 0.622; + Cw2 0.3; + Cw3 2; + Cv1 7.1; + Cv2 5.0; } wallFunctionCoeffs { - kappa kappa [0 0 0 0 0 0 0] 0.4187; - E E [0 0 0 0 0 0 0] 9; + kappa 0.4187; + E 9; } diff --git a/tutorials/simpleSRFFoam/simpleSRFFoam/Make/options b/tutorials/simpleSRFFoam/simpleSRFFoam/Make/options index 35a2464b97..be658f22d0 100644 --- a/tutorials/simpleSRFFoam/simpleSRFFoam/Make/options +++ b/tutorials/simpleSRFFoam/simpleSRFFoam/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/RAS \ -I$(LIB_SRC)/transportModels EXE_LIBS = \ diff --git a/tutorials/simpleSRFFoam/simpleSRFFoam/createFields.H b/tutorials/simpleSRFFoam/simpleSRFFoam/createFields.H index c0e0337fed..aab42f3534 100644 --- a/tutorials/simpleSRFFoam/simpleSRFFoam/createFields.H +++ b/tutorials/simpleSRFFoam/simpleSRFFoam/createFields.H @@ -46,9 +46,9 @@ singlePhaseTransportModel laminarTransport(Urel, phi); - autoPtr turbulence + autoPtr turbulence ( - turbulenceModel::New(Urel, phi, laminarTransport) + incompressible::RASmodel::New(Urel, phi, laminarTransport) ); Info<< "Creating SRF model\n" << endl; diff --git a/tutorials/simpleSRFFoam/simpleSRFFoam/simpleSRFFoam.C b/tutorials/simpleSRFFoam/simpleSRFFoam/simpleSRFFoam.C index 7480f08dcc..5e89702f0f 100644 --- a/tutorials/simpleSRFFoam/simpleSRFFoam/simpleSRFFoam.C +++ b/tutorials/simpleSRFFoam/simpleSRFFoam/simpleSRFFoam.C @@ -33,7 +33,7 @@ Description #include "fvCFD.H" #include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" -#include "incompressible/turbulenceModel/turbulenceModel.H" +#include "incompressible/RASmodel/RASmodel.H" #include "SRFModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/solidDisplacementFoam/plateHole/Allclean b/tutorials/solidDisplacementFoam/plateHole/Allclean deleted file mode 100755 index eac022838c..0000000000 --- a/tutorials/solidDisplacementFoam/plateHole/Allclean +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -# Source tutorial clean functions -. $WM_PROJECT_DIR/bin/tools/CleanFunctions - -cleanCase -cleanSamples diff --git a/tutorials/sonicTurbFoam/nacaAirfoil/constant/turbulenceProperties b/tutorials/sonicTurbFoam/nacaAirfoil/constant/turbulenceProperties index 94309a416d..1e9b27636e 100644 --- a/tutorials/sonicTurbFoam/nacaAirfoil/constant/turbulenceProperties +++ b/tutorials/sonicTurbFoam/nacaAirfoil/constant/turbulenceProperties @@ -22,7 +22,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -turbulenceModel LaunderSharmaKE; +RASmodel LaunderSharmaKE; turbulence on; @@ -32,73 +32,73 @@ laminarCoeffs kEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C3 C3 [0 0 0 0 0 0 0] -0.33; - alphah alphah [0 0 0 0 0 0 0] 1; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 -0.33; + alphah 1; + alphak 1; + alphaEps 0.76923; } RNGkEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.0845; - C1 C1 [0 0 0 0 0 0 0] 1.42; - C2 C2 [0 0 0 0 0 0 0] 1.68; - C3 C3 [0 0 0 0 0 0 0] -0.33; - alphah alphah [0 0 0 0 0 0 0] 1; - alphak alphaK [0 0 0 0 0 0 0] 1.39; - alphaEps alphaEps [0 0 0 0 0 0 0] 1.39; - eta0 eta0 [0 0 0 0 0 0 0] 4.38; - beta beta [0 0 0 0 0 0 0] 0.012; + Cmu 0.0845; + C1 1.42; + C2 1.68; + C3 -0.33; + alphah 1; + alphak 1.39; + alphaEps 1.39; + eta0 4.38; + beta 0.012; } LaunderSharmaKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C3 C3 [0 0 0 0 0 0 0] -0.33; - alphah alphah [0 0 0 0 0 0 0] 1; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 -0.33; + alphah 1; + alphak 1; + alphaEps 0.76923; } LRRCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clrr1 Clrr1 [0 0 0 0 0 0 0] 1.8; - Clrr2 Clrr2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphah alphah [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - alphaR alphaR [0 0 0 0 0 0 0] 1.22; + Cmu 0.09; + Clrr1 1.8; + Clrr2 0.6; + C1 1.44; + C2 1.92; + Cs 0.25; + Ceps 0.15; + alphah 1; + alphaEps 0.76923; + alphaR 1.22; } LaunderGibsonRSTMCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clg1 Clg1 [0 0 0 0 0 0 0] 1.8; - Clg2 Clg2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C1Ref C1Ref [0 0 0 0 0 0 0] 0.5; - C2Ref C2Ref [0 0 0 0 0 0 0] 0.3; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphah alphah [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - alphaR alphaR [0 0 0 0 0 0 0] 1.22; + Cmu 0.09; + Clg1 1.8; + Clg2 0.6; + C1 1.44; + C2 1.92; + C1Ref 0.5; + C2Ref 0.3; + Cs 0.25; + Ceps 0.15; + alphah 1; + alphaEps 0.76923; + alphaR 1.22; } wallFunctionCoeffs { - kappa kappa [0 0 0 0 0 0 0] 0.4187; - E E [0 0 0 0 0 0 0] 9; + kappa 0.4187; + E 9; } diff --git a/tutorials/sonicTurbFoam/prism/constant/turbulenceProperties b/tutorials/sonicTurbFoam/prism/constant/turbulenceProperties index b2da411881..60c47b9acf 100644 --- a/tutorials/sonicTurbFoam/prism/constant/turbulenceProperties +++ b/tutorials/sonicTurbFoam/prism/constant/turbulenceProperties @@ -22,7 +22,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -turbulenceModel kEpsilon; +RASmodel kEpsilon; turbulence on; @@ -32,73 +32,73 @@ laminarCoeffs kEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C3 C3 [0 0 0 0 0 0 0] -0.33; - alphah alphah [0 0 0 0 0 0 0] 1; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 -0.33; + alphah 1; + alphak 1; + alphaEps 0.76923; } RNGkEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.0845; - C1 C1 [0 0 0 0 0 0 0] 1.42; - C2 C2 [0 0 0 0 0 0 0] 1.68; - C3 C3 [0 0 0 0 0 0 0] -0.33; - alphah alphah [0 0 0 0 0 0 0] 1; - alphak alphaK [0 0 0 0 0 0 0] 1.39; - alphaEps alphaEps [0 0 0 0 0 0 0] 1.39; - eta0 eta0 [0 0 0 0 0 0 0] 4.38; - beta beta [0 0 0 0 0 0 0] 0.012; + Cmu 0.0845; + C1 1.42; + C2 1.68; + C3 -0.33; + alphah 1; + alphak 1.39; + alphaEps 1.39; + eta0 4.38; + beta 0.012; } LaunderSharmaKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C3 C3 [0 0 0 0 0 0 0] -0.33; - alphah alphah [0 0 0 0 0 0 0] 1; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 -0.33; + alphah 1; + alphak 1; + alphaEps 0.76923; } LRRCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clrr1 Clrr1 [0 0 0 0 0 0 0] 1.8; - Clrr2 Clrr2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphah alphah [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - alphaR alphaR [0 0 0 0 0 0 0] 1.22; + Cmu 0.09; + Clrr1 1.8; + Clrr2 0.6; + C1 1.44; + C2 1.92; + Cs 0.25; + Ceps 0.15; + alphah 1; + alphaEps 0.76923; + alphaR 1.22; } LaunderGibsonRSTMCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clg1 Clg1 [0 0 0 0 0 0 0] 1.8; - Clg2 Clg2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C1Ref C1Ref [0 0 0 0 0 0 0] 0.5; - C2Ref C2Ref [0 0 0 0 0 0 0] 0.3; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphah alphah [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - alphaR alphaR [0 0 0 0 0 0 0] 1.22; + Cmu 0.09; + Clg1 1.8; + Clg2 0.6; + C1 1.44; + C2 1.92; + C1Ref 0.5; + C2Ref 0.3; + Cs 0.25; + Ceps 0.15; + alphah 1; + alphaEps 0.76923; + alphaR 1.22; } wallFunctionCoeffs { - kappa kappa [0 0 0 0 0 0 0] 0.4187; - E E [0 0 0 0 0 0 0] 9; + kappa 0.4187; + E 9; } diff --git a/tutorials/turbFoam/cavity/constant/turbulenceProperties b/tutorials/turbFoam/cavity/constant/turbulenceProperties index 5af0c608eb..283f8136c9 100644 --- a/tutorials/turbFoam/cavity/constant/turbulenceProperties +++ b/tutorials/turbFoam/cavity/constant/turbulenceProperties @@ -22,7 +22,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -turbulenceModel kEpsilon; +RASmodel kEpsilon; turbulence on; @@ -32,175 +32,175 @@ laminarCoeffs kEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; } RNGkEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.0845; - C1 C1 [0 0 0 0 0 0 0] 1.42; - C2 C2 [0 0 0 0 0 0 0] 1.68; - alphak alphaK [0 0 0 0 0 0 0] 1.39; - alphaEps alphaEps [0 0 0 0 0 0 0] 1.39; - eta0 eta0 [0 0 0 0 0 0 0] 4.38; - beta beta [0 0 0 0 0 0 0] 0.012; + Cmu 0.0845; + C1 1.42; + C2 1.68; + alphak 1.39; + alphaEps 1.39; + eta0 4.38; + beta 0.012; } realizableKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - A0 A0 [0 0 0 0 0 0 0] 4.0; - C2 C2 [0 0 0 0 0 0 0] 1.9; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.833333; + Cmu 0.09; + A0 4.0; + C2 1.9; + alphak 1; + alphaEps 0.833333; } kOmegaSSTCoeffs { - alphaK1 alphaK1 [0 0 0 0 0 0 0] 0.85034; - alphaK2 alphaK1 [0 0 0 0 0 0 0] 1.0; - alphaOmega1 alphaOmega1 [0 0 0 0 0 0 0] 0.5; - alphaOmega2 alphaOmega2 [0 0 0 0 0 0 0] 0.85616; - gamma1 gamma1 [0 0 0 0 0 0 0] 0.5532; - gamma2 gamma2 [0 0 0 0 0 0 0] 0.4403; - beta1 beta1 [0 0 0 0 0 0 0] 0.0750; - beta2 beta2 [0 0 0 0 0 0 0] 0.0828; - betaStar betaStar [0 0 0 0 0 0 0] 0.09; - a1 a1 [0 0 0 0 0 0 0] 0.31; - c1 c1 [0 0 0 0 0 0 0] 10; + alphaK1 0.85034; + alphaK2 1.0; + alphaOmega1 0.5; + alphaOmega2 0.85616; + gamma1 0.5532; + gamma2 0.4403; + beta1 0.0750; + beta2 0.0828; + betaStar 0.09; + a1 0.31; + c1 10; - Cmu Cmu [0 0 0 0 0 0 0] 0.09; + Cmu 0.09; } NonlinearKEShihCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76932; - A1 A1 [0 0 0 0 0 0 0] 1.25; - A2 A2 [0 0 0 0 0 0 0] 1000; - Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; - Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; - Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; - alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76932; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; } LienCubicKECoeffs { - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - A1 A1 [0 0 0 0 0 0 0] 1.25; - A2 A2 [0 0 0 0 0 0 0] 1000; - Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; - Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; - Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; - alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; } QZetaCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaZeta alphaZeta [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaZeta 0.76923; anisotropic no; } LaunderSharmaKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; } LamBremhorstKECoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; } LienCubicKELowReCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - A1 A1 [0 0 0 0 0 0 0] 1.25; - A2 A2 [0 0 0 0 0 0 0] 1000; - Ctau1 Ctau1 [0 0 0 0 0 0 0] -4; - Ctau2 Ctau2 [0 0 0 0 0 0 0] 13; - Ctau3 Ctau3 [0 0 0 0 0 0 0] -2; - alphaKsi alphaKsi [0 0 0 0 0 0 0] 0.9; - Am Am [0 0 0 0 0 0 0] 0.016; - Aepsilon Aepsilon [0 0 0 0 0 0 0] 0.263; - Amu Amu [0 0 0 0 0 0 0] 0.00222; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; + Am 0.016; + Aepsilon 0.263; + Amu 0.00222; } LienLeschzinerLowReCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - Am Am [0 0 0 0 0 0 0] 0.016; - Aepsilon Aepsilon [0 0 0 0 0 0 0] 0.263; - Amu Amu [0 0 0 0 0 0 0] 0.00222; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + Am 0.016; + Aepsilon 0.263; + Amu 0.00222; } LRRCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clrr1 Clrr1 [0 0 0 0 0 0 0] 1.8; - Clrr2 Clrr2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + Clrr1 1.8; + Clrr2 0.6; + C1 1.44; + C2 1.92; + Cs 0.25; + Ceps 0.15; + alphaEps 0.76923; } LaunderGibsonRSTMCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - Clg1 Clg1 [0 0 0 0 0 0 0] 1.8; - Clg2 Clg2 [0 0 0 0 0 0 0] 0.6; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C1Ref C1Ref [0 0 0 0 0 0 0] 0.5; - C2Ref C2Ref [0 0 0 0 0 0 0] 0.3; - Cs Cs [0 0 0 0 0 0 0] 0.25; - Ceps Ceps [0 0 0 0 0 0 0] 0.15; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; - alphaR alphaR [0 0 0 0 0 0 0] 1.22; + Cmu 0.09; + Clg1 1.8; + Clg2 0.6; + C1 1.44; + C2 1.92; + C1Ref 0.5; + C2Ref 0.3; + Cs 0.25; + Ceps 0.15; + alphaEps 0.76923; + alphaR 1.22; } SpalartAllmarasCoeffs { - alphaNut alphaNut [0 0 0 0 0 0 0] 1.5; - Cb1 Cb1 [0 0 0 0 0 0 0] 0.1355; - Cb2 Cb2 [0 0 0 0 0 0 0] 0.622; - Cw2 Cw2 [0 0 0 0 0 0 0] 0.3; - Cw3 Cw3 [0 0 0 0 0 0 0] 2; - Cv1 Cv1 [0 0 0 0 0 0 0] 7.1; - Cv2 Cv2 [0 0 0 0 0 0 0] 5.0; + alphaNut 1.5; + Cb1 0.1355; + Cb2 0.622; + Cw2 0.3; + Cw3 2; + Cv1 7.1; + Cv2 5.0; } wallFunctionCoeffs { - kappa kappa [0 0 0 0 0 0 0] 0.4187; - E E [0 0 0 0 0 0 0] 9; + kappa 0.4187; + E 9; } diff --git a/tutorials/twoPhaseEulerFoam/bed/constant/turbulenceProperties b/tutorials/twoPhaseEulerFoam/bed/constant/turbulenceProperties index 06441f0935..165657e27c 100644 --- a/tutorials/twoPhaseEulerFoam/bed/constant/turbulenceProperties +++ b/tutorials/twoPhaseEulerFoam/bed/constant/turbulenceProperties @@ -34,13 +34,13 @@ turbulence on; kEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C3 C3 [0 0 0 0 0 0 0] -0.375; + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 -0.375; - alphak alphak [0 0 0 0 0 0 0] 1.0; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.82142; + alphak 1.0; + alphaEps 0.82142; } @@ -49,8 +49,8 @@ kEpsilonCoeffs wallFunctionCoeffs { - kappa kappa [0 0 0 0 0 0 0] 0.4187; - E E [0 0 0 0 0 0 0] 9.0; + kappa 0.4187; + E 9.0; } // ************************************************************************* // diff --git a/tutorials/twoPhaseEulerFoam/bed2/constant/turbulenceProperties b/tutorials/twoPhaseEulerFoam/bed2/constant/turbulenceProperties index c049b3a58f..cbd29fd836 100644 --- a/tutorials/twoPhaseEulerFoam/bed2/constant/turbulenceProperties +++ b/tutorials/twoPhaseEulerFoam/bed2/constant/turbulenceProperties @@ -34,13 +34,13 @@ turbulence off; kEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - C3 C3 [0 0 0 0 0 0 0] -0.375; + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 -0.375; - alphak alphak [0 0 0 0 0 0 0] 1.0; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.82142; + alphak 1.0; + alphaEps 0.82142; } @@ -49,8 +49,8 @@ kEpsilonCoeffs wallFunctionCoeffs { - kappa kappa [0 0 0 0 0 0 0] 0.4187; - E E [0 0 0 0 0 0 0] 9.0; + kappa 0.4187; + E 9.0; } // ************************************************************************* // diff --git a/tutorials/twoPhaseEulerFoam/bubbleColumn/0/Theta b/tutorials/twoPhaseEulerFoam/bubbleColumn/0/Theta index 0fb8ca3e19..94fad5835e 100644 --- a/tutorials/twoPhaseEulerFoam/bubbleColumn/0/Theta +++ b/tutorials/twoPhaseEulerFoam/bubbleColumn/0/Theta @@ -1,16 +1,26 @@ -// ************************************************************************* // +/*---------------------------------------------------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.4 | +| \\ / A nd | Web: http://www.openfoam.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ -version 1.0; -format ascii; -root ""; -case ""; -instance ""; -local ""; -class volScalarField; -form dictionary; -object Theta; +FoamFile +{ + version 2.0; + format ascii; -// ************************************************************************* // + root ""; + case ""; + instance ""; + local ""; + + class volScalarField; + object Theta; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [ 0 2 -2 0 0 0 0 ]; diff --git a/tutorials/twoPhaseEulerFoam/bubbleColumn/constant/turbulenceProperties b/tutorials/twoPhaseEulerFoam/bubbleColumn/constant/turbulenceProperties index 023bcfc148..0046e64aad 100644 --- a/tutorials/twoPhaseEulerFoam/bubbleColumn/constant/turbulenceProperties +++ b/tutorials/twoPhaseEulerFoam/bubbleColumn/constant/turbulenceProperties @@ -22,23 +22,23 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -turbulenceModel kEpsilon; +RASmodel kEpsilon; turbulence off; kEpsilonCoeffs { - Cmu Cmu [0 0 0 0 0 0 0] 0.09; - C1 C1 [0 0 0 0 0 0 0] 1.44; - C2 C2 [0 0 0 0 0 0 0] 1.92; - alphak alphak [0 0 0 0 0 0 0] 1; - alphaEps alphaEps [0 0 0 0 0 0 0] 0.76923; + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; } wallFunctionCoeffs { - kappa kappa [0 0 0 0 0 0 0] 0.4187; - E E [0 0 0 0 0 0 0] 9; + kappa 0.4187; + E 9; } diff --git a/wmake/wmake b/wmake/wmake index 61def5bc66..1290fd556d 100755 --- a/wmake/wmake +++ b/wmake/wmake @@ -89,9 +89,16 @@ done make="make" +# set WM_NCOMPPROCS automatically when both WM_HOSTS and WM_SCHEDULER are set +if [ -z "$WM_NCOMPPROCS" -a -n "$WM_HOSTS" -a -n "$WM_SCHEDULER" ] +then + WM_NCOMPPROCS=$(wmakeScheduler -count) + [ $? -eq 0 ] || unset WM_NCOMPPROCS +fi + if [ "$WM_NCOMPPROCS" ] then - if [ "$WM_NCOMPPROCS" -ne 1 -a ! "$MAKEFLAGS" ] + if [ "$WM_NCOMPPROCS" -gt 1 -a ! "$MAKEFLAGS" ] then lockDir=$HOME/.wmakeScheduler diff --git a/wmake/wmakeLockScheduler b/wmake/wmakeLockScheduler deleted file mode 100755 index b8db7492f7..0000000000 --- a/wmake/wmakeLockScheduler +++ /dev/null @@ -1,201 +0,0 @@ -#!/bin/bash -#------------------------------------------------------------------------------ -# ========= | -# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox -# \\ / O peration | -# \\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd. -# \\/ M anipulation | -#------------------------------------------------------------------------------- -# License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your -# option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# -# Script -# wmakeScheduler -# -# Description -# Scheduler for network distributed compilations using wmake. -# - WM_HOSTS contains a list of hosts and number of concurrent processes -# eg, -# export WM_HOSTS="hostA:1 hostB:2 hostC:1" -# - WM_COLOURS contains a list of colours to cycle through -# export WM_COLOURS="black blue green cyan red magenta yellow" -# -# Sources the relevant cshrc/bashrc if not set. -# -# WM_PROJECT_DIR, WM_PROJECT and WM_PROJECT_VERSION will have been set -# before calling this routine -# -# Usage -# wmakeScheduler COMMAND -# run 'COMMAND' on one of the slots listed in WM_HOSTS -# -# wmakeScheduler -count -# count the total number of slots available in WM_HOSTS -# eg, WM_NCOMPPROCS=$(wmakeScheduler -count) -# -#------------------------------------------------------------------------------- -lockDir=$HOME/.wmakeScheduler - -# fallback - 1 core on current host -: ${WM_HOSTS:=$HOST:1} - -# count the total number of slots available and exit -if [ "$1" = "-count" ] -then - expr $( - for slotGroup in $WM_HOSTS - do - n=${slotGroup##*:} - if [ "$n" = "${slotGroup%%:*}" ]; then n=1; fi # missing ':' - echo "+ ${n:-1}" - done) - exit 0 -fi - -# where to source WM_PROJECT settings in a remote shell -# This code tries to figure out which cshrc or bashrc to execute. -# !! Assumes remote computer running same shell and startup files -# in same location - -sourceFoam=false # fallback command -case $SHELL in -*/csh | */tcsh ) # [t]csh vs bash|ksh|sh - shellRc=cshrc - ;; -*) - shellRc=bashrc - ;; -esac - -# check ~/.$WM_PROJECT-$WM_PROJECT_VERSION/ -# check ~/.$WM_PROJECT/$WM_PROJECT_VERSION/ -# check ~/.$WM_PROJECT/ -# check /etc/ -# check /dev/null; then - # Set colour - colour=${colours[$colourIndex]} - #echo "** host=$host colourIndex=$colourIndex colour=$colour" - - if [ "$host" = "$HOST" ]; then - if [ "$colour" ]; then - eval $* 2>&1 | colourPipe $colour - else - eval $* - fi - elif [ -n "$JOB_ID" ]; then - qrsh -inherit -v PWD $host "$rcmd" - else - if [ "$colour" ]; then - ssh $host "$sourceFoam 2>/dev/null; cd $PWD && $rcmd" 2>&1 | colourPipe $colour - else - ssh $host "$sourceFoam 2>/dev/null; cd $PWD && $rcmd" - fi - fi - retval=$? - - # Release lock - rm -f "$lockFile" 2>/dev/null - exit $retval - fi - i=$(expr $i + 1) - - # Cycle through colours - colourIndex=$(expr $colourIndex + 1) - if (( $colourIndex >= $nColours )); then - colourIndex=0 - fi - done - done -done - -if [ "$WM_COLOURS" ]; then - setterm -foreground default -fi - -#------------------------------------------------------------------------------ diff --git a/wmake/wmakeScheduler b/wmake/wmakeScheduler index 1be15abd87..14f4d90402 100755 --- a/wmake/wmakeScheduler +++ b/wmake/wmakeScheduler @@ -37,7 +37,8 @@ # Sources the relevant cshrc/bashrc if not set. # # WM_PROJECT_DIR, WM_PROJECT and WM_PROJECT_VERSION will have been set -# before calling this routine +# before calling this routine. +# FOAM_INST_DIR may possibly have been set (to find installation) # # Usage # wmakeScheduler COMMAND @@ -45,7 +46,7 @@ # # wmakeScheduler -count # count the total number of slots available in WM_HOSTS -# eg, WM_NCOMPPROCS=$(wmakeScheduler -count) +# eg, export WM_NCOMPPROCS=$(wmakeScheduler -count) # #------------------------------------------------------------------------------- lockDir=$HOME/.wmakeScheduler @@ -81,21 +82,15 @@ case $SHELL in ;; esac -# check ~/.$WM_PROJECT-$WM_PROJECT_VERSION/ # check ~/.$WM_PROJECT/$WM_PROJECT_VERSION/ # check ~/.$WM_PROJECT/ # check /etc/ -# check