From 52c2bfc5198fd4417354e95baf68bebf4c8b77d8 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 11 Jun 2008 15:08:13 +0200 Subject: [PATCH 01/21] fix minor typos --- README | 63 +++++++++---------- src/OpenFOAM/db/dictionary/dictionary.C | 26 ++++---- src/OpenFOAM/db/dictionary/dictionary.H | 28 ++++----- .../db/dictionary/dictionaryTemplates.C | 4 +- 4 files changed, 58 insertions(+), 63 deletions(-) diff --git a/README b/README index e698d955a2..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,9 +100,8 @@ 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 + 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/. @@ -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/src/OpenFOAM/db/dictionary/dictionary.C b/src/OpenFOAM/db/dictionary/dictionary.C index 8dd2263574..f72c1b532d 100644 --- a/src/OpenFOAM/db/dictionary/dictionary.C +++ b/src/OpenFOAM/db/dictionary/dictionary.C @@ -195,15 +195,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 +215,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 +239,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,10 +267,10 @@ 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* ePtr = lookupEntryPtr(keyword, recursive); if (ePtr == NULL) { @@ -291,10 +291,10 @@ const Foam::entry& Foam::dictionary::lookupEntry Foam::ITstream& Foam::dictionary::lookup ( const word& keyword, - bool recusive + bool recursive ) const { - return lookupEntry(keyword, recusive).stream(); + return lookupEntry(keyword, recursive).stream(); } diff --git a/src/OpenFOAM/db/dictionary/dictionary.H b/src/OpenFOAM/db/dictionary/dictionary.H index 93fc495d59..a3a21841cb 100644 --- a/src/OpenFOAM/db/dictionary/dictionary.H +++ b/src/OpenFOAM/db/dictionary/dictionary.H @@ -31,8 +31,8 @@ Description 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 - objectRegistry itself to work. + data dictionaries, since unlike the IOdictionary class, it does not use + a objectRegistry itself to work. SourceFiles dictionary.C @@ -171,31 +171,31 @@ 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; //- Check if entry is a sub-dictionary bool isDict(const word&) const; diff --git a/src/OpenFOAM/db/dictionary/dictionaryTemplates.C b/src/OpenFOAM/db/dictionary/dictionaryTemplates.C index 73b97fa664..4a0f54d762 100644 --- a/src/OpenFOAM/db/dictionary/dictionaryTemplates.C +++ b/src/OpenFOAM/db/dictionary/dictionaryTemplates.C @@ -34,10 +34,10 @@ T Foam::dictionary::lookupOrDefault ( const word& keyword, const T& deft, - bool recusive + bool recursive ) const { - const entry* ePtr = lookupEntryPtr(keyword, recusive); + const entry* ePtr = lookupEntryPtr(keyword, recursive); if (ePtr == NULL) { From 64d00dc22bf1aa6de86c422e3c274c932579956e Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 13 Jun 2008 13:16:02 +0200 Subject: [PATCH 02/21] Doxygen filter changes * allow doxygen to process applications/**.H * use @cond/@endcond to suppress documenting classes/variables in applications/ - allows some access from applications to libraries - connection between application and local includes is still a bit weak, but is possible via the dirs.html navigation. --- bin/doxyFilt | 18 ++-- bin/{doxyAwkTop => tools/doxyFilt-ignore.awk} | 42 +++------- bin/tools/doxyFilt-top.awk | 82 +++++++++++++++++++ bin/{doxyAwk => tools/doxyFilt.awk} | 34 ++++---- bin/{doxyScr => tools/doxyFilt.sed} | 11 +++ doc/Doxygen/Doxyfile | 4 +- 6 files changed, 135 insertions(+), 56 deletions(-) rename bin/{doxyAwkTop => tools/doxyFilt-ignore.awk} (70%) create mode 100644 bin/tools/doxyFilt-top.awk rename bin/{doxyAwk => tools/doxyFilt.awk} (77%) rename bin/{doxyScr => tools/doxyFilt.sed} (81%) diff --git a/bin/doxyFilt b/bin/doxyFilt index c8b97232fd..8b56c6cf89 100755 --- a/bin/doxyFilt +++ b/bin/doxyFilt @@ -29,9 +29,12 @@ # Description # pass-through filter for doxygen # -# Filter has special treatment for applications/{solvers,utilities}/*.C -# - only keep the first comment block of the C source file -# - the corresponding H files are ignored in Doxyfile EXCLUDE_PATTERNS +# Special treatment for applications/{solvers,utilities}/*.C +# - only keep the first comment block of the C source file +# use @cond / @endcond to suppress documenting all classes/variables +# +# Special treatment for applications/{solvers,utilities}/*.H +# - use @cond / @endcond to suppress documenting all classes/variables #------------------------------------------------------------------------------ if [ "$#" -gt 0 ] @@ -41,16 +44,19 @@ then dirName=${filePath%/[^/]*} fileName=${filePath##*/} - awkScript=$WM_PROJECT_DIR/bin/doxyAwk + awkScript=$WM_PROJECT_DIR/bin/tools/doxyFilt.awk case "$1" in */applications/solvers/*.C | */applications/utilities/*.C ) - awkScript=$WM_PROJECT_DIR/bin/doxyAwkTop + awkScript=$WM_PROJECT_DIR/bin/tools/doxyFilt-top.awk + ;; + */applications/solvers/*.H | */applications/utilities/*.H ) + awkScript=$WM_PROJECT_DIR/bin/tools/doxyFilt-ignore.awk ;; esac awk -f $awkScript $1 | \ - sed -f $WM_PROJECT_DIR/bin/doxyScr \ + sed -f $WM_PROJECT_DIR/bin/tools/doxyFilt.sed \ -e s@%filePath%@$filePath@g \ -e s@%fileName%@$fileName@g \ -e s@%dirName%@$dirName@g diff --git a/bin/doxyAwkTop b/bin/tools/doxyFilt-ignore.awk similarity index 70% rename from bin/doxyAwkTop rename to bin/tools/doxyFilt-ignore.awk index da1c4cc164..55d5800d19 100644 --- a/bin/doxyAwkTop +++ b/bin/tools/doxyFilt-ignore.awk @@ -4,7 +4,7 @@ # \\ / O peration | # \\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd. # \\/ M anipulation | -# ------------------------------------------------------------------------------ +# ----------------------------------------------------------------------------- # License # This file is part of OpenFOAM. # @@ -23,41 +23,23 @@ # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # Script -# doxyAwkTop +# doxyFilt-ignore.awk # # Description -# Output only the first /* ... */ comment section found in the file -# - This is useful for application files in which only the first -# block documents the application itself and all other files simply -# pollute our documentation +# - Prefix file contents with doxygen @file tag and %filePath% tag +# that will be changed in a subsequent sed script +# - Surround the contents of an entire file with @cond / @endcond +# to skip documenting all classes/variables # # ----------------------------------------------------------------------------- BEGIN { - state = 0 + print "//! @file %filePath%" + print "//! @cond OpenFOAMIgnoreAppDoxygen" } -# a '/*' at the beginning of a line starts a block -/^ *\/\*/ { - state++ +{ print } + +END { + print "//! @endcond OpenFOAMIgnoreAppDoxygen" } - -# a '*/' ends the block -/\*\// { - if (state == 1) - { - print - } - state = 2 - next -} - -# end block -{ - if (state == 1) - { - print - } - next -} - # ----------------------------------------------------------------------------- diff --git a/bin/tools/doxyFilt-top.awk b/bin/tools/doxyFilt-top.awk new file mode 100644 index 0000000000..b37630b0d3 --- /dev/null +++ b/bin/tools/doxyFilt-top.awk @@ -0,0 +1,82 @@ +# ----------------------------------------------------------------------------- +# ========= | +# \\ / 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 +# doxyFilt-top.awk +# +# Description +# Only output the first /* ... */ comment section found in the file +# Use @cond / @endcond to suppress documenting all classes/variables +# - This is useful for application files in which only the first +# block documents the application itself. +# +# ----------------------------------------------------------------------------- +BEGIN { + state = 0 +} + +# a '/*' at the beginning of a line starts a comment block +/^ *\/\*/ { + state++ +} + +# check first line +# either started with a comment or skip documentation for the whole file +FNR == 1 { + if (!state) + { + print "//! @cond OpenFOAMIgnoreAppDoxygen" + state = 2 + } +} + +# a '*/' ends the comment block +# skip documentation for rest of the file +/\*\// { + if (state == 1) + { + print + print "//! @cond OpenFOAMIgnoreAppDoxygen" + } + state = 2 + next +} + +# print everything within the first comment block +{ + if (state) + { + print + } + next +} + +END { + if (state == 2) + { + print "//! @endcond OpenFOAMIgnoreAppDoxygen" + } +} + +# ----------------------------------------------------------------------------- diff --git a/bin/doxyAwk b/bin/tools/doxyFilt.awk similarity index 77% rename from bin/doxyAwk rename to bin/tools/doxyFilt.awk index c09b058db6..25c323c6eb 100644 --- a/bin/doxyAwk +++ b/bin/tools/doxyFilt.awk @@ -4,7 +4,7 @@ # \\ / O peration | # \\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd. # \\/ M anipulation | -# ------------------------------------------------------------------------------ +# ----------------------------------------------------------------------------- # License # This file is part of OpenFOAM. # @@ -23,23 +23,23 @@ # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # Script -# doxyAwk +# doxyFilt.awk # # Description # Converts cocoon style sentinel strings into doxygen style strings # -# - assume the comment strings are formatted as follows -# //- general description -# // more information -# // and even more information -# This should be re-formatted as the following -# //! general description -# /*! -# more information -# and even more information -# */ -# The intermediate "/*! ... */" block is left-justified to handle -# possible verbatim text +# Assumes comment strings are formatted as follows +# //- general description +# // more information +# // and even more information +# This should be re-formatted as the following +# //! general description +# /*! +# more information +# and even more information +# */ +# The intermediate "/*! ... */" block is left-justified to handle +# possible verbatim text # ----------------------------------------------------------------------------- BEGIN { @@ -55,14 +55,14 @@ BEGIN { /^ *\/\// { - # start block + # start comment block if (state == 1) { printf "/*!\n" state = 2 } - # inside block + # inside comment block if (state == 2) { if (!sub(/^ *\/\/ /, "")) @@ -77,7 +77,7 @@ BEGIN { { - # end block + # end comment block if (state == 2) { printf "*/\n" diff --git a/bin/doxyScr b/bin/tools/doxyFilt.sed similarity index 81% rename from bin/doxyScr rename to bin/tools/doxyFilt.sed index da9dc8c8d9..5b92b42455 100644 --- a/bin/doxyScr +++ b/bin/tools/doxyFilt.sed @@ -1,3 +1,12 @@ +# ----------------------------------------------------------------------------- +# Script +# doxyFilt.sed +# +# Description +# Transform human-readable tags such as 'Description' into the Doxygen +# equivalent +# ----------------------------------------------------------------------------- + /^License/,/\*\//{ /^License/,/MA 0211.-130. USA/{ s?^License.*?\*\/\ @@ -141,3 +150,5 @@ s? *\([a-zA-Z0-9]*\.[a-zA-Z]*\)?
  • \1
  • ? s/.*\*\//\*\// } + +# ----------------------------------------------------------------------------- diff --git a/doc/Doxygen/Doxyfile b/doc/Doxygen/Doxyfile index cce0feda75..13c36d9d30 100644 --- a/doc/Doxygen/Doxyfile +++ b/doc/Doxygen/Doxyfile @@ -522,9 +522,7 @@ EXCLUDE_SYMLINKS = NO # for example use the pattern */test/* EXCLUDE_PATTERNS = */lnInclude/* \ - */t/* \ - */applications/utilities/*.H \ - */applications/solvers/*.H + */t/* # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names From 1e8d4b2a82ae664963ca738c84bf4237f84943cf Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 13 Jun 2008 10:43:31 +0200 Subject: [PATCH 03/21] dictionary functionEntries cleanup * added '#remove' function * changed insert() method name to more general execute() * using #inputMode or #remove within a primitiveEntry now provokes an error * adjusted the dictionaryTest accordingly --- .../test/dictionary/calcEntry/calcEntry.C | 21 +--- .../test/dictionary/calcEntry/calcEntry.H | 7 +- applications/test/dictionary/testDict | 59 +++++++-- applications/test/dictionary/testDict2 | 30 +++++ applications/test/dictionary/value | 3 +- src/OpenFOAM/Make/files | 1 + src/OpenFOAM/db/dictionary/entry/entryIO.C | 16 ++- .../functionEntry/functionEntry.C | 119 +++++++++--------- .../functionEntry/functionEntry.H | 52 ++++---- .../includeEntry/includeEntry.C | 68 +++++----- .../includeEntry/includeEntry.H | 19 +-- .../inputModeEntry/inputModeEntry.C | 38 ++---- .../inputModeEntry/inputModeEntry.H | 16 ++- .../functionEntries/removeEntry/removeEntry.C | 88 +++++++++++++ .../functionEntries/removeEntry/removeEntry.H | 100 +++++++++++++++ .../primitiveEntry/primitiveEntryIO.C | 2 +- 16 files changed, 432 insertions(+), 207 deletions(-) create mode 100644 applications/test/dictionary/testDict2 create mode 100644 src/OpenFOAM/db/dictionary/functionEntries/removeEntry/removeEntry.C create mode 100644 src/OpenFOAM/db/dictionary/functionEntries/removeEntry/removeEntry.H 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/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/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..4360ee9ec2 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,7 +55,7 @@ namespace functionEntries // * * * * * * * * * * * * * * * * Private Data * * * * * * * * * * * * * * // -Foam::label Foam::functionEntries::inputModeEntry::inputMode_ = imError; +Foam::label Foam::functionEntries::inputModeEntry::mode_ = imError; // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -74,15 +66,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 +87,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 +100,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 +119,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); } From 92cd94ac669b0de75b8f8b6c041c24b9069950a2 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 13 Jun 2008 14:40:46 +0200 Subject: [PATCH 04/21] Reworked dictionary code : * finally removed #ifdef's with old merge method * use autoPtr::ptr() instead of autoPtr::() to reduce cloning * eliminated a few add() methods that are covered by the templated form * added a 'set()' method that forces overwrite - symmetric with HashTable --- src/OpenFOAM/db/dictionary/dictionary.C | 253 ++++++++---------- src/OpenFOAM/db/dictionary/dictionary.H | 73 +++-- .../db/dictionary/dictionaryTemplates.C | 22 +- .../inputModeEntry/inputModeEntry.C | 1 + 4 files changed, 178 insertions(+), 171 deletions(-) diff --git a/src/OpenFOAM/db/dictionary/dictionary.C b/src/OpenFOAM/db/dictionary/dictionary.C index f72c1b532d..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() @@ -270,11 +202,10 @@ const Foam::entry& Foam::dictionary::lookupEntry bool recursive ) const { - const entry* ePtr = lookupEntryPtr(keyword, recursive); + 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,7 +215,7 @@ const Foam::entry& Foam::dictionary::lookupEntry << exit(FatalIOError); } - return *ePtr; + return *entryPtr; } @@ -300,7 +231,9 @@ Foam::ITstream& Foam::dictionary::lookup 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 a3a21841cb..9a6021ae53 100644 --- a/src/OpenFOAM/db/dictionary/dictionary.H +++ b/src/OpenFOAM/db/dictionary/dictionary.H @@ -34,6 +34,10 @@ Description data dictionaries, since unlike the IOdictionary class, it does not use a 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 @@ -217,38 +221,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 +330,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 4a0f54d762..03f245f910 100644 --- a/src/OpenFOAM/db/dictionary/dictionaryTemplates.C +++ b/src/OpenFOAM/db/dictionary/dictionaryTemplates.C @@ -33,30 +33,34 @@ template T Foam::dictionary::lookupOrDefault ( const word& keyword, - const T& deft, + const T& deflt, bool recursive ) const { - const entry* ePtr = lookupEntryPtr(keyword, recursive); + 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) +void Foam::dictionary::add(const word& k, const T& t, bool overwrite) { - entry* ePtr = new primitiveEntry(keyword, t); - append(ePtr); - hashedEntries_.insert(ePtr->keyword(), ePtr); + 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/functionEntries/inputModeEntry/inputModeEntry.C b/src/OpenFOAM/db/dictionary/functionEntries/inputModeEntry/inputModeEntry.C index 4360ee9ec2..cdfa9410fd 100644 --- a/src/OpenFOAM/db/dictionary/functionEntries/inputModeEntry/inputModeEntry.C +++ b/src/OpenFOAM/db/dictionary/functionEntries/inputModeEntry/inputModeEntry.C @@ -59,6 +59,7 @@ 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(); From f48cbb88a94771294fcc14c6aecc7d7506d50898 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 13 Jun 2008 15:51:31 +0200 Subject: [PATCH 05/21] use dictionary lookupOrDefault() method instead of found() + lookup() --- .../sampledSurface/patch/sampledPatch.C | 2 +- .../sampledSurface/sampledSurface.C | 23 ++----------------- .../sampledSurface/sampledSurface.H | 5 ---- 3 files changed, 3 insertions(+), 27 deletions(-) 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; From 763cc5e4ab08c1488b51302b10d606a8c61bf9eb Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 13 Jun 2008 19:47:04 +0200 Subject: [PATCH 06/21] Pstream : avoid compiler warnings, doxygen ignore file-scope variables --- src/Pstream/Allwmake | 4 +++ src/Pstream/dummy/IPread.C | 43 +++++++++++++----------------- src/Pstream/dummy/OPwrite.C | 13 +++------ src/Pstream/dummy/Pstream.C | 16 ++++------- src/Pstream/gamma/OPwrite.C | 6 +++-- src/Pstream/gamma/PstreamGlobals.H | 3 ++- src/Pstream/mpi/IPread.C | 18 +++++-------- src/Pstream/mpi/OPwrite.C | 26 +++++++----------- src/Pstream/mpi/Pstream.C | 18 ++++++------- 9 files changed, 64 insertions(+), 83 deletions(-) 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..f00f322bab 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, @@ -89,7 +87,7 @@ IPstream::IPstream // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -label IPstream::read +Foam::label Foam::IPstream::read ( const commsTypes commsType, const int fromProcNo, @@ -192,7 +190,7 @@ label IPstream::read } -void IPstream::waitRequests() +void Foam::IPstream::waitRequests() { if (IPstream_outstandingRequests_.size() > 0) { @@ -219,7 +217,7 @@ void IPstream::waitRequests() } -bool IPstream::finishedRequest(const label i) +bool Foam::IPstream::finishedRequest(const label i) { if (i >= IPstream_outstandingRequests_.size()) { @@ -244,6 +242,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..4f69ef3f75 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), @@ -132,7 +128,7 @@ bool OPstream::write } -void OPstream::waitRequests() +void Foam::OPstream::waitRequests() { if (OPstream_outstandingRequests_.size() > 0) { @@ -159,7 +155,7 @@ void OPstream::waitRequests() } -bool OPstream::finishedRequest(const label i) +bool Foam::OPstream::finishedRequest(const label i) { if (i >= OPstream_outstandingRequests_.size()) { @@ -184,6 +180,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 - // ************************************************************************* // From 099117dd2a545ac4f6e2b22da614cfa6201834d9 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 13 Jun 2008 18:21:36 +0200 Subject: [PATCH 07/21] argList + IOobject write-headers modifications * new -srcDoc option to display doxygen-processed source code * display standard options -help/-doc/-srcDoc at end of usage * consolidate code when writing IOobject headers * drop writeLogbanner and add optional bool to writeBanner * minor formatting changes --- src/OpenFOAM/db/IOobject/IOobject.H | 7 +-- src/OpenFOAM/db/IOobject/IOobjectI.H | 38 +++++---------- .../db/IOobject/IOobjectWriteHeader.C | 14 +++--- src/OpenFOAM/global/argList/argList.C | 47 +++++++++++++------ src/OpenFOAM/global/argList/argList.H | 22 +++++---- 5 files changed, 65 insertions(+), 63 deletions(-) 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/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; From 3bbd01ebfb4e798c0dbafa6af25dd8e72e0a64ea Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Sun, 15 Jun 2008 17:57:55 +0200 Subject: [PATCH 08/21] minor changes to Allwmake script(s) * use $WM_THIRD_PARTY_DIR variable in top-level Allwmake * test new shell idiom for Allwmake files: # run from this directory only cd ${0%/*} || exit 1 this might be especially useful when building optional components --- Allwmake | 5 ++++- applications/utilities/mesh/conversion/Optional/Allwmake | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) 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/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 From 1025c3c4d348e1a67825f962efbde2d853da5cce Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Mon, 16 Jun 2008 10:39:22 +0200 Subject: [PATCH 09/21] eliminate .OpenFOAM-VERSION references in dotFoam and other files --- bin/mpirunDebug | 23 +++++++------- src/OSspecific/Unix/Unix.C | 20 +++---------- src/OpenFOAM/include/OSspecific.H | 2 -- wmake/wmakeLockScheduler | 50 +++++++++++++++++-------------- wmake/wmakeScheduler | 13 +++----- 5 files changed, 49 insertions(+), 59 deletions(-) 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/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/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/wmake/wmakeLockScheduler b/wmake/wmakeLockScheduler index b8db7492f7..8182ad4b76 100755 --- a/wmake/wmakeLockScheduler +++ b/wmake/wmakeLockScheduler @@ -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,35 +82,40 @@ case $SHELL in ;; 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" + ## echo "** host=$host colourIndex=$colourIndex colour=$colour" if [ "$host" = "$HOST" ]; then if [ "$colour" ]; then 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 Date: Sun, 15 Jun 2008 17:56:54 +0200 Subject: [PATCH 10/21] build paraview without requiring Tk --- bin/tools/buildParaViewFunctions | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bin/tools/buildParaViewFunctions b/bin/tools/buildParaViewFunctions index f279a503b0..0ff51f99ed 100644 --- a/bin/tools/buildParaViewFunctions +++ b/bin/tools/buildParaViewFunctions @@ -48,6 +48,7 @@ initialiseVariables () if [ "$VERBOSE" = ON ]; then addCMakeVariable "CMAKE_VERBOSE_MAKEFILE=TRUE" fi + addCMakeVariable "VTK_USE_TK=FALSE" } @@ -90,8 +91,8 @@ addPythonSupport () else # Try to obtain $PYTHON_LIBRARY if not set # - assumes dynamically linked - PYTHON_LIBRARY=`ldd $WHICH_PYTHON | grep libpython | \ - sed 's/.* => \(.*\) (.*/\1/'` + PYTHON_LIBRARY=`ldd $WHICH_PYTHON | \ + sed -ne '/libpython/s/.* => \(.*\) (.*/\1/p'` fi if [ ! -n "$PYTHON_LIBRARY" ]; then @@ -102,7 +103,7 @@ addPythonSupport () exit 1 fi PYTHON_MAJOR_VERSION=`echo $PYTHON_LIBRARY | \ - sed 's/.*libpython\(.*\).so.*/\1/'` + sed 's/.*libpython\(.*\)\.so.*/\1/'` PYTHON_INCLUDE_DIR=/usr/include/python$PYTHON_MAJOR_VERSION addCMakeVariable "PARAVIEW_ENABLE_PYTHON=ON" @@ -143,7 +144,7 @@ buildParaView () # set paraview environment unset PARAVIEW_SRC_DIR - for i in $PWD $WM_PROJECT_INST_DIR + for i in $PWD $WM_THIRD_PARTY_DIR do if [ -d $i/$PARAVIEW_SRC ] then @@ -155,7 +156,7 @@ buildParaView () [ -d "$PARAVIEW_SRC_DIR" ] || { echo "did not find $PARAVIEW_SRC in these directories:" echo " PWD=$PWD" - echo " WM_PROJECT_INST_DIR=$WM_PROJECT_INST_DIR" + echo " WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR" echo "abort build" exit 1 } From a382bdacea2a22ede53a128041fcd221777ae5da Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Mon, 16 Jun 2008 11:09:59 +0200 Subject: [PATCH 11/21] OpenFOAM Make/options: use $WM_THIRD_PARTY_DIR zlib headers, not system headers --- src/OpenFOAM/Make/options | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 \ From dcb487fd0fb8d1a5995e826cb6375587dcf20d3c Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Mon, 16 Jun 2008 11:46:11 +0200 Subject: [PATCH 12/21] wmake : set WM_NCOMPPROCS automatically when both WM_HOSTS and WM_SCHEDULER are set This substantially eases enabling/disabling distributed compiling For example, - export WM_HOSTS="host1:N ... hostN:N" as usual - simply set/unset WM_SCHEDULER etc/aliases.{sh,csh} added aliases for enabling/disabling wmakeScheduler - alias wmSchedON='export WM_SCHEDULER=$WM_PROJECT_DIR/wmake/wmakeScheduler' - alias wmSchedOFF='unset WM_SCHEDULER' Removed wmakeLockScheduler, identical to wmakeScheduler except a 'sleep' --- etc/aliases.csh | 6 ++ etc/aliases.sh | 6 ++ wmake/wmake | 9 +- wmake/wmakeLockScheduler | 207 --------------------------------------- 4 files changed, 20 insertions(+), 208 deletions(-) delete mode 100755 wmake/wmakeLockScheduler 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/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 8182ad4b76..0000000000 --- a/wmake/wmakeLockScheduler +++ /dev/null @@ -1,207 +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. -# FOAM_INST_DIR may possibly have been set (to find installation) -# -# 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, export 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/ -# check /etc/ -if [ "$WM_PROJECT" ]; then - - for i in \ - $HOME/.$WM_PROJECT/$WM_PROJECT_VERSION \ - $HOME/.$WM_PROJECT \ - $WM_PROJECT_DIR/etc \ - ; - do - if [ -f "$i/$shellRc" ]; then - sourceFoam="$i/$shellRc" - break - fi - done -fi - -# Construct test string for remote execution. -# Source WM_PROJECT settings if WM_PROJECT environment not set. -# attempt to preserve the installation directory 'FOAM_INST_DIR' -case $sourceFoam in -*/bashrc) - if [ "$FOAM_INST_DIR" ]; then - sourceFoam='[ "$WM_PROJECT" ] || '"FOAM_INST_DIR=$FOAM_INST_DIR . $sourceFoam" - else - sourceFoam='[ "$WM_PROJECT" ] || '". $sourceFoam" - fi - ;; - -*/cshrc) - # TODO: csh equivalent to bash code (preserving FOAM_INST_DIR) - sourceFoam='if ( ! $?WM_PROJECT ) source '"$sourceFoam" - ;; -esac - -# quote double-quotes for remote command line -rcmd=$(echo $* | sed -e s/\"/\'\"\'/g) -## the same, without forking (not ksh, maybe not /bin/sh either) -# rcmd=$(while [ "$#" -gt 0 ]; do echo "${1//\"/'\"'}"; shift; done) - - -# Convert WM_COLOURS into an array -declare colours -nColours=0 -for col in $WM_COLOURS -do - colours[$nColours]=$col - ((nColours = $nColours + 1)) -done - -# Bashism: make pipe fail early. This make sure return value of compilation -# is returned and not of colouring pipe. -set -o pipefail - -# Define function to colour output by argument 1 -colourPipe(){ - if [ "$1" ]; then - (while read line; do setterm -foreground $1; echo "$line" ; done; setterm -foreground default) - else - cat - fi -} - - -colourIndex=0 - -while : -do - for slotGroup in $WM_HOSTS - do - # split 'host:N', but catch 'host:' and 'host' too - host=${slotGroup%%:*} - n=${slotGroup##*:} - if [ "$n" = "$host" ]; then n=1; fi # missing ':' - : ${n:=1} - - i=0 - while [ "$i" -lt "$n" ] - do - lockFile="$lockDir/$host:$i" - if lockfile -r0 "$lockFile" 2>/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 - -#------------------------------------------------------------------------------ From 290e4018cd94dee5fbbd9ee3f49be4356fb5b750 Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 16 Jun 2008 14:15:04 +0100 Subject: [PATCH 13/21] enabled lookupOrDefault on model coefficients --- src/turbulenceModels/compressible/LRR/LRR.C | 84 +++++++++-------- .../LaunderGibsonRSTM/LaunderGibsonRSTM.C | 91 ++++++++++--------- .../LaunderSharmaKE/LaunderSharmaKE.C | 35 ++++--- .../compressible/RNGkEpsilon/RNGkEpsilon.C | 42 +++++---- .../SpalartAllmaras/SpalartAllmaras.C | 36 ++++---- .../compressible/kEpsilon/kEpsilon.C | 37 +++++--- .../compressible/kOmegaSST/kOmegaSST.C | 87 ++++++++++++------ .../compressible/realizableKE/realizableKE.C | 43 +++++---- src/turbulenceModels/incompressible/LRR/LRR.C | 73 ++++++++------- .../LamBremhorstKE/LamBremhorstKE.C | 23 +++-- .../LaunderGibsonRSTM/LaunderGibsonRSTM.C | 85 +++++++++-------- .../LaunderSharmaKE/LaunderSharmaKE.C | 23 +++-- .../incompressible/LienCubicKE/LienCubicKE.C | 51 +++++++---- .../LienCubicKELowRe/LienCubicKELowRe.C | 71 +++++++++------ .../LienLeschzinerLowRe/LienLeschzinerLowRe.C | 43 +++++---- .../NonlinearKEShih/NonlinearKEShih.C | 51 +++++++---- .../incompressible/QZeta/QZeta.C | 36 +++++--- .../incompressible/RNGkEpsilon/RNGkEpsilon.C | 34 ++++--- .../SpalartAllmaras/SpalartAllmaras.C | 32 ++++--- .../incompressible/kEpsilon/kEpsilon.C | 20 ++-- .../incompressible/kOmegaSST/kOmegaSST.C | 81 ++++++++++++----- .../realizableKE/realizableKE.C | 27 ++++-- 22 files changed, 665 insertions(+), 440 deletions(-) diff --git a/src/turbulenceModels/compressible/LRR/LRR.C b/src/turbulenceModels/compressible/LRR/LRR.C index 380baf2d6d..ea9d71543b 100644 --- a/src/turbulenceModels/compressible/LRR/LRR.C +++ b/src/turbulenceModels/compressible/LRR/LRR.C @@ -55,17 +55,23 @@ LRR::LRR : turbulenceModel(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(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09)), + Clrr1(turbulenceModelCoeffs_.lookupOrDefault("Clrr1", 1.8)), + Clrr2(turbulenceModelCoeffs_.lookupOrDefault("Clrr2", 0.6)), + C1(turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44)), + C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92)), + Cs(turbulenceModelCoeffs_.lookupOrDefault("Cs", 0.25)), + Ceps(turbulenceModelCoeffs_.lookupOrDefault("Ceps", 0.15)), + couplingFactor_ + ( + turbulenceModelCoeffs_.lookupOrDefault("couplingFactor", 0.0) + ), + alphaR(turbulenceModelCoeffs_.lookupOrDefault("alphaR", 1.22)), + alphaEps + ( + turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 0.76923) + ), + alphah(turbulenceModelCoeffs_.lookupOrDefault("alphah", 1.0)), R_ ( @@ -121,21 +127,16 @@ 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); } } @@ -191,24 +192,31 @@ bool LRR::read() { if (turbulenceModel::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_; + Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09); + Clrr1 = turbulenceModelCoeffs_.lookupOrDefault("Clrr1", 1.8); + Clrr2 = turbulenceModelCoeffs_.lookupOrDefault("Clrr2", 0.6); + C1 = turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44); + C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92); + Cs = turbulenceModelCoeffs_.lookupOrDefault("Cs", 0.25); + Ceps = turbulenceModelCoeffs_.lookupOrDefault("Ceps", 0.15); + alphaR = turbulenceModelCoeffs_.lookupOrDefault("alphaR", 1.22); + alphaEps = turbulenceModelCoeffs_.lookupOrDefault + ( + "alphaEps", + 0.76923 + ); + alphah = turbulenceModelCoeffs_.lookupOrDefault("alphah", 1.0); + couplingFactor_ = turbulenceModelCoeffs_.lookupOrDefault + ( + "couplingFactor", + 0.0 + ); 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); } diff --git a/src/turbulenceModels/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C b/src/turbulenceModels/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C index da59204bd1..179f05cfae 100644 --- a/src/turbulenceModels/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C +++ b/src/turbulenceModels/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C @@ -57,19 +57,25 @@ LaunderGibsonRSTM::LaunderGibsonRSTM : turbulenceModel(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(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09)), + Clg1(turbulenceModelCoeffs_.lookupOrDefault("Clg1", 1.8)), + Clg2(turbulenceModelCoeffs_.lookupOrDefault("Clg2", 0.6)), + C1(turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44)), + C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92)), + Cs(turbulenceModelCoeffs_.lookupOrDefault("Cs", 0.25)), + Ceps(turbulenceModelCoeffs_.lookupOrDefault("Ceps", 0.15)), + C1Ref(turbulenceModelCoeffs_.lookupOrDefault("C1Ref", 0.5)), + C2Ref(turbulenceModelCoeffs_.lookupOrDefault("C2Ref", 0.3)), + couplingFactor_ + ( + turbulenceModelCoeffs_.lookupOrDefault("couplingFactor", 0.0) + ), + alphaR(turbulenceModelCoeffs_.lookupOrDefault("alphaR", 1.22)), + alphaEps + ( + turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 0.76923) + ), + alphah(turbulenceModelCoeffs_.lookupOrDefault("alphah", 1.0)), y_(mesh_), @@ -127,21 +133,16 @@ 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); } } @@ -197,26 +198,34 @@ bool LaunderGibsonRSTM::read() { if (turbulenceModel::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; + Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09); + Clg1 = turbulenceModelCoeffs_.lookupOrDefault("Clg1", 1.8); + Clg2 = turbulenceModelCoeffs_.lookupOrDefault("Clg2", 0.6); + C1 = turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44); + C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92); + Cs = turbulenceModelCoeffs_.lookupOrDefault("Cs", 0.25); + Ceps = turbulenceModelCoeffs_.lookupOrDefault("Ceps", 0.15); + C1Ref = turbulenceModelCoeffs_.lookupOrDefault("C1Ref", 0.5); + C2Ref = turbulenceModelCoeffs_.lookupOrDefault("C2Ref", 0.3); + alphaR = turbulenceModelCoeffs_.lookupOrDefault("alphaR", 1.22); + alphaEps = turbulenceModelCoeffs_.lookupOrDefault + ( + "alphaEps", + 0.76923 + ); + alphah = turbulenceModelCoeffs_.lookupOrDefault("alphah", 1.0); - turbulenceModelCoeffs_.lookup("couplingFactor") >> couplingFactor_; + couplingFactor_ = turbulenceModelCoeffs_.lookupOrDefault + ( + "couplingFactor", + 0.0 + ); 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); } diff --git a/src/turbulenceModels/compressible/LaunderSharmaKE/LaunderSharmaKE.C b/src/turbulenceModels/compressible/LaunderSharmaKE/LaunderSharmaKE.C index 7e758e9d9d..f5328518ff 100644 --- a/src/turbulenceModels/compressible/LaunderSharmaKE/LaunderSharmaKE.C +++ b/src/turbulenceModels/compressible/LaunderSharmaKE/LaunderSharmaKE.C @@ -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))); } @@ -71,13 +71,16 @@ LaunderSharmaKE::LaunderSharmaKE : turbulenceModel(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(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09)), + C1(turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44)), + C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92)), + C3(turbulenceModelCoeffs_.lookupOrDefault("C3", -0.33)), + alphak(turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.0)), + alphaEps + ( + turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 0.76923) + ), + alphah(turbulenceModelCoeffs_.lookupOrDefault("alphah", 1.0)), k_ ( @@ -176,12 +179,16 @@ bool LaunderSharmaKE::read() { if (turbulenceModel::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; + Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09); + C1 = turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44); + C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92); + C3 = turbulenceModelCoeffs_.lookupOrDefault("C3", -0.33); + alphaEps = turbulenceModelCoeffs_.lookupOrDefault + ( + "alphaEps", + 0.76923 + ); + alphah = turbulenceModelCoeffs_.lookupOrDefault("alphah", 1.0); return true; } diff --git a/src/turbulenceModels/compressible/RNGkEpsilon/RNGkEpsilon.C b/src/turbulenceModels/compressible/RNGkEpsilon/RNGkEpsilon.C index c37b3632e8..0abe4b55f0 100644 --- a/src/turbulenceModels/compressible/RNGkEpsilon/RNGkEpsilon.C +++ b/src/turbulenceModels/compressible/RNGkEpsilon/RNGkEpsilon.C @@ -55,15 +55,15 @@ RNGkEpsilon::RNGkEpsilon : turbulenceModel(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(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.0845)), + C1(turbulenceModelCoeffs_.lookupOrDefault("C1", 1.42)), + C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.68)), + C3(turbulenceModelCoeffs_.lookupOrDefault("C3", -0.33)), + alphak(turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.39)), + alphaEps(turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 1.39)), + alphah(turbulenceModelCoeffs_.lookupOrDefault("alphah", 1.0)), + eta0(turbulenceModelCoeffs_.lookupOrDefault("eta0", 4.38)), + beta(turbulenceModelCoeffs_.lookupOrDefault("beta", 0.012)), k_ ( @@ -164,15 +164,19 @@ bool RNGkEpsilon::read() { if (turbulenceModel::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; + Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.0845); + C1 = turbulenceModelCoeffs_.lookupOrDefault("C1", 1.42); + C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.68); + C3 = turbulenceModelCoeffs_.lookupOrDefault("C3", -0.33); + alphak = turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.39); + alphaEps = turbulenceModelCoeffs_.lookupOrDefault + ( + "alphaEps", + 1.39 + ); + alphah = turbulenceModelCoeffs_.lookupOrDefault("alphah", 1.0); + eta0 = turbulenceModelCoeffs_.lookupOrDefault("eta0", 4.38); + beta = turbulenceModelCoeffs_.lookupOrDefault("beta", 0.012); return true; } @@ -210,7 +214,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" diff --git a/src/turbulenceModels/compressible/SpalartAllmaras/SpalartAllmaras.C b/src/turbulenceModels/compressible/SpalartAllmaras/SpalartAllmaras.C index a2ccbf80a4..265191af0a 100644 --- a/src/turbulenceModels/compressible/SpalartAllmaras/SpalartAllmaras.C +++ b/src/turbulenceModels/compressible/SpalartAllmaras/SpalartAllmaras.C @@ -115,16 +115,16 @@ SpalartAllmaras::SpalartAllmaras : turbulenceModel(typeName, rho, U, phi, thermophysicalModel), - alphaNut(turbulenceModelCoeffs_.lookup("alphaNut")), - alphah(turbulenceModelCoeffs_.lookup("alphah")), + alphaNut(turbulenceModelCoeffs_.lookupOrDefault("alphaNut", 1.5)), + alphah(turbulenceModelCoeffs_.lookupOrDefault("alphah", 1.0)), - Cb1(turbulenceModelCoeffs_.lookup("Cb1")), - Cb2(turbulenceModelCoeffs_.lookup("Cb2")), + Cb1(turbulenceModelCoeffs_.lookupOrDefault("Cb1", 0.1355)), + Cb2(turbulenceModelCoeffs_.lookupOrDefault("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(turbulenceModelCoeffs_.lookupOrDefault("Cw2", 0.3)), + Cw3(turbulenceModelCoeffs_.lookupOrDefault("Cw3", 2.0)), + Cv1(turbulenceModelCoeffs_.lookupOrDefault("Cv1", 7.1)), + Cv2(turbulenceModelCoeffs_.lookupOrDefault("Cv2", 5.0)), nuTilda_ ( @@ -214,16 +214,20 @@ bool SpalartAllmaras::read() { if (turbulenceModel::read()) { - turbulenceModelCoeffs_.lookup("alphaNut") >> alphaNut; - turbulenceModelCoeffs_.lookup("alphah") >> alphah; + alphaNut = turbulenceModelCoeffs_.lookupOrDefault + ( + "alphaNut", + 1.5 + ); + alphah = turbulenceModelCoeffs_.lookupOrDefault("alphah", 1.0); - turbulenceModelCoeffs_.lookup("Cb1") >> Cb1; - turbulenceModelCoeffs_.lookup("Cb2") >> Cb2; + Cb1 = turbulenceModelCoeffs_.lookupOrDefault("Cb1", 0.1355); + Cb2 = turbulenceModelCoeffs_.lookupOrDefault("Cb2", 0.622); Cw1 = Cb1/sqr(kappa_) + alphaNut*(1.0 + Cb2); - turbulenceModelCoeffs_.lookup("Cw2") >> Cw2; - turbulenceModelCoeffs_.lookup("Cw3") >> Cw3; - turbulenceModelCoeffs_.lookup("Cv1") >> Cv1; - turbulenceModelCoeffs_.lookup("Cv2") >> Cv2; + Cw2 = turbulenceModelCoeffs_.lookupOrDefault("Cw2", 0.3); + Cw3 = turbulenceModelCoeffs_.lookupOrDefault("Cw3", 2.0); + Cv1 = turbulenceModelCoeffs_.lookupOrDefault("Cv1", 7.1); + Cv2 = turbulenceModelCoeffs_.lookupOrDefault("Cv2", 5.0); return true; } diff --git a/src/turbulenceModels/compressible/kEpsilon/kEpsilon.C b/src/turbulenceModels/compressible/kEpsilon/kEpsilon.C index a4438c23ee..02e863550c 100644 --- a/src/turbulenceModels/compressible/kEpsilon/kEpsilon.C +++ b/src/turbulenceModels/compressible/kEpsilon/kEpsilon.C @@ -54,13 +54,16 @@ kEpsilon::kEpsilon : turbulenceModel(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(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09)), + C1(turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44)), + C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92)), + C3(turbulenceModelCoeffs_.lookupOrDefault("C3", -0.33)), + alphak(turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.0)), + alphaEps + ( + turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 0.76923) + ), + alphah(turbulenceModelCoeffs_.lookupOrDefault("alphah", 1.0)), k_ ( @@ -162,13 +165,17 @@ bool kEpsilon::read() { if (turbulenceModel::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; + Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09); + C1 = turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44); + C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92); + C3 = turbulenceModelCoeffs_.lookupOrDefault("C3", -0.33); + alphak = turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.0); + alphaEps = turbulenceModelCoeffs_.lookupOrDefault + ( + "alphaEps", + 0.76923 + ); + alphah = turbulenceModelCoeffs_.lookupOrDefault("alphah", 1.0); return true; } @@ -232,7 +239,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_) ); diff --git a/src/turbulenceModels/compressible/kOmegaSST/kOmegaSST.C b/src/turbulenceModels/compressible/kOmegaSST/kOmegaSST.C index 4956b162be..8592f98003 100644 --- a/src/turbulenceModels/compressible/kOmegaSST/kOmegaSST.C +++ b/src/turbulenceModels/compressible/kOmegaSST/kOmegaSST.C @@ -97,23 +97,32 @@ kOmegaSST::kOmegaSST : turbulenceModel(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 + ( + turbulenceModelCoeffs_.lookupOrDefault("alphaK1", 0.85034) + ), + alphaK2(turbulenceModelCoeffs_.lookupOrDefault("alphaK2", 1.0)), + alphaOmega1 + ( + turbulenceModelCoeffs_.lookupOrDefault("alphaOmega1", 0.5) + ), + alphaOmega2 + ( + turbulenceModelCoeffs_.lookupOrDefault("alphaOmega2", 0.85616) + ), + alphah(turbulenceModelCoeffs_.lookupOrDefault("alphah", 1.0)), + gamma1(turbulenceModelCoeffs_.lookupOrDefault("gamma1", 0.5532)), + gamma2(turbulenceModelCoeffs_.lookupOrDefault("gamma2", 0.4403)), + beta1(turbulenceModelCoeffs_.lookupOrDefault("beta1", 0.075)), + beta2(turbulenceModelCoeffs_.lookupOrDefault("beta2", 0.0828)), + betaStar(turbulenceModelCoeffs_.lookupOrDefault("betaStar", 0.09)), + a1(turbulenceModelCoeffs_.lookupOrDefault("a1", 0.31)), + c1(turbulenceModelCoeffs_.lookupOrDefault("c1", 10.0)), omega0_("omega0", dimless/dimTime, SMALL), omegaSmall_("omegaSmall", dimless/dimTime, SMALL), - Cmu(turbulenceModelCoeffs_.lookup("Cmu")), + Cmu(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09)), y_(mesh_), @@ -216,19 +225,43 @@ bool kOmegaSST::read() { if (turbulenceModel::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; + alphaK1 = turbulenceModelCoeffs_.lookupOrDefault + ( + "alphaK1", + 0.85034 + ); + alphaK2 = turbulenceModelCoeffs_.lookupOrDefault("alphaK2", 1.0); + alphaOmega1 = turbulenceModelCoeffs_.lookupOrDefault + ( + "alphaOmega1", + 0.5 + ); + alphaOmega2 = turbulenceModelCoeffs_.lookupOrDefault + ( + "alphaOmega2", + 0.85616 + ); + alphah = turbulenceModelCoeffs_.lookupOrDefault("alphah", 1.0); + gamma1 = turbulenceModelCoeffs_.lookupOrDefault + ( + "gamma1", + 0.5532 + ); + gamma2 = turbulenceModelCoeffs_.lookupOrDefault + ( + "gamma2", + 0.4403 + ); + beta1 = turbulenceModelCoeffs_.lookupOrDefault("beta1", 0.075); + beta2 = turbulenceModelCoeffs_.lookupOrDefault("beta2", 0.0828); + betaStar = turbulenceModelCoeffs_.lookupOrDefault + ( + "betaStar", + 0.09 + ); + a1 = turbulenceModelCoeffs_.lookupOrDefault("a1", 0.31); + c1 = turbulenceModelCoeffs_.lookupOrDefault("c1", 10.0); + Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09); return true; } @@ -244,7 +277,7 @@ 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; diff --git a/src/turbulenceModels/compressible/realizableKE/realizableKE.C b/src/turbulenceModels/compressible/realizableKE/realizableKE.C index 421fc4db4a..85ebd9a583 100644 --- a/src/turbulenceModels/compressible/realizableKE/realizableKE.C +++ b/src/turbulenceModels/compressible/realizableKE/realizableKE.C @@ -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))); @@ -94,13 +94,16 @@ realizableKE::realizableKE ) : 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")), + + Cmu(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09)), + A0(turbulenceModelCoeffs_.lookupOrDefault("A0", 4.0)), + C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.9)), + alphak(turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.0)), + alphaEps + ( + turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 0.833333) + ), + alphah(turbulenceModelCoeffs_.lookupOrDefault("alphah", 1.0)), k_ ( @@ -203,12 +206,16 @@ bool realizableKE::read() { if (turbulenceModel::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; + Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09); + A0 = turbulenceModelCoeffs_.lookupOrDefault("A0", 4.0); + C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.9); + alphak = turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.0); + alphaEps = turbulenceModelCoeffs_.lookupOrDefault + ( + "alphaEps", + 0.833333 + ); + alphah = turbulenceModelCoeffs_.lookupOrDefault("alphah", 1.0); return true; } @@ -240,10 +247,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 +293,7 @@ void realizableKE::correct() kEqn().relax(); solve(kEqn); bound(k_, k0_); - + // Re-calculate viscosity mut_ = rCmu(gradU, S2, magS)*rho_*sqr(k_)/epsilon_; diff --git a/src/turbulenceModels/incompressible/LRR/LRR.C b/src/turbulenceModels/incompressible/LRR/LRR.C index 1c37f360f7..b672516b1f 100644 --- a/src/turbulenceModels/incompressible/LRR/LRR.C +++ b/src/turbulenceModels/incompressible/LRR/LRR.C @@ -52,15 +52,21 @@ LRR::LRR : turbulenceModel(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(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09)), + Clrr1(turbulenceModelCoeffs_.lookupOrDefault("Clrr1", 1.8)), + Clrr2(turbulenceModelCoeffs_.lookupOrDefault("Clrr2", 0.6)), + C1(turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44)), + C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92)), + Cs(turbulenceModelCoeffs_.lookupOrDefault("Cs", 0.25)), + Ceps(turbulenceModelCoeffs_.lookupOrDefault("Ceps", 0.15)), + alphaEps + ( + turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 0.76923) + ), + couplingFactor_ + ( + turbulenceModelCoeffs_.lookupOrDefault("couplingFactor", 0.0) + ), R_ ( @@ -105,21 +111,16 @@ 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); } } @@ -173,16 +174,24 @@ bool LRR::read() { if (turbulenceModel::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; + Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09); + Clrr1 = turbulenceModelCoeffs_.lookupOrDefault("Clrr1", 1.8); + Clrr2 = turbulenceModelCoeffs_.lookupOrDefault("Clrr2", 0.6); + C1 = turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44); + C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92); + Cs = turbulenceModelCoeffs_.lookupOrDefault("Cs", 0.25); + Ceps = turbulenceModelCoeffs_.lookupOrDefault("Ceps", 0.15); + alphaEps = turbulenceModelCoeffs_.lookupOrDefault + ( + "alphaEps", + 0.76923 + ); - turbulenceModelCoeffs_.lookup("couplingFactor") >> couplingFactor_; + couplingFactor_ = turbulenceModelCoeffs_.lookupOrDefault + ( + "couplingFactor", + 0.0 + ); if (couplingFactor_ < 0.0 || couplingFactor_ > 1.0) { diff --git a/src/turbulenceModels/incompressible/LamBremhorstKE/LamBremhorstKE.C b/src/turbulenceModels/incompressible/LamBremhorstKE/LamBremhorstKE.C index bb506dc999..d89072281f 100644 --- a/src/turbulenceModels/incompressible/LamBremhorstKE/LamBremhorstKE.C +++ b/src/turbulenceModels/incompressible/LamBremhorstKE/LamBremhorstKE.C @@ -51,10 +51,13 @@ LamBremhorstKE::LamBremhorstKE : turbulenceModel(typeName, U, phi, lamTransportModel), - Cmu(turbulenceModelCoeffs_.lookup("Cmu")), - C1(turbulenceModelCoeffs_.lookup("C1")), - C2(turbulenceModelCoeffs_.lookup("C2")), - alphaEps(turbulenceModelCoeffs_.lookup("alphaEps")), + Cmu(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09)), + C1(turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44)), + C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92)), + alphaEps + ( + turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 0.76923) + ), k_ ( @@ -153,10 +156,14 @@ bool LamBremhorstKE::read() { if (turbulenceModel::read()) { - turbulenceModelCoeffs_.lookup("Cmu") >> Cmu; - turbulenceModelCoeffs_.lookup("C1") >> C1; - turbulenceModelCoeffs_.lookup("C2") >> C2; - turbulenceModelCoeffs_.lookup("alphaEps") >> alphaEps; + Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09); + C1 = turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44); + C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92); + alphaEps = turbulenceModelCoeffs_.lookupOrDefault + ( + "alphaEps", + 0.76923 + ); return true; } diff --git a/src/turbulenceModels/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C b/src/turbulenceModels/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C index b01febba7b..27a16dc4c8 100644 --- a/src/turbulenceModels/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C +++ b/src/turbulenceModels/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C @@ -52,18 +52,24 @@ LaunderGibsonRSTM::LaunderGibsonRSTM : turbulenceModel(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(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09)), + Clg1(turbulenceModelCoeffs_.lookupOrDefault("Clg1", 1.8)), + Clg2(turbulenceModelCoeffs_.lookupOrDefault("Clg2", 0.6)), + C1(turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44)), + C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92)), + Cs(turbulenceModelCoeffs_.lookupOrDefault("Cs", 0.25)), + Ceps(turbulenceModelCoeffs_.lookupOrDefault("Ceps", 0.15)), + alphaR(turbulenceModelCoeffs_.lookupOrDefault("alphaR", 1.22)), + alphaEps + ( + turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 0.76923) + ), + C1Ref(turbulenceModelCoeffs_.lookupOrDefault("C1Ref", 0.5)), + C2Ref(turbulenceModelCoeffs_.lookupOrDefault("C2Ref", 0.3)), + couplingFactor_ + ( + turbulenceModelCoeffs_.lookupOrDefault("couplingFactor", 0.0) + ), yr_(mesh_), @@ -110,21 +116,16 @@ 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); } } @@ -178,19 +179,27 @@ bool LaunderGibsonRSTM::read() { if (turbulenceModel::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; + Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09); + Clg1 = turbulenceModelCoeffs_.lookupOrDefault("Clg1", 1.8); + Clg2 = turbulenceModelCoeffs_.lookupOrDefault("Clg2", 0.6); + C1 = turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44); + C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92); + Cs = turbulenceModelCoeffs_.lookupOrDefault("Cs", 0.25); + Ceps = turbulenceModelCoeffs_.lookupOrDefault("Ceps", 0.15); + alphaR = turbulenceModelCoeffs_.lookupOrDefault("alphaR", 1.22); + alphaEps = turbulenceModelCoeffs_.lookupOrDefault + ( + "alphaEps", + 0.76923 + ); + C1Ref = turbulenceModelCoeffs_.lookupOrDefault("C1Ref", 0.5); + C2Ref = turbulenceModelCoeffs_.lookupOrDefault("C2Ref", 0.3); - turbulenceModelCoeffs_.lookup("couplingFactor") >> couplingFactor_; + couplingFactor_ = turbulenceModelCoeffs_.lookupOrDefault + ( + "couplingFactor", + 0.0 + ); if (couplingFactor_ < 0.0 || couplingFactor_ > 1.0) { diff --git a/src/turbulenceModels/incompressible/LaunderSharmaKE/LaunderSharmaKE.C b/src/turbulenceModels/incompressible/LaunderSharmaKE/LaunderSharmaKE.C index f6d08178b3..015e92a031 100644 --- a/src/turbulenceModels/incompressible/LaunderSharmaKE/LaunderSharmaKE.C +++ b/src/turbulenceModels/incompressible/LaunderSharmaKE/LaunderSharmaKE.C @@ -66,10 +66,13 @@ LaunderSharmaKE::LaunderSharmaKE : turbulenceModel(typeName, U, phi, lamTransportModel), - Cmu(turbulenceModelCoeffs_.lookup("Cmu")), - C1(turbulenceModelCoeffs_.lookup("C1")), - C2(turbulenceModelCoeffs_.lookup("C2")), - alphaEps(turbulenceModelCoeffs_.lookup("alphaEps")), + Cmu(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09)), + C1(turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44)), + C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92)), + alphaEps + ( + turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 0.76923) + ), k_ ( @@ -158,10 +161,14 @@ bool LaunderSharmaKE::read() { if (turbulenceModel::read()) { - turbulenceModelCoeffs_.lookup("Cmu") >> Cmu; - turbulenceModelCoeffs_.lookup("C1") >> C1; - turbulenceModelCoeffs_.lookup("C2") >> C2; - turbulenceModelCoeffs_.lookup("alphaEps") >> alphaEps; + Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09); + C1 = turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44); + C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92); + alphaEps = turbulenceModelCoeffs_.lookupOrDefault + ( + "alphaEps", + 0.76923 + ); return true; } diff --git a/src/turbulenceModels/incompressible/LienCubicKE/LienCubicKE.C b/src/turbulenceModels/incompressible/LienCubicKE/LienCubicKE.C index a64913bda7..7de1b1d374 100644 --- a/src/turbulenceModels/incompressible/LienCubicKE/LienCubicKE.C +++ b/src/turbulenceModels/incompressible/LienCubicKE/LienCubicKE.C @@ -52,16 +52,19 @@ LienCubicKE::LienCubicKE : turbulenceModel(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(turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44)), + C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92)), + alphak(turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.0)), + alphaEps + ( + turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 0.76923) + ), + A1(turbulenceModelCoeffs_.lookupOrDefault("A1", 1.25)), + A2(turbulenceModelCoeffs_.lookupOrDefault("A2", 1000.0)), + Ctau1(turbulenceModelCoeffs_.lookupOrDefault("Ctau1", -4.0)), + Ctau2(turbulenceModelCoeffs_.lookupOrDefault("Ctau2", 13.0)), + Ctau3(turbulenceModelCoeffs_.lookupOrDefault("Ctau3", -2.0)), + alphaKsi(turbulenceModelCoeffs_.lookupOrDefault("alphaKsi", 0.9)), k_ ( @@ -195,16 +198,24 @@ bool LienCubicKE::read() { if (turbulenceModel::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; + C1 = turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44); + C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92); + alphak = turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.0); + alphaEps = turbulenceModelCoeffs_.lookupOrDefault + ( + "alphaEps", + 0.76923 + ); + A1 = turbulenceModelCoeffs_.lookupOrDefault("A1", 1.25); + A2 = turbulenceModelCoeffs_.lookupOrDefault("A2", 1000.0); + Ctau1 = turbulenceModelCoeffs_.lookupOrDefault("Ctau1", -4.0); + Ctau2 = turbulenceModelCoeffs_.lookupOrDefault("Ctau2", 13.0); + Ctau3 = turbulenceModelCoeffs_.lookupOrDefault("Ctau3", -2.0); + alphaKsi = turbulenceModelCoeffs_.lookupOrDefault + ( + "alphaKsi", + 0.9 + ); return true; } diff --git a/src/turbulenceModels/incompressible/LienCubicKELowRe/LienCubicKELowRe.C b/src/turbulenceModels/incompressible/LienCubicKELowRe/LienCubicKELowRe.C index b72ee3cf14..2138565629 100644 --- a/src/turbulenceModels/incompressible/LienCubicKELowRe/LienCubicKELowRe.C +++ b/src/turbulenceModels/incompressible/LienCubicKELowRe/LienCubicKELowRe.C @@ -52,20 +52,23 @@ LienCubicKELowRe::LienCubicKELowRe : turbulenceModel(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(turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44)), + C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92)), + alphak(turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.0)), + alphaEps + ( + turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 0.76923) + ), + A1(turbulenceModelCoeffs_.lookupOrDefault("A1", 1.25)), + A2(turbulenceModelCoeffs_.lookupOrDefault("A2", 1000.0)), + Ctau1(turbulenceModelCoeffs_.lookupOrDefault("Ctau1", -4.0)), + Ctau2(turbulenceModelCoeffs_.lookupOrDefault("Ctau2", 13.0)), + Ctau3(turbulenceModelCoeffs_.lookupOrDefault("Ctau3", -2.0)), + alphaKsi(turbulenceModelCoeffs_.lookupOrDefault("alphaKsi", 0.9)), + CmuWall(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09)), + Am(turbulenceModelCoeffs_.lookupOrDefault("Am", 0.016)), + Aepsilon(turbulenceModelCoeffs_.lookupOrDefault("Aepsilon", 0.263)), + Amu(turbulenceModelCoeffs_.lookupOrDefault("Amu", 0.00222)), k_ ( @@ -220,20 +223,32 @@ bool LienCubicKELowRe::read() { if (turbulenceModel::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; + C1 = turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44); + C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92); + alphak = turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.0); + alphaEps = turbulenceModelCoeffs_.lookupOrDefault + ( + "alphaEps", + 0.76923 + ); + A1 = turbulenceModelCoeffs_.lookupOrDefault("A1", 1.25); + A2 = turbulenceModelCoeffs_.lookupOrDefault("A2", 1000.0); + Ctau1= turbulenceModelCoeffs_.lookupOrDefault("Ctau1", -4.0); + Ctau2= turbulenceModelCoeffs_.lookupOrDefault("Ctau2", 13.0); + Ctau3 = turbulenceModelCoeffs_.lookupOrDefault("Ctau3", -2.0); + alphaKsi = turbulenceModelCoeffs_.lookupOrDefault + ( + "alphaKsi", + 0.9 + ); + CmuWall= turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09); + Am = turbulenceModelCoeffs_.lookupOrDefault("Am", 0.016); + Aepsilon = turbulenceModelCoeffs_.lookupOrDefault + ( + "Aepsilon", + 0.263 + ); + Amu = turbulenceModelCoeffs_.lookupOrDefault("Amu", 0.00222); return true; } diff --git a/src/turbulenceModels/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.C b/src/turbulenceModels/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.C index 1dbba5a001..7a8df3e45d 100644 --- a/src/turbulenceModels/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.C +++ b/src/turbulenceModels/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.C @@ -52,14 +52,17 @@ LienLeschzinerLowRe::LienLeschzinerLowRe : turbulenceModel(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(turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44)), + C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92)), + alphak(turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.0)), + alphaEps + ( + turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 0.76923) + ), + Cmu(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09)), + Am(turbulenceModelCoeffs_.lookupOrDefault("Am", 0.016)), + Aepsilon(turbulenceModelCoeffs_.lookupOrDefault("Aepsilon", 0.263)), + Amu(turbulenceModelCoeffs_.lookupOrDefault("Amu", 0.00222)), k_ ( @@ -160,14 +163,22 @@ bool LienLeschzinerLowRe::read() { if (turbulenceModel::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; + C1 = turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44); + C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92); + alphak = turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.0); + alphaEps = turbulenceModelCoeffs_.lookupOrDefault + ( + "alphaEps", + 0.76923 + ); + Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09); + Am = turbulenceModelCoeffs_.lookupOrDefault("Am", 0.016); + Aepsilon = turbulenceModelCoeffs_.lookupOrDefault + ( + "Aepsilon", + 0.263 + ); + Amu = turbulenceModelCoeffs_.lookupOrDefault("Amu", 0.00222); return true; } diff --git a/src/turbulenceModels/incompressible/NonlinearKEShih/NonlinearKEShih.C b/src/turbulenceModels/incompressible/NonlinearKEShih/NonlinearKEShih.C index 6d6d904c62..4047412037 100644 --- a/src/turbulenceModels/incompressible/NonlinearKEShih/NonlinearKEShih.C +++ b/src/turbulenceModels/incompressible/NonlinearKEShih/NonlinearKEShih.C @@ -52,16 +52,19 @@ NonlinearKEShih::NonlinearKEShih : turbulenceModel(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(turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44)), + C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92)), + alphak(turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.0)), + alphaEps + ( + turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 0.76923) + ), + A1(turbulenceModelCoeffs_.lookupOrDefault("A1", 1.25)), + A2(turbulenceModelCoeffs_.lookupOrDefault("A2", 1000.0)), + Ctau1(turbulenceModelCoeffs_.lookupOrDefault("Ctau1", -4.0)), + Ctau2(turbulenceModelCoeffs_.lookupOrDefault("Ctau2", 13.0)), + Ctau3(turbulenceModelCoeffs_.lookupOrDefault("Ctau3", -2.0)), + alphaKsi(turbulenceModelCoeffs_.lookupOrDefault("alphaKsi", 0.9)), k_ ( @@ -179,16 +182,24 @@ bool NonlinearKEShih::read() { if (turbulenceModel::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; + C1 = turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44); + C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92); + alphak = turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.0); + alphaEps = turbulenceModelCoeffs_.lookupOrDefault + ( + "alphaEps", + 0.76923 + ); + A1 = turbulenceModelCoeffs_.lookupOrDefault("A1", 1.25); + A2 = turbulenceModelCoeffs_.lookupOrDefault("A2", 1000.0); + Ctau1 = turbulenceModelCoeffs_.lookupOrDefault("Ctau1", -4.0); + Ctau2 = turbulenceModelCoeffs_.lookupOrDefault("Ctau2", 13.0); + Ctau3 = turbulenceModelCoeffs_.lookupOrDefault("Ctau3", -2.0); + alphaKsi = turbulenceModelCoeffs_.lookupOrDefault + ( + "alphaKsi", + 0.9 + ); return true; } diff --git a/src/turbulenceModels/incompressible/QZeta/QZeta.C b/src/turbulenceModels/incompressible/QZeta/QZeta.C index dcafe71f59..b4428c7934 100644 --- a/src/turbulenceModels/incompressible/QZeta/QZeta.C +++ b/src/turbulenceModels/incompressible/QZeta/QZeta.C @@ -51,7 +51,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)); } @@ -77,11 +77,17 @@ QZeta::QZeta : turbulenceModel(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(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09)), + C1(turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44)), + C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92)), + alphaZeta + ( + turbulenceModelCoeffs_.lookupOrDefault("alphaZeta", 0.76923) + ), + Anisotropic + ( + turbulenceModelCoeffs_.lookupOrDefault("anisotropic", false) + ), k_ ( @@ -198,11 +204,19 @@ bool QZeta::read() { if (turbulenceModel::read()) { - turbulenceModelCoeffs_.lookup("Cmu") >> Cmu; - turbulenceModelCoeffs_.lookup("C1") >> C1; - turbulenceModelCoeffs_.lookup("C2") >> C2; - turbulenceModelCoeffs_.lookup("alphaZeta") >> alphaZeta; - turbulenceModelCoeffs_.lookup("anisotropic") >> Anisotropic; + Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09); + C1 = turbulenceModelCoeffs_.lookupOrDefault("C1", 1.92); + C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.44); + alphaZeta = turbulenceModelCoeffs_.lookupOrDefault + ( + "alphaZeta", + 0.76923 + ); + Anisotropic = turbulenceModelCoeffs_.lookupOrDefault + ( + "anisotropic", + false + ); return true; } diff --git a/src/turbulenceModels/incompressible/RNGkEpsilon/RNGkEpsilon.C b/src/turbulenceModels/incompressible/RNGkEpsilon/RNGkEpsilon.C index 05fd38e9f0..cfe2d3d6b2 100644 --- a/src/turbulenceModels/incompressible/RNGkEpsilon/RNGkEpsilon.C +++ b/src/turbulenceModels/incompressible/RNGkEpsilon/RNGkEpsilon.C @@ -51,13 +51,13 @@ RNGkEpsilon::RNGkEpsilon : turbulenceModel(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(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.0845)), + C1(turbulenceModelCoeffs_.lookupOrDefault("C1", 1.42)), + C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.68)), + alphak(turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.39)), + alphaEps(turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 1.39)), + eta0(turbulenceModelCoeffs_.lookupOrDefault("eta0", 4.38)), + beta(turbulenceModelCoeffs_.lookupOrDefault("beta", 0.012)), k_ ( @@ -149,13 +149,17 @@ bool RNGkEpsilon::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("eta0") >> eta0; - turbulenceModelCoeffs_.lookup("beta") >> beta; + Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.0845); + C1 = turbulenceModelCoeffs_.lookupOrDefault("C1", 1.42); + C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.68); + alphak = turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.39); + alphaEps = turbulenceModelCoeffs_.lookupOrDefault + ( + "alphaEps", + 1.39 + ); + eta0 = turbulenceModelCoeffs_.lookupOrDefault("eta0", 4.38); + beta = turbulenceModelCoeffs_.lookupOrDefault("beta", 0.012); return true; } @@ -182,7 +186,7 @@ void RNGkEpsilon::correct() 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" diff --git a/src/turbulenceModels/incompressible/SpalartAllmaras/SpalartAllmaras.C b/src/turbulenceModels/incompressible/SpalartAllmaras/SpalartAllmaras.C index 3523ba2a48..d2130de943 100644 --- a/src/turbulenceModels/incompressible/SpalartAllmaras/SpalartAllmaras.C +++ b/src/turbulenceModels/incompressible/SpalartAllmaras/SpalartAllmaras.C @@ -112,15 +112,15 @@ SpalartAllmaras::SpalartAllmaras : turbulenceModel(typeName, U, phi, lamTransportModel), - alphaNut(turbulenceModelCoeffs_.lookup("alphaNut")), + alphaNut(turbulenceModelCoeffs_.lookupOrDefault("alphaNut", 1.5)), - Cb1(turbulenceModelCoeffs_.lookup("Cb1")), - Cb2(turbulenceModelCoeffs_.lookup("Cb2")), + Cb1(turbulenceModelCoeffs_.lookupOrDefault("Cb1", 0.1355)), + Cb2(turbulenceModelCoeffs_.lookupOrDefault("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(turbulenceModelCoeffs_.lookupOrDefault("Cw2", 0.3)), + Cw3(turbulenceModelCoeffs_.lookupOrDefault("Cw3", 2.0)), + Cv1(turbulenceModelCoeffs_.lookupOrDefault("Cv1", 7.1)), + Cv2(turbulenceModelCoeffs_.lookupOrDefault("Cv2", 5.0)), nuTilda_ ( @@ -257,15 +257,19 @@ bool SpalartAllmaras::read() { if (turbulenceModel::read()) { - turbulenceModelCoeffs_.lookup("alphaNut") >> alphaNut; + alphaNut = turbulenceModelCoeffs_.lookupOrDefault + ( + "alphaNut", + 1.5 + ); - turbulenceModelCoeffs_.lookup("Cb1") >> Cb1; - turbulenceModelCoeffs_.lookup("Cb2") >> Cb2; + Cb1 = turbulenceModelCoeffs_.lookupOrDefault("Cb1", 0.1355); + Cb2 = turbulenceModelCoeffs_.lookupOrDefault("Cb2", 0.622); Cw1 = Cb1/sqr(kappa_) + alphaNut*(1.0 + Cb2); - turbulenceModelCoeffs_.lookup("Cw2") >> Cw2; - turbulenceModelCoeffs_.lookup("Cw3") >> Cw3; - turbulenceModelCoeffs_.lookup("Cv1") >> Cv1; - turbulenceModelCoeffs_.lookup("Cv2") >> Cv2; + Cw2 = turbulenceModelCoeffs_.lookupOrDefault("Cw2", 0.3); + Cw3 = turbulenceModelCoeffs_.lookupOrDefault("Cw3", 2.0); + Cv1 = turbulenceModelCoeffs_.lookupOrDefault("Cv1", 7.1); + Cv2 = turbulenceModelCoeffs_.lookupOrDefault("Cv2", 5.0); return true; } diff --git a/src/turbulenceModels/incompressible/kEpsilon/kEpsilon.C b/src/turbulenceModels/incompressible/kEpsilon/kEpsilon.C index 901887c54a..d18d1bf470 100644 --- a/src/turbulenceModels/incompressible/kEpsilon/kEpsilon.C +++ b/src/turbulenceModels/incompressible/kEpsilon/kEpsilon.C @@ -52,10 +52,13 @@ kEpsilon::kEpsilon : turbulenceModel(typeName, U, phi, lamTransportModel), - Cmu(turbulenceModelCoeffs_.lookup("Cmu")), - C1(turbulenceModelCoeffs_.lookup("C1")), - C2(turbulenceModelCoeffs_.lookup("C2")), - alphaEps(turbulenceModelCoeffs_.lookup("alphaEps")), + Cmu(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09)), + C1(turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44)), + C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92)), + alphaEps + ( + turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 0.76923) + ), k_ ( @@ -146,10 +149,11 @@ bool kEpsilon::read() { if (turbulenceModel::read()) { - turbulenceModelCoeffs_.lookup("Cmu") >> Cmu; - turbulenceModelCoeffs_.lookup("C1") >> C1; - turbulenceModelCoeffs_.lookup("C2") >> C2; - turbulenceModelCoeffs_.lookup("alphaEps") >> alphaEps; + Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09); + C1 = turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44); + C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92); + alphaEps = + turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 0.76923); return true; } diff --git a/src/turbulenceModels/incompressible/kOmegaSST/kOmegaSST.C b/src/turbulenceModels/incompressible/kOmegaSST/kOmegaSST.C index 70c5e70ebe..0057a1a1e5 100644 --- a/src/turbulenceModels/incompressible/kOmegaSST/kOmegaSST.C +++ b/src/turbulenceModels/incompressible/kOmegaSST/kOmegaSST.C @@ -94,22 +94,31 @@ kOmegaSST::kOmegaSST : turbulenceModel(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 + ( + turbulenceModelCoeffs_.lookupOrDefault("alphaK1", 0.85034) + ), + alphaK2(turbulenceModelCoeffs_.lookupOrDefault("alphaK2", 1.0)), + alphaOmega1 + ( + turbulenceModelCoeffs_.lookupOrDefault("alphaOmega1", 0.5) + ), + alphaOmega2 + ( + turbulenceModelCoeffs_.lookupOrDefault("alphaOmega2", 0.85616) + ), + gamma1(turbulenceModelCoeffs_.lookupOrDefault("gamma1", 0.5532)), + gamma2(turbulenceModelCoeffs_.lookupOrDefault("gamma2", 0.4403)), + beta1(turbulenceModelCoeffs_.lookupOrDefault("beta1", 0.075)), + beta2(turbulenceModelCoeffs_.lookupOrDefault("beta2", 0.0828)), + betaStar(turbulenceModelCoeffs_.lookupOrDefault("betaStar", 0.09)), + a1(turbulenceModelCoeffs_.lookupOrDefault("a1", 0.31)), + c1(turbulenceModelCoeffs_.lookupOrDefault("c1", 10.0)), omega0_("omega0", dimless/dimTime, SMALL), omegaSmall_("omegaSmall", dimless/dimTime, SMALL), - Cmu(turbulenceModelCoeffs_.lookup("Cmu")), + Cmu(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09)), y_(mesh_), @@ -202,18 +211,42 @@ bool kOmegaSST::read() { if (turbulenceModel::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; + alphaK1 = turbulenceModelCoeffs_.lookupOrDefault + ( + "alphaK1", + 0.85034 + ); + alphaK2 = turbulenceModelCoeffs_.lookupOrDefault + ( + "alphaK2", + 1.0 + ); + turbulenceModelCoeffs_.lookupOrDefault("alphaOmega1", 0.5); + alphaOmega2 = turbulenceModelCoeffs_.lookupOrDefault + ( + "alphaOmega2", + 0.85616 + ); + gamma1 = turbulenceModelCoeffs_.lookupOrDefault + ( + "gamma1", + 0.5532 + ); + gamma2 = turbulenceModelCoeffs_.lookupOrDefault + ( + "gamma2", + 0.4403 + ); + beta1 = turbulenceModelCoeffs_.lookupOrDefault("beta1", 0.075); + beta2 = turbulenceModelCoeffs_.lookupOrDefault("beta2", 0.0828); + betaStar = turbulenceModelCoeffs_.lookupOrDefault + ( + "betaStar", + 0.09 + ); + a1 = turbulenceModelCoeffs_.lookupOrDefault("a1", 0.31); + c1 = turbulenceModelCoeffs_.lookupOrDefault("c1", 10.0); + Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09); return true; } diff --git a/src/turbulenceModels/incompressible/realizableKE/realizableKE.C b/src/turbulenceModels/incompressible/realizableKE/realizableKE.C index 45f82cb3a7..9bfe0ed084 100644 --- a/src/turbulenceModels/incompressible/realizableKE/realizableKE.C +++ b/src/turbulenceModels/incompressible/realizableKE/realizableKE.C @@ -93,11 +93,14 @@ realizableKE::realizableKE turbulenceModel(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(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09)), + A0(turbulenceModelCoeffs_.lookupOrDefault("A0", 4.0)), + C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.9)), + alphak(turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.0)), + alphaEps + ( + turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 0.833333) + ), k_ ( @@ -190,11 +193,15 @@ bool realizableKE::read() { if (turbulenceModel::read()) { - turbulenceModelCoeffs_.lookup("Cmu") >> Cmu; - turbulenceModelCoeffs_.lookup("A0") >> A0; - turbulenceModelCoeffs_.lookup("C2") >> C2; - turbulenceModelCoeffs_.lookup("alphak") >> alphak; - turbulenceModelCoeffs_.lookup("alphaEps") >> alphaEps; + Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09); + A0 = turbulenceModelCoeffs_.lookupOrDefault("A0", 4.0); + C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.9); + alphak = turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.0); + alphaEps = turbulenceModelCoeffs_.lookupOrDefault + ( + "alphaEps", + 0.833333 + ); return true; } From 349ddc5f59e5135c0dbb51f422829374656f4cae Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 16 Jun 2008 15:54:11 +0100 Subject: [PATCH 14/21] added lookupOrAddDefault and readIfPresent functions --- src/OpenFOAM/db/dictionary/dictionary.H | 19 +++++++++ .../db/dictionary/dictionaryTemplates.C | 42 +++++++++++++++++++ 2 files changed, 61 insertions(+) diff --git a/src/OpenFOAM/db/dictionary/dictionary.H b/src/OpenFOAM/db/dictionary/dictionary.H index 93fc495d59..4bb9bc1849 100644 --- a/src/OpenFOAM/db/dictionary/dictionary.H +++ b/src/OpenFOAM/db/dictionary/dictionary.H @@ -197,6 +197,25 @@ public: template T lookupOrDefault(const word&, const T&, bool recusive=false) const; + //- Find and return a T, if not found return the given default value, + // and add to dictionary. If recusive search parent dictionaries + template + T lookupOrAddDefault + ( + const word&, + const T&, + bool recusive=false + ); + + //- Find an entry if present, and assign to T + template + void readIfPresent + ( + const word&, + T&, + bool recusive=false + ) const; + //- Check if entry is a sub-dictionary bool isDict(const word&) const; diff --git a/src/OpenFOAM/db/dictionary/dictionaryTemplates.C b/src/OpenFOAM/db/dictionary/dictionaryTemplates.C index 73b97fa664..6c1361ff07 100644 --- a/src/OpenFOAM/db/dictionary/dictionaryTemplates.C +++ b/src/OpenFOAM/db/dictionary/dictionaryTemplates.C @@ -50,6 +50,48 @@ T Foam::dictionary::lookupOrDefault } +template +T Foam::dictionary::lookupOrAddDefault +( + const word& keyword, + const T& deft, + bool recusive +) +{ + const entry* ePtr = lookupEntryPtr(keyword, recusive); + + if (ePtr == NULL) + { + entry* defPtr = new primitiveEntry(keyword, deft); + append(defPtr); + hashedEntries_.insert(defPtr->keyword(), defPtr); + + return deft; + } + else + { + return pTraits(ePtr->stream()); + } +} + + +template +void Foam::dictionary::readIfPresent +( + const word& keyword, + T& deft, + bool recusive +) const +{ + const entry* ePtr = lookupEntryPtr(keyword, recusive); + + if (ePtr != NULL) + { + ePtr->stream() >> deft; + } +} + + template void Foam::dictionary::add(const word& keyword, const T& t) { From 0067393011fc8982ca781d94c6d4c41aaf354702 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Mon, 16 Jun 2008 17:10:19 +0200 Subject: [PATCH 15/21] bin/tools/*Functions are not executable - use editor hint instead of #!/bin/sh --- bin/tools/CleanFunctions | 3 +-- bin/tools/RunFunctions | 3 +-- bin/tools/buildParaViewFunctions | 3 +-- bin/tools/thirdPartyGetFunctions | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) 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 0ff51f99ed..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 | 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 | From 454374affe85c2923c6209a511abab7c6c993935 Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 16 Jun 2008 17:45:49 +0100 Subject: [PATCH 16/21] updating tubulence model io --- src/turbulenceModels/compressible/LRR/LRR.C | 58 ++++++------- src/turbulenceModels/compressible/LRR/LRR.H | 26 +++--- .../LaunderGibsonRSTM/LaunderGibsonRSTM.C | 60 +++++++------ .../LaunderGibsonRSTM/LaunderGibsonRSTM.H | 30 +++---- .../LaunderSharmaKE/LaunderSharmaKE.C | 34 ++++---- .../LaunderSharmaKE/LaunderSharmaKE.H | 20 ++--- .../compressible/RNGkEpsilon/RNGkEpsilon.C | 45 +++++----- .../compressible/RNGkEpsilon/RNGkEpsilon.H | 24 +++--- .../SpalartAllmaras/SpalartAllmaras.C | 43 +++++----- .../SpalartAllmaras/SpalartAllmaras.H | 18 ++-- .../compressible/kEpsilon/kEpsilon.C | 34 ++++---- .../compressible/kEpsilon/kEpsilon.H | 30 ++++--- .../compressible/kOmegaSST/kOmegaSST.C | 86 ++++++++----------- .../compressible/kOmegaSST/kOmegaSST.H | 26 +++--- .../kOmegaSST/kOmegaWallFunctionsI.H | 2 +- .../kOmegaSST/kOmegaWallViscosityI.H | 4 +- .../compressible/realizableKE/realizableKE.C | 30 +++---- .../compressible/realizableKE/realizableKE.H | 12 +-- .../turbulenceModel/turbulenceModel.C | 8 ++ .../turbulenceModel/turbulenceModel.H | 5 ++ .../wallFunctions/wallFunctionsI.H | 4 +- .../wallFunctions/wallViscosityI.H | 4 +- src/turbulenceModels/incompressible/LRR/LRR.C | 50 ++++++----- src/turbulenceModels/incompressible/LRR/LRR.H | 16 ++-- .../LamBremhorstKE/LamBremhorstKE.C | 24 +++--- .../LamBremhorstKE/LamBremhorstKE.H | 12 +-- .../LaunderGibsonRSTM/LaunderGibsonRSTM.C | 62 +++++++------ .../LaunderGibsonRSTM/LaunderGibsonRSTM.H | 26 +++--- .../LaunderSharmaKE/LaunderSharmaKE.C | 24 +++--- .../LaunderSharmaKE/LaunderSharmaKE.H | 12 +-- .../incompressible/LienCubicKE/LienCubicKE.C | 50 +++++------ .../incompressible/LienCubicKE/LienCubicKE.H | 24 +++--- .../LienCubicKELowRe/LienCubicKELowRe.C | 75 ++++++++-------- .../LienCubicKELowRe/LienCubicKELowRe.H | 28 +++--- .../LienCubicKELowReSetWallDissipation.H | 6 +- .../LienLeschzinerLowRe/LienLeschzinerLowRe.C | 49 +++++------ .../LienLeschzinerLowRe/LienLeschzinerLowRe.H | 20 ++--- .../LienLeschzinerLowReSetWallDissipation.H | 6 +- .../NonlinearKEShih/NonlinearKEShih.C | 53 ++++++------ .../NonlinearKEShih/NonlinearKEShih.H | 20 ++--- .../incompressible/QZeta/QZeta.C | 36 ++++---- .../incompressible/QZeta/QZeta.H | 14 +-- .../incompressible/RNGkEpsilon/RNGkEpsilon.C | 37 ++++---- .../incompressible/RNGkEpsilon/RNGkEpsilon.H | 18 ++-- .../SpalartAllmaras/SpalartAllmaras.C | 36 ++++---- .../SpalartAllmaras/SpalartAllmaras.H | 16 ++-- .../incompressible/kEpsilon/kEpsilon.C | 19 ++-- .../incompressible/kEpsilon/kEpsilon.H | 23 +++-- .../incompressible/kOmegaSST/kOmegaSST.C | 85 ++++++++---------- .../incompressible/kOmegaSST/kOmegaSST.H | 24 +++--- .../kOmegaSST/kOmegaWallFunctionsI.H | 2 +- .../kOmegaSST/kOmegaWallViscosityI.H | 4 +- .../realizableKE/realizableKE.C | 26 +++--- .../realizableKE/realizableKE.H | 10 +-- .../turbulenceModel/turbulenceModel.C | 8 ++ .../turbulenceModel/turbulenceModel.H | 8 +- .../wallFunctions/wallFunctionsI.H | 4 +- .../wallFunctions/wallViscosityI.H | 4 +- 58 files changed, 753 insertions(+), 781 deletions(-) diff --git a/src/turbulenceModels/compressible/LRR/LRR.C b/src/turbulenceModels/compressible/LRR/LRR.C index ea9d71543b..abcb8e08a8 100644 --- a/src/turbulenceModels/compressible/LRR/LRR.C +++ b/src/turbulenceModels/compressible/LRR/LRR.C @@ -55,23 +55,23 @@ LRR::LRR : turbulenceModel(typeName, rho, U, phi, thermophysicalModel), - Cmu(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09)), - Clrr1(turbulenceModelCoeffs_.lookupOrDefault("Clrr1", 1.8)), - Clrr2(turbulenceModelCoeffs_.lookupOrDefault("Clrr2", 0.6)), - C1(turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44)), - C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92)), - Cs(turbulenceModelCoeffs_.lookupOrDefault("Cs", 0.25)), - Ceps(turbulenceModelCoeffs_.lookupOrDefault("Ceps", 0.15)), + Cmu(turbulenceModelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), + Clrr1(turbulenceModelCoeffs_.lookupOrAddDefault("Clrr1", 1.8)), + Clrr2(turbulenceModelCoeffs_.lookupOrAddDefault("Clrr2", 0.6)), + C1(turbulenceModelCoeffs_.lookupOrAddDefault("C1", 1.44)), + C2(turbulenceModelCoeffs_.lookupOrAddDefault("C2", 1.92)), + Cs(turbulenceModelCoeffs_.lookupOrAddDefault("Cs", 0.25)), + Ceps(turbulenceModelCoeffs_.lookupOrAddDefault("Ceps", 0.15)), couplingFactor_ ( - turbulenceModelCoeffs_.lookupOrDefault("couplingFactor", 0.0) + turbulenceModelCoeffs_.lookupOrAddDefault("couplingFactor", 0.0) ), - alphaR(turbulenceModelCoeffs_.lookupOrDefault("alphaR", 1.22)), + alphaR(turbulenceModelCoeffs_.lookupOrAddDefault("alphaR", 1.22)), alphaEps ( - turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 0.76923) + turbulenceModelCoeffs_.lookupOrAddDefault("alphaEps", 0.76923) ), - alphah(turbulenceModelCoeffs_.lookupOrDefault("alphah", 1.0)), + alphah(turbulenceModelCoeffs_.lookupOrAddDefault("alphah", 1.0)), R_ ( @@ -138,6 +138,8 @@ LRR::LRR << " is not in range 0 - 1" << nl << exit(FatalError); } + + printCoeffs(); } @@ -192,25 +194,21 @@ bool LRR::read() { if (turbulenceModel::read()) { - Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09); - Clrr1 = turbulenceModelCoeffs_.lookupOrDefault("Clrr1", 1.8); - Clrr2 = turbulenceModelCoeffs_.lookupOrDefault("Clrr2", 0.6); - C1 = turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44); - C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92); - Cs = turbulenceModelCoeffs_.lookupOrDefault("Cs", 0.25); - Ceps = turbulenceModelCoeffs_.lookupOrDefault("Ceps", 0.15); - alphaR = turbulenceModelCoeffs_.lookupOrDefault("alphaR", 1.22); - alphaEps = turbulenceModelCoeffs_.lookupOrDefault - ( - "alphaEps", - 0.76923 - ); - alphah = turbulenceModelCoeffs_.lookupOrDefault("alphah", 1.0); - couplingFactor_ = turbulenceModelCoeffs_.lookupOrDefault - ( - "couplingFactor", - 0.0 - ); + turbulenceModelCoeffs_.readIfPresent("Cmu", Cmu); + turbulenceModelCoeffs_.readIfPresent("Clrr1", Clrr1); + turbulenceModelCoeffs_.readIfPresent("Clrr2", Clrr2); + turbulenceModelCoeffs_.readIfPresent("C1", C1); + turbulenceModelCoeffs_.readIfPresent("C2", C2); + turbulenceModelCoeffs_.readIfPresent("Cs", Cs); + turbulenceModelCoeffs_.readIfPresent("Ceps", Ceps); + turbulenceModelCoeffs_.readIfPresent("alphaR", alphaR); + turbulenceModelCoeffs_.readIfPresent("alphaEps", alphaEps); + turbulenceModelCoeffs_.readIfPresent("alphah", alphah); + turbulenceModelCoeffs_.readIfPresent + ( + "couplingFactor", + couplingFactor_ + ); if (couplingFactor_ < 0.0 || couplingFactor_ > 1.0) { diff --git a/src/turbulenceModels/compressible/LRR/LRR.H b/src/turbulenceModels/compressible/LRR/LRR.H index 772016594f..d095a08707 100644 --- a/src/turbulenceModels/compressible/LRR/LRR.H +++ b/src/turbulenceModels/compressible/LRR/LRR.H @@ -59,21 +59,21 @@ class LRR { // 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()) ); diff --git a/src/turbulenceModels/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C b/src/turbulenceModels/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C index 179f05cfae..af49d94b98 100644 --- a/src/turbulenceModels/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C +++ b/src/turbulenceModels/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C @@ -57,25 +57,25 @@ LaunderGibsonRSTM::LaunderGibsonRSTM : turbulenceModel(typeName, rho, U, phi, thermophysicalModel), - Cmu(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09)), - Clg1(turbulenceModelCoeffs_.lookupOrDefault("Clg1", 1.8)), - Clg2(turbulenceModelCoeffs_.lookupOrDefault("Clg2", 0.6)), - C1(turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44)), - C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92)), - Cs(turbulenceModelCoeffs_.lookupOrDefault("Cs", 0.25)), - Ceps(turbulenceModelCoeffs_.lookupOrDefault("Ceps", 0.15)), - C1Ref(turbulenceModelCoeffs_.lookupOrDefault("C1Ref", 0.5)), - C2Ref(turbulenceModelCoeffs_.lookupOrDefault("C2Ref", 0.3)), + Cmu(turbulenceModelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), + Clg1(turbulenceModelCoeffs_.lookupOrAddDefault("Clg1", 1.8)), + Clg2(turbulenceModelCoeffs_.lookupOrAddDefault("Clg2", 0.6)), + C1(turbulenceModelCoeffs_.lookupOrAddDefault("C1", 1.44)), + C2(turbulenceModelCoeffs_.lookupOrAddDefault("C2", 1.92)), + Cs(turbulenceModelCoeffs_.lookupOrAddDefault("Cs", 0.25)), + Ceps(turbulenceModelCoeffs_.lookupOrAddDefault("Ceps", 0.15)), + C1Ref(turbulenceModelCoeffs_.lookupOrAddDefault("C1Ref", 0.5)), + C2Ref(turbulenceModelCoeffs_.lookupOrAddDefault("C2Ref", 0.3)), couplingFactor_ ( - turbulenceModelCoeffs_.lookupOrDefault("couplingFactor", 0.0) + turbulenceModelCoeffs_.lookupOrAddDefault("couplingFactor", 0.0) ), - alphaR(turbulenceModelCoeffs_.lookupOrDefault("alphaR", 1.22)), + alphaR(turbulenceModelCoeffs_.lookupOrAddDefault("alphaR", 1.22)), alphaEps ( - turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 0.76923) + turbulenceModelCoeffs_.lookupOrAddDefault("alphaEps", 0.76923) ), - alphah(turbulenceModelCoeffs_.lookupOrDefault("alphah", 1.0)), + alphah(turbulenceModelCoeffs_.lookupOrAddDefault("alphah", 1.0)), y_(mesh_), @@ -144,6 +144,8 @@ LaunderGibsonRSTM::LaunderGibsonRSTM << " is not in range 0 - 1" << nl << exit(FatalError); } + + printCoeffs(); } @@ -198,27 +200,23 @@ bool LaunderGibsonRSTM::read() { if (turbulenceModel::read()) { - Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09); - Clg1 = turbulenceModelCoeffs_.lookupOrDefault("Clg1", 1.8); - Clg2 = turbulenceModelCoeffs_.lookupOrDefault("Clg2", 0.6); - C1 = turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44); - C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92); - Cs = turbulenceModelCoeffs_.lookupOrDefault("Cs", 0.25); - Ceps = turbulenceModelCoeffs_.lookupOrDefault("Ceps", 0.15); - C1Ref = turbulenceModelCoeffs_.lookupOrDefault("C1Ref", 0.5); - C2Ref = turbulenceModelCoeffs_.lookupOrDefault("C2Ref", 0.3); - alphaR = turbulenceModelCoeffs_.lookupOrDefault("alphaR", 1.22); - alphaEps = turbulenceModelCoeffs_.lookupOrDefault - ( - "alphaEps", - 0.76923 - ); - alphah = turbulenceModelCoeffs_.lookupOrDefault("alphah", 1.0); + turbulenceModelCoeffs_.readIfPresent("Cmu", Cmu); + turbulenceModelCoeffs_.readIfPresent("Clg1", Clg1); + turbulenceModelCoeffs_.readIfPresent("Clg2", Clg2); + turbulenceModelCoeffs_.readIfPresent("C1", C1); + turbulenceModelCoeffs_.readIfPresent("C2", C2); + turbulenceModelCoeffs_.readIfPresent("Cs", Cs); + turbulenceModelCoeffs_.readIfPresent("Ceps", Ceps); + turbulenceModelCoeffs_.readIfPresent("C1Ref", C1Ref); + turbulenceModelCoeffs_.readIfPresent("C2Ref", C2Ref); + turbulenceModelCoeffs_.readIfPresent("alphaR", alphaR); + turbulenceModelCoeffs_.readIfPresent("alphaEps", alphaEps); + turbulenceModelCoeffs_.readIfPresent("alphah", alphah); - couplingFactor_ = turbulenceModelCoeffs_.lookupOrDefault + turbulenceModelCoeffs_.readIfPresent ( "couplingFactor", - 0.0 + couplingFactor_ ); if (couplingFactor_ < 0.0 || couplingFactor_ > 1.0) diff --git a/src/turbulenceModels/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H b/src/turbulenceModels/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H index c96037f420..3a9bec0679 100644 --- a/src/turbulenceModels/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H +++ b/src/turbulenceModels/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H @@ -59,24 +59,24 @@ class LaunderGibsonRSTM { // 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()) ); diff --git a/src/turbulenceModels/compressible/LaunderSharmaKE/LaunderSharmaKE.C b/src/turbulenceModels/compressible/LaunderSharmaKE/LaunderSharmaKE.C index f5328518ff..ed86a5e885 100644 --- a/src/turbulenceModels/compressible/LaunderSharmaKE/LaunderSharmaKE.C +++ b/src/turbulenceModels/compressible/LaunderSharmaKE/LaunderSharmaKE.C @@ -71,16 +71,16 @@ LaunderSharmaKE::LaunderSharmaKE : turbulenceModel(typeName, rho, U, phi, thermophysicalModel), - Cmu(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09)), - C1(turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44)), - C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92)), - C3(turbulenceModelCoeffs_.lookupOrDefault("C3", -0.33)), - alphak(turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.0)), + Cmu(turbulenceModelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), + C1(turbulenceModelCoeffs_.lookupOrAddDefault("C1", 1.44)), + C2(turbulenceModelCoeffs_.lookupOrAddDefault("C2", 1.92)), + C3(turbulenceModelCoeffs_.lookupOrAddDefault("C3", -0.33)), + alphak(turbulenceModelCoeffs_.lookupOrAddDefault("alphak", 1.0)), alphaEps ( - turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 0.76923) + turbulenceModelCoeffs_.lookupOrAddDefault("alphaEps", 0.76923) ), - alphah(turbulenceModelCoeffs_.lookupOrDefault("alphah", 1.0)), + alphah(turbulenceModelCoeffs_.lookupOrAddDefault("alphah", 1.0)), k_ ( @@ -120,7 +120,9 @@ LaunderSharmaKE::LaunderSharmaKE ), Cmu*fMu()*rho_*sqr(k_)/(epsilon_ + epsilonSmall_) ) -{} +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -179,16 +181,12 @@ bool LaunderSharmaKE::read() { if (turbulenceModel::read()) { - Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09); - C1 = turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44); - C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92); - C3 = turbulenceModelCoeffs_.lookupOrDefault("C3", -0.33); - alphaEps = turbulenceModelCoeffs_.lookupOrDefault - ( - "alphaEps", - 0.76923 - ); - alphah = turbulenceModelCoeffs_.lookupOrDefault("alphah", 1.0); + turbulenceModelCoeffs_.readIfPresent("Cmu", Cmu); + turbulenceModelCoeffs_.readIfPresent("C1", C1); + turbulenceModelCoeffs_.readIfPresent("C2", C2); + turbulenceModelCoeffs_.readIfPresent("C3", C3); + turbulenceModelCoeffs_.readIfPresent("alphaEps", alphaEps); + turbulenceModelCoeffs_.readIfPresent("alphah", alphah); return true; } diff --git a/src/turbulenceModels/compressible/LaunderSharmaKE/LaunderSharmaKE.H b/src/turbulenceModels/compressible/LaunderSharmaKE/LaunderSharmaKE.H index b04d60e6bd..1bfb5eecd2 100644 --- a/src/turbulenceModels/compressible/LaunderSharmaKE/LaunderSharmaKE.H +++ b/src/turbulenceModels/compressible/LaunderSharmaKE/LaunderSharmaKE.H @@ -59,13 +59,13 @@ class LaunderSharmaKE { // 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()) ); diff --git a/src/turbulenceModels/compressible/RNGkEpsilon/RNGkEpsilon.C b/src/turbulenceModels/compressible/RNGkEpsilon/RNGkEpsilon.C index 0abe4b55f0..d13d4ff1d3 100644 --- a/src/turbulenceModels/compressible/RNGkEpsilon/RNGkEpsilon.C +++ b/src/turbulenceModels/compressible/RNGkEpsilon/RNGkEpsilon.C @@ -55,15 +55,18 @@ RNGkEpsilon::RNGkEpsilon : turbulenceModel(typeName, rho, U, phi, thermophysicalModel), - Cmu(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.0845)), - C1(turbulenceModelCoeffs_.lookupOrDefault("C1", 1.42)), - C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.68)), - C3(turbulenceModelCoeffs_.lookupOrDefault("C3", -0.33)), - alphak(turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.39)), - alphaEps(turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 1.39)), - alphah(turbulenceModelCoeffs_.lookupOrDefault("alphah", 1.0)), - eta0(turbulenceModelCoeffs_.lookupOrDefault("eta0", 4.38)), - beta(turbulenceModelCoeffs_.lookupOrDefault("beta", 0.012)), + Cmu(turbulenceModelCoeffs_.lookupOrAddDefault("Cmu", 0.0845)), + C1(turbulenceModelCoeffs_.lookupOrAddDefault("C1", 1.42)), + C2(turbulenceModelCoeffs_.lookupOrAddDefault("C2", 1.68)), + C3(turbulenceModelCoeffs_.lookupOrAddDefault("C3", -0.33)), + alphak(turbulenceModelCoeffs_.lookupOrAddDefault("alphak", 1.39)), + alphaEps + ( + turbulenceModelCoeffs_.lookupOrAddDefault("alphaEps", 1.39) + ), + alphah(turbulenceModelCoeffs_.lookupOrAddDefault("alphah", 1.0)), + eta0(turbulenceModelCoeffs_.lookupOrAddDefault("eta0", 4.38)), + beta(turbulenceModelCoeffs_.lookupOrAddDefault("beta", 0.012)), k_ ( @@ -105,6 +108,8 @@ RNGkEpsilon::RNGkEpsilon ) { # include "wallViscosityI.H" + + printCoeffs(); } @@ -164,19 +169,15 @@ bool RNGkEpsilon::read() { if (turbulenceModel::read()) { - Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.0845); - C1 = turbulenceModelCoeffs_.lookupOrDefault("C1", 1.42); - C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.68); - C3 = turbulenceModelCoeffs_.lookupOrDefault("C3", -0.33); - alphak = turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.39); - alphaEps = turbulenceModelCoeffs_.lookupOrDefault - ( - "alphaEps", - 1.39 - ); - alphah = turbulenceModelCoeffs_.lookupOrDefault("alphah", 1.0); - eta0 = turbulenceModelCoeffs_.lookupOrDefault("eta0", 4.38); - beta = turbulenceModelCoeffs_.lookupOrDefault("beta", 0.012); + turbulenceModelCoeffs_.readIfPresent("Cmu", Cmu); + turbulenceModelCoeffs_.readIfPresent("C1", C1); + turbulenceModelCoeffs_.readIfPresent("C2", C2); + turbulenceModelCoeffs_.readIfPresent("C3", C3); + turbulenceModelCoeffs_.readIfPresent("alphak", alphak); + turbulenceModelCoeffs_.readIfPresent("alphaEps", alphaEps); + turbulenceModelCoeffs_.readIfPresent("alphah", alphah); + turbulenceModelCoeffs_.readIfPresent("eta0", eta0); + turbulenceModelCoeffs_.readIfPresent("beta", beta); return true; } diff --git a/src/turbulenceModels/compressible/RNGkEpsilon/RNGkEpsilon.H b/src/turbulenceModels/compressible/RNGkEpsilon/RNGkEpsilon.H index 4f321579ee..f3e5c31c9f 100644 --- a/src/turbulenceModels/compressible/RNGkEpsilon/RNGkEpsilon.H +++ b/src/turbulenceModels/compressible/RNGkEpsilon/RNGkEpsilon.H @@ -58,15 +58,15 @@ class RNGkEpsilon { // 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()) ); diff --git a/src/turbulenceModels/compressible/SpalartAllmaras/SpalartAllmaras.C b/src/turbulenceModels/compressible/SpalartAllmaras/SpalartAllmaras.C index 265191af0a..802a63c8c9 100644 --- a/src/turbulenceModels/compressible/SpalartAllmaras/SpalartAllmaras.C +++ b/src/turbulenceModels/compressible/SpalartAllmaras/SpalartAllmaras.C @@ -115,16 +115,19 @@ SpalartAllmaras::SpalartAllmaras : turbulenceModel(typeName, rho, U, phi, thermophysicalModel), - alphaNut(turbulenceModelCoeffs_.lookupOrDefault("alphaNut", 1.5)), - alphah(turbulenceModelCoeffs_.lookupOrDefault("alphah", 1.0)), + alphaNut + ( + turbulenceModelCoeffs_.lookupOrAddDefault("alphaNut", 1.5) + ), + alphah(turbulenceModelCoeffs_.lookupOrAddDefault("alphah", 1.0)), - Cb1(turbulenceModelCoeffs_.lookupOrDefault("Cb1", 0.1355)), - Cb2(turbulenceModelCoeffs_.lookupOrDefault("Cb2", 0.622)), + Cb1(turbulenceModelCoeffs_.lookupOrAddDefault("Cb1", 0.1355)), + Cb2(turbulenceModelCoeffs_.lookupOrAddDefault("Cb2", 0.622)), Cw1(Cb1/sqr(kappa_) + alphaNut*(1.0 + Cb2)), - Cw2(turbulenceModelCoeffs_.lookupOrDefault("Cw2", 0.3)), - Cw3(turbulenceModelCoeffs_.lookupOrDefault("Cw3", 2.0)), - Cv1(turbulenceModelCoeffs_.lookupOrDefault("Cv1", 7.1)), - Cv2(turbulenceModelCoeffs_.lookupOrDefault("Cv2", 5.0)), + Cw2(turbulenceModelCoeffs_.lookupOrAddDefault("Cw2", 0.3)), + Cw3(turbulenceModelCoeffs_.lookupOrAddDefault("Cw3", 2.0)), + Cv1(turbulenceModelCoeffs_.lookupOrAddDefault("Cv1", 7.1)), + Cv2(turbulenceModelCoeffs_.lookupOrAddDefault("Cv2", 5.0)), nuTilda_ ( @@ -153,7 +156,9 @@ SpalartAllmaras::SpalartAllmaras ), d_(mesh_) -{} +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -214,20 +219,16 @@ bool SpalartAllmaras::read() { if (turbulenceModel::read()) { - alphaNut = turbulenceModelCoeffs_.lookupOrDefault - ( - "alphaNut", - 1.5 - ); - alphah = turbulenceModelCoeffs_.lookupOrDefault("alphah", 1.0); + turbulenceModelCoeffs_.readIfPresent("alphaNut", alphaNut); + turbulenceModelCoeffs_.readIfPresent("alphah", alphah); - Cb1 = turbulenceModelCoeffs_.lookupOrDefault("Cb1", 0.1355); - Cb2 = turbulenceModelCoeffs_.lookupOrDefault("Cb2", 0.622); + turbulenceModelCoeffs_.readIfPresent("Cb1", Cb1); + turbulenceModelCoeffs_.readIfPresent("Cb2", Cb2); Cw1 = Cb1/sqr(kappa_) + alphaNut*(1.0 + Cb2); - Cw2 = turbulenceModelCoeffs_.lookupOrDefault("Cw2", 0.3); - Cw3 = turbulenceModelCoeffs_.lookupOrDefault("Cw3", 2.0); - Cv1 = turbulenceModelCoeffs_.lookupOrDefault("Cv1", 7.1); - Cv2 = turbulenceModelCoeffs_.lookupOrDefault("Cv2", 5.0); + turbulenceModelCoeffs_.readIfPresent("Cw2", Cw2); + turbulenceModelCoeffs_.readIfPresent("Cw3", Cw3); + turbulenceModelCoeffs_.readIfPresent("Cv1", Cv1); + turbulenceModelCoeffs_.readIfPresent("Cv2", Cv2); return true; } diff --git a/src/turbulenceModels/compressible/SpalartAllmaras/SpalartAllmaras.H b/src/turbulenceModels/compressible/SpalartAllmaras/SpalartAllmaras.H index db0639521b..fbb1761d20 100644 --- a/src/turbulenceModels/compressible/SpalartAllmaras/SpalartAllmaras.H +++ b/src/turbulenceModels/compressible/SpalartAllmaras/SpalartAllmaras.H @@ -75,16 +75,16 @@ class SpalartAllmaras { // 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_; diff --git a/src/turbulenceModels/compressible/kEpsilon/kEpsilon.C b/src/turbulenceModels/compressible/kEpsilon/kEpsilon.C index 02e863550c..e77192b006 100644 --- a/src/turbulenceModels/compressible/kEpsilon/kEpsilon.C +++ b/src/turbulenceModels/compressible/kEpsilon/kEpsilon.C @@ -54,16 +54,16 @@ kEpsilon::kEpsilon : turbulenceModel(typeName, rho, U, phi, thermophysicalModel), - Cmu(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09)), - C1(turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44)), - C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92)), - C3(turbulenceModelCoeffs_.lookupOrDefault("C3", -0.33)), - alphak(turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.0)), + Cmu(turbulenceModelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), + C1(turbulenceModelCoeffs_.lookupOrAddDefault("C1", 1.44)), + C2(turbulenceModelCoeffs_.lookupOrAddDefault("C2", 1.92)), + C3(turbulenceModelCoeffs_.lookupOrAddDefault("C3", -0.33)), + alphak(turbulenceModelCoeffs_.lookupOrAddDefault("alphak", 1.0)), alphaEps ( - turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 0.76923) + turbulenceModelCoeffs_.lookupOrAddDefault("alphaEps", 0.76923) ), - alphah(turbulenceModelCoeffs_.lookupOrDefault("alphah", 1.0)), + alphah(turbulenceModelCoeffs_.lookupOrAddDefault("alphah", 1.0)), k_ ( @@ -105,6 +105,8 @@ kEpsilon::kEpsilon ) { # include "wallViscosityI.H" + + printCoeffs(); } @@ -165,17 +167,13 @@ bool kEpsilon::read() { if (turbulenceModel::read()) { - Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09); - C1 = turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44); - C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92); - C3 = turbulenceModelCoeffs_.lookupOrDefault("C3", -0.33); - alphak = turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.0); - alphaEps = turbulenceModelCoeffs_.lookupOrDefault - ( - "alphaEps", - 0.76923 - ); - alphah = turbulenceModelCoeffs_.lookupOrDefault("alphah", 1.0); + turbulenceModelCoeffs_.readIfPresent("Cmu", Cmu); + turbulenceModelCoeffs_.readIfPresent("C1", C1); + turbulenceModelCoeffs_.readIfPresent("C2", C2); + turbulenceModelCoeffs_.readIfPresent("C3", C3); + turbulenceModelCoeffs_.readIfPresent("alphak", alphak); + turbulenceModelCoeffs_.readIfPresent("alphaEps", alphaEps); + turbulenceModelCoeffs_.readIfPresent("alphah", alphah); return true; } diff --git a/src/turbulenceModels/compressible/kEpsilon/kEpsilon.H b/src/turbulenceModels/compressible/kEpsilon/kEpsilon.H index 926539f9ed..f88830349a 100644 --- a/src/turbulenceModels/compressible/kEpsilon/kEpsilon.H +++ b/src/turbulenceModels/compressible/kEpsilon/kEpsilon.H @@ -58,17 +58,21 @@ class kEpsilon { // 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()) ); diff --git a/src/turbulenceModels/compressible/kOmegaSST/kOmegaSST.C b/src/turbulenceModels/compressible/kOmegaSST/kOmegaSST.C index 8592f98003..b9b511d839 100644 --- a/src/turbulenceModels/compressible/kOmegaSST/kOmegaSST.C +++ b/src/turbulenceModels/compressible/kOmegaSST/kOmegaSST.C @@ -99,30 +99,30 @@ kOmegaSST::kOmegaSST alphaK1 ( - turbulenceModelCoeffs_.lookupOrDefault("alphaK1", 0.85034) + turbulenceModelCoeffs_.lookupOrAddDefault("alphaK1", 0.85034) ), - alphaK2(turbulenceModelCoeffs_.lookupOrDefault("alphaK2", 1.0)), + alphaK2(turbulenceModelCoeffs_.lookupOrAddDefault("alphaK2", 1.0)), alphaOmega1 ( - turbulenceModelCoeffs_.lookupOrDefault("alphaOmega1", 0.5) + turbulenceModelCoeffs_.lookupOrAddDefault("alphaOmega1", 0.5) ), alphaOmega2 ( - turbulenceModelCoeffs_.lookupOrDefault("alphaOmega2", 0.85616) + turbulenceModelCoeffs_.lookupOrAddDefault("alphaOmega2", 0.85616) ), - alphah(turbulenceModelCoeffs_.lookupOrDefault("alphah", 1.0)), - gamma1(turbulenceModelCoeffs_.lookupOrDefault("gamma1", 0.5532)), - gamma2(turbulenceModelCoeffs_.lookupOrDefault("gamma2", 0.4403)), - beta1(turbulenceModelCoeffs_.lookupOrDefault("beta1", 0.075)), - beta2(turbulenceModelCoeffs_.lookupOrDefault("beta2", 0.0828)), - betaStar(turbulenceModelCoeffs_.lookupOrDefault("betaStar", 0.09)), - a1(turbulenceModelCoeffs_.lookupOrDefault("a1", 0.31)), - c1(turbulenceModelCoeffs_.lookupOrDefault("c1", 10.0)), + alphah(turbulenceModelCoeffs_.lookupOrAddDefault("alphah", 1.0)), + gamma1(turbulenceModelCoeffs_.lookupOrAddDefault("gamma1", 0.5532)), + gamma2(turbulenceModelCoeffs_.lookupOrAddDefault("gamma2", 0.4403)), + beta1(turbulenceModelCoeffs_.lookupOrAddDefault("beta1", 0.075)), + beta2(turbulenceModelCoeffs_.lookupOrAddDefault("beta2", 0.0828)), + betaStar(turbulenceModelCoeffs_.lookupOrAddDefault("betaStar", 0.09)), + a1(turbulenceModelCoeffs_.lookupOrAddDefault("a1", 0.31)), + c1(turbulenceModelCoeffs_.lookupOrAddDefault("c1", 10.0)), omega0_("omega0", dimless/dimTime, SMALL), omegaSmall_("omegaSmall", dimless/dimTime, SMALL), - Cmu(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09)), + Cmu(turbulenceModelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), y_(mesh_), @@ -166,6 +166,8 @@ kOmegaSST::kOmegaSST ) { # include "kOmegaWallViscosityI.H" + + printCoeffs(); } @@ -225,43 +227,27 @@ bool kOmegaSST::read() { if (turbulenceModel::read()) { - alphaK1 = turbulenceModelCoeffs_.lookupOrDefault - ( - "alphaK1", - 0.85034 - ); - alphaK2 = turbulenceModelCoeffs_.lookupOrDefault("alphaK2", 1.0); - alphaOmega1 = turbulenceModelCoeffs_.lookupOrDefault - ( - "alphaOmega1", - 0.5 - ); - alphaOmega2 = turbulenceModelCoeffs_.lookupOrDefault - ( - "alphaOmega2", - 0.85616 - ); - alphah = turbulenceModelCoeffs_.lookupOrDefault("alphah", 1.0); - gamma1 = turbulenceModelCoeffs_.lookupOrDefault - ( - "gamma1", - 0.5532 - ); - gamma2 = turbulenceModelCoeffs_.lookupOrDefault - ( - "gamma2", - 0.4403 - ); - beta1 = turbulenceModelCoeffs_.lookupOrDefault("beta1", 0.075); - beta2 = turbulenceModelCoeffs_.lookupOrDefault("beta2", 0.0828); - betaStar = turbulenceModelCoeffs_.lookupOrDefault - ( - "betaStar", - 0.09 - ); - a1 = turbulenceModelCoeffs_.lookupOrDefault("a1", 0.31); - c1 = turbulenceModelCoeffs_.lookupOrDefault("c1", 10.0); - Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09); + turbulenceModelCoeffs_.readIfPresent("alphaK1", alphaK1); + turbulenceModelCoeffs_.readIfPresent("alphaK2", alphaK2); + turbulenceModelCoeffs_.readIfPresent + ( + "alphaOmega1", + alphaOmega1 + ); + turbulenceModelCoeffs_.readIfPresent + ( + "alphaOmega2", + alphaOmega2 + ); + turbulenceModelCoeffs_.readIfPresent("alphah", alphah); + turbulenceModelCoeffs_.readIfPresent("gamma1", gamma1); + turbulenceModelCoeffs_.readIfPresent("gamma2", gamma2); + turbulenceModelCoeffs_.readIfPresent("beta1", beta1); + turbulenceModelCoeffs_.readIfPresent("beta2", beta2); + turbulenceModelCoeffs_.readIfPresent("betaStar", betaStar); + turbulenceModelCoeffs_.readIfPresent("a1", a1); + turbulenceModelCoeffs_.readIfPresent("c1", c1); + turbulenceModelCoeffs_.readIfPresent("Cmu", Cmu); return true; } diff --git a/src/turbulenceModels/compressible/kOmegaSST/kOmegaSST.H b/src/turbulenceModels/compressible/kOmegaSST/kOmegaSST.H index 070d9df5dc..b0a4905fa0 100644 --- a/src/turbulenceModels/compressible/kOmegaSST/kOmegaSST.H +++ b/src/turbulenceModels/compressible/kOmegaSST/kOmegaSST.H @@ -85,29 +85,29 @@ class kOmegaSST { // 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_; diff --git a/src/turbulenceModels/compressible/kOmegaSST/kOmegaWallFunctionsI.H b/src/turbulenceModels/compressible/kOmegaSST/kOmegaWallFunctionsI.H index 7044139788..c6c2574337 100644 --- a/src/turbulenceModels/compressible/kOmegaSST/kOmegaWallFunctionsI.H +++ b/src/turbulenceModels/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/compressible/kOmegaSST/kOmegaWallViscosityI.H index 5b49f68a33..1e454d41d5 100644 --- a/src/turbulenceModels/compressible/kOmegaSST/kOmegaWallViscosityI.H +++ b/src/turbulenceModels/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/realizableKE/realizableKE.C b/src/turbulenceModels/compressible/realizableKE/realizableKE.C index 85ebd9a583..e330ca3c21 100644 --- a/src/turbulenceModels/compressible/realizableKE/realizableKE.C +++ b/src/turbulenceModels/compressible/realizableKE/realizableKE.C @@ -95,15 +95,15 @@ realizableKE::realizableKE : turbulenceModel(typeName, rho, U, phi, thermophysicalModel), - Cmu(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09)), - A0(turbulenceModelCoeffs_.lookupOrDefault("A0", 4.0)), - C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.9)), - alphak(turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.0)), + Cmu(turbulenceModelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), + A0(turbulenceModelCoeffs_.lookupOrAddDefault("A0", 4.0)), + C2(turbulenceModelCoeffs_.lookupOrAddDefault("C2", 1.9)), + alphak(turbulenceModelCoeffs_.lookupOrAddDefault("alphak", 1.0)), alphaEps ( - turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 0.833333) + turbulenceModelCoeffs_.lookupOrAddDefault("alphaEps", 0.833333) ), - alphah(turbulenceModelCoeffs_.lookupOrDefault("alphah", 1.0)), + alphah(turbulenceModelCoeffs_.lookupOrAddDefault("alphah", 1.0)), k_ ( @@ -147,6 +147,8 @@ realizableKE::realizableKE bound(k_, k0_); bound(epsilon_, epsilon0_); # include "wallViscosityI.H" + + printCoeffs(); } @@ -206,16 +208,12 @@ bool realizableKE::read() { if (turbulenceModel::read()) { - Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09); - A0 = turbulenceModelCoeffs_.lookupOrDefault("A0", 4.0); - C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.9); - alphak = turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.0); - alphaEps = turbulenceModelCoeffs_.lookupOrDefault - ( - "alphaEps", - 0.833333 - ); - alphah = turbulenceModelCoeffs_.lookupOrDefault("alphah", 1.0); + turbulenceModelCoeffs_.readIfPresent("Cmu", Cmu); + turbulenceModelCoeffs_.readIfPresent("A0", A0); + turbulenceModelCoeffs_.readIfPresent("C2", C2); + turbulenceModelCoeffs_.readIfPresent("alphak", alphak); + turbulenceModelCoeffs_.readIfPresent("alphaEps", alphaEps); + turbulenceModelCoeffs_.readIfPresent("alphah", alphah); return true; } diff --git a/src/turbulenceModels/compressible/realizableKE/realizableKE.H b/src/turbulenceModels/compressible/realizableKE/realizableKE.H index ce38735214..73e64b2bb4 100644 --- a/src/turbulenceModels/compressible/realizableKE/realizableKE.H +++ b/src/turbulenceModels/compressible/realizableKE/realizableKE.H @@ -68,12 +68,12 @@ class realizableKE { // 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_; diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C index 40ae474c06..dcf8a25d93 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C +++ b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C @@ -41,6 +41,14 @@ namespace compressible defineTypeNameAndDebug(turbulenceModel, 0); defineRunTimeSelectionTable(turbulenceModel, dictionary); +// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // + +void turbulenceModel::printCoeffs() +{ + Info<< turbulenceModelCoeffs_; +} + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // turbulenceModel::turbulenceModel diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H index 4a757e152a..715f975548 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H +++ b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H @@ -103,6 +103,11 @@ protected: nearWallDist y_; + // Protected member functions + + //- Print model coefficients + virtual void printCoeffs(); + //- Return the laminar thermal conductivity const volScalarField& alpha() const { diff --git a/src/turbulenceModels/compressible/wallFunctions/wallFunctionsI.H b/src/turbulenceModels/compressible/wallFunctions/wallFunctionsI.H index abdfa559fc..00c5fea678 100644 --- a/src/turbulenceModels/compressible/wallFunctions/wallFunctionsI.H +++ b/src/turbulenceModels/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(); diff --git a/src/turbulenceModels/compressible/wallFunctions/wallViscosityI.H b/src/turbulenceModels/compressible/wallFunctions/wallViscosityI.H index bacc50e92c..8103b850b5 100644 --- a/src/turbulenceModels/compressible/wallFunctions/wallViscosityI.H +++ b/src/turbulenceModels/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(); @@ -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/incompressible/LRR/LRR.C b/src/turbulenceModels/incompressible/LRR/LRR.C index b672516b1f..ac1fa841b1 100644 --- a/src/turbulenceModels/incompressible/LRR/LRR.C +++ b/src/turbulenceModels/incompressible/LRR/LRR.C @@ -52,20 +52,20 @@ LRR::LRR : turbulenceModel(typeName, U, phi, lamTransportModel), - Cmu(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09)), - Clrr1(turbulenceModelCoeffs_.lookupOrDefault("Clrr1", 1.8)), - Clrr2(turbulenceModelCoeffs_.lookupOrDefault("Clrr2", 0.6)), - C1(turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44)), - C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92)), - Cs(turbulenceModelCoeffs_.lookupOrDefault("Cs", 0.25)), - Ceps(turbulenceModelCoeffs_.lookupOrDefault("Ceps", 0.15)), + Cmu(turbulenceModelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), + Clrr1(turbulenceModelCoeffs_.lookupOrAddDefault("Clrr1", 1.8)), + Clrr2(turbulenceModelCoeffs_.lookupOrAddDefault("Clrr2", 0.6)), + C1(turbulenceModelCoeffs_.lookupOrAddDefault("C1", 1.44)), + C2(turbulenceModelCoeffs_.lookupOrAddDefault("C2", 1.92)), + Cs(turbulenceModelCoeffs_.lookupOrAddDefault("Cs", 0.25)), + Ceps(turbulenceModelCoeffs_.lookupOrAddDefault("Ceps", 0.15)), alphaEps ( - turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 0.76923) + turbulenceModelCoeffs_.lookupOrAddDefault("alphaEps", 0.76923) ), couplingFactor_ ( - turbulenceModelCoeffs_.lookupOrDefault("couplingFactor", 0.0) + turbulenceModelCoeffs_.lookupOrAddDefault("couplingFactor", 0.0) ), R_ @@ -122,6 +122,8 @@ LRR::LRR << " is not in range 0 - 1" << nl << exit(FatalError); } + + printCoeffs(); } @@ -174,24 +176,20 @@ bool LRR::read() { if (turbulenceModel::read()) { - Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09); - Clrr1 = turbulenceModelCoeffs_.lookupOrDefault("Clrr1", 1.8); - Clrr2 = turbulenceModelCoeffs_.lookupOrDefault("Clrr2", 0.6); - C1 = turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44); - C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92); - Cs = turbulenceModelCoeffs_.lookupOrDefault("Cs", 0.25); - Ceps = turbulenceModelCoeffs_.lookupOrDefault("Ceps", 0.15); - alphaEps = turbulenceModelCoeffs_.lookupOrDefault - ( - "alphaEps", - 0.76923 - ); + turbulenceModelCoeffs_.readIfPresent("Cmu", Cmu); + turbulenceModelCoeffs_.readIfPresent("Clrr1", Clrr1); + turbulenceModelCoeffs_.readIfPresent("Clrr2", Clrr2); + turbulenceModelCoeffs_.readIfPresent("C1", C1); + turbulenceModelCoeffs_.readIfPresent("C2", C2); + turbulenceModelCoeffs_.readIfPresent("Cs", Cs); + turbulenceModelCoeffs_.readIfPresent("Ceps", Ceps); + turbulenceModelCoeffs_.readIfPresent("alphaEps", alphaEps); - couplingFactor_ = turbulenceModelCoeffs_.lookupOrDefault - ( - "couplingFactor", - 0.0 - ); + turbulenceModelCoeffs_.readIfPresent + ( + "couplingFactor", + couplingFactor_ + ); if (couplingFactor_ < 0.0 || couplingFactor_ > 1.0) { diff --git a/src/turbulenceModels/incompressible/LRR/LRR.H b/src/turbulenceModels/incompressible/LRR/LRR.H index 04cec06c38..bcc6c119d5 100644 --- a/src/turbulenceModels/incompressible/LRR/LRR.H +++ b/src/turbulenceModels/incompressible/LRR/LRR.H @@ -56,16 +56,16 @@ class LRR { // 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_; diff --git a/src/turbulenceModels/incompressible/LamBremhorstKE/LamBremhorstKE.C b/src/turbulenceModels/incompressible/LamBremhorstKE/LamBremhorstKE.C index d89072281f..02921cc661 100644 --- a/src/turbulenceModels/incompressible/LamBremhorstKE/LamBremhorstKE.C +++ b/src/turbulenceModels/incompressible/LamBremhorstKE/LamBremhorstKE.C @@ -51,12 +51,12 @@ LamBremhorstKE::LamBremhorstKE : turbulenceModel(typeName, U, phi, lamTransportModel), - Cmu(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09)), - C1(turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44)), - C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92)), + Cmu(turbulenceModelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), + C1(turbulenceModelCoeffs_.lookupOrAddDefault("C1", 1.44)), + C2(turbulenceModelCoeffs_.lookupOrAddDefault("C2", 1.92)), alphaEps ( - turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 0.76923) + turbulenceModelCoeffs_.lookupOrAddDefault("alphaEps", 0.76923) ), k_ @@ -96,7 +96,9 @@ LamBremhorstKE::LamBremhorstKE ), nut_(Cmu*fMu_*sqr(k_)/(epsilon_ + epsilonSmall_)) -{} +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -156,14 +158,10 @@ bool LamBremhorstKE::read() { if (turbulenceModel::read()) { - Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09); - C1 = turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44); - C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92); - alphaEps = turbulenceModelCoeffs_.lookupOrDefault - ( - "alphaEps", - 0.76923 - ); + turbulenceModelCoeffs_.readIfPresent("Cmu", Cmu); + turbulenceModelCoeffs_.readIfPresent("C1", C1); + turbulenceModelCoeffs_.readIfPresent("C2", C2); + turbulenceModelCoeffs_.readIfPresent("alphaEps", alphaEps); return true; } diff --git a/src/turbulenceModels/incompressible/LamBremhorstKE/LamBremhorstKE.H b/src/turbulenceModels/incompressible/LamBremhorstKE/LamBremhorstKE.H index e791c01538..b78998d6ce 100644 --- a/src/turbulenceModels/incompressible/LamBremhorstKE/LamBremhorstKE.H +++ b/src/turbulenceModels/incompressible/LamBremhorstKE/LamBremhorstKE.H @@ -57,10 +57,10 @@ class LamBremhorstKE { // Private data - dimensionedScalar Cmu; - dimensionedScalar C1; - dimensionedScalar C2; - dimensionedScalar alphaEps; + scalar Cmu; + scalar C1; + scalar C2; + scalar alphaEps; 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", nut_ + nu()) ); @@ -115,7 +115,7 @@ public: //- Return the effective diffusivity for epsilon tmp DepsilonEff() const { - return tmp + return tmp ( new volScalarField("DepsilonEff", alphaEps*nut_ + nu()) ); diff --git a/src/turbulenceModels/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C b/src/turbulenceModels/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C index 27a16dc4c8..3aaaa93f9e 100644 --- a/src/turbulenceModels/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C +++ b/src/turbulenceModels/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C @@ -52,23 +52,23 @@ LaunderGibsonRSTM::LaunderGibsonRSTM : turbulenceModel(typeName, U, phi, lamTransportModel), - Cmu(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09)), - Clg1(turbulenceModelCoeffs_.lookupOrDefault("Clg1", 1.8)), - Clg2(turbulenceModelCoeffs_.lookupOrDefault("Clg2", 0.6)), - C1(turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44)), - C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92)), - Cs(turbulenceModelCoeffs_.lookupOrDefault("Cs", 0.25)), - Ceps(turbulenceModelCoeffs_.lookupOrDefault("Ceps", 0.15)), - alphaR(turbulenceModelCoeffs_.lookupOrDefault("alphaR", 1.22)), + Cmu(turbulenceModelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), + Clg1(turbulenceModelCoeffs_.lookupOrAddDefault("Clg1", 1.8)), + Clg2(turbulenceModelCoeffs_.lookupOrAddDefault("Clg2", 0.6)), + C1(turbulenceModelCoeffs_.lookupOrAddDefault("C1", 1.44)), + C2(turbulenceModelCoeffs_.lookupOrAddDefault("C2", 1.92)), + Cs(turbulenceModelCoeffs_.lookupOrAddDefault("Cs", 0.25)), + Ceps(turbulenceModelCoeffs_.lookupOrAddDefault("Ceps", 0.15)), + alphaR(turbulenceModelCoeffs_.lookupOrAddDefault("alphaR", 1.22)), alphaEps ( - turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 0.76923) + turbulenceModelCoeffs_.lookupOrAddDefault("alphaEps", 0.76923) ), - C1Ref(turbulenceModelCoeffs_.lookupOrDefault("C1Ref", 0.5)), - C2Ref(turbulenceModelCoeffs_.lookupOrDefault("C2Ref", 0.3)), + C1Ref(turbulenceModelCoeffs_.lookupOrAddDefault("C1Ref", 0.5)), + C2Ref(turbulenceModelCoeffs_.lookupOrAddDefault("C2Ref", 0.3)), couplingFactor_ ( - turbulenceModelCoeffs_.lookupOrDefault("couplingFactor", 0.0) + turbulenceModelCoeffs_.lookupOrAddDefault("couplingFactor", 0.0) ), yr_(mesh_), @@ -127,6 +127,8 @@ LaunderGibsonRSTM::LaunderGibsonRSTM << " is not in range 0 - 1" << nl << exit(FatalError); } + + printCoeffs(); } @@ -179,27 +181,23 @@ bool LaunderGibsonRSTM::read() { if (turbulenceModel::read()) { - Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09); - Clg1 = turbulenceModelCoeffs_.lookupOrDefault("Clg1", 1.8); - Clg2 = turbulenceModelCoeffs_.lookupOrDefault("Clg2", 0.6); - C1 = turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44); - C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92); - Cs = turbulenceModelCoeffs_.lookupOrDefault("Cs", 0.25); - Ceps = turbulenceModelCoeffs_.lookupOrDefault("Ceps", 0.15); - alphaR = turbulenceModelCoeffs_.lookupOrDefault("alphaR", 1.22); - alphaEps = turbulenceModelCoeffs_.lookupOrDefault - ( - "alphaEps", - 0.76923 - ); - C1Ref = turbulenceModelCoeffs_.lookupOrDefault("C1Ref", 0.5); - C2Ref = turbulenceModelCoeffs_.lookupOrDefault("C2Ref", 0.3); + turbulenceModelCoeffs_.readIfPresent("Cmu", Cmu); + turbulenceModelCoeffs_.readIfPresent("Clg1", Clg1); + turbulenceModelCoeffs_.readIfPresent("Clg2", Clg2); + turbulenceModelCoeffs_.readIfPresent("C1", C1); + turbulenceModelCoeffs_.readIfPresent("C2", C2); + turbulenceModelCoeffs_.readIfPresent("Cs", Cs); + turbulenceModelCoeffs_.readIfPresent("Ceps", Ceps); + turbulenceModelCoeffs_.readIfPresent("alphaR", alphaR); + turbulenceModelCoeffs_.readIfPresent("alphaEps", alphaEps); + turbulenceModelCoeffs_.readIfPresent("C1Ref", C1Ref); + turbulenceModelCoeffs_.readIfPresent("C2Ref", C2Ref); - couplingFactor_ = turbulenceModelCoeffs_.lookupOrDefault - ( - "couplingFactor", - 0.0 - ); + turbulenceModelCoeffs_.readIfPresent + ( + "couplingFactor", + couplingFactor_ + ); if (couplingFactor_ < 0.0 || couplingFactor_ > 1.0) { diff --git a/src/turbulenceModels/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H b/src/turbulenceModels/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H index fcce180317..5ca442e79e 100644 --- a/src/turbulenceModels/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H +++ b/src/turbulenceModels/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H @@ -56,20 +56,20 @@ class LaunderGibsonRSTM { // 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 +114,7 @@ public: //- Return the effective diffusivity for R tmp DREff() const { - return tmp + return tmp ( new volScalarField("DREff", alphaR*nut_ + nu()) ); @@ -123,7 +123,7 @@ public: //- Return the effective diffusivity for epsilon tmp DepsilonEff() const { - return tmp + return tmp ( new volScalarField("DepsilonEff", alphaEps*nut_ + nu()) ); diff --git a/src/turbulenceModels/incompressible/LaunderSharmaKE/LaunderSharmaKE.C b/src/turbulenceModels/incompressible/LaunderSharmaKE/LaunderSharmaKE.C index 015e92a031..2608339864 100644 --- a/src/turbulenceModels/incompressible/LaunderSharmaKE/LaunderSharmaKE.C +++ b/src/turbulenceModels/incompressible/LaunderSharmaKE/LaunderSharmaKE.C @@ -66,12 +66,12 @@ LaunderSharmaKE::LaunderSharmaKE : turbulenceModel(typeName, U, phi, lamTransportModel), - Cmu(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09)), - C1(turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44)), - C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92)), + Cmu(turbulenceModelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), + C1(turbulenceModelCoeffs_.lookupOrAddDefault("C1", 1.44)), + C2(turbulenceModelCoeffs_.lookupOrAddDefault("C2", 1.92)), alphaEps ( - turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 0.76923) + turbulenceModelCoeffs_.lookupOrAddDefault("alphaEps", 0.76923) ), k_ @@ -101,7 +101,9 @@ LaunderSharmaKE::LaunderSharmaKE ), nut_(Cmu*fMu()*sqr(k_)/(epsilonTilda_ + epsilonSmall_)) -{} +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -161,14 +163,10 @@ bool LaunderSharmaKE::read() { if (turbulenceModel::read()) { - Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09); - C1 = turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44); - C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92); - alphaEps = turbulenceModelCoeffs_.lookupOrDefault - ( - "alphaEps", - 0.76923 - ); + turbulenceModelCoeffs_.readIfPresent("Cmu", Cmu); + turbulenceModelCoeffs_.readIfPresent("C1", C1); + turbulenceModelCoeffs_.readIfPresent("C2", C2); + turbulenceModelCoeffs_.readIfPresent("alphaEps", alphaEps); return true; } diff --git a/src/turbulenceModels/incompressible/LaunderSharmaKE/LaunderSharmaKE.H b/src/turbulenceModels/incompressible/LaunderSharmaKE/LaunderSharmaKE.H index 34a03c4027..f83fa6fdac 100644 --- a/src/turbulenceModels/incompressible/LaunderSharmaKE/LaunderSharmaKE.H +++ b/src/turbulenceModels/incompressible/LaunderSharmaKE/LaunderSharmaKE.H @@ -56,10 +56,10 @@ class LaunderSharmaKE { // Private data - dimensionedScalar Cmu; - dimensionedScalar C1; - dimensionedScalar C2; - dimensionedScalar alphaEps; + scalar Cmu; + scalar C1; + scalar C2; + scalar alphaEps; volScalarField k_; volScalarField epsilonTilda_; @@ -106,7 +106,7 @@ public: //- Return the effective diffusivity for k tmp DkEff() const { - return tmp + return tmp ( new volScalarField("DkEff", nut_ + nu()) ); @@ -115,7 +115,7 @@ public: //- Return the effective diffusivity for epsilon tmp DepsilonEff() const { - return tmp + return tmp ( new volScalarField("DepsilonEff", alphaEps*nut_ + nu()) ); diff --git a/src/turbulenceModels/incompressible/LienCubicKE/LienCubicKE.C b/src/turbulenceModels/incompressible/LienCubicKE/LienCubicKE.C index 7de1b1d374..4390541ffd 100644 --- a/src/turbulenceModels/incompressible/LienCubicKE/LienCubicKE.C +++ b/src/turbulenceModels/incompressible/LienCubicKE/LienCubicKE.C @@ -52,19 +52,19 @@ LienCubicKE::LienCubicKE : turbulenceModel(typeName, U, phi, lamTransportModel), - C1(turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44)), - C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92)), - alphak(turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.0)), + C1(turbulenceModelCoeffs_.lookupOrAddDefault("C1", 1.44)), + C2(turbulenceModelCoeffs_.lookupOrAddDefault("C2", 1.92)), + alphak(turbulenceModelCoeffs_.lookupOrAddDefault("alphak", 1.0)), alphaEps ( - turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 0.76923) + turbulenceModelCoeffs_.lookupOrAddDefault("alphaEps", 0.76923) ), - A1(turbulenceModelCoeffs_.lookupOrDefault("A1", 1.25)), - A2(turbulenceModelCoeffs_.lookupOrDefault("A2", 1000.0)), - Ctau1(turbulenceModelCoeffs_.lookupOrDefault("Ctau1", -4.0)), - Ctau2(turbulenceModelCoeffs_.lookupOrDefault("Ctau2", 13.0)), - Ctau3(turbulenceModelCoeffs_.lookupOrDefault("Ctau3", -2.0)), - alphaKsi(turbulenceModelCoeffs_.lookupOrDefault("alphaKsi", 0.9)), + A1(turbulenceModelCoeffs_.lookupOrAddDefault("A1", 1.25)), + A2(turbulenceModelCoeffs_.lookupOrAddDefault("A2", 1000.0)), + Ctau1(turbulenceModelCoeffs_.lookupOrAddDefault("Ctau1", -4.0)), + Ctau2(turbulenceModelCoeffs_.lookupOrAddDefault("Ctau2", 13.0)), + Ctau3(turbulenceModelCoeffs_.lookupOrAddDefault("Ctau3", -2.0)), + alphaKsi(turbulenceModelCoeffs_.lookupOrAddDefault("alphaKsi", 0.9)), k_ ( @@ -137,6 +137,8 @@ LienCubicKE::LienCubicKE ) { # include "wallNonlinearViscosityI.H" + + printCoeffs(); } @@ -198,24 +200,16 @@ bool LienCubicKE::read() { if (turbulenceModel::read()) { - C1 = turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44); - C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92); - alphak = turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.0); - alphaEps = turbulenceModelCoeffs_.lookupOrDefault - ( - "alphaEps", - 0.76923 - ); - A1 = turbulenceModelCoeffs_.lookupOrDefault("A1", 1.25); - A2 = turbulenceModelCoeffs_.lookupOrDefault("A2", 1000.0); - Ctau1 = turbulenceModelCoeffs_.lookupOrDefault("Ctau1", -4.0); - Ctau2 = turbulenceModelCoeffs_.lookupOrDefault("Ctau2", 13.0); - Ctau3 = turbulenceModelCoeffs_.lookupOrDefault("Ctau3", -2.0); - alphaKsi = turbulenceModelCoeffs_.lookupOrDefault - ( - "alphaKsi", - 0.9 - ); + turbulenceModelCoeffs_.readIfPresent("C1", C1); + turbulenceModelCoeffs_.readIfPresent("C2", C2); + turbulenceModelCoeffs_.readIfPresent("alphak", alphak); + turbulenceModelCoeffs_.readIfPresent("alphaEps", alphaEps); + turbulenceModelCoeffs_.readIfPresent("A1", A1); + turbulenceModelCoeffs_.readIfPresent("A2", A2); + turbulenceModelCoeffs_.readIfPresent("Ctau1", Ctau1); + turbulenceModelCoeffs_.readIfPresent("Ctau2", Ctau2); + turbulenceModelCoeffs_.readIfPresent("Ctau3", Ctau3); + turbulenceModelCoeffs_.readIfPresent("alphaKsi", alphaKsi); return true; } diff --git a/src/turbulenceModels/incompressible/LienCubicKE/LienCubicKE.H b/src/turbulenceModels/incompressible/LienCubicKE/LienCubicKE.H index 59429c0bd1..cdcfe24a27 100644 --- a/src/turbulenceModels/incompressible/LienCubicKE/LienCubicKE.H +++ b/src/turbulenceModels/incompressible/LienCubicKE/LienCubicKE.H @@ -55,16 +55,16 @@ class LienCubicKE { // 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 +114,7 @@ public: //- Return the effective diffusivity for k tmp DkEff() const { - return tmp + return tmp ( new volScalarField("DkEff", alphak*nut_ + nu()) ); @@ -123,7 +123,7 @@ public: //- Return the effective diffusivity for epsilon tmp DepsilonEff() const { - return tmp + return tmp ( new volScalarField("DepsilonEff", alphaEps*nut_ + nu()) ); diff --git a/src/turbulenceModels/incompressible/LienCubicKELowRe/LienCubicKELowRe.C b/src/turbulenceModels/incompressible/LienCubicKELowRe/LienCubicKELowRe.C index 2138565629..662de4fd48 100644 --- a/src/turbulenceModels/incompressible/LienCubicKELowRe/LienCubicKELowRe.C +++ b/src/turbulenceModels/incompressible/LienCubicKELowRe/LienCubicKELowRe.C @@ -52,23 +52,26 @@ LienCubicKELowRe::LienCubicKELowRe : turbulenceModel(typeName, U, phi, lamTransportModel), - C1(turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44)), - C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92)), - alphak(turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.0)), + C1(turbulenceModelCoeffs_.lookupOrAddDefault("C1", 1.44)), + C2(turbulenceModelCoeffs_.lookupOrAddDefault("C2", 1.92)), + alphak(turbulenceModelCoeffs_.lookupOrAddDefault("alphak", 1.0)), alphaEps ( - turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 0.76923) + turbulenceModelCoeffs_.lookupOrAddDefault("alphaEps", 0.76923) ), - A1(turbulenceModelCoeffs_.lookupOrDefault("A1", 1.25)), - A2(turbulenceModelCoeffs_.lookupOrDefault("A2", 1000.0)), - Ctau1(turbulenceModelCoeffs_.lookupOrDefault("Ctau1", -4.0)), - Ctau2(turbulenceModelCoeffs_.lookupOrDefault("Ctau2", 13.0)), - Ctau3(turbulenceModelCoeffs_.lookupOrDefault("Ctau3", -2.0)), - alphaKsi(turbulenceModelCoeffs_.lookupOrDefault("alphaKsi", 0.9)), - CmuWall(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09)), - Am(turbulenceModelCoeffs_.lookupOrDefault("Am", 0.016)), - Aepsilon(turbulenceModelCoeffs_.lookupOrDefault("Aepsilon", 0.263)), - Amu(turbulenceModelCoeffs_.lookupOrDefault("Amu", 0.00222)), + A1(turbulenceModelCoeffs_.lookupOrAddDefault("A1", 1.25)), + A2(turbulenceModelCoeffs_.lookupOrAddDefault("A2", 1000.0)), + Ctau1(turbulenceModelCoeffs_.lookupOrAddDefault("Ctau1", -4.0)), + Ctau2(turbulenceModelCoeffs_.lookupOrAddDefault("Ctau2", 13.0)), + Ctau3(turbulenceModelCoeffs_.lookupOrAddDefault("Ctau3", -2.0)), + alphaKsi(turbulenceModelCoeffs_.lookupOrAddDefault("alphaKsi", 0.9)), + CmuWall(turbulenceModelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), + Am(turbulenceModelCoeffs_.lookupOrAddDefault("Am", 0.016)), + Aepsilon + ( + turbulenceModelCoeffs_.lookupOrAddDefault("Aepsilon", 0.263) + ), + Amu(turbulenceModelCoeffs_.lookupOrAddDefault("Amu", 0.00222)), k_ ( @@ -162,7 +165,9 @@ LienCubicKELowRe::LienCubicKELowRe )*gradU ) ) -{} +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -223,32 +228,20 @@ bool LienCubicKELowRe::read() { if (turbulenceModel::read()) { - C1 = turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44); - C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92); - alphak = turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.0); - alphaEps = turbulenceModelCoeffs_.lookupOrDefault - ( - "alphaEps", - 0.76923 - ); - A1 = turbulenceModelCoeffs_.lookupOrDefault("A1", 1.25); - A2 = turbulenceModelCoeffs_.lookupOrDefault("A2", 1000.0); - Ctau1= turbulenceModelCoeffs_.lookupOrDefault("Ctau1", -4.0); - Ctau2= turbulenceModelCoeffs_.lookupOrDefault("Ctau2", 13.0); - Ctau3 = turbulenceModelCoeffs_.lookupOrDefault("Ctau3", -2.0); - alphaKsi = turbulenceModelCoeffs_.lookupOrDefault - ( - "alphaKsi", - 0.9 - ); - CmuWall= turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09); - Am = turbulenceModelCoeffs_.lookupOrDefault("Am", 0.016); - Aepsilon = turbulenceModelCoeffs_.lookupOrDefault - ( - "Aepsilon", - 0.263 - ); - Amu = turbulenceModelCoeffs_.lookupOrDefault("Amu", 0.00222); + turbulenceModelCoeffs_.readIfPresent("C1", C1); + turbulenceModelCoeffs_.readIfPresent("C2", C2); + turbulenceModelCoeffs_.readIfPresent("alphak", alphak); + turbulenceModelCoeffs_.readIfPresent("alphaEps", alphaEps); + turbulenceModelCoeffs_.readIfPresent("A1", A1); + turbulenceModelCoeffs_.readIfPresent("A2", A2); + turbulenceModelCoeffs_.readIfPresent("Ctau1", Ctau1); + turbulenceModelCoeffs_.readIfPresent("Ctau2", Ctau2); + turbulenceModelCoeffs_.readIfPresent("Ctau3", Ctau3); + turbulenceModelCoeffs_.readIfPresent("alphaKsi", alphaKsi); + turbulenceModelCoeffs_.readIfPresent("Cmu", CmuWall); + turbulenceModelCoeffs_.readIfPresent("Am", Am); + turbulenceModelCoeffs_.readIfPresent("Aepsilon", Aepsilon); + turbulenceModelCoeffs_.readIfPresent("Amu", Amu); return true; } diff --git a/src/turbulenceModels/incompressible/LienCubicKELowRe/LienCubicKELowRe.H b/src/turbulenceModels/incompressible/LienCubicKELowRe/LienCubicKELowRe.H index e6978eea9a..445799b428 100644 --- a/src/turbulenceModels/incompressible/LienCubicKELowRe/LienCubicKELowRe.H +++ b/src/turbulenceModels/incompressible/LienCubicKELowRe/LienCubicKELowRe.H @@ -71,22 +71,22 @@ class LienCubicKELowRe { // 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_; diff --git a/src/turbulenceModels/incompressible/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H b/src/turbulenceModels/incompressible/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H index f4b7dfc5c3..f3bb91f17e 100644 --- a/src/turbulenceModels/incompressible/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H +++ b/src/turbulenceModels/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/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.C index 7a8df3e45d..dba79ad54e 100644 --- a/src/turbulenceModels/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.C +++ b/src/turbulenceModels/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.C @@ -52,17 +52,20 @@ LienLeschzinerLowRe::LienLeschzinerLowRe : turbulenceModel(typeName, U, phi, lamTransportModel), - C1(turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44)), - C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92)), - alphak(turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.0)), + C1(turbulenceModelCoeffs_.lookupOrAddDefault("C1", 1.44)), + C2(turbulenceModelCoeffs_.lookupOrAddDefault("C2", 1.92)), + alphak(turbulenceModelCoeffs_.lookupOrAddDefault("alphak", 1.0)), alphaEps ( - turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 0.76923) + turbulenceModelCoeffs_.lookupOrAddDefault("alphaEps", 0.76923) ), - Cmu(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09)), - Am(turbulenceModelCoeffs_.lookupOrDefault("Am", 0.016)), - Aepsilon(turbulenceModelCoeffs_.lookupOrDefault("Aepsilon", 0.263)), - Amu(turbulenceModelCoeffs_.lookupOrDefault("Amu", 0.00222)), + Cmu(turbulenceModelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), + Am(turbulenceModelCoeffs_.lookupOrAddDefault("Am", 0.016)), + Aepsilon + ( + turbulenceModelCoeffs_.lookupOrAddDefault("Aepsilon", 0.263) + ), + Amu(turbulenceModelCoeffs_.lookupOrAddDefault("Amu", 0.00222)), k_ ( @@ -100,7 +103,9 @@ LienLeschzinerLowRe::LienLeschzinerLowRe /(scalar(1) - exp(-Aepsilon*yStar_) + SMALL)*sqr(k_) /(epsilon_ + epsilonSmall_) ) -{} +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -163,22 +168,14 @@ bool LienLeschzinerLowRe::read() { if (turbulenceModel::read()) { - C1 = turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44); - C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92); - alphak = turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.0); - alphaEps = turbulenceModelCoeffs_.lookupOrDefault - ( - "alphaEps", - 0.76923 - ); - Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09); - Am = turbulenceModelCoeffs_.lookupOrDefault("Am", 0.016); - Aepsilon = turbulenceModelCoeffs_.lookupOrDefault - ( - "Aepsilon", - 0.263 - ); - Amu = turbulenceModelCoeffs_.lookupOrDefault("Amu", 0.00222); + turbulenceModelCoeffs_.readIfPresent("C1", C1); + turbulenceModelCoeffs_.readIfPresent("C2", C2); + turbulenceModelCoeffs_.readIfPresent("alphak", alphak); + turbulenceModelCoeffs_.readIfPresent("alphaEps", alphaEps); + turbulenceModelCoeffs_.readIfPresent("Cmu", Cmu); + turbulenceModelCoeffs_.readIfPresent("Am", Am); + turbulenceModelCoeffs_.readIfPresent("Aepsilon", Aepsilon); + turbulenceModelCoeffs_.readIfPresent("Amu", Amu); return true; } @@ -205,7 +202,7 @@ void LienLeschzinerLowRe::correct() y_.correct(); } - scalar Cmu75 = pow(Cmu.value(), 0.75); + scalar Cmu75 = pow(Cmu, 0.75); volTensorField gradU = fvc::grad(U_); diff --git a/src/turbulenceModels/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.H b/src/turbulenceModels/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.H index 815f38e79d..f921fe6fc8 100644 --- a/src/turbulenceModels/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.H +++ b/src/turbulenceModels/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.H @@ -57,15 +57,15 @@ class LienLeschzinerLowRe { // 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 +109,7 @@ public: //- Return the effective diffusivity for k tmp DkEff() const { - return tmp + return tmp ( new volScalarField("DkEff", alphak*nut_ + nu()) ); @@ -118,7 +118,7 @@ public: //- Return the effective diffusivity for epsilon tmp DepsilonEff() const { - return tmp + return tmp ( new volScalarField("DepsilonEff", alphaEps*nut_ + nu()) ); diff --git a/src/turbulenceModels/incompressible/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H b/src/turbulenceModels/incompressible/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H index 437fa55785..cfda062b59 100644 --- a/src/turbulenceModels/incompressible/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H +++ b/src/turbulenceModels/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/NonlinearKEShih/NonlinearKEShih.C b/src/turbulenceModels/incompressible/NonlinearKEShih/NonlinearKEShih.C index 4047412037..ac432e4618 100644 --- a/src/turbulenceModels/incompressible/NonlinearKEShih/NonlinearKEShih.C +++ b/src/turbulenceModels/incompressible/NonlinearKEShih/NonlinearKEShih.C @@ -52,19 +52,22 @@ NonlinearKEShih::NonlinearKEShih : turbulenceModel(typeName, U, phi, lamTransportModel), - C1(turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44)), - C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92)), - alphak(turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.0)), + C1(turbulenceModelCoeffs_.lookupOrAddDefault("C1", 1.44)), + C2(turbulenceModelCoeffs_.lookupOrAddDefault("C2", 1.92)), + alphak(turbulenceModelCoeffs_.lookupOrAddDefault("alphak", 1.0)), alphaEps ( - turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 0.76923) + turbulenceModelCoeffs_.lookupOrAddDefault("alphaEps", 0.76923) + ), + A1(turbulenceModelCoeffs_.lookupOrAddDefault("A1", 1.25)), + A2(turbulenceModelCoeffs_.lookupOrAddDefault("A2", 1000.0)), + Ctau1(turbulenceModelCoeffs_.lookupOrAddDefault("Ctau1", -4.0)), + Ctau2(turbulenceModelCoeffs_.lookupOrAddDefault("Ctau2", 13.0)), + Ctau3(turbulenceModelCoeffs_.lookupOrAddDefault("Ctau3", -2.0)), + alphaKsi + ( + turbulenceModelCoeffs_.lookupOrAddDefault("alphaKsi", 0.9) ), - A1(turbulenceModelCoeffs_.lookupOrDefault("A1", 1.25)), - A2(turbulenceModelCoeffs_.lookupOrDefault("A2", 1000.0)), - Ctau1(turbulenceModelCoeffs_.lookupOrDefault("Ctau1", -4.0)), - Ctau2(turbulenceModelCoeffs_.lookupOrDefault("Ctau2", 13.0)), - Ctau3(turbulenceModelCoeffs_.lookupOrDefault("Ctau3", -2.0)), - alphaKsi(turbulenceModelCoeffs_.lookupOrDefault("alphaKsi", 0.9)), k_ ( @@ -119,6 +122,8 @@ NonlinearKEShih::NonlinearKEShih ) { # include "wallNonlinearViscosityI.H" + + printCoeffs(); } @@ -182,24 +187,16 @@ bool NonlinearKEShih::read() { if (turbulenceModel::read()) { - C1 = turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44); - C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92); - alphak = turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.0); - alphaEps = turbulenceModelCoeffs_.lookupOrDefault - ( - "alphaEps", - 0.76923 - ); - A1 = turbulenceModelCoeffs_.lookupOrDefault("A1", 1.25); - A2 = turbulenceModelCoeffs_.lookupOrDefault("A2", 1000.0); - Ctau1 = turbulenceModelCoeffs_.lookupOrDefault("Ctau1", -4.0); - Ctau2 = turbulenceModelCoeffs_.lookupOrDefault("Ctau2", 13.0); - Ctau3 = turbulenceModelCoeffs_.lookupOrDefault("Ctau3", -2.0); - alphaKsi = turbulenceModelCoeffs_.lookupOrDefault - ( - "alphaKsi", - 0.9 - ); + turbulenceModelCoeffs_.readIfPresent("C1", C1); + turbulenceModelCoeffs_.readIfPresent("C2", C2); + turbulenceModelCoeffs_.readIfPresent("alphak", alphak); + turbulenceModelCoeffs_.readIfPresent("alphaEps", alphaEps); + turbulenceModelCoeffs_.readIfPresent("A1", A1); + turbulenceModelCoeffs_.readIfPresent("A2", A2); + turbulenceModelCoeffs_.readIfPresent("Ctau1", Ctau1); + turbulenceModelCoeffs_.readIfPresent("Ctau2", Ctau2); + turbulenceModelCoeffs_.readIfPresent("Ctau3", Ctau3); + turbulenceModelCoeffs_.readIfPresent("alphaKsi", alphaKsi); return true; } diff --git a/src/turbulenceModels/incompressible/NonlinearKEShih/NonlinearKEShih.H b/src/turbulenceModels/incompressible/NonlinearKEShih/NonlinearKEShih.H index 82e21a1c8e..5a820e9a21 100644 --- a/src/turbulenceModels/incompressible/NonlinearKEShih/NonlinearKEShih.H +++ b/src/turbulenceModels/incompressible/NonlinearKEShih/NonlinearKEShih.H @@ -56,16 +56,16 @@ class NonlinearKEShih { // 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_; diff --git a/src/turbulenceModels/incompressible/QZeta/QZeta.C b/src/turbulenceModels/incompressible/QZeta/QZeta.C index b4428c7934..27198fef05 100644 --- a/src/turbulenceModels/incompressible/QZeta/QZeta.C +++ b/src/turbulenceModels/incompressible/QZeta/QZeta.C @@ -77,16 +77,16 @@ QZeta::QZeta : turbulenceModel(typeName, U, phi, lamTransportModel), - Cmu(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09)), - C1(turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44)), - C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92)), + Cmu(turbulenceModelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), + C1(turbulenceModelCoeffs_.lookupOrAddDefault("C1", 1.44)), + C2(turbulenceModelCoeffs_.lookupOrAddDefault("C2", 1.92)), alphaZeta ( - turbulenceModelCoeffs_.lookupOrDefault("alphaZeta", 0.76923) + turbulenceModelCoeffs_.lookupOrAddDefault("alphaZeta", 0.76923) ), Anisotropic ( - turbulenceModelCoeffs_.lookupOrDefault("anisotropic", false) + turbulenceModelCoeffs_.lookupOrAddDefault("anisotropic", false) ), k_ @@ -144,7 +144,9 @@ QZeta::QZeta ), nut_(Cmu*fMu()*sqr(k_)/(epsilon_ + epsilonSmall_)) -{} +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -204,19 +206,15 @@ bool QZeta::read() { if (turbulenceModel::read()) { - Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09); - C1 = turbulenceModelCoeffs_.lookupOrDefault("C1", 1.92); - C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.44); - alphaZeta = turbulenceModelCoeffs_.lookupOrDefault - ( - "alphaZeta", - 0.76923 - ); - Anisotropic = turbulenceModelCoeffs_.lookupOrDefault - ( - "anisotropic", - false - ); + turbulenceModelCoeffs_.readIfPresent("Cmu", Cmu); + turbulenceModelCoeffs_.readIfPresent("C1", C1); + turbulenceModelCoeffs_.readIfPresent("C2", C2); + turbulenceModelCoeffs_.readIfPresent("alphaZeta", alphaZeta); + turbulenceModelCoeffs_.readIfPresent + ( + "anisotropic", + Anisotropic + ); return true; } diff --git a/src/turbulenceModels/incompressible/QZeta/QZeta.H b/src/turbulenceModels/incompressible/QZeta/QZeta.H index 4776dfc9f0..7ad93af896 100644 --- a/src/turbulenceModels/incompressible/QZeta/QZeta.H +++ b/src/turbulenceModels/incompressible/QZeta/QZeta.H @@ -56,11 +56,11 @@ class QZeta { // 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 +110,7 @@ public: //- Return the effective diffusivity for q tmp DqEff() const { - return tmp + return tmp ( new volScalarField("DqEff", nut_ + nu()) ); @@ -119,7 +119,7 @@ public: //- Return the effective diffusivity for epsilon tmp DzetaEff() const { - return tmp + return tmp ( new volScalarField("DzetaEff", alphaZeta*nut_ + nu()) ); diff --git a/src/turbulenceModels/incompressible/RNGkEpsilon/RNGkEpsilon.C b/src/turbulenceModels/incompressible/RNGkEpsilon/RNGkEpsilon.C index cfe2d3d6b2..6da8e707cc 100644 --- a/src/turbulenceModels/incompressible/RNGkEpsilon/RNGkEpsilon.C +++ b/src/turbulenceModels/incompressible/RNGkEpsilon/RNGkEpsilon.C @@ -51,13 +51,16 @@ RNGkEpsilon::RNGkEpsilon : turbulenceModel(typeName, U, phi, lamTransportModel), - Cmu(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.0845)), - C1(turbulenceModelCoeffs_.lookupOrDefault("C1", 1.42)), - C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.68)), - alphak(turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.39)), - alphaEps(turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 1.39)), - eta0(turbulenceModelCoeffs_.lookupOrDefault("eta0", 4.38)), - beta(turbulenceModelCoeffs_.lookupOrDefault("beta", 0.012)), + Cmu(turbulenceModelCoeffs_.lookupOrAddDefault("Cmu", 0.0845)), + C1(turbulenceModelCoeffs_.lookupOrAddDefault("C1", 1.42)), + C2(turbulenceModelCoeffs_.lookupOrAddDefault("C2", 1.68)), + alphak(turbulenceModelCoeffs_.lookupOrAddDefault("alphak", 1.39)), + alphaEps + ( + turbulenceModelCoeffs_.lookupOrAddDefault("alphaEps", 1.39) + ), + eta0(turbulenceModelCoeffs_.lookupOrAddDefault("eta0", 4.38)), + beta(turbulenceModelCoeffs_.lookupOrAddDefault("beta", 0.012)), k_ ( @@ -88,6 +91,8 @@ RNGkEpsilon::RNGkEpsilon nut_(Cmu*sqr(k_)/(epsilon_ + epsilonSmall_)) { # include "wallViscosityI.H" + + printCoeffs(); } @@ -149,17 +154,13 @@ bool RNGkEpsilon::read() { if (turbulenceModel::read()) { - Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.0845); - C1 = turbulenceModelCoeffs_.lookupOrDefault("C1", 1.42); - C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.68); - alphak = turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.39); - alphaEps = turbulenceModelCoeffs_.lookupOrDefault - ( - "alphaEps", - 1.39 - ); - eta0 = turbulenceModelCoeffs_.lookupOrDefault("eta0", 4.38); - beta = turbulenceModelCoeffs_.lookupOrDefault("beta", 0.012); + turbulenceModelCoeffs_.readIfPresent("Cmu", Cmu); + turbulenceModelCoeffs_.readIfPresent("C1", C1); + turbulenceModelCoeffs_.readIfPresent("C2", C2); + turbulenceModelCoeffs_.readIfPresent("alphak", alphak); + turbulenceModelCoeffs_.readIfPresent("alphaEps", alphaEps); + turbulenceModelCoeffs_.readIfPresent("eta0", eta0); + turbulenceModelCoeffs_.readIfPresent("beta", beta); return true; } diff --git a/src/turbulenceModels/incompressible/RNGkEpsilon/RNGkEpsilon.H b/src/turbulenceModels/incompressible/RNGkEpsilon/RNGkEpsilon.H index ac317cb42a..307c9b7219 100644 --- a/src/turbulenceModels/incompressible/RNGkEpsilon/RNGkEpsilon.H +++ b/src/turbulenceModels/incompressible/RNGkEpsilon/RNGkEpsilon.H @@ -55,13 +55,13 @@ class RNGkEpsilon { // 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 +101,7 @@ public: //- Return the effective diffusivity for k tmp DkEff() const { - return tmp + return tmp ( new volScalarField("DkEff", alphak*nut_ + nu()) ); @@ -110,7 +110,7 @@ public: //- Return the effective diffusivity for epsilon tmp DepsilonEff() const { - return tmp + return tmp ( new volScalarField("DepsilonEff", alphaEps*nut_ + nu()) ); diff --git a/src/turbulenceModels/incompressible/SpalartAllmaras/SpalartAllmaras.C b/src/turbulenceModels/incompressible/SpalartAllmaras/SpalartAllmaras.C index d2130de943..197da2eee5 100644 --- a/src/turbulenceModels/incompressible/SpalartAllmaras/SpalartAllmaras.C +++ b/src/turbulenceModels/incompressible/SpalartAllmaras/SpalartAllmaras.C @@ -112,15 +112,15 @@ SpalartAllmaras::SpalartAllmaras : turbulenceModel(typeName, U, phi, lamTransportModel), - alphaNut(turbulenceModelCoeffs_.lookupOrDefault("alphaNut", 1.5)), + alphaNut(turbulenceModelCoeffs_.lookupOrAddDefault("alphaNut", 1.5)), - Cb1(turbulenceModelCoeffs_.lookupOrDefault("Cb1", 0.1355)), - Cb2(turbulenceModelCoeffs_.lookupOrDefault("Cb2", 0.622)), + Cb1(turbulenceModelCoeffs_.lookupOrAddDefault("Cb1", 0.1355)), + Cb2(turbulenceModelCoeffs_.lookupOrAddDefault("Cb2", 0.622)), Cw1(Cb1/sqr(kappa_) + alphaNut*(1.0 + Cb2)), - Cw2(turbulenceModelCoeffs_.lookupOrDefault("Cw2", 0.3)), - Cw3(turbulenceModelCoeffs_.lookupOrDefault("Cw3", 2.0)), - Cv1(turbulenceModelCoeffs_.lookupOrDefault("Cv1", 7.1)), - Cv2(turbulenceModelCoeffs_.lookupOrDefault("Cv2", 5.0)), + Cw2(turbulenceModelCoeffs_.lookupOrAddDefault("Cw2", 0.3)), + Cw3(turbulenceModelCoeffs_.lookupOrAddDefault("Cw3", 2.0)), + Cv1(turbulenceModelCoeffs_.lookupOrAddDefault("Cv1", 7.1)), + Cv2(turbulenceModelCoeffs_.lookupOrAddDefault("Cv2", 5.0)), nuTilda_ ( @@ -149,7 +149,9 @@ SpalartAllmaras::SpalartAllmaras ), d_(mesh_) -{} +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -257,19 +259,15 @@ bool SpalartAllmaras::read() { if (turbulenceModel::read()) { - alphaNut = turbulenceModelCoeffs_.lookupOrDefault - ( - "alphaNut", - 1.5 - ); + turbulenceModelCoeffs_.readIfPresent("alphaNut", alphaNut); - Cb1 = turbulenceModelCoeffs_.lookupOrDefault("Cb1", 0.1355); - Cb2 = turbulenceModelCoeffs_.lookupOrDefault("Cb2", 0.622); + turbulenceModelCoeffs_.readIfPresent("Cb1", Cb1); + turbulenceModelCoeffs_.readIfPresent("Cb2", Cb2); Cw1 = Cb1/sqr(kappa_) + alphaNut*(1.0 + Cb2); - Cw2 = turbulenceModelCoeffs_.lookupOrDefault("Cw2", 0.3); - Cw3 = turbulenceModelCoeffs_.lookupOrDefault("Cw3", 2.0); - Cv1 = turbulenceModelCoeffs_.lookupOrDefault("Cv1", 7.1); - Cv2 = turbulenceModelCoeffs_.lookupOrDefault("Cv2", 5.0); + turbulenceModelCoeffs_.readIfPresent("Cw2", Cw2); + turbulenceModelCoeffs_.readIfPresent("Cw3", Cw3); + turbulenceModelCoeffs_.readIfPresent("Cv1", Cv1); + turbulenceModelCoeffs_.readIfPresent("Cv2", Cv2); return true; } diff --git a/src/turbulenceModels/incompressible/SpalartAllmaras/SpalartAllmaras.H b/src/turbulenceModels/incompressible/SpalartAllmaras/SpalartAllmaras.H index f87b8ad7ed..ef0be3c3be 100644 --- a/src/turbulenceModels/incompressible/SpalartAllmaras/SpalartAllmaras.H +++ b/src/turbulenceModels/incompressible/SpalartAllmaras/SpalartAllmaras.H @@ -72,15 +72,15 @@ class SpalartAllmaras { // 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_; diff --git a/src/turbulenceModels/incompressible/kEpsilon/kEpsilon.C b/src/turbulenceModels/incompressible/kEpsilon/kEpsilon.C index d18d1bf470..fa55f6b702 100644 --- a/src/turbulenceModels/incompressible/kEpsilon/kEpsilon.C +++ b/src/turbulenceModels/incompressible/kEpsilon/kEpsilon.C @@ -52,12 +52,12 @@ kEpsilon::kEpsilon : turbulenceModel(typeName, U, phi, lamTransportModel), - Cmu(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09)), - C1(turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44)), - C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92)), + Cmu(turbulenceModelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), + C1(turbulenceModelCoeffs_.lookupOrAddDefault("C1", 1.44)), + C2(turbulenceModelCoeffs_.lookupOrAddDefault("C2", 1.92)), alphaEps ( - turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 0.76923) + turbulenceModelCoeffs_.lookupOrAddDefault("alphaEps", 0.76923) ), k_ @@ -89,6 +89,8 @@ kEpsilon::kEpsilon nut_(Cmu*sqr(k_)/(epsilon_ + epsilonSmall_)) { # include "wallViscosityI.H" + + printCoeffs(); } @@ -149,11 +151,10 @@ bool kEpsilon::read() { if (turbulenceModel::read()) { - Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09); - C1 = turbulenceModelCoeffs_.lookupOrDefault("C1", 1.44); - C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.92); - alphaEps = - turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 0.76923); + turbulenceModelCoeffs_.readIfPresent("Cmu", Cmu); + turbulenceModelCoeffs_.readIfPresent("C1", C1); + turbulenceModelCoeffs_.readIfPresent("C2", C2); + turbulenceModelCoeffs_.readIfPresent("alphaEps", alphaEps); return true; } diff --git a/src/turbulenceModels/incompressible/kEpsilon/kEpsilon.H b/src/turbulenceModels/incompressible/kEpsilon/kEpsilon.H index f64e0c8aab..9c80f45af9 100644 --- a/src/turbulenceModels/incompressible/kEpsilon/kEpsilon.H +++ b/src/turbulenceModels/incompressible/kEpsilon/kEpsilon.H @@ -55,14 +55,19 @@ class kEpsilon { // 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 +103,7 @@ public: //- Return the effective diffusivity for k tmp DkEff() const { - return tmp + return tmp ( new volScalarField("DkEff", nut_ + nu()) ); @@ -107,7 +112,7 @@ public: //- Return the effective diffusivity for epsilon tmp DepsilonEff() const { - return tmp + return tmp ( new volScalarField("DepsilonEff", alphaEps*nut_ + nu()) ); diff --git a/src/turbulenceModels/incompressible/kOmegaSST/kOmegaSST.C b/src/turbulenceModels/incompressible/kOmegaSST/kOmegaSST.C index 0057a1a1e5..0530b4f2fc 100644 --- a/src/turbulenceModels/incompressible/kOmegaSST/kOmegaSST.C +++ b/src/turbulenceModels/incompressible/kOmegaSST/kOmegaSST.C @@ -96,29 +96,32 @@ kOmegaSST::kOmegaSST alphaK1 ( - turbulenceModelCoeffs_.lookupOrDefault("alphaK1", 0.85034) + turbulenceModelCoeffs_.lookupOrAddDefault("alphaK1", 0.85034) ), - alphaK2(turbulenceModelCoeffs_.lookupOrDefault("alphaK2", 1.0)), + alphaK2(turbulenceModelCoeffs_.lookupOrAddDefault("alphaK2", 1.0)), alphaOmega1 ( - turbulenceModelCoeffs_.lookupOrDefault("alphaOmega1", 0.5) + turbulenceModelCoeffs_.lookupOrAddDefault("alphaOmega1", 0.5) ), alphaOmega2 ( - turbulenceModelCoeffs_.lookupOrDefault("alphaOmega2", 0.85616) + turbulenceModelCoeffs_.lookupOrAddDefault("alphaOmega2", 0.85616) ), - gamma1(turbulenceModelCoeffs_.lookupOrDefault("gamma1", 0.5532)), - gamma2(turbulenceModelCoeffs_.lookupOrDefault("gamma2", 0.4403)), - beta1(turbulenceModelCoeffs_.lookupOrDefault("beta1", 0.075)), - beta2(turbulenceModelCoeffs_.lookupOrDefault("beta2", 0.0828)), - betaStar(turbulenceModelCoeffs_.lookupOrDefault("betaStar", 0.09)), - a1(turbulenceModelCoeffs_.lookupOrDefault("a1", 0.31)), - c1(turbulenceModelCoeffs_.lookupOrDefault("c1", 10.0)), + gamma1(turbulenceModelCoeffs_.lookupOrAddDefault("gamma1", 0.5532)), + gamma2(turbulenceModelCoeffs_.lookupOrAddDefault("gamma2", 0.4403)), + beta1(turbulenceModelCoeffs_.lookupOrAddDefault("beta1", 0.075)), + beta2(turbulenceModelCoeffs_.lookupOrAddDefault("beta2", 0.0828)), + betaStar + ( + turbulenceModelCoeffs_.lookupOrAddDefault("betaStar", 0.09) + ), + a1(turbulenceModelCoeffs_.lookupOrAddDefault("a1", 0.31)), + c1(turbulenceModelCoeffs_.lookupOrAddDefault("c1", 10.0)), omega0_("omega0", dimless/dimTime, SMALL), omegaSmall_("omegaSmall", dimless/dimTime, SMALL), - Cmu(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09)), + Cmu(turbulenceModelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), y_(mesh_), @@ -151,6 +154,8 @@ kOmegaSST::kOmegaSST nut_(a1*k_/max(a1*(omega_ + omegaSmall_), F2()*mag(symm(fvc::grad(U_))))) { # include "kOmegaWallViscosityI.H" + + printCoeffs(); } @@ -211,42 +216,26 @@ bool kOmegaSST::read() { if (turbulenceModel::read()) { - alphaK1 = turbulenceModelCoeffs_.lookupOrDefault - ( - "alphaK1", - 0.85034 - ); - alphaK2 = turbulenceModelCoeffs_.lookupOrDefault - ( - "alphaK2", - 1.0 - ); - turbulenceModelCoeffs_.lookupOrDefault("alphaOmega1", 0.5); - alphaOmega2 = turbulenceModelCoeffs_.lookupOrDefault - ( - "alphaOmega2", - 0.85616 - ); - gamma1 = turbulenceModelCoeffs_.lookupOrDefault - ( - "gamma1", - 0.5532 - ); - gamma2 = turbulenceModelCoeffs_.lookupOrDefault - ( - "gamma2", - 0.4403 - ); - beta1 = turbulenceModelCoeffs_.lookupOrDefault("beta1", 0.075); - beta2 = turbulenceModelCoeffs_.lookupOrDefault("beta2", 0.0828); - betaStar = turbulenceModelCoeffs_.lookupOrDefault - ( - "betaStar", - 0.09 - ); - a1 = turbulenceModelCoeffs_.lookupOrDefault("a1", 0.31); - c1 = turbulenceModelCoeffs_.lookupOrDefault("c1", 10.0); - Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09); + turbulenceModelCoeffs_.readIfPresent("alphaK1", alphaK1); + turbulenceModelCoeffs_.readIfPresent("alphaK2", alphaK2); + turbulenceModelCoeffs_.readIfPresent + ( + "alphaOmega1", + alphaOmega1 + ); + turbulenceModelCoeffs_.readIfPresent + ( + "alphaOmega2", + alphaOmega2 + ); + turbulenceModelCoeffs_.readIfPresent("gamma1", gamma1); + turbulenceModelCoeffs_.readIfPresent("gamma2", gamma2); + turbulenceModelCoeffs_.readIfPresent("beta1", beta1); + turbulenceModelCoeffs_.readIfPresent("beta2", beta2); + turbulenceModelCoeffs_.readIfPresent("betaStar", betaStar); + turbulenceModelCoeffs_.readIfPresent("a1", a1); + turbulenceModelCoeffs_.readIfPresent("c1", c1); + turbulenceModelCoeffs_.readIfPresent("Cmu", Cmu); return true; } diff --git a/src/turbulenceModels/incompressible/kOmegaSST/kOmegaSST.H b/src/turbulenceModels/incompressible/kOmegaSST/kOmegaSST.H index da5db280d8..c4b9bbd90e 100644 --- a/src/turbulenceModels/incompressible/kOmegaSST/kOmegaSST.H +++ b/src/turbulenceModels/incompressible/kOmegaSST/kOmegaSST.H @@ -84,27 +84,27 @@ class kOmegaSST { // 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_; diff --git a/src/turbulenceModels/incompressible/kOmegaSST/kOmegaWallFunctionsI.H b/src/turbulenceModels/incompressible/kOmegaSST/kOmegaWallFunctionsI.H index 2c94b5ae36..3bb8a4afd6 100644 --- a/src/turbulenceModels/incompressible/kOmegaSST/kOmegaWallFunctionsI.H +++ b/src/turbulenceModels/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/incompressible/kOmegaSST/kOmegaWallViscosityI.H index 0bdaa5549d..18f699ba74 100644 --- a/src/turbulenceModels/incompressible/kOmegaSST/kOmegaWallViscosityI.H +++ b/src/turbulenceModels/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/realizableKE/realizableKE.C b/src/turbulenceModels/incompressible/realizableKE/realizableKE.C index 9bfe0ed084..84da561444 100644 --- a/src/turbulenceModels/incompressible/realizableKE/realizableKE.C +++ b/src/turbulenceModels/incompressible/realizableKE/realizableKE.C @@ -93,13 +93,13 @@ realizableKE::realizableKE turbulenceModel(typeName, U, phi, lamTransportModel), - Cmu(turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09)), - A0(turbulenceModelCoeffs_.lookupOrDefault("A0", 4.0)), - C2(turbulenceModelCoeffs_.lookupOrDefault("C2", 1.9)), - alphak(turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.0)), + Cmu(turbulenceModelCoeffs_.lookupOrAddDefault("Cmu", 0.09)), + A0(turbulenceModelCoeffs_.lookupOrAddDefault("A0", 4.0)), + C2(turbulenceModelCoeffs_.lookupOrAddDefault("C2", 1.9)), + alphak(turbulenceModelCoeffs_.lookupOrAddDefault("alphak", 1.0)), alphaEps ( - turbulenceModelCoeffs_.lookupOrDefault("alphaEps", 0.833333) + turbulenceModelCoeffs_.lookupOrAddDefault("alphaEps", 0.833333) ), k_ @@ -133,6 +133,8 @@ realizableKE::realizableKE bound(k_, k0_); bound(epsilon_, epsilon0_); # include "wallViscosityI.H" + + printCoeffs(); } @@ -193,15 +195,11 @@ bool realizableKE::read() { if (turbulenceModel::read()) { - Cmu = turbulenceModelCoeffs_.lookupOrDefault("Cmu", 0.09); - A0 = turbulenceModelCoeffs_.lookupOrDefault("A0", 4.0); - C2 = turbulenceModelCoeffs_.lookupOrDefault("C2", 1.9); - alphak = turbulenceModelCoeffs_.lookupOrDefault("alphak", 1.0); - alphaEps = turbulenceModelCoeffs_.lookupOrDefault - ( - "alphaEps", - 0.833333 - ); + turbulenceModelCoeffs_.readIfPresent("Cmu", Cmu); + turbulenceModelCoeffs_.readIfPresent("A0", A0); + turbulenceModelCoeffs_.readIfPresent("C2", C2); + turbulenceModelCoeffs_.readIfPresent("alphak", alphak); + turbulenceModelCoeffs_.readIfPresent("alphaEps", alphaEps); return true; } diff --git a/src/turbulenceModels/incompressible/realizableKE/realizableKE.H b/src/turbulenceModels/incompressible/realizableKE/realizableKE.H index cc6d714bc4..d6e9f62f80 100644 --- a/src/turbulenceModels/incompressible/realizableKE/realizableKE.H +++ b/src/turbulenceModels/incompressible/realizableKE/realizableKE.H @@ -67,11 +67,11 @@ class realizableKE { // 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_; diff --git a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C index 0c19ae8fd7..62ee1e81dd 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C +++ b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C @@ -37,6 +37,14 @@ namespace Foam defineTypeNameAndDebug(turbulenceModel, 0); defineRunTimeSelectionTable(turbulenceModel, dictionary); +// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // + +void turbulenceModel::printCoeffs() +{ + Info<< turbulenceModelCoeffs_; +} + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // turbulenceModel::turbulenceModel diff --git a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H index f3400d0950..7dc80b1cd9 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H +++ b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H @@ -99,6 +99,12 @@ protected: nearWallDist y_; + // Protected member functions + + //- Print model coefficients + virtual void printCoeffs(); + + private: // Private Member Functions @@ -236,7 +242,7 @@ public: //- Return the effective viscosity virtual tmp nuEff() const { - return tmp + return tmp ( new volScalarField("nuEff", nut() + nu()) ); diff --git a/src/turbulenceModels/incompressible/wallFunctions/wallFunctionsI.H b/src/turbulenceModels/incompressible/wallFunctions/wallFunctionsI.H index d17b7eb27e..4a6602f597 100644 --- a/src/turbulenceModels/incompressible/wallFunctions/wallFunctionsI.H +++ b/src/turbulenceModels/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(); diff --git a/src/turbulenceModels/incompressible/wallFunctions/wallViscosityI.H b/src/turbulenceModels/incompressible/wallFunctions/wallViscosityI.H index d7283346d9..f1fa326303 100644 --- a/src/turbulenceModels/incompressible/wallFunctions/wallViscosityI.H +++ b/src/turbulenceModels/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); } From 98735abbf02472e72ed9f008b536ab59b4f2ab87 Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 16 Jun 2008 17:58:16 +0100 Subject: [PATCH 17/21] added printCoeffs variable --- .../turbulenceModel/turbulenceModel.C | 16 +++++++--------- .../turbulenceModel/turbulenceModel.H | 1 + .../turbulenceModel/turbulenceModel.C | 16 +++++++--------- .../turbulenceModel/turbulenceModel.H | 1 + 4 files changed, 16 insertions(+), 18 deletions(-) diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C index dcf8a25d93..e2c6ed90c3 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C +++ b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C @@ -45,7 +45,10 @@ defineRunTimeSelectionTable(turbulenceModel, dictionary); void turbulenceModel::printCoeffs() { - Info<< turbulenceModelCoeffs_; + if (printCoeffs_) + { + Info<< turbulenceModelCoeffs_; + } } @@ -81,16 +84,11 @@ turbulenceModel::turbulenceModel thermophysicalModel_(thermophysicalModel), turbulence_(lookup("turbulence")), + printCoeffs_(lookupOrDefault("printCoeffs", false)), turbulenceModelCoeffs_(subDict(type + "Coeffs")), - kappa_ - ( - dimensionedScalar(subDict("wallFunctionCoeffs").lookup("kappa")).value() - ), - E_ - ( - dimensionedScalar(subDict("wallFunctionCoeffs").lookup("E")).value() - ), + kappa_(readScalar(subDict("wallFunctionCoeffs").lookup("kappa"))), + E_(readScalar(subDict("wallFunctionCoeffs").lookup("E"))), yPlusLam_(yPlusLam(kappa_, E_)), k0_("k0", dimVelocity*dimVelocity, SMALL), diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H index 715f975548..5036bff206 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H +++ b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H @@ -88,6 +88,7 @@ protected: basicThermo& thermophysicalModel_; Switch turbulence_; + Switch printCoeffs_; dictionary turbulenceModelCoeffs_; scalar kappa_; diff --git a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C index 62ee1e81dd..3f1e371f96 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C +++ b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C @@ -41,7 +41,10 @@ defineRunTimeSelectionTable(turbulenceModel, dictionary); void turbulenceModel::printCoeffs() { - Info<< turbulenceModelCoeffs_; + if (printCoeffs_) + { + Info<< turbulenceModelCoeffs_; + } } @@ -75,16 +78,11 @@ turbulenceModel::turbulenceModel transportModel_(lamTransportModel), turbulence_(lookup("turbulence")), + printCoeffs_(lookupOrDefault("printCoeffs", false)), turbulenceModelCoeffs_(subDict(type + "Coeffs")), - kappa_ - ( - dimensionedScalar(subDict("wallFunctionCoeffs").lookup("kappa")).value() - ), - E_ - ( - dimensionedScalar(subDict("wallFunctionCoeffs").lookup("E")).value() - ), + kappa_(readScalar(subDict("wallFunctionCoeffs").lookup("kappa"))), + E_(readScalar(subDict("wallFunctionCoeffs").lookup("E"))), yPlusLam_(yPlusLam(kappa_, E_)), k0_("k0", dimVelocity*dimVelocity, SMALL), diff --git a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H index 7dc80b1cd9..a8bd512763 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H +++ b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H @@ -84,6 +84,7 @@ protected: transportModel& transportModel_; Switch turbulence_; + Switch printCoeffs_; dictionary turbulenceModelCoeffs_; scalar kappa_; From 2251d431fbcf180e300ad35a5eb72df3a836f3a2 Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 16 Jun 2008 19:25:40 +0100 Subject: [PATCH 18/21] added lookupOrAddDefault and readIfPresent functions --- .../DeardorffDiffStress/DeardorffDiffStress.C | 12 +++-- .../DeardorffDiffStress/DeardorffDiffStress.H | 6 +-- .../compressible/GenEddyVisc/GenEddyVisc.C | 8 ++-- .../compressible/GenEddyVisc/GenEddyVisc.H | 2 +- .../compressible/GenSGSStress/GenSGSStress.C | 8 ++-- .../compressible/GenSGSStress/GenSGSStress.H | 2 +- .../compressible/LESmodel/LESmodel.C | 14 +++++- .../compressible/LESmodel/LESmodel.H | 11 ++++- .../compressible/Smagorinsky/Smagorinsky.C | 8 ++-- .../compressible/Smagorinsky/Smagorinsky.H | 2 +- .../SpalartAllmaras/SpalartAllmaras.C | 46 ++++++++++--------- .../SpalartAllmaras/SpalartAllmaras.H | 28 +++++------ .../compressible/dynOneEqEddy/dynOneEqEddy.C | 4 +- .../lowReOneEqEddy/lowReOneEqEddy.C | 12 +++-- .../lowReOneEqEddy/lowReOneEqEddy.H | 6 +-- .../compressible/oneEqEddy/oneEqEddy.C | 8 ++-- .../compressible/oneEqEddy/oneEqEddy.H | 2 +- .../DeardorffDiffStress/DeardorffDiffStress.C | 12 +++-- .../DeardorffDiffStress/DeardorffDiffStress.H | 4 +- .../incompressible/GenEddyVisc/GenEddyVisc.C | 8 ++-- .../incompressible/GenEddyVisc/GenEddyVisc.H | 2 +- .../GenSGSStress/GenSGSStress.C | 38 +++++++-------- .../GenSGSStress/GenSGSStress.H | 2 +- .../incompressible/LESmodel/LESmodel.C | 15 +++++- .../incompressible/LESmodel/LESmodel.H | 11 ++++- .../LRRDiffStress/LRRDiffStress.C | 16 ++++--- .../LRRDiffStress/LRRDiffStress.H | 6 +-- .../incompressible/Smagorinsky/Smagorinsky.C | 4 +- .../incompressible/Smagorinsky/Smagorinsky.H | 2 +- .../Smagorinsky2/Smagorinsky2.C | 8 ++-- .../Smagorinsky2/Smagorinsky2.H | 2 +- .../SpalartAllmaras/SpalartAllmaras.C | 46 ++++++++++--------- .../SpalartAllmaras/SpalartAllmaras.H | 26 +++++------ .../dynMixedSmagorinsky/dynMixedSmagorinsky.C | 4 +- .../dynOneEqEddy/dynOneEqEddy.C | 4 +- .../dynSmagorinsky/dynSmagorinsky.C | 4 +- .../locDynOneEqEddy/locDynOneEqEddy.C | 6 ++- .../mixedSmagorinsky/mixedSmagorinsky.C | 4 +- .../incompressible/oneEqEddy/oneEqEddy.C | 8 ++-- .../incompressible/oneEqEddy/oneEqEddy.H | 2 +- .../scaleSimilarity/scaleSimilarity.C | 4 +- .../spectEddyVisc/spectEddyVisc.C | 26 ++++++----- .../spectEddyVisc/spectEddyVisc.H | 10 ++-- 43 files changed, 270 insertions(+), 183 deletions(-) diff --git a/src/LESmodels/compressible/DeardorffDiffStress/DeardorffDiffStress.C b/src/LESmodels/compressible/DeardorffDiffStress/DeardorffDiffStress.C index 3114f7ec86..3cfd53504d 100644 --- a/src/LESmodels/compressible/DeardorffDiffStress/DeardorffDiffStress.C +++ b/src/LESmodels/compressible/DeardorffDiffStress/DeardorffDiffStress.C @@ -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; } diff --git a/src/LESmodels/compressible/DeardorffDiffStress/DeardorffDiffStress.H b/src/LESmodels/compressible/DeardorffDiffStress/DeardorffDiffStress.H index c367b6cea9..45b0929f7d 100644 --- a/src/LESmodels/compressible/DeardorffDiffStress/DeardorffDiffStress.H +++ b/src/LESmodels/compressible/DeardorffDiffStress/DeardorffDiffStress.H @@ -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()) ); diff --git a/src/LESmodels/compressible/GenEddyVisc/GenEddyVisc.C b/src/LESmodels/compressible/GenEddyVisc/GenEddyVisc.C index a892042c29..08d7d6cf97 100644 --- a/src/LESmodels/compressible/GenEddyVisc/GenEddyVisc.C +++ b/src/LESmodels/compressible/GenEddyVisc/GenEddyVisc.C @@ -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; } diff --git a/src/LESmodels/compressible/GenEddyVisc/GenEddyVisc.H b/src/LESmodels/compressible/GenEddyVisc/GenEddyVisc.H index fd6acb14ec..099b16fd86 100644 --- a/src/LESmodels/compressible/GenEddyVisc/GenEddyVisc.H +++ b/src/LESmodels/compressible/GenEddyVisc/GenEddyVisc.H @@ -68,7 +68,7 @@ class GenEddyVisc protected: - dimensionedScalar ce_; + scalar ce_; volScalarField k_; volScalarField muSgs_; diff --git a/src/LESmodels/compressible/GenSGSStress/GenSGSStress.C b/src/LESmodels/compressible/GenSGSStress/GenSGSStress.C index 648efe8598..d1b565a978 100644 --- a/src/LESmodels/compressible/GenSGSStress/GenSGSStress.C +++ b/src/LESmodels/compressible/GenSGSStress/GenSGSStress.C @@ -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; } diff --git a/src/LESmodels/compressible/GenSGSStress/GenSGSStress.H b/src/LESmodels/compressible/GenSGSStress/GenSGSStress.H index 6951132d21..8035007e87 100644 --- a/src/LESmodels/compressible/GenSGSStress/GenSGSStress.H +++ b/src/LESmodels/compressible/GenSGSStress/GenSGSStress.H @@ -69,7 +69,7 @@ class GenSGSStress protected: - dimensionedScalar ce_; + scalar ce_; volSymmTensorField B_; volScalarField muSgs_; diff --git a/src/LESmodels/compressible/LESmodel/LESmodel.C b/src/LESmodels/compressible/LESmodel/LESmodel.C index cfc426fb78..8e3c6a488a 100644 --- a/src/LESmodels/compressible/LESmodel/LESmodel.C +++ b/src/LESmodels/compressible/LESmodel/LESmodel.C @@ -39,7 +39,18 @@ namespace compressible defineTypeNameAndDebug(LESmodel, 0); defineRunTimeSelectionTable(LESmodel, dictionary); -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // + +void LESmodel::printCoeffs() +{ + if (printCoeffs_) + { + Info<< LESmodelProperties_; + } +} + + +// * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * * // LESmodel::LESmodel ( @@ -70,6 +81,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/LESmodels/compressible/LESmodel/LESmodel.H index 8dfd96dfc2..912db4f0a1 100644 --- a/src/LESmodels/compressible/LESmodel/LESmodel.H +++ b/src/LESmodels/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/Smagorinsky/Smagorinsky.C b/src/LESmodels/compressible/Smagorinsky/Smagorinsky.C index 0bee1a50ce..39828a9c03 100644 --- a/src/LESmodels/compressible/Smagorinsky/Smagorinsky.C +++ b/src/LESmodels/compressible/Smagorinsky/Smagorinsky.C @@ -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; } diff --git a/src/LESmodels/compressible/Smagorinsky/Smagorinsky.H b/src/LESmodels/compressible/Smagorinsky/Smagorinsky.H index ba951aa86e..94c530e1d5 100644 --- a/src/LESmodels/compressible/Smagorinsky/Smagorinsky.H +++ b/src/LESmodels/compressible/Smagorinsky/Smagorinsky.H @@ -71,7 +71,7 @@ class Smagorinsky { // Private data - dimensionedScalar ck_; + scalar ck_; // Private Member Functions diff --git a/src/LESmodels/compressible/SpalartAllmaras/SpalartAllmaras.C b/src/LESmodels/compressible/SpalartAllmaras/SpalartAllmaras.C index 71e22b5548..df1f27f98c 100644 --- a/src/LESmodels/compressible/SpalartAllmaras/SpalartAllmaras.C +++ b/src/LESmodels/compressible/SpalartAllmaras/SpalartAllmaras.C @@ -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 diff --git a/src/LESmodels/compressible/SpalartAllmaras/SpalartAllmaras.H b/src/LESmodels/compressible/SpalartAllmaras/SpalartAllmaras.H index 233619579a..b6e6074ae7 100644 --- a/src/LESmodels/compressible/SpalartAllmaras/SpalartAllmaras.H +++ b/src/LESmodels/compressible/SpalartAllmaras/SpalartAllmaras.H @@ -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 diff --git a/src/LESmodels/compressible/dynOneEqEddy/dynOneEqEddy.C b/src/LESmodels/compressible/dynOneEqEddy/dynOneEqEddy.C index 4156ea6a80..8f3685453c 100644 --- a/src/LESmodels/compressible/dynOneEqEddy/dynOneEqEddy.C +++ b/src/LESmodels/compressible/dynOneEqEddy/dynOneEqEddy.C @@ -90,7 +90,9 @@ dynOneEqEddy::dynOneEqEddy filterPtr_(LESfilter::New(U.mesh(), LESmodelProperties())), filter_(filterPtr_()) -{} +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/LESmodels/compressible/lowReOneEqEddy/lowReOneEqEddy.C b/src/LESmodels/compressible/lowReOneEqEddy/lowReOneEqEddy.C index 5c1a90b8f6..07c594976a 100644 --- a/src/LESmodels/compressible/lowReOneEqEddy/lowReOneEqEddy.C +++ b/src/LESmodels/compressible/lowReOneEqEddy/lowReOneEqEddy.C @@ -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; } diff --git a/src/LESmodels/compressible/lowReOneEqEddy/lowReOneEqEddy.H b/src/LESmodels/compressible/lowReOneEqEddy/lowReOneEqEddy.H index 4bc8e8dbaf..65f7b4f416 100644 --- a/src/LESmodels/compressible/lowReOneEqEddy/lowReOneEqEddy.H +++ b/src/LESmodels/compressible/lowReOneEqEddy/lowReOneEqEddy.H @@ -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()) ); diff --git a/src/LESmodels/compressible/oneEqEddy/oneEqEddy.C b/src/LESmodels/compressible/oneEqEddy/oneEqEddy.C index 9788ad6115..00c0fbe96b 100644 --- a/src/LESmodels/compressible/oneEqEddy/oneEqEddy.C +++ b/src/LESmodels/compressible/oneEqEddy/oneEqEddy.C @@ -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; } diff --git a/src/LESmodels/compressible/oneEqEddy/oneEqEddy.H b/src/LESmodels/compressible/oneEqEddy/oneEqEddy.H index a4f0d150f7..09455a825f 100644 --- a/src/LESmodels/compressible/oneEqEddy/oneEqEddy.H +++ b/src/LESmodels/compressible/oneEqEddy/oneEqEddy.H @@ -75,7 +75,7 @@ class oneEqEddy { // Private data - dimensionedScalar ck_; + scalar ck_; // Private Member Functions diff --git a/src/LESmodels/incompressible/DeardorffDiffStress/DeardorffDiffStress.C b/src/LESmodels/incompressible/DeardorffDiffStress/DeardorffDiffStress.C index 8ad2f76730..1a76b74acf 100644 --- a/src/LESmodels/incompressible/DeardorffDiffStress/DeardorffDiffStress.C +++ b/src/LESmodels/incompressible/DeardorffDiffStress/DeardorffDiffStress.C @@ -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 * * * * * * * * * * * * * // @@ -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; } diff --git a/src/LESmodels/incompressible/DeardorffDiffStress/DeardorffDiffStress.H b/src/LESmodels/incompressible/DeardorffDiffStress/DeardorffDiffStress.H index be045adb83..d7b2d06b6e 100644 --- a/src/LESmodels/incompressible/DeardorffDiffStress/DeardorffDiffStress.H +++ b/src/LESmodels/incompressible/DeardorffDiffStress/DeardorffDiffStress.H @@ -73,8 +73,8 @@ class DeardorffDiffStress { // Private data - dimensionedScalar ck_; - dimensionedScalar cm_; + scalar ck_; + scalar cm_; // Private Member Functions diff --git a/src/LESmodels/incompressible/GenEddyVisc/GenEddyVisc.C b/src/LESmodels/incompressible/GenEddyVisc/GenEddyVisc.C index 27e7317f4e..ad6f1db5c2 100644 --- a/src/LESmodels/incompressible/GenEddyVisc/GenEddyVisc.C +++ b/src/LESmodels/incompressible/GenEddyVisc/GenEddyVisc.C @@ -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; } diff --git a/src/LESmodels/incompressible/GenEddyVisc/GenEddyVisc.H b/src/LESmodels/incompressible/GenEddyVisc/GenEddyVisc.H index 54c02facb4..b66f5da240 100644 --- a/src/LESmodels/incompressible/GenEddyVisc/GenEddyVisc.H +++ b/src/LESmodels/incompressible/GenEddyVisc/GenEddyVisc.H @@ -66,7 +66,7 @@ class GenEddyVisc protected: - dimensionedScalar ce_; + scalar ce_; volScalarField nuSgs_; diff --git a/src/LESmodels/incompressible/GenSGSStress/GenSGSStress.C b/src/LESmodels/incompressible/GenSGSStress/GenSGSStress.C index 086267e798..9eee42fa26 100644 --- a/src/LESmodels/incompressible/GenSGSStress/GenSGSStress.C +++ b/src/LESmodels/incompressible/GenSGSStress/GenSGSStress.C @@ -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) { diff --git a/src/LESmodels/incompressible/GenSGSStress/GenSGSStress.H b/src/LESmodels/incompressible/GenSGSStress/GenSGSStress.H index cffcfb53e0..297a06d352 100644 --- a/src/LESmodels/incompressible/GenSGSStress/GenSGSStress.H +++ b/src/LESmodels/incompressible/GenSGSStress/GenSGSStress.H @@ -67,7 +67,7 @@ class GenSGSStress protected: - dimensionedScalar ce_; + scalar ce_; scalar couplingFactor_; diff --git a/src/LESmodels/incompressible/LESmodel/LESmodel.C b/src/LESmodels/incompressible/LESmodel/LESmodel.C index 0d6dd2a5c9..75690169d0 100644 --- a/src/LESmodels/incompressible/LESmodel/LESmodel.C +++ b/src/LESmodels/incompressible/LESmodel/LESmodel.C @@ -37,7 +37,18 @@ namespace Foam defineTypeNameAndDebug(LESmodel, 0); defineRunTimeSelectionTable(LESmodel, dictionary); -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // + +void LESmodel::printCoeffs() +{ + if (printCoeffs_) + { + Info<< LESmodelProperties_; + } +} + + +// * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * * // LESmodel::LESmodel ( @@ -66,6 +77,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/LESmodels/incompressible/LESmodel/LESmodel.H index b0c89c26c2..2853e66d2d 100644 --- a/src/LESmodels/incompressible/LESmodel/LESmodel.H +++ b/src/LESmodels/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/LRRDiffStress/LRRDiffStress.C b/src/LESmodels/incompressible/LRRDiffStress/LRRDiffStress.C index e05aa67a97..1ae232f295 100644 --- a/src/LESmodels/incompressible/LRRDiffStress/LRRDiffStress.C +++ b/src/LESmodels/incompressible/LRRDiffStress/LRRDiffStress.C @@ -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 * * * * * * * * * * * * * // @@ -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; } diff --git a/src/LESmodels/incompressible/LRRDiffStress/LRRDiffStress.H b/src/LESmodels/incompressible/LRRDiffStress/LRRDiffStress.H index 9d9c337c19..b9be932079 100644 --- a/src/LESmodels/incompressible/LRRDiffStress/LRRDiffStress.H +++ b/src/LESmodels/incompressible/LRRDiffStress/LRRDiffStress.H @@ -71,9 +71,9 @@ class LRRDiffStress { // Private data - dimensionedScalar ck_; - dimensionedScalar c1_; - dimensionedScalar c2_; + scalar ck_; + scalar c1_; + scalar c2_; // Private Member Functions diff --git a/src/LESmodels/incompressible/Smagorinsky/Smagorinsky.C b/src/LESmodels/incompressible/Smagorinsky/Smagorinsky.C index b83e306902..706812439e 100644 --- a/src/LESmodels/incompressible/Smagorinsky/Smagorinsky.C +++ b/src/LESmodels/incompressible/Smagorinsky/Smagorinsky.C @@ -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; } diff --git a/src/LESmodels/incompressible/Smagorinsky/Smagorinsky.H b/src/LESmodels/incompressible/Smagorinsky/Smagorinsky.H index d3419ea74e..bcedf4cd95 100644 --- a/src/LESmodels/incompressible/Smagorinsky/Smagorinsky.H +++ b/src/LESmodels/incompressible/Smagorinsky/Smagorinsky.H @@ -70,7 +70,7 @@ class Smagorinsky { // Private data - dimensionedScalar ck_; + scalar ck_; // Private Member Functions diff --git a/src/LESmodels/incompressible/Smagorinsky2/Smagorinsky2.C b/src/LESmodels/incompressible/Smagorinsky2/Smagorinsky2.C index e95ae845cb..7ca2395725 100644 --- a/src/LESmodels/incompressible/Smagorinsky2/Smagorinsky2.C +++ b/src/LESmodels/incompressible/Smagorinsky2/Smagorinsky2.C @@ -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; } diff --git a/src/LESmodels/incompressible/Smagorinsky2/Smagorinsky2.H b/src/LESmodels/incompressible/Smagorinsky2/Smagorinsky2.H index 41ce618016..7fd2a59d78 100644 --- a/src/LESmodels/incompressible/Smagorinsky2/Smagorinsky2.H +++ b/src/LESmodels/incompressible/Smagorinsky2/Smagorinsky2.H @@ -69,7 +69,7 @@ class Smagorinsky2 { // Private data - dimensionedScalar cD2_; + scalar cD2_; // Private Member Functions diff --git a/src/LESmodels/incompressible/SpalartAllmaras/SpalartAllmaras.C b/src/LESmodels/incompressible/SpalartAllmaras/SpalartAllmaras.C index 3c4c424b70..5c8c25bd4e 100644 --- a/src/LESmodels/incompressible/SpalartAllmaras/SpalartAllmaras.C +++ b/src/LESmodels/incompressible/SpalartAllmaras/SpalartAllmaras.C @@ -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 diff --git a/src/LESmodels/incompressible/SpalartAllmaras/SpalartAllmaras.H b/src/LESmodels/incompressible/SpalartAllmaras/SpalartAllmaras.H index 86ba82a7e0..c36143e9d7 100644 --- a/src/LESmodels/incompressible/SpalartAllmaras/SpalartAllmaras.H +++ b/src/LESmodels/incompressible/SpalartAllmaras/SpalartAllmaras.H @@ -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; diff --git a/src/LESmodels/incompressible/dynMixedSmagorinsky/dynMixedSmagorinsky.C b/src/LESmodels/incompressible/dynMixedSmagorinsky/dynMixedSmagorinsky.C index 5780bbbb0c..0718ee0220 100644 --- a/src/LESmodels/incompressible/dynMixedSmagorinsky/dynMixedSmagorinsky.C +++ b/src/LESmodels/incompressible/dynMixedSmagorinsky/dynMixedSmagorinsky.C @@ -51,7 +51,9 @@ dynMixedSmagorinsky::dynMixedSmagorinsky LESmodel(typeName, U, phi, transport), scaleSimilarity(U, phi, transport), dynSmagorinsky(U, phi, transport) -{} +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/LESmodels/incompressible/dynOneEqEddy/dynOneEqEddy.C b/src/LESmodels/incompressible/dynOneEqEddy/dynOneEqEddy.C index 68b2aac5fa..570aa08b54 100644 --- a/src/LESmodels/incompressible/dynOneEqEddy/dynOneEqEddy.C +++ b/src/LESmodels/incompressible/dynOneEqEddy/dynOneEqEddy.C @@ -117,7 +117,9 @@ dynOneEqEddy::dynOneEqEddy filterPtr_(LESfilter::New(U.mesh(), LESmodelProperties())), filter_(filterPtr_()) -{} +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/LESmodels/incompressible/dynSmagorinsky/dynSmagorinsky.C b/src/LESmodels/incompressible/dynSmagorinsky/dynSmagorinsky.C index f541e1100f..ca03a7fd00 100644 --- a/src/LESmodels/incompressible/dynSmagorinsky/dynSmagorinsky.C +++ b/src/LESmodels/incompressible/dynSmagorinsky/dynSmagorinsky.C @@ -108,7 +108,9 @@ dynSmagorinsky::dynSmagorinsky filterPtr_(LESfilter::New(U.mesh(), LESmodelProperties())), filter_(filterPtr_()) -{} +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/LESmodels/incompressible/locDynOneEqEddy/locDynOneEqEddy.C b/src/LESmodels/incompressible/locDynOneEqEddy/locDynOneEqEddy.C index d84f1cd6c8..a394c814e1 100644 --- a/src/LESmodels/incompressible/locDynOneEqEddy/locDynOneEqEddy.C +++ b/src/LESmodels/incompressible/locDynOneEqEddy/locDynOneEqEddy.C @@ -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 * * * * * * * * * * * * * * * // diff --git a/src/LESmodels/incompressible/mixedSmagorinsky/mixedSmagorinsky.C b/src/LESmodels/incompressible/mixedSmagorinsky/mixedSmagorinsky.C index 3cf5e144d3..338143a5a6 100644 --- a/src/LESmodels/incompressible/mixedSmagorinsky/mixedSmagorinsky.C +++ b/src/LESmodels/incompressible/mixedSmagorinsky/mixedSmagorinsky.C @@ -51,7 +51,9 @@ mixedSmagorinsky::mixedSmagorinsky LESmodel(typeName, U, phi, transport), scaleSimilarity(U, phi, transport), Smagorinsky(U, phi, transport) -{} +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/LESmodels/incompressible/oneEqEddy/oneEqEddy.C b/src/LESmodels/incompressible/oneEqEddy/oneEqEddy.C index 97156edec5..81b605d86c 100644 --- a/src/LESmodels/incompressible/oneEqEddy/oneEqEddy.C +++ b/src/LESmodels/incompressible/oneEqEddy/oneEqEddy.C @@ -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; } diff --git a/src/LESmodels/incompressible/oneEqEddy/oneEqEddy.H b/src/LESmodels/incompressible/oneEqEddy/oneEqEddy.H index 6067c8c65c..a546996015 100644 --- a/src/LESmodels/incompressible/oneEqEddy/oneEqEddy.H +++ b/src/LESmodels/incompressible/oneEqEddy/oneEqEddy.H @@ -76,7 +76,7 @@ class oneEqEddy volScalarField k_; - dimensionedScalar ck_; + scalar ck_; // Private Member Functions diff --git a/src/LESmodels/incompressible/scaleSimilarity/scaleSimilarity.C b/src/LESmodels/incompressible/scaleSimilarity/scaleSimilarity.C index 7650e20624..56e0b5d316 100644 --- a/src/LESmodels/incompressible/scaleSimilarity/scaleSimilarity.C +++ b/src/LESmodels/incompressible/scaleSimilarity/scaleSimilarity.C @@ -49,7 +49,9 @@ scaleSimilarity::scaleSimilarity LESmodel(typeName, U, phi, transport), filterPtr_(LESfilter::New(U.mesh(), LESmodelProperties())), filter_(filterPtr_()) -{} +{ + printCoeffs(); +} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/LESmodels/incompressible/spectEddyVisc/spectEddyVisc.C b/src/LESmodels/incompressible/spectEddyVisc/spectEddyVisc.C index 8a5c78ff2b..edad7876e1 100644 --- a/src/LESmodels/incompressible/spectEddyVisc/spectEddyVisc.C +++ b/src/LESmodels/incompressible/spectEddyVisc/spectEddyVisc.C @@ -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; } diff --git a/src/LESmodels/incompressible/spectEddyVisc/spectEddyVisc.H b/src/LESmodels/incompressible/spectEddyVisc/spectEddyVisc.H index 284b9f6f3a..2543b835fd 100644 --- a/src/LESmodels/incompressible/spectEddyVisc/spectEddyVisc.H +++ b/src/LESmodels/incompressible/spectEddyVisc/spectEddyVisc.H @@ -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 From 5d377a21092481e34e40af2680f1f69c42850977 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Tue, 17 Jun 2008 10:01:10 +0200 Subject: [PATCH 19/21] fixed NamedEnum array bounds warning * some warnings were spurious with gcc-4.3.0, but gcc-4.3.1 correctly flagged these problems: - processorLduInterfaceTemplates.C --- .../lduInterface/processorLduInterfaceTemplates.C | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) 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); } From 817b64987e6fe902f78b0ea30725c5d570d2470d Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Tue, 17 Jun 2008 11:44:33 +0200 Subject: [PATCH 20/21] Avoid gcc-4.3.1 warning: parentheses around comparison in operand of & --- .../meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.C | 2 +- src/dynamicMesh/meshCut/meshModifiers/meshCutter/meshCutter.C | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 ( From 24c4b1b74506cb6fe0d2bdf568ad694570e2f69e Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 17 Jun 2008 10:48:04 +0100 Subject: [PATCH 21/21] relocation of turbulence models and renaming namespaces --- .../solvers/combustion/PDRFoam/Make/options | 2 +- .../turbulence/PDRkEpsilon/PDRkEpsilon.C | 35 +-- .../turbulence/PDRkEpsilon/PDRkEpsilon.H | 22 +- .../solvers/combustion/XiFoam/Make/options | 2 +- .../solvers/combustion/Xoodles/Make/options | 4 +- .../combustion/coldEngineFoam/Make/options | 2 +- .../combustion/dieselEngineFoam/Make/options | 2 +- .../combustion/dieselFoam/Make/options | 2 +- .../combustion/engineFoam/Make/options | 2 +- .../combustion/reactingFoam/Make/options | 2 +- .../solvers/compressible/coodles/Make/options | 4 +- .../compressible/rhoPimpleFoam/Make/options | 2 +- .../rhoPorousSimpleFoam/Make/options | 2 +- .../compressible/rhoSimpleFoam/Make/options | 2 +- .../compressible/rhoTurbFoam/Make/options | 2 +- .../compressible/sonicTurbFoam/Make/options | 2 +- ...H~918dc24fd09dc58d05222b287f51b98d2599f83e | 14 ++ ...918dc24fd09dc58d05222b287f51b98d2599f83e_0 | 14 ++ ...918dc24fd09dc58d05222b287f51b98d2599f83e_1 | 14 ++ ...H~918dc24fd09dc58d05222b287f51b98d2599f83e | 234 ++++++++++++++++++ ...918dc24fd09dc58d05222b287f51b98d2599f83e_0 | 234 ++++++++++++++++++ ...918dc24fd09dc58d05222b287f51b98d2599f83e_1 | 234 ++++++++++++++++++ ...H~918dc24fd09dc58d05222b287f51b98d2599f83e | 18 ++ ...918dc24fd09dc58d05222b287f51b98d2599f83e_0 | 18 ++ ...918dc24fd09dc58d05222b287f51b98d2599f83e_1 | 18 ++ .../heatTransfer/buoyantFoam/Make/options | 2 +- .../buoyantSimpleFoam/Make/options | 2 +- .../buoyantSimpleRadiationFoam/Make/options | 2 +- .../chtMultiRegionFoam/Make/options | 2 +- .../coupleManager/coupleManager.H | 2 +- .../coupleManager/coupleManagerI.H | 2 +- .../heatTransfer/lesBuoyantFoam/Make/options | 4 +- .../incompressible/boundaryFoam/Make/options | 2 +- .../boundaryFoam/createFields.H | 4 +- .../incompressible/channelOodles/Make/options | 4 +- .../incompressible/oodles/Make/options | 4 +- .../incompressible/simpleFoam/Make/options | 2 +- .../incompressible/simpleFoam/createFields.H | 4 +- .../incompressible/turbDyMFoam/Make/options | 2 +- .../incompressible/turbDyMFoam/createFields.H | 4 +- .../incompressible/turbFoam/Make/options | 2 +- .../incompressible/turbFoam/createFields.H | 4 +- .../compressibleLesInterFoam/Make/options | 4 +- .../multiphase/interDyMFoam/Make/options | 4 +- .../multiphase/interDyMFoam/createFields.H | 6 +- .../interPhaseChangeFoam/Make/options | 4 +- .../multiphase/lesCavitatingFoam/Make/options | 6 +- .../devOneEqEddy/devOneEqEddy.C | 12 +- .../devOneEqEddy/devOneEqEddy.H | 6 +- .../multiphase/lesInterFoam/Make/options | 4 +- .../multiphase/rasCavitatingFoam/Make/options | 2 +- .../rasCavitatingFoam/createFields.H | 4 +- .../multiphase/rasInterFoam/Make/options | 2 +- .../multiphase/rasInterFoam/createFields.H | 4 +- .../dataConversion/hashSetUnion.H | 53 ++++ .../dataConversion/hashTableUnion.H | 53 ++++ .../execFlowFunctionObjects/Make/options | 6 +- .../execFlowFunctionObjects.C | 9 +- .../stressField/stressComponents/Make/options | 2 +- .../postProcessing/turbulence/R/Make/options | 2 +- .../turbulence/R/createFields.H | 4 +- .../createTurbulenceFields/Make/options | 2 +- .../createTurbulenceFields/createFields.H | 4 +- .../velocityField/Pe/Make/options | 6 +- .../postProcessing/velocityField/Pe/Pe.C | 9 +- .../wall/wallGradU/Make/options | 2 +- .../wall/wallHeatFlux/Make/options | 2 +- .../wall/wallShearStress/Make/options | 2 +- .../wall/wallShearStress/createFields.H | 4 +- .../postProcessing/wall/yPlusLES/Make/options | 4 +- .../postProcessing/wall/yPlusRAS/Make/options | 2 +- .../postProcessing/wall/yPlusRAS/yPlusRAS.C | 4 +- src/Allwmake | 1 - src/turbulenceModels/Allwmake | 4 +- .../LES}/Allwmake | 0 .../LES}/LESdeltas/LESdelta/LESdelta.C | 0 .../LES}/LESdeltas/LESdelta/LESdelta.H | 0 .../LES}/LESdeltas/LESdelta/newDelta.C | 0 .../LES}/LESdeltas/Make/files | 0 .../LES}/LESdeltas/Make/options | 0 .../LESdeltas/PrandtlDelta/PrandtlDelta.C | 0 .../LESdeltas/PrandtlDelta/PrandtlDelta.H | 0 .../cubeRootVolDelta/cubeRootVolDelta.C | 0 .../cubeRootVolDelta/cubeRootVolDelta.H | 0 .../LES}/LESdeltas/smoothDelta/smoothDelta.C | 0 .../LES}/LESdeltas/smoothDelta/smoothDelta.H | 0 .../smoothDelta/smoothDeltaDeltaDataI.H | 0 .../LES}/LESfilters/LESfilter/LESfilter.C | 0 .../LES}/LESfilters/LESfilter/LESfilter.H | 0 .../LES}/LESfilters/LESfilter/newFilter.C | 0 .../LES}/LESfilters/Make/files | 0 .../LES}/LESfilters/Make/options | 0 .../anisotropicFilter/anisotropicFilter.C | 0 .../anisotropicFilter/anisotropicFilter.H | 0 .../LESfilters/laplaceFilter/laplaceFilter.C | 0 .../LESfilters/laplaceFilter/laplaceFilter.H | 0 .../LESfilters/simpleFilter/simpleFilter.C | 0 .../LESfilters/simpleFilter/simpleFilter.H | 0 .../DeardorffDiffStress/DeardorffDiffStress.C | 4 +- .../DeardorffDiffStress/DeardorffDiffStress.H | 4 +- .../compressible/GenEddyVisc/GenEddyVisc.C | 4 +- .../compressible/GenEddyVisc/GenEddyVisc.H | 4 +- .../compressible/GenSGSStress/GenSGSStress.C | 4 +- .../compressible/GenSGSStress/GenSGSStress.H | 4 +- .../LES}/compressible/LESmodel/LESmodel.C | 0 .../LES}/compressible/LESmodel/LESmodel.H | 0 .../LES}/compressible/LESmodel/newLESmodel.C | 0 .../LES}/compressible/Make/files | 0 .../LES}/compressible/Make/options | 4 +- .../compressible/Smagorinsky/Smagorinsky.C | 4 +- .../compressible/Smagorinsky/Smagorinsky.H | 4 +- .../SpalartAllmaras/SpalartAllmaras.C | 4 +- .../SpalartAllmaras/SpalartAllmaras.H | 4 +- .../compressible/dynOneEqEddy/dynOneEqEddy.C | 4 +- .../compressible/dynOneEqEddy/dynOneEqEddy.H | 4 +- .../lowReOneEqEddy/lowReOneEqEddy.C | 4 +- .../lowReOneEqEddy/lowReOneEqEddy.H | 4 +- .../LES}/compressible/oneEqEddy/oneEqEddy.C | 4 +- .../LES}/compressible/oneEqEddy/oneEqEddy.H | 4 +- .../muSgsWallFunctionFvPatchScalarField.C | 4 +- .../muSgsWallFunctionFvPatchScalarField.H | 4 +- .../DeardorffDiffStress/DeardorffDiffStress.C | 16 +- .../DeardorffDiffStress/DeardorffDiffStress.H | 4 +- .../incompressible/GenEddyVisc/GenEddyVisc.C | 4 +- .../incompressible/GenEddyVisc/GenEddyVisc.H | 4 +- .../GenSGSStress/GenSGSStress.C | 4 +- .../GenSGSStress/GenSGSStress.H | 4 +- .../LES}/incompressible/LESmodel/LESmodel.C | 0 .../LES}/incompressible/LESmodel/LESmodel.H | 0 .../incompressible/LESmodel/newLESmodel.C | 0 .../LRRDiffStress/LRRDiffStress.C | 4 +- .../LRRDiffStress/LRRDiffStress.H | 4 +- .../LES}/incompressible/Make/files | 0 .../LES}/incompressible/Make/options | 6 +- .../incompressible/Smagorinsky/Smagorinsky.C | 4 +- .../incompressible/Smagorinsky/Smagorinsky.H | 4 +- .../Smagorinsky2/Smagorinsky2.C | 4 +- .../Smagorinsky2/Smagorinsky2.H | 4 +- .../SpalartAllmaras/SpalartAllmaras.C | 4 +- .../SpalartAllmaras/SpalartAllmaras.H | 4 +- .../dynMixedSmagorinsky/dynMixedSmagorinsky.C | 4 +- .../dynMixedSmagorinsky/dynMixedSmagorinsky.H | 4 +- .../dynOneEqEddy/dynOneEqEddy.C | 4 +- .../dynOneEqEddy/dynOneEqEddy.H | 4 +- .../dynSmagorinsky/dynSmagorinsky.C | 4 +- .../dynSmagorinsky/dynSmagorinsky.H | 4 +- .../LES}/incompressible/laminar/laminar.C | 4 +- .../LES}/incompressible/laminar/laminar.H | 4 +- .../locDynOneEqEddy/locDynOneEqEddy.C | 4 +- .../locDynOneEqEddy/locDynOneEqEddy.H | 4 +- .../mixedSmagorinsky/mixedSmagorinsky.C | 4 +- .../mixedSmagorinsky/mixedSmagorinsky.H | 4 +- .../LES}/incompressible/oneEqEddy/oneEqEddy.C | 4 +- .../LES}/incompressible/oneEqEddy/oneEqEddy.H | 4 +- .../scaleSimilarity/scaleSimilarity.C | 4 +- .../scaleSimilarity/scaleSimilarity.H | 4 +- .../spectEddyVisc/spectEddyVisc.C | 4 +- .../spectEddyVisc/spectEddyVisc.H | 4 +- .../vanDriestDelta/vanDriestDelta.C | 4 +- .../vanDriestDelta/vanDriestDelta.H | 4 +- .../nuSgsWallFunctionFvPatchScalarField.C | 4 +- .../nuSgsWallFunctionFvPatchScalarField.H | 4 +- src/turbulenceModels/RAS/Allwmake | 5 + .../{ => RAS}/compressible/LRR/LRR.C | 4 +- .../{ => RAS}/compressible/LRR/LRR.H | 6 +- .../LaunderGibsonRSTM/LaunderGibsonRSTM.C | 4 +- .../LaunderGibsonRSTM/LaunderGibsonRSTM.H | 6 +- .../LaunderSharmaKE/LaunderSharmaKE.C | 4 +- .../LaunderSharmaKE/LaunderSharmaKE.H | 6 +- .../compressible/LaunderSharmaKE/sourceFiles | 0 .../{ => RAS}/compressible/Make/files | 0 .../{ => RAS}/compressible/Make/options | 0 .../compressible/RNGkEpsilon/RNGkEpsilon.C | 4 +- .../compressible/RNGkEpsilon/RNGkEpsilon.H | 6 +- .../compressible/RNGkEpsilon/sourceFiles | 0 .../SpalartAllmaras/SpalartAllmaras.C | 4 +- .../SpalartAllmaras/SpalartAllmaras.H | 6 +- .../compressible/kEpsilon/kEpsilon.C | 4 +- .../compressible/kEpsilon/kEpsilon.H | 6 +- .../kOmegaSST/checkkOmegaPatchFieldTypes.H | 0 .../compressible/kOmegaSST/kOmegaSST.C | 4 +- .../compressible/kOmegaSST/kOmegaSST.H | 6 +- .../kOmegaSST/kOmegaWallFunctionsI.H | 0 .../kOmegaSST/kOmegaWallViscosityI.H | 0 .../compressible/kOmegaSST/wallOmegaI.H | 0 .../{ => RAS}/compressible/laminar/laminar.C | 4 +- .../{ => RAS}/compressible/laminar/laminar.H | 6 +- .../compressible/realizableKE/realizableKE.C | 4 +- .../compressible/realizableKE/realizableKE.H | 6 +- .../turbulenceModel/newTurbulenceModel.C | 0 .../turbulenceModel/turbulenceModel.C | 0 .../turbulenceModel/turbulenceModel.H | 4 +- ...ndardRoughWallFunctionFvPatchScalarField.C | 4 +- ...ndardRoughWallFunctionFvPatchScalarField.H | 6 +- .../wallFunctions/wallDissipationI.H | 0 .../wallFunctions/wallFunctionsI.H | 0 .../wallFunctions/wallViscosityI.H | 0 .../{ => RAS}/incompressible/LRR/LRR.C | 7 +- .../{ => RAS}/incompressible/LRR/LRR.H | 9 +- .../LamBremhorstKE/LamBremhorstKE.C | 7 +- .../LamBremhorstKE/LamBremhorstKE.H | 9 +- .../LaunderGibsonRSTM/LaunderGibsonRSTM.C | 7 +- .../LaunderGibsonRSTM/LaunderGibsonRSTM.H | 9 +- .../LaunderSharmaKE/LaunderSharmaKE.C | 7 +- .../LaunderSharmaKE/LaunderSharmaKE.H | 9 +- .../incompressible/LienCubicKE/LienCubicKE.C | 7 +- .../incompressible/LienCubicKE/LienCubicKE.H | 9 +- .../LienCubicKELowRe/LienCubicKELowRe.C | 7 +- .../LienCubicKELowRe/LienCubicKELowRe.H | 9 +- .../LienCubicKELowReSetWallDissipation.H | 0 .../LienLeschzinerLowRe/LienLeschzinerLowRe.C | 7 +- .../LienLeschzinerLowRe/LienLeschzinerLowRe.H | 9 +- .../LienLeschzinerLowReSetWallDissipation.H | 0 .../{ => RAS}/incompressible/Make/files | 0 .../{ => RAS}/incompressible/Make/options | 0 .../NonlinearKEShih/NonlinearKEShih.C | 7 +- .../NonlinearKEShih/NonlinearKEShih.H | 9 +- .../{ => RAS}/incompressible/QZeta/QZeta.C | 7 +- .../{ => RAS}/incompressible/QZeta/QZeta.H | 9 +- .../incompressible/RNGkEpsilon/RNGkEpsilon.C | 7 +- .../incompressible/RNGkEpsilon/RNGkEpsilon.H | 9 +- .../SpalartAllmaras/SpalartAllmaras.C | 7 +- .../SpalartAllmaras/SpalartAllmaras.H | 9 +- .../incompressible/kEpsilon/kEpsilon.C | 7 +- .../incompressible/kEpsilon/kEpsilon.H | 9 +- .../kOmegaSST/checkkOmegaPatchFieldTypes.H | 0 .../incompressible/kOmegaSST/kOmegaSST.C | 7 +- .../incompressible/kOmegaSST/kOmegaSST.H | 9 +- .../kOmegaSST/kOmegaWallFunctionsI.H | 0 .../kOmegaSST/kOmegaWallViscosityI.H | 0 .../incompressible/kOmegaSST/wallOmegaI.H | 0 .../incompressible/laminar/laminar.C | 7 +- .../incompressible/laminar/laminar.H | 9 +- .../realizableKE/realizableKE.C | 7 +- .../realizableKE/realizableKE.H | 9 +- .../checkIncompressibleTurbulenceModelsLock.C | 0 .../turbulenceModel/newTurbulenceModel.C | 3 + .../turbulenceModel/turbulenceModel.C | 3 + .../turbulenceModel/turbulenceModel.H | 10 +- .../wallFunctions/nonLinearWallFunctionsI.H | 0 ...ndardRoughWallFunctionFvPatchScalarField.C | 19 +- ...ndardRoughWallFunctionFvPatchScalarField.H | 11 +- ...utStandardWallFunctionFvPatchScalarField.C | 13 +- ...utStandardWallFunctionFvPatchScalarField.H | 9 +- .../nutWallFunctionFvPatchScalarField.C | 15 +- .../nutWallFunctionFvPatchScalarField.H | 9 +- .../wallFunctions/wallDissipationI.H | 0 .../wallFunctions/wallFunctionsI.H | 0 .../wallFunctions/wallNonlinearViscosityI.H | 0 .../wallFunctions/wallViscosityI.H | 0 250 files changed, 1444 insertions(+), 403 deletions(-) create mode 100644 applications/solvers/heatTransfer/TlesPimlpleFoam/calculateAverages.H~918dc24fd09dc58d05222b287f51b98d2599f83e create mode 100644 applications/solvers/heatTransfer/TlesPimlpleFoam/calculateAverages.H~918dc24fd09dc58d05222b287f51b98d2599f83e_0 create mode 100644 applications/solvers/heatTransfer/TlesPimlpleFoam/calculateAverages.H~918dc24fd09dc58d05222b287f51b98d2599f83e_1 create mode 100644 applications/solvers/heatTransfer/TlesPimlpleFoam/createAverages.H~918dc24fd09dc58d05222b287f51b98d2599f83e create mode 100644 applications/solvers/heatTransfer/TlesPimlpleFoam/createAverages.H~918dc24fd09dc58d05222b287f51b98d2599f83e_0 create mode 100644 applications/solvers/heatTransfer/TlesPimlpleFoam/createAverages.H~918dc24fd09dc58d05222b287f51b98d2599f83e_1 create mode 100644 applications/solvers/heatTransfer/TlesPimlpleFoam/writeNaveragingSteps.H~918dc24fd09dc58d05222b287f51b98d2599f83e create mode 100644 applications/solvers/heatTransfer/TlesPimlpleFoam/writeNaveragingSteps.H~918dc24fd09dc58d05222b287f51b98d2599f83e_0 create mode 100644 applications/solvers/heatTransfer/TlesPimlpleFoam/writeNaveragingSteps.H~918dc24fd09dc58d05222b287f51b98d2599f83e_1 create mode 100644 applications/utilities/postProcessing/dataConversion/hashSetUnion.H create mode 100644 applications/utilities/postProcessing/dataConversion/hashTableUnion.H rename src/{LESmodels => turbulenceModels/LES}/Allwmake (100%) rename src/{LESmodels => turbulenceModels/LES}/LESdeltas/LESdelta/LESdelta.C (100%) rename src/{LESmodels => turbulenceModels/LES}/LESdeltas/LESdelta/LESdelta.H (100%) rename src/{LESmodels => turbulenceModels/LES}/LESdeltas/LESdelta/newDelta.C (100%) rename src/{LESmodels => turbulenceModels/LES}/LESdeltas/Make/files (100%) rename src/{LESmodels => turbulenceModels/LES}/LESdeltas/Make/options (100%) rename src/{LESmodels => turbulenceModels/LES}/LESdeltas/PrandtlDelta/PrandtlDelta.C (100%) rename src/{LESmodels => turbulenceModels/LES}/LESdeltas/PrandtlDelta/PrandtlDelta.H (100%) rename src/{LESmodels => turbulenceModels/LES}/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.C (100%) rename src/{LESmodels => turbulenceModels/LES}/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.H (100%) rename src/{LESmodels => turbulenceModels/LES}/LESdeltas/smoothDelta/smoothDelta.C (100%) rename src/{LESmodels => turbulenceModels/LES}/LESdeltas/smoothDelta/smoothDelta.H (100%) rename src/{LESmodels => turbulenceModels/LES}/LESdeltas/smoothDelta/smoothDeltaDeltaDataI.H (100%) rename src/{LESmodels => turbulenceModels/LES}/LESfilters/LESfilter/LESfilter.C (100%) rename src/{LESmodels => turbulenceModels/LES}/LESfilters/LESfilter/LESfilter.H (100%) rename src/{LESmodels => turbulenceModels/LES}/LESfilters/LESfilter/newFilter.C (100%) rename src/{LESmodels => turbulenceModels/LES}/LESfilters/Make/files (100%) rename src/{LESmodels => turbulenceModels/LES}/LESfilters/Make/options (100%) rename src/{LESmodels => turbulenceModels/LES}/LESfilters/anisotropicFilter/anisotropicFilter.C (100%) rename src/{LESmodels => turbulenceModels/LES}/LESfilters/anisotropicFilter/anisotropicFilter.H (100%) rename src/{LESmodels => turbulenceModels/LES}/LESfilters/laplaceFilter/laplaceFilter.C (100%) rename src/{LESmodels => turbulenceModels/LES}/LESfilters/laplaceFilter/laplaceFilter.H (100%) rename src/{LESmodels => turbulenceModels/LES}/LESfilters/simpleFilter/simpleFilter.C (100%) rename src/{LESmodels => turbulenceModels/LES}/LESfilters/simpleFilter/simpleFilter.H (100%) rename src/{LESmodels => turbulenceModels/LES}/compressible/DeardorffDiffStress/DeardorffDiffStress.C (98%) rename src/{LESmodels => turbulenceModels/LES}/compressible/DeardorffDiffStress/DeardorffDiffStress.H (98%) rename src/{LESmodels => turbulenceModels/LES}/compressible/GenEddyVisc/GenEddyVisc.C (98%) rename src/{LESmodels => turbulenceModels/LES}/compressible/GenEddyVisc/GenEddyVisc.H (98%) rename src/{LESmodels => turbulenceModels/LES}/compressible/GenSGSStress/GenSGSStress.C (98%) rename src/{LESmodels => turbulenceModels/LES}/compressible/GenSGSStress/GenSGSStress.H (98%) rename src/{LESmodels => turbulenceModels/LES}/compressible/LESmodel/LESmodel.C (100%) rename src/{LESmodels => turbulenceModels/LES}/compressible/LESmodel/LESmodel.H (100%) rename src/{LESmodels => turbulenceModels/LES}/compressible/LESmodel/newLESmodel.C (100%) rename src/{LESmodels => turbulenceModels/LES}/compressible/Make/files (100%) rename src/{LESmodels => turbulenceModels/LES}/compressible/Make/options (68%) rename src/{LESmodels => turbulenceModels/LES}/compressible/Smagorinsky/Smagorinsky.C (98%) rename src/{LESmodels => turbulenceModels/LES}/compressible/Smagorinsky/Smagorinsky.H (98%) rename src/{LESmodels => turbulenceModels/LES}/compressible/SpalartAllmaras/SpalartAllmaras.C (99%) rename src/{LESmodels => turbulenceModels/LES}/compressible/SpalartAllmaras/SpalartAllmaras.H (98%) rename src/{LESmodels => turbulenceModels/LES}/compressible/dynOneEqEddy/dynOneEqEddy.C (98%) rename src/{LESmodels => turbulenceModels/LES}/compressible/dynOneEqEddy/dynOneEqEddy.H (98%) rename src/{LESmodels => turbulenceModels/LES}/compressible/lowReOneEqEddy/lowReOneEqEddy.C (98%) rename src/{LESmodels => turbulenceModels/LES}/compressible/lowReOneEqEddy/lowReOneEqEddy.H (98%) rename src/{LESmodels => turbulenceModels/LES}/compressible/oneEqEddy/oneEqEddy.C (98%) rename src/{LESmodels => turbulenceModels/LES}/compressible/oneEqEddy/oneEqEddy.H (98%) rename src/{LESmodels => turbulenceModels/LES}/compressible/wallFunc/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.C (99%) rename src/{LESmodels => turbulenceModels/LES}/compressible/wallFunc/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.H (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/DeardorffDiffStress/DeardorffDiffStress.C (89%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/DeardorffDiffStress/DeardorffDiffStress.H (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/GenEddyVisc/GenEddyVisc.C (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/GenEddyVisc/GenEddyVisc.H (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/GenSGSStress/GenSGSStress.C (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/GenSGSStress/GenSGSStress.H (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/LESmodel/LESmodel.C (100%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/LESmodel/LESmodel.H (100%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/LESmodel/newLESmodel.C (100%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/LRRDiffStress/LRRDiffStress.C (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/LRRDiffStress/LRRDiffStress.H (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/Make/files (100%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/Make/options (56%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/Smagorinsky/Smagorinsky.C (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/Smagorinsky/Smagorinsky.H (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/Smagorinsky2/Smagorinsky2.C (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/Smagorinsky2/Smagorinsky2.H (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/SpalartAllmaras/SpalartAllmaras.C (99%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/SpalartAllmaras/SpalartAllmaras.H (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/dynMixedSmagorinsky/dynMixedSmagorinsky.C (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/dynMixedSmagorinsky/dynMixedSmagorinsky.H (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/dynOneEqEddy/dynOneEqEddy.C (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/dynOneEqEddy/dynOneEqEddy.H (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/dynSmagorinsky/dynSmagorinsky.C (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/dynSmagorinsky/dynSmagorinsky.H (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/laminar/laminar.C (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/laminar/laminar.H (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/locDynOneEqEddy/locDynOneEqEddy.C (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/locDynOneEqEddy/locDynOneEqEddy.H (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/mixedSmagorinsky/mixedSmagorinsky.C (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/mixedSmagorinsky/mixedSmagorinsky.H (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/oneEqEddy/oneEqEddy.C (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/oneEqEddy/oneEqEddy.H (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/scaleSimilarity/scaleSimilarity.C (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/scaleSimilarity/scaleSimilarity.H (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/spectEddyVisc/spectEddyVisc.C (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/spectEddyVisc/spectEddyVisc.H (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/vanDriestDelta/vanDriestDelta.C (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/vanDriestDelta/vanDriestDelta.H (98%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/wallFunc/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C (99%) rename src/{LESmodels => turbulenceModels/LES}/incompressible/wallFunc/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.H (98%) create mode 100755 src/turbulenceModels/RAS/Allwmake rename src/turbulenceModels/{ => RAS}/compressible/LRR/LRR.C (99%) rename src/turbulenceModels/{ => RAS}/compressible/LRR/LRR.H (97%) rename src/turbulenceModels/{ => RAS}/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C (99%) rename src/turbulenceModels/{ => RAS}/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H (97%) rename src/turbulenceModels/{ => RAS}/compressible/LaunderSharmaKE/LaunderSharmaKE.C (99%) rename src/turbulenceModels/{ => RAS}/compressible/LaunderSharmaKE/LaunderSharmaKE.H (97%) rename src/turbulenceModels/{ => RAS}/compressible/LaunderSharmaKE/sourceFiles (100%) rename src/turbulenceModels/{ => RAS}/compressible/Make/files (100%) rename src/turbulenceModels/{ => RAS}/compressible/Make/options (100%) rename src/turbulenceModels/{ => RAS}/compressible/RNGkEpsilon/RNGkEpsilon.C (99%) rename src/turbulenceModels/{ => RAS}/compressible/RNGkEpsilon/RNGkEpsilon.H (97%) rename src/turbulenceModels/{ => RAS}/compressible/RNGkEpsilon/sourceFiles (100%) rename src/turbulenceModels/{ => RAS}/compressible/SpalartAllmaras/SpalartAllmaras.C (99%) rename src/turbulenceModels/{ => RAS}/compressible/SpalartAllmaras/SpalartAllmaras.H (98%) rename src/turbulenceModels/{ => RAS}/compressible/kEpsilon/kEpsilon.C (99%) rename src/turbulenceModels/{ => RAS}/compressible/kEpsilon/kEpsilon.H (97%) rename src/turbulenceModels/{ => RAS}/compressible/kOmegaSST/checkkOmegaPatchFieldTypes.H (100%) rename src/turbulenceModels/{ => RAS}/compressible/kOmegaSST/kOmegaSST.C (99%) rename src/turbulenceModels/{ => RAS}/compressible/kOmegaSST/kOmegaSST.H (98%) rename src/turbulenceModels/{ => RAS}/compressible/kOmegaSST/kOmegaWallFunctionsI.H (100%) rename src/turbulenceModels/{ => RAS}/compressible/kOmegaSST/kOmegaWallViscosityI.H (100%) rename src/turbulenceModels/{ => RAS}/compressible/kOmegaSST/wallOmegaI.H (100%) rename src/turbulenceModels/{ => RAS}/compressible/laminar/laminar.C (98%) rename src/turbulenceModels/{ => RAS}/compressible/laminar/laminar.H (97%) rename src/turbulenceModels/{ => RAS}/compressible/realizableKE/realizableKE.C (99%) rename src/turbulenceModels/{ => RAS}/compressible/realizableKE/realizableKE.H (97%) rename src/turbulenceModels/{ => RAS}/compressible/turbulenceModel/newTurbulenceModel.C (100%) rename src/turbulenceModels/{ => RAS}/compressible/turbulenceModel/turbulenceModel.C (100%) rename src/turbulenceModels/{ => RAS}/compressible/turbulenceModel/turbulenceModel.H (98%) rename src/turbulenceModels/{ => RAS}/compressible/wallFunctions/mutWallFunctions/mutStandardRoughWallFunction/mutStandardRoughWallFunctionFvPatchScalarField.C (99%) rename src/turbulenceModels/{ => RAS}/compressible/wallFunctions/mutWallFunctions/mutStandardRoughWallFunction/mutStandardRoughWallFunctionFvPatchScalarField.H (97%) rename src/turbulenceModels/{ => RAS}/compressible/wallFunctions/wallDissipationI.H (100%) rename src/turbulenceModels/{ => RAS}/compressible/wallFunctions/wallFunctionsI.H (100%) rename src/turbulenceModels/{ => RAS}/compressible/wallFunctions/wallViscosityI.H (100%) rename src/turbulenceModels/{ => RAS}/incompressible/LRR/LRR.C (98%) rename src/turbulenceModels/{ => RAS}/incompressible/LRR/LRR.H (96%) rename src/turbulenceModels/{ => RAS}/incompressible/LamBremhorstKE/LamBremhorstKE.C (98%) rename src/turbulenceModels/{ => RAS}/incompressible/LamBremhorstKE/LamBremhorstKE.H (96%) rename src/turbulenceModels/{ => RAS}/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C (99%) rename src/turbulenceModels/{ => RAS}/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H (96%) rename src/turbulenceModels/{ => RAS}/incompressible/LaunderSharmaKE/LaunderSharmaKE.C (98%) rename src/turbulenceModels/{ => RAS}/incompressible/LaunderSharmaKE/LaunderSharmaKE.H (96%) rename src/turbulenceModels/{ => RAS}/incompressible/LienCubicKE/LienCubicKE.C (98%) rename src/turbulenceModels/{ => RAS}/incompressible/LienCubicKE/LienCubicKE.H (96%) rename src/turbulenceModels/{ => RAS}/incompressible/LienCubicKELowRe/LienCubicKELowRe.C (99%) rename src/turbulenceModels/{ => RAS}/incompressible/LienCubicKELowRe/LienCubicKELowRe.H (97%) rename src/turbulenceModels/{ => RAS}/incompressible/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H (100%) rename src/turbulenceModels/{ => RAS}/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.C (98%) rename src/turbulenceModels/{ => RAS}/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.H (96%) rename src/turbulenceModels/{ => RAS}/incompressible/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H (100%) rename src/turbulenceModels/{ => RAS}/incompressible/Make/files (100%) rename src/turbulenceModels/{ => RAS}/incompressible/Make/options (100%) rename src/turbulenceModels/{ => RAS}/incompressible/NonlinearKEShih/NonlinearKEShih.C (98%) rename src/turbulenceModels/{ => RAS}/incompressible/NonlinearKEShih/NonlinearKEShih.H (96%) rename src/turbulenceModels/{ => RAS}/incompressible/QZeta/QZeta.C (98%) rename src/turbulenceModels/{ => RAS}/incompressible/QZeta/QZeta.H (97%) rename src/turbulenceModels/{ => RAS}/incompressible/RNGkEpsilon/RNGkEpsilon.C (98%) rename src/turbulenceModels/{ => RAS}/incompressible/RNGkEpsilon/RNGkEpsilon.H (96%) rename src/turbulenceModels/{ => RAS}/incompressible/SpalartAllmaras/SpalartAllmaras.C (98%) rename src/turbulenceModels/{ => RAS}/incompressible/SpalartAllmaras/SpalartAllmaras.H (96%) rename src/turbulenceModels/{ => RAS}/incompressible/kEpsilon/kEpsilon.C (98%) rename src/turbulenceModels/{ => RAS}/incompressible/kEpsilon/kEpsilon.H (96%) rename src/turbulenceModels/{ => RAS}/incompressible/kOmegaSST/checkkOmegaPatchFieldTypes.H (100%) rename src/turbulenceModels/{ => RAS}/incompressible/kOmegaSST/kOmegaSST.C (98%) rename src/turbulenceModels/{ => RAS}/incompressible/kOmegaSST/kOmegaSST.H (98%) rename src/turbulenceModels/{ => RAS}/incompressible/kOmegaSST/kOmegaWallFunctionsI.H (100%) rename src/turbulenceModels/{ => RAS}/incompressible/kOmegaSST/kOmegaWallViscosityI.H (100%) rename src/turbulenceModels/{ => RAS}/incompressible/kOmegaSST/wallOmegaI.H (100%) rename src/turbulenceModels/{ => RAS}/incompressible/laminar/laminar.C (97%) rename src/turbulenceModels/{ => RAS}/incompressible/laminar/laminar.H (96%) rename src/turbulenceModels/{ => RAS}/incompressible/realizableKE/realizableKE.C (98%) rename src/turbulenceModels/{ => RAS}/incompressible/realizableKE/realizableKE.H (97%) rename src/turbulenceModels/{ => RAS}/incompressible/turbulenceModel/checkIncompressibleTurbulenceModelsLock.C (100%) rename src/turbulenceModels/{ => RAS}/incompressible/turbulenceModel/newTurbulenceModel.C (98%) rename src/turbulenceModels/{ => RAS}/incompressible/turbulenceModel/turbulenceModel.C (98%) rename src/turbulenceModels/{ => RAS}/incompressible/turbulenceModel/turbulenceModel.H (97%) rename src/turbulenceModels/{ => RAS}/incompressible/wallFunctions/nonLinearWallFunctionsI.H (100%) rename src/turbulenceModels/{ => RAS}/incompressible/wallFunctions/nutWallFunctions/nutStandardRoughWallFunction/nutStandardRoughWallFunctionFvPatchScalarField.C (97%) rename src/turbulenceModels/{ => RAS}/incompressible/wallFunctions/nutWallFunctions/nutStandardRoughWallFunction/nutStandardRoughWallFunctionFvPatchScalarField.H (96%) rename src/turbulenceModels/{ => RAS}/incompressible/wallFunctions/nutWallFunctions/nutStandardWallFunction/nutStandardWallFunctionFvPatchScalarField.C (96%) rename src/turbulenceModels/{ => RAS}/incompressible/wallFunctions/nutWallFunctions/nutStandardWallFunction/nutStandardWallFunctionFvPatchScalarField.H (96%) rename src/turbulenceModels/{ => RAS}/incompressible/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C (95%) rename src/turbulenceModels/{ => RAS}/incompressible/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H (96%) rename src/turbulenceModels/{ => RAS}/incompressible/wallFunctions/wallDissipationI.H (100%) rename src/turbulenceModels/{ => RAS}/incompressible/wallFunctions/wallFunctionsI.H (100%) rename src/turbulenceModels/{ => RAS}/incompressible/wallFunctions/wallNonlinearViscosityI.H (100%) rename src/turbulenceModels/{ => RAS}/incompressible/wallFunctions/wallViscosityI.H (100%) 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/TlesPimlpleFoam/calculateAverages.H~918dc24fd09dc58d05222b287f51b98d2599f83e b/applications/solvers/heatTransfer/TlesPimlpleFoam/calculateAverages.H~918dc24fd09dc58d05222b287f51b98d2599f83e new file mode 100644 index 0000000000..331a2aaa7e --- /dev/null +++ b/applications/solvers/heatTransfer/TlesPimlpleFoam/calculateAverages.H~918dc24fd09dc58d05222b287f51b98d2599f83e @@ -0,0 +1,14 @@ + nAveragingSteps++; + + scalar nm1Coeff = scalar(nAveragingSteps - 1)/nAveragingSteps; + scalar nCoeff = 1.0/nAveragingSteps; + + R += sqr(Umean); + Umean = nm1Coeff*Umean + nCoeff*U; + R = nm1Coeff*R + nCoeff*sqr(U) - sqr(Umean); + Bmean = nm1Coeff*Bmean + nCoeff*sgsModel->B(); + epsilonMean = nm1Coeff*epsilonMean + nCoeff*sgsModel->epsilon(); + + pPrime2Mean += sqr(pMean); + pMean = nm1Coeff*pMean + nCoeff*p; + pPrime2Mean = nm1Coeff*pPrime2Mean + nCoeff*sqr(p) - sqr(pMean); diff --git a/applications/solvers/heatTransfer/TlesPimlpleFoam/calculateAverages.H~918dc24fd09dc58d05222b287f51b98d2599f83e_0 b/applications/solvers/heatTransfer/TlesPimlpleFoam/calculateAverages.H~918dc24fd09dc58d05222b287f51b98d2599f83e_0 new file mode 100644 index 0000000000..331a2aaa7e --- /dev/null +++ b/applications/solvers/heatTransfer/TlesPimlpleFoam/calculateAverages.H~918dc24fd09dc58d05222b287f51b98d2599f83e_0 @@ -0,0 +1,14 @@ + nAveragingSteps++; + + scalar nm1Coeff = scalar(nAveragingSteps - 1)/nAveragingSteps; + scalar nCoeff = 1.0/nAveragingSteps; + + R += sqr(Umean); + Umean = nm1Coeff*Umean + nCoeff*U; + R = nm1Coeff*R + nCoeff*sqr(U) - sqr(Umean); + Bmean = nm1Coeff*Bmean + nCoeff*sgsModel->B(); + epsilonMean = nm1Coeff*epsilonMean + nCoeff*sgsModel->epsilon(); + + pPrime2Mean += sqr(pMean); + pMean = nm1Coeff*pMean + nCoeff*p; + pPrime2Mean = nm1Coeff*pPrime2Mean + nCoeff*sqr(p) - sqr(pMean); diff --git a/applications/solvers/heatTransfer/TlesPimlpleFoam/calculateAverages.H~918dc24fd09dc58d05222b287f51b98d2599f83e_1 b/applications/solvers/heatTransfer/TlesPimlpleFoam/calculateAverages.H~918dc24fd09dc58d05222b287f51b98d2599f83e_1 new file mode 100644 index 0000000000..331a2aaa7e --- /dev/null +++ b/applications/solvers/heatTransfer/TlesPimlpleFoam/calculateAverages.H~918dc24fd09dc58d05222b287f51b98d2599f83e_1 @@ -0,0 +1,14 @@ + nAveragingSteps++; + + scalar nm1Coeff = scalar(nAveragingSteps - 1)/nAveragingSteps; + scalar nCoeff = 1.0/nAveragingSteps; + + R += sqr(Umean); + Umean = nm1Coeff*Umean + nCoeff*U; + R = nm1Coeff*R + nCoeff*sqr(U) - sqr(Umean); + Bmean = nm1Coeff*Bmean + nCoeff*sgsModel->B(); + epsilonMean = nm1Coeff*epsilonMean + nCoeff*sgsModel->epsilon(); + + pPrime2Mean += sqr(pMean); + pMean = nm1Coeff*pMean + nCoeff*p; + pPrime2Mean = nm1Coeff*pPrime2Mean + nCoeff*sqr(p) - sqr(pMean); diff --git a/applications/solvers/heatTransfer/TlesPimlpleFoam/createAverages.H~918dc24fd09dc58d05222b287f51b98d2599f83e b/applications/solvers/heatTransfer/TlesPimlpleFoam/createAverages.H~918dc24fd09dc58d05222b287f51b98d2599f83e new file mode 100644 index 0000000000..64e53cdc77 --- /dev/null +++ b/applications/solvers/heatTransfer/TlesPimlpleFoam/createAverages.H~918dc24fd09dc58d05222b287f51b98d2599f83e @@ -0,0 +1,234 @@ + label nAveragingSteps = 1; + + IFstream nAveragingStepsFile + ( + runTime.path()/runTime.timeName()/"uniform"/"nAveragingSteps.raw" + ); + + + autoPtr UmeanPtr; + autoPtr RPtr; + autoPtr BmeanPtr; + autoPtr epsilonMeanPtr; + + autoPtr pMeanPtr; + autoPtr pPrime2MeanPtr; + + if (nAveragingStepsFile.good()) + { + nAveragingStepsFile >> nAveragingSteps; + + Info<< "Reading field Umean\n" << endl; + UmeanPtr.reset + ( + new volVectorField + ( + IOobject + ( + "Umean", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ) + ); + + Info<< "\nReading field R\n" << endl; + RPtr.reset + ( + new volSymmTensorField + ( + IOobject + ( + "R", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ) + ); + + Info<< "\nReading field Bmean\n" << endl; + BmeanPtr.reset + ( + new volSymmTensorField + ( + IOobject + ( + "Bmean", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ) + ); + + Info<< "\nReading field epsilonMean\n" << endl; + epsilonMeanPtr.reset + ( + new volScalarField + ( + IOobject + ( + "epsilonMean", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ) + ); + + Info<< "Reading field pMean\n" << endl; + pMeanPtr.reset + ( + new volScalarField + ( + IOobject + ( + "pMean", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ) + ); + + Info<< "Reading field pPrime2Mean\n" << endl; + pPrime2MeanPtr.reset + ( + new volScalarField + ( + IOobject + ( + "pPrime2Mean", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ) + ); + } + else + { + Info<< "Creating field Umean\n" << endl; + UmeanPtr.reset + ( + new volVectorField + ( + IOobject + ( + "Umean", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + U + ) + ); + + Info<< "Creating field R\n" << endl; + RPtr.reset + ( + new volSymmTensorField + ( + IOobject + ( + "R", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + sqr(U) - sqr(UmeanPtr()) + ) + ); + + Info<< "Creating field Bmean\n" << endl; + BmeanPtr.reset + ( + new volSymmTensorField + ( + IOobject + ( + "Bmean", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + sgsModel->B() + ) + ); + + Info<< "Creating field epsilonMean\n" << endl; + epsilonMeanPtr.reset + ( + new volScalarField + ( + IOobject + ( + "epsilonMean", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + sgsModel->epsilon() + ) + ); + + Info<< "Creating field pMean\n" << endl; + pMeanPtr.reset + ( + new volScalarField + ( + IOobject + ( + "pMean", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + p + ) + ); + + Info<< "Creating field pPrime2Mean\n" << endl; + pPrime2MeanPtr.reset + ( + new volScalarField + ( + IOobject + ( + "pPrime2Mean", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + sqr(p) - sqr(pMeanPtr()) + ) + ); + } + + volVectorField& Umean = UmeanPtr(); + volSymmTensorField& R = RPtr(); + volSymmTensorField& Bmean = BmeanPtr(); + volScalarField& epsilonMean = epsilonMeanPtr(); + + volScalarField& pMean = pMeanPtr(); + volScalarField& pPrime2Mean = pPrime2MeanPtr(); diff --git a/applications/solvers/heatTransfer/TlesPimlpleFoam/createAverages.H~918dc24fd09dc58d05222b287f51b98d2599f83e_0 b/applications/solvers/heatTransfer/TlesPimlpleFoam/createAverages.H~918dc24fd09dc58d05222b287f51b98d2599f83e_0 new file mode 100644 index 0000000000..64e53cdc77 --- /dev/null +++ b/applications/solvers/heatTransfer/TlesPimlpleFoam/createAverages.H~918dc24fd09dc58d05222b287f51b98d2599f83e_0 @@ -0,0 +1,234 @@ + label nAveragingSteps = 1; + + IFstream nAveragingStepsFile + ( + runTime.path()/runTime.timeName()/"uniform"/"nAveragingSteps.raw" + ); + + + autoPtr UmeanPtr; + autoPtr RPtr; + autoPtr BmeanPtr; + autoPtr epsilonMeanPtr; + + autoPtr pMeanPtr; + autoPtr pPrime2MeanPtr; + + if (nAveragingStepsFile.good()) + { + nAveragingStepsFile >> nAveragingSteps; + + Info<< "Reading field Umean\n" << endl; + UmeanPtr.reset + ( + new volVectorField + ( + IOobject + ( + "Umean", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ) + ); + + Info<< "\nReading field R\n" << endl; + RPtr.reset + ( + new volSymmTensorField + ( + IOobject + ( + "R", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ) + ); + + Info<< "\nReading field Bmean\n" << endl; + BmeanPtr.reset + ( + new volSymmTensorField + ( + IOobject + ( + "Bmean", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ) + ); + + Info<< "\nReading field epsilonMean\n" << endl; + epsilonMeanPtr.reset + ( + new volScalarField + ( + IOobject + ( + "epsilonMean", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ) + ); + + Info<< "Reading field pMean\n" << endl; + pMeanPtr.reset + ( + new volScalarField + ( + IOobject + ( + "pMean", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ) + ); + + Info<< "Reading field pPrime2Mean\n" << endl; + pPrime2MeanPtr.reset + ( + new volScalarField + ( + IOobject + ( + "pPrime2Mean", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ) + ); + } + else + { + Info<< "Creating field Umean\n" << endl; + UmeanPtr.reset + ( + new volVectorField + ( + IOobject + ( + "Umean", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + U + ) + ); + + Info<< "Creating field R\n" << endl; + RPtr.reset + ( + new volSymmTensorField + ( + IOobject + ( + "R", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + sqr(U) - sqr(UmeanPtr()) + ) + ); + + Info<< "Creating field Bmean\n" << endl; + BmeanPtr.reset + ( + new volSymmTensorField + ( + IOobject + ( + "Bmean", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + sgsModel->B() + ) + ); + + Info<< "Creating field epsilonMean\n" << endl; + epsilonMeanPtr.reset + ( + new volScalarField + ( + IOobject + ( + "epsilonMean", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + sgsModel->epsilon() + ) + ); + + Info<< "Creating field pMean\n" << endl; + pMeanPtr.reset + ( + new volScalarField + ( + IOobject + ( + "pMean", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + p + ) + ); + + Info<< "Creating field pPrime2Mean\n" << endl; + pPrime2MeanPtr.reset + ( + new volScalarField + ( + IOobject + ( + "pPrime2Mean", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + sqr(p) - sqr(pMeanPtr()) + ) + ); + } + + volVectorField& Umean = UmeanPtr(); + volSymmTensorField& R = RPtr(); + volSymmTensorField& Bmean = BmeanPtr(); + volScalarField& epsilonMean = epsilonMeanPtr(); + + volScalarField& pMean = pMeanPtr(); + volScalarField& pPrime2Mean = pPrime2MeanPtr(); diff --git a/applications/solvers/heatTransfer/TlesPimlpleFoam/createAverages.H~918dc24fd09dc58d05222b287f51b98d2599f83e_1 b/applications/solvers/heatTransfer/TlesPimlpleFoam/createAverages.H~918dc24fd09dc58d05222b287f51b98d2599f83e_1 new file mode 100644 index 0000000000..64e53cdc77 --- /dev/null +++ b/applications/solvers/heatTransfer/TlesPimlpleFoam/createAverages.H~918dc24fd09dc58d05222b287f51b98d2599f83e_1 @@ -0,0 +1,234 @@ + label nAveragingSteps = 1; + + IFstream nAveragingStepsFile + ( + runTime.path()/runTime.timeName()/"uniform"/"nAveragingSteps.raw" + ); + + + autoPtr UmeanPtr; + autoPtr RPtr; + autoPtr BmeanPtr; + autoPtr epsilonMeanPtr; + + autoPtr pMeanPtr; + autoPtr pPrime2MeanPtr; + + if (nAveragingStepsFile.good()) + { + nAveragingStepsFile >> nAveragingSteps; + + Info<< "Reading field Umean\n" << endl; + UmeanPtr.reset + ( + new volVectorField + ( + IOobject + ( + "Umean", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ) + ); + + Info<< "\nReading field R\n" << endl; + RPtr.reset + ( + new volSymmTensorField + ( + IOobject + ( + "R", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ) + ); + + Info<< "\nReading field Bmean\n" << endl; + BmeanPtr.reset + ( + new volSymmTensorField + ( + IOobject + ( + "Bmean", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ) + ); + + Info<< "\nReading field epsilonMean\n" << endl; + epsilonMeanPtr.reset + ( + new volScalarField + ( + IOobject + ( + "epsilonMean", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ) + ); + + Info<< "Reading field pMean\n" << endl; + pMeanPtr.reset + ( + new volScalarField + ( + IOobject + ( + "pMean", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ) + ); + + Info<< "Reading field pPrime2Mean\n" << endl; + pPrime2MeanPtr.reset + ( + new volScalarField + ( + IOobject + ( + "pPrime2Mean", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ) + ); + } + else + { + Info<< "Creating field Umean\n" << endl; + UmeanPtr.reset + ( + new volVectorField + ( + IOobject + ( + "Umean", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + U + ) + ); + + Info<< "Creating field R\n" << endl; + RPtr.reset + ( + new volSymmTensorField + ( + IOobject + ( + "R", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + sqr(U) - sqr(UmeanPtr()) + ) + ); + + Info<< "Creating field Bmean\n" << endl; + BmeanPtr.reset + ( + new volSymmTensorField + ( + IOobject + ( + "Bmean", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + sgsModel->B() + ) + ); + + Info<< "Creating field epsilonMean\n" << endl; + epsilonMeanPtr.reset + ( + new volScalarField + ( + IOobject + ( + "epsilonMean", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + sgsModel->epsilon() + ) + ); + + Info<< "Creating field pMean\n" << endl; + pMeanPtr.reset + ( + new volScalarField + ( + IOobject + ( + "pMean", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + p + ) + ); + + Info<< "Creating field pPrime2Mean\n" << endl; + pPrime2MeanPtr.reset + ( + new volScalarField + ( + IOobject + ( + "pPrime2Mean", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + sqr(p) - sqr(pMeanPtr()) + ) + ); + } + + volVectorField& Umean = UmeanPtr(); + volSymmTensorField& R = RPtr(); + volSymmTensorField& Bmean = BmeanPtr(); + volScalarField& epsilonMean = epsilonMeanPtr(); + + volScalarField& pMean = pMeanPtr(); + volScalarField& pPrime2Mean = pPrime2MeanPtr(); diff --git a/applications/solvers/heatTransfer/TlesPimlpleFoam/writeNaveragingSteps.H~918dc24fd09dc58d05222b287f51b98d2599f83e b/applications/solvers/heatTransfer/TlesPimlpleFoam/writeNaveragingSteps.H~918dc24fd09dc58d05222b287f51b98d2599f83e new file mode 100644 index 0000000000..f590d9ba6f --- /dev/null +++ b/applications/solvers/heatTransfer/TlesPimlpleFoam/writeNaveragingSteps.H~918dc24fd09dc58d05222b287f51b98d2599f83e @@ -0,0 +1,18 @@ + if (runTime.outputTime()) + { + OFstream nAveragingStepsFile + ( + runTime.path()/runTime.timeName()/"uniform"/"nAveragingSteps.raw" + ); + + if (nAveragingStepsFile.good()) + { + nAveragingStepsFile << nAveragingSteps << endl; + } + else + { + FatalErrorIn(args.executable()) + << "Cannot open file " << nAveragingStepsFile.name() + << abort(FatalError); + } + } diff --git a/applications/solvers/heatTransfer/TlesPimlpleFoam/writeNaveragingSteps.H~918dc24fd09dc58d05222b287f51b98d2599f83e_0 b/applications/solvers/heatTransfer/TlesPimlpleFoam/writeNaveragingSteps.H~918dc24fd09dc58d05222b287f51b98d2599f83e_0 new file mode 100644 index 0000000000..f590d9ba6f --- /dev/null +++ b/applications/solvers/heatTransfer/TlesPimlpleFoam/writeNaveragingSteps.H~918dc24fd09dc58d05222b287f51b98d2599f83e_0 @@ -0,0 +1,18 @@ + if (runTime.outputTime()) + { + OFstream nAveragingStepsFile + ( + runTime.path()/runTime.timeName()/"uniform"/"nAveragingSteps.raw" + ); + + if (nAveragingStepsFile.good()) + { + nAveragingStepsFile << nAveragingSteps << endl; + } + else + { + FatalErrorIn(args.executable()) + << "Cannot open file " << nAveragingStepsFile.name() + << abort(FatalError); + } + } diff --git a/applications/solvers/heatTransfer/TlesPimlpleFoam/writeNaveragingSteps.H~918dc24fd09dc58d05222b287f51b98d2599f83e_1 b/applications/solvers/heatTransfer/TlesPimlpleFoam/writeNaveragingSteps.H~918dc24fd09dc58d05222b287f51b98d2599f83e_1 new file mode 100644 index 0000000000..f590d9ba6f --- /dev/null +++ b/applications/solvers/heatTransfer/TlesPimlpleFoam/writeNaveragingSteps.H~918dc24fd09dc58d05222b287f51b98d2599f83e_1 @@ -0,0 +1,18 @@ + if (runTime.outputTime()) + { + OFstream nAveragingStepsFile + ( + runTime.path()/runTime.timeName()/"uniform"/"nAveragingSteps.raw" + ); + + if (nAveragingStepsFile.good()) + { + nAveragingStepsFile << nAveragingSteps << endl; + } + else + { + FatalErrorIn(args.executable()) + << "Cannot open file " << nAveragingStepsFile.name() + << abort(FatalError); + } + } 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/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/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/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/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 98% rename from src/LESmodels/compressible/DeardorffDiffStress/DeardorffDiffStress.C rename to src/turbulenceModels/LES/compressible/DeardorffDiffStress/DeardorffDiffStress.C index 3cfd53504d..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 * * * * * * * * * * * * * // @@ -127,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 98% rename from src/LESmodels/compressible/DeardorffDiffStress/DeardorffDiffStress.H rename to src/turbulenceModels/LES/compressible/DeardorffDiffStress/DeardorffDiffStress.H index 45b0929f7d..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 { /*---------------------------------------------------------------------------*\ @@ -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 98% rename from src/LESmodels/compressible/GenEddyVisc/GenEddyVisc.C rename to src/turbulenceModels/LES/compressible/GenEddyVisc/GenEddyVisc.C index 08d7d6cf97..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 * * * * * * * * * * * * * * // @@ -129,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 099b16fd86..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 { /*---------------------------------------------------------------------------*\ @@ -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 98% rename from src/LESmodels/compressible/GenSGSStress/GenSGSStress.C rename to src/turbulenceModels/LES/compressible/GenSGSStress/GenSGSStress.C index d1b565a978..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 * * * * * * * * * * * * * * // @@ -144,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 8035007e87..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 { /*---------------------------------------------------------------------------*\ @@ -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 100% rename from src/LESmodels/compressible/LESmodel/LESmodel.C rename to src/turbulenceModels/LES/compressible/LESmodel/LESmodel.C diff --git a/src/LESmodels/compressible/LESmodel/LESmodel.H b/src/turbulenceModels/LES/compressible/LESmodel/LESmodel.H similarity index 100% rename from src/LESmodels/compressible/LESmodel/LESmodel.H rename to src/turbulenceModels/LES/compressible/LESmodel/LESmodel.H 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 98% rename from src/LESmodels/compressible/Smagorinsky/Smagorinsky.C rename to src/turbulenceModels/LES/compressible/Smagorinsky/Smagorinsky.C index 39828a9c03..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 * * * * * * * * * * * * * // @@ -97,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 98% rename from src/LESmodels/compressible/Smagorinsky/Smagorinsky.H rename to src/turbulenceModels/LES/compressible/Smagorinsky/Smagorinsky.H index 94c530e1d5..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 { /*---------------------------------------------------------------------------*\ @@ -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 99% rename from src/LESmodels/compressible/SpalartAllmaras/SpalartAllmaras.C rename to src/turbulenceModels/LES/compressible/SpalartAllmaras/SpalartAllmaras.C index df1f27f98c..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 * * * * * * * * * * * * * // @@ -241,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 98% rename from src/LESmodels/compressible/SpalartAllmaras/SpalartAllmaras.H rename to src/turbulenceModels/LES/compressible/SpalartAllmaras/SpalartAllmaras.H index b6e6074ae7..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 { /*---------------------------------------------------------------------------*\ @@ -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 8f3685453c..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 * * * * * * * * * * * * * // @@ -148,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 98% rename from src/LESmodels/compressible/lowReOneEqEddy/lowReOneEqEddy.C rename to src/turbulenceModels/LES/compressible/lowReOneEqEddy/lowReOneEqEddy.C index 07c594976a..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 { // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -114,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 98% rename from src/LESmodels/compressible/lowReOneEqEddy/lowReOneEqEddy.H rename to src/turbulenceModels/LES/compressible/lowReOneEqEddy/lowReOneEqEddy.H index 65f7b4f416..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 { /*---------------------------------------------------------------------------*\ @@ -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 98% rename from src/LESmodels/compressible/oneEqEddy/oneEqEddy.C rename to src/turbulenceModels/LES/compressible/oneEqEddy/oneEqEddy.C index 00c0fbe96b..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 * * * * * * * * * * * * * // @@ -109,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 98% rename from src/LESmodels/compressible/oneEqEddy/oneEqEddy.H rename to src/turbulenceModels/LES/compressible/oneEqEddy/oneEqEddy.H index 09455a825f..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 { /*---------------------------------------------------------------------------*\ @@ -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 89% rename from src/LESmodels/incompressible/DeardorffDiffStress/DeardorffDiffStress.C rename to src/turbulenceModels/LES/incompressible/DeardorffDiffStress/DeardorffDiffStress.C index 1a76b74acf..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 * * * * * * * * * * * * * // @@ -91,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_); @@ -125,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 98% rename from src/LESmodels/incompressible/DeardorffDiffStress/DeardorffDiffStress.H rename to src/turbulenceModels/LES/incompressible/DeardorffDiffStress/DeardorffDiffStress.H index d7b2d06b6e..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 { /*---------------------------------------------------------------------------*\ @@ -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 98% rename from src/LESmodels/incompressible/GenEddyVisc/GenEddyVisc.C rename to src/turbulenceModels/LES/incompressible/GenEddyVisc/GenEddyVisc.C index ad6f1db5c2..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 * * * * * * * * * * * * * * // @@ -109,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 98% rename from src/LESmodels/incompressible/GenEddyVisc/GenEddyVisc.H rename to src/turbulenceModels/LES/incompressible/GenEddyVisc/GenEddyVisc.H index b66f5da240..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 { /*---------------------------------------------------------------------------*\ @@ -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 98% rename from src/LESmodels/incompressible/GenSGSStress/GenSGSStress.C rename to src/turbulenceModels/LES/incompressible/GenSGSStress/GenSGSStress.C index 9eee42fa26..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 * * * * * * * * * * * * * * // @@ -173,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 297a06d352..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 { /*---------------------------------------------------------------------------*\ @@ -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 100% rename from src/LESmodels/incompressible/LESmodel/LESmodel.C rename to src/turbulenceModels/LES/incompressible/LESmodel/LESmodel.C diff --git a/src/LESmodels/incompressible/LESmodel/LESmodel.H b/src/turbulenceModels/LES/incompressible/LESmodel/LESmodel.H similarity index 100% rename from src/LESmodels/incompressible/LESmodel/LESmodel.H rename to src/turbulenceModels/LES/incompressible/LESmodel/LESmodel.H 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 98% rename from src/LESmodels/incompressible/LRRDiffStress/LRRDiffStress.C rename to src/turbulenceModels/LES/incompressible/LRRDiffStress/LRRDiffStress.C index 1ae232f295..544727b8ac 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 * * * * * * * * * * * * * // @@ -128,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 98% rename from src/LESmodels/incompressible/LRRDiffStress/LRRDiffStress.H rename to src/turbulenceModels/LES/incompressible/LRRDiffStress/LRRDiffStress.H index b9be932079..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 { /*---------------------------------------------------------------------------*\ @@ -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 98% rename from src/LESmodels/incompressible/Smagorinsky/Smagorinsky.C rename to src/turbulenceModels/LES/incompressible/Smagorinsky/Smagorinsky.C index 706812439e..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 * * * * * * * * * * * * * // @@ -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 98% rename from src/LESmodels/incompressible/Smagorinsky/Smagorinsky.H rename to src/turbulenceModels/LES/incompressible/Smagorinsky/Smagorinsky.H index bcedf4cd95..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 { /*---------------------------------------------------------------------------*\ @@ -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 98% rename from src/LESmodels/incompressible/Smagorinsky2/Smagorinsky2.C rename to src/turbulenceModels/LES/incompressible/Smagorinsky2/Smagorinsky2.C index 7ca2395725..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 * * * * * * * * * * * * * // @@ -107,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 98% rename from src/LESmodels/incompressible/Smagorinsky2/Smagorinsky2.H rename to src/turbulenceModels/LES/incompressible/Smagorinsky2/Smagorinsky2.H index 7fd2a59d78..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 { /*---------------------------------------------------------------------------*\ @@ -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 99% rename from src/LESmodels/incompressible/SpalartAllmaras/SpalartAllmaras.C rename to src/turbulenceModels/LES/incompressible/SpalartAllmaras/SpalartAllmaras.C index 5c8c25bd4e..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 * * * * * * * * * * * * * // @@ -237,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 98% rename from src/LESmodels/incompressible/SpalartAllmaras/SpalartAllmaras.H rename to src/turbulenceModels/LES/incompressible/SpalartAllmaras/SpalartAllmaras.H index c36143e9d7..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 { /*---------------------------------------------------------------------------*\ @@ -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 0718ee0220..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 * * * * * * * * * * * * * // @@ -133,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 570aa08b54..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 * * * * * * * * * * * * * // @@ -172,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 ca03a7fd00..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 * * * * * * * * * * * * * // @@ -152,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 a394c814e1..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 * * * * * * * * * * * * * // @@ -163,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 338143a5a6..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 * * * * * * * * * * * * * // @@ -136,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 98% rename from src/LESmodels/incompressible/oneEqEddy/oneEqEddy.C rename to src/turbulenceModels/LES/incompressible/oneEqEddy/oneEqEddy.C index 81b605d86c..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 * * * * * * * * * * * * * // @@ -112,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 98% rename from src/LESmodels/incompressible/oneEqEddy/oneEqEddy.H rename to src/turbulenceModels/LES/incompressible/oneEqEddy/oneEqEddy.H index a546996015..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 { /*---------------------------------------------------------------------------*\ @@ -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 56e0b5d316..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 * * * * * * * * * * * * * // @@ -115,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 98% rename from src/LESmodels/incompressible/spectEddyVisc/spectEddyVisc.C rename to src/turbulenceModels/LES/incompressible/spectEddyVisc/spectEddyVisc.C index edad7876e1..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 * * * * * * * * * * * * * // @@ -117,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 98% rename from src/LESmodels/incompressible/spectEddyVisc/spectEddyVisc.H rename to src/turbulenceModels/LES/incompressible/spectEddyVisc/spectEddyVisc.H index 2543b835fd..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 { /*---------------------------------------------------------------------------*\ @@ -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 98% rename from src/LESmodels/incompressible/vanDriestDelta/vanDriestDelta.C rename to src/turbulenceModels/LES/incompressible/vanDriestDelta/vanDriestDelta.C index bdc974b2c0..a633325022 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 * * * * * * * * * * * * * // @@ -143,7 +143,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 99% rename from src/turbulenceModels/compressible/LRR/LRR.C rename to src/turbulenceModels/RAS/compressible/LRR/LRR.C index abcb8e08a8..6127a63e3f 100644 --- a/src/turbulenceModels/compressible/LRR/LRR.C +++ b/src/turbulenceModels/RAS/compressible/LRR/LRR.C @@ -34,7 +34,7 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -366,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 97% rename from src/turbulenceModels/compressible/LRR/LRR.H rename to src/turbulenceModels/RAS/compressible/LRR/LRR.H index d095a08707..3ac8c47a00 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 @@ -46,7 +46,7 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -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 99% rename from src/turbulenceModels/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C rename to src/turbulenceModels/RAS/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C index af49d94b98..d7bac108de 100644 --- a/src/turbulenceModels/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C +++ b/src/turbulenceModels/RAS/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C @@ -36,7 +36,7 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -390,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 97% rename from src/turbulenceModels/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H rename to src/turbulenceModels/RAS/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H index 3a9bec0679..c6e9128711 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. @@ -46,7 +46,7 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -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 99% rename from src/turbulenceModels/compressible/LaunderSharmaKE/LaunderSharmaKE.C rename to src/turbulenceModels/RAS/compressible/LaunderSharmaKE/LaunderSharmaKE.C index ed86a5e885..90ff2b01c2 100644 --- a/src/turbulenceModels/compressible/LaunderSharmaKE/LaunderSharmaKE.C +++ b/src/turbulenceModels/RAS/compressible/LaunderSharmaKE/LaunderSharmaKE.C @@ -34,7 +34,7 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -270,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 97% rename from src/turbulenceModels/compressible/LaunderSharmaKE/LaunderSharmaKE.H rename to src/turbulenceModels/RAS/compressible/LaunderSharmaKE/LaunderSharmaKE.H index 1bfb5eecd2..07eda8047b 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 @@ -46,7 +46,7 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -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 100% rename from src/turbulenceModels/compressible/Make/files rename to src/turbulenceModels/RAS/compressible/Make/files 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/RNGkEpsilon/RNGkEpsilon.C b/src/turbulenceModels/RAS/compressible/RNGkEpsilon/RNGkEpsilon.C similarity index 99% rename from src/turbulenceModels/compressible/RNGkEpsilon/RNGkEpsilon.C rename to src/turbulenceModels/RAS/compressible/RNGkEpsilon/RNGkEpsilon.C index d13d4ff1d3..072e8d65e3 100644 --- a/src/turbulenceModels/compressible/RNGkEpsilon/RNGkEpsilon.C +++ b/src/turbulenceModels/RAS/compressible/RNGkEpsilon/RNGkEpsilon.C @@ -34,7 +34,7 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -267,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 97% rename from src/turbulenceModels/compressible/RNGkEpsilon/RNGkEpsilon.H rename to src/turbulenceModels/RAS/compressible/RNGkEpsilon/RNGkEpsilon.H index f3e5c31c9f..3d70f721a5 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. @@ -45,7 +45,7 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -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 99% rename from src/turbulenceModels/compressible/SpalartAllmaras/SpalartAllmaras.C rename to src/turbulenceModels/RAS/compressible/SpalartAllmaras/SpalartAllmaras.C index 802a63c8c9..d6bd52b61a 100644 --- a/src/turbulenceModels/compressible/SpalartAllmaras/SpalartAllmaras.C +++ b/src/turbulenceModels/RAS/compressible/SpalartAllmaras/SpalartAllmaras.C @@ -34,7 +34,7 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -285,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 98% rename from src/turbulenceModels/compressible/SpalartAllmaras/SpalartAllmaras.H rename to src/turbulenceModels/RAS/compressible/SpalartAllmaras/SpalartAllmaras.H index fbb1761d20..08b41ddb11 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 @@ -62,7 +62,7 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -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 99% rename from src/turbulenceModels/compressible/kEpsilon/kEpsilon.C rename to src/turbulenceModels/RAS/compressible/kEpsilon/kEpsilon.C index e77192b006..6545b763d9 100644 --- a/src/turbulenceModels/compressible/kEpsilon/kEpsilon.C +++ b/src/turbulenceModels/RAS/compressible/kEpsilon/kEpsilon.C @@ -34,7 +34,7 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -257,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 97% rename from src/turbulenceModels/compressible/kEpsilon/kEpsilon.H rename to src/turbulenceModels/RAS/compressible/kEpsilon/kEpsilon.H index f88830349a..3a58da60b3 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 @@ -45,7 +45,7 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -164,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 99% rename from src/turbulenceModels/compressible/kOmegaSST/kOmegaSST.C rename to src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaSST.C index b9b511d839..3369960b4f 100644 --- a/src/turbulenceModels/compressible/kOmegaSST/kOmegaSST.C +++ b/src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaSST.C @@ -34,7 +34,7 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -348,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 98% rename from src/turbulenceModels/compressible/kOmegaSST/kOmegaSST.H rename to src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaSST.H index b0a4905fa0..717403d3e8 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. @@ -72,7 +72,7 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -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 100% rename from src/turbulenceModels/compressible/kOmegaSST/kOmegaWallFunctionsI.H rename to src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaWallFunctionsI.H diff --git a/src/turbulenceModels/compressible/kOmegaSST/kOmegaWallViscosityI.H b/src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaWallViscosityI.H similarity index 100% rename from src/turbulenceModels/compressible/kOmegaSST/kOmegaWallViscosityI.H rename to src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaWallViscosityI.H 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 98% rename from src/turbulenceModels/compressible/laminar/laminar.C rename to src/turbulenceModels/RAS/compressible/laminar/laminar.C index 0a576c96ec..291f40e585 100644 --- a/src/turbulenceModels/compressible/laminar/laminar.C +++ b/src/turbulenceModels/RAS/compressible/laminar/laminar.C @@ -33,7 +33,7 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -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 97% rename from src/turbulenceModels/compressible/laminar/laminar.H rename to src/turbulenceModels/RAS/compressible/laminar/laminar.H index e3c062878f..31efee8b39 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. @@ -45,7 +45,7 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -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 99% rename from src/turbulenceModels/compressible/realizableKE/realizableKE.C rename to src/turbulenceModels/RAS/compressible/realizableKE/realizableKE.C index e330ca3c21..f7aa5b9fef 100644 --- a/src/turbulenceModels/compressible/realizableKE/realizableKE.C +++ b/src/turbulenceModels/RAS/compressible/realizableKE/realizableKE.C @@ -34,7 +34,7 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -302,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 97% rename from src/turbulenceModels/compressible/realizableKE/realizableKE.H rename to src/turbulenceModels/RAS/compressible/realizableKE/realizableKE.H index 73e64b2bb4..d8f1d10e11 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. @@ -55,7 +55,7 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -179,7 +179,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS } // End namespace compressible } // End namespace Foam diff --git a/src/turbulenceModels/compressible/turbulenceModel/newTurbulenceModel.C b/src/turbulenceModels/RAS/compressible/turbulenceModel/newTurbulenceModel.C similarity index 100% rename from src/turbulenceModels/compressible/turbulenceModel/newTurbulenceModel.C rename to src/turbulenceModels/RAS/compressible/turbulenceModel/newTurbulenceModel.C diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C b/src/turbulenceModels/RAS/compressible/turbulenceModel/turbulenceModel.C similarity index 100% rename from src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C rename to src/turbulenceModels/RAS/compressible/turbulenceModel/turbulenceModel.C diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/RAS/compressible/turbulenceModel/turbulenceModel.H similarity index 98% rename from src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H rename to src/turbulenceModels/RAS/compressible/turbulenceModel/turbulenceModel.H index 5036bff206..d0a3b2ae1a 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H +++ b/src/turbulenceModels/RAS/compressible/turbulenceModel/turbulenceModel.H @@ -23,10 +23,10 @@ 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 diff --git a/src/turbulenceModels/compressible/wallFunctions/mutWallFunctions/mutStandardRoughWallFunction/mutStandardRoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/RAS/compressible/wallFunctions/mutWallFunctions/mutStandardRoughWallFunction/mutStandardRoughWallFunctionFvPatchScalarField.C similarity index 99% rename from src/turbulenceModels/compressible/wallFunctions/mutWallFunctions/mutStandardRoughWallFunction/mutStandardRoughWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/RAS/compressible/wallFunctions/mutWallFunctions/mutStandardRoughWallFunction/mutStandardRoughWallFunctionFvPatchScalarField.C index 3c69402750..64d45abbdf 100644 --- a/src/turbulenceModels/compressible/wallFunctions/mutWallFunctions/mutStandardRoughWallFunction/mutStandardRoughWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/RAS/compressible/wallFunctions/mutWallFunctions/mutStandardRoughWallFunction/mutStandardRoughWallFunctionFvPatchScalarField.C @@ -36,7 +36,7 @@ namespace Foam { namespace compressible { -namespace turbulenceModels +namespace RAS { // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -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 100% rename from src/turbulenceModels/compressible/wallFunctions/wallFunctionsI.H rename to src/turbulenceModels/RAS/compressible/wallFunctions/wallFunctionsI.H diff --git a/src/turbulenceModels/compressible/wallFunctions/wallViscosityI.H b/src/turbulenceModels/RAS/compressible/wallFunctions/wallViscosityI.H similarity index 100% rename from src/turbulenceModels/compressible/wallFunctions/wallViscosityI.H rename to src/turbulenceModels/RAS/compressible/wallFunctions/wallViscosityI.H diff --git a/src/turbulenceModels/incompressible/LRR/LRR.C b/src/turbulenceModels/RAS/incompressible/LRR/LRR.C similarity index 98% rename from src/turbulenceModels/incompressible/LRR/LRR.C rename to src/turbulenceModels/RAS/incompressible/LRR/LRR.C index ac1fa841b1..1151255d8b 100644 --- a/src/turbulenceModels/incompressible/LRR/LRR.C +++ b/src/turbulenceModels/RAS/incompressible/LRR/LRR.C @@ -32,7 +32,9 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -346,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 96% rename from src/turbulenceModels/incompressible/LRR/LRR.H rename to src/turbulenceModels/RAS/incompressible/LRR/LRR.H index bcc6c119d5..e4c8c9f338 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 @@ -43,7 +43,9 @@ SourceFiles namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -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 98% rename from src/turbulenceModels/incompressible/LamBremhorstKE/LamBremhorstKE.C rename to src/turbulenceModels/RAS/incompressible/LamBremhorstKE/LamBremhorstKE.C index 02921cc661..eaa3da2984 100644 --- a/src/turbulenceModels/incompressible/LamBremhorstKE/LamBremhorstKE.C +++ b/src/turbulenceModels/RAS/incompressible/LamBremhorstKE/LamBremhorstKE.C @@ -31,7 +31,9 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -242,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 96% rename from src/turbulenceModels/incompressible/LamBremhorstKE/LamBremhorstKE.H rename to src/turbulenceModels/RAS/incompressible/LamBremhorstKE/LamBremhorstKE.H index b78998d6ce..4a9f48ecd4 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 @@ -44,7 +44,9 @@ SourceFiles namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -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 99% rename from src/turbulenceModels/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C rename to src/turbulenceModels/RAS/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C index 3aaaa93f9e..d2fb24cde5 100644 --- a/src/turbulenceModels/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C +++ b/src/turbulenceModels/RAS/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C @@ -32,7 +32,9 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -369,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 96% rename from src/turbulenceModels/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H rename to src/turbulenceModels/RAS/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H index 5ca442e79e..82ea6ae7d5 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. @@ -43,7 +43,9 @@ SourceFiles namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -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 98% rename from src/turbulenceModels/incompressible/LaunderSharmaKE/LaunderSharmaKE.C rename to src/turbulenceModels/RAS/incompressible/LaunderSharmaKE/LaunderSharmaKE.C index 2608339864..edf6c03051 100644 --- a/src/turbulenceModels/incompressible/LaunderSharmaKE/LaunderSharmaKE.C +++ b/src/turbulenceModels/RAS/incompressible/LaunderSharmaKE/LaunderSharmaKE.C @@ -31,7 +31,9 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -237,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 96% rename from src/turbulenceModels/incompressible/LaunderSharmaKE/LaunderSharmaKE.H rename to src/turbulenceModels/RAS/incompressible/LaunderSharmaKE/LaunderSharmaKE.H index f83fa6fdac..befc3a589b 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 @@ -43,7 +43,9 @@ SourceFiles namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -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 98% rename from src/turbulenceModels/incompressible/LienCubicKE/LienCubicKE.C rename to src/turbulenceModels/RAS/incompressible/LienCubicKE/LienCubicKE.C index 4390541ffd..3050ca0c1b 100644 --- a/src/turbulenceModels/incompressible/LienCubicKE/LienCubicKE.C +++ b/src/turbulenceModels/RAS/incompressible/LienCubicKE/LienCubicKE.C @@ -32,7 +32,9 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -319,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 96% rename from src/turbulenceModels/incompressible/LienCubicKE/LienCubicKE.H rename to src/turbulenceModels/RAS/incompressible/LienCubicKE/LienCubicKE.H index cdcfe24a27..4b1a061df7 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. @@ -42,7 +42,9 @@ SourceFiles namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -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 99% rename from src/turbulenceModels/incompressible/LienCubicKELowRe/LienCubicKELowRe.C rename to src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowRe.C index 662de4fd48..96cae22468 100644 --- a/src/turbulenceModels/incompressible/LienCubicKELowRe/LienCubicKELowRe.C +++ b/src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowRe.C @@ -32,7 +32,9 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -380,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 97% rename from src/turbulenceModels/incompressible/LienCubicKELowRe/LienCubicKELowRe.H rename to src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowRe.H index 445799b428..17e2dbfacb 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 @@ -58,7 +58,9 @@ SourceFiles namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -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 100% rename from src/turbulenceModels/incompressible/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H rename to src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H diff --git a/src/turbulenceModels/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.C b/src/turbulenceModels/RAS/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.C similarity index 98% rename from src/turbulenceModels/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.C rename to src/turbulenceModels/RAS/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.C index dba79ad54e..8f9b218d1d 100644 --- a/src/turbulenceModels/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.C +++ b/src/turbulenceModels/RAS/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.C @@ -32,7 +32,9 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -269,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 96% rename from src/turbulenceModels/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.H rename to src/turbulenceModels/RAS/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.H index f921fe6fc8..effce00a16 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 @@ -44,7 +44,9 @@ SourceFiles namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -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 100% rename from src/turbulenceModels/incompressible/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H rename to src/turbulenceModels/RAS/incompressible/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H diff --git a/src/turbulenceModels/incompressible/Make/files b/src/turbulenceModels/RAS/incompressible/Make/files similarity index 100% rename from src/turbulenceModels/incompressible/Make/files rename to src/turbulenceModels/RAS/incompressible/Make/files 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 98% rename from src/turbulenceModels/incompressible/NonlinearKEShih/NonlinearKEShih.C rename to src/turbulenceModels/RAS/incompressible/NonlinearKEShih/NonlinearKEShih.C index ac432e4618..8001d707c7 100644 --- a/src/turbulenceModels/incompressible/NonlinearKEShih/NonlinearKEShih.C +++ b/src/turbulenceModels/RAS/incompressible/NonlinearKEShih/NonlinearKEShih.C @@ -32,7 +32,9 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -294,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 96% rename from src/turbulenceModels/incompressible/NonlinearKEShih/NonlinearKEShih.H rename to src/turbulenceModels/RAS/incompressible/NonlinearKEShih/NonlinearKEShih.H index 5a820e9a21..f8e5973a64 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 @@ -43,7 +43,9 @@ SourceFiles namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -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 98% rename from src/turbulenceModels/incompressible/QZeta/QZeta.C rename to src/turbulenceModels/RAS/incompressible/QZeta/QZeta.C index 27198fef05..d10559ccde 100644 --- a/src/turbulenceModels/incompressible/QZeta/QZeta.C +++ b/src/turbulenceModels/RAS/incompressible/QZeta/QZeta.C @@ -31,7 +31,9 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -291,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 97% rename from src/turbulenceModels/incompressible/QZeta/QZeta.H rename to src/turbulenceModels/RAS/incompressible/QZeta/QZeta.H index 7ad93af896..5e9d6953f0 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 @@ -43,7 +43,9 @@ SourceFiles namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -166,7 +168,8 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // 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 98% rename from src/turbulenceModels/incompressible/RNGkEpsilon/RNGkEpsilon.C rename to src/turbulenceModels/RAS/incompressible/RNGkEpsilon/RNGkEpsilon.C index 6da8e707cc..5ec48b1ed5 100644 --- a/src/turbulenceModels/incompressible/RNGkEpsilon/RNGkEpsilon.C +++ b/src/turbulenceModels/RAS/incompressible/RNGkEpsilon/RNGkEpsilon.C @@ -32,7 +32,9 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -238,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 96% rename from src/turbulenceModels/incompressible/RNGkEpsilon/RNGkEpsilon.H rename to src/turbulenceModels/RAS/incompressible/RNGkEpsilon/RNGkEpsilon.H index 307c9b7219..47df99ac8c 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. @@ -42,7 +42,9 @@ SourceFiles namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -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 98% rename from src/turbulenceModels/incompressible/SpalartAllmaras/SpalartAllmaras.C rename to src/turbulenceModels/RAS/incompressible/SpalartAllmaras/SpalartAllmaras.C index 197da2eee5..c623765464 100644 --- a/src/turbulenceModels/incompressible/SpalartAllmaras/SpalartAllmaras.C +++ b/src/turbulenceModels/RAS/incompressible/SpalartAllmaras/SpalartAllmaras.C @@ -32,7 +32,9 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -325,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 96% rename from src/turbulenceModels/incompressible/SpalartAllmaras/SpalartAllmaras.H rename to src/turbulenceModels/RAS/incompressible/SpalartAllmaras/SpalartAllmaras.H index ef0be3c3be..6ad20dbe13 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 @@ -59,7 +59,9 @@ SourceFiles namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -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 98% rename from src/turbulenceModels/incompressible/kEpsilon/kEpsilon.C rename to src/turbulenceModels/RAS/incompressible/kEpsilon/kEpsilon.C index fa55f6b702..524649e8f3 100644 --- a/src/turbulenceModels/incompressible/kEpsilon/kEpsilon.C +++ b/src/turbulenceModels/RAS/incompressible/kEpsilon/kEpsilon.C @@ -32,7 +32,9 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -227,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 96% rename from src/turbulenceModels/incompressible/kEpsilon/kEpsilon.H rename to src/turbulenceModels/RAS/incompressible/kEpsilon/kEpsilon.H index 9c80f45af9..697edabc2f 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. @@ -42,7 +42,9 @@ SourceFiles namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -149,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 98% rename from src/turbulenceModels/incompressible/kOmegaSST/kOmegaSST.C rename to src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaSST.C index 0530b4f2fc..a2d6838b28 100644 --- a/src/turbulenceModels/incompressible/kOmegaSST/kOmegaSST.C +++ b/src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaSST.C @@ -32,7 +32,9 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -323,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 98% rename from src/turbulenceModels/incompressible/kOmegaSST/kOmegaSST.H rename to src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaSST.H index c4b9bbd90e..0672ed3f39 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 @@ -71,7 +71,9 @@ SourceFiles namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -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 100% rename from src/turbulenceModels/incompressible/kOmegaSST/kOmegaWallFunctionsI.H rename to src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaWallFunctionsI.H diff --git a/src/turbulenceModels/incompressible/kOmegaSST/kOmegaWallViscosityI.H b/src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaWallViscosityI.H similarity index 100% rename from src/turbulenceModels/incompressible/kOmegaSST/kOmegaWallViscosityI.H rename to src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaWallViscosityI.H 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 97% rename from src/turbulenceModels/incompressible/laminar/laminar.C rename to src/turbulenceModels/RAS/incompressible/laminar/laminar.C index 23096bae43..931adedc68 100644 --- a/src/turbulenceModels/incompressible/laminar/laminar.C +++ b/src/turbulenceModels/RAS/incompressible/laminar/laminar.C @@ -31,7 +31,9 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -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 96% rename from src/turbulenceModels/incompressible/laminar/laminar.H rename to src/turbulenceModels/RAS/incompressible/laminar/laminar.H index 60ec7e3e3d..e29ac76b49 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. @@ -42,7 +42,9 @@ SourceFiles namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -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 98% rename from src/turbulenceModels/incompressible/realizableKE/realizableKE.C rename to src/turbulenceModels/RAS/incompressible/realizableKE/realizableKE.C index 84da561444..132a7b84cb 100644 --- a/src/turbulenceModels/incompressible/realizableKE/realizableKE.C +++ b/src/turbulenceModels/RAS/incompressible/realizableKE/realizableKE.C @@ -32,7 +32,9 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -283,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 97% rename from src/turbulenceModels/incompressible/realizableKE/realizableKE.H rename to src/turbulenceModels/RAS/incompressible/realizableKE/realizableKE.H index d6e9f62f80..41c15c9ee5 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. @@ -54,7 +54,9 @@ SourceFiles namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { /*---------------------------------------------------------------------------*\ @@ -168,7 +170,8 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace turbulenceModels +} // End namespace RAS +} // End namespace incompressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/incompressible/turbulenceModel/checkIncompressibleTurbulenceModelsLock.C b/src/turbulenceModels/RAS/incompressible/turbulenceModel/checkIncompressibleTurbulenceModelsLock.C similarity index 100% rename from src/turbulenceModels/incompressible/turbulenceModel/checkIncompressibleTurbulenceModelsLock.C rename to src/turbulenceModels/RAS/incompressible/turbulenceModel/checkIncompressibleTurbulenceModelsLock.C diff --git a/src/turbulenceModels/incompressible/turbulenceModel/newTurbulenceModel.C b/src/turbulenceModels/RAS/incompressible/turbulenceModel/newTurbulenceModel.C similarity index 98% rename from src/turbulenceModels/incompressible/turbulenceModel/newTurbulenceModel.C rename to src/turbulenceModels/RAS/incompressible/turbulenceModel/newTurbulenceModel.C index bed073afa8..6b060f9419 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/newTurbulenceModel.C +++ b/src/turbulenceModels/RAS/incompressible/turbulenceModel/newTurbulenceModel.C @@ -32,6 +32,8 @@ License namespace Foam { +namespace incompressible +{ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -88,6 +90,7 @@ autoPtr turbulenceModel::New // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +} // End namespace incompressible } // End namespace Foam // ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C b/src/turbulenceModels/RAS/incompressible/turbulenceModel/turbulenceModel.C similarity index 98% rename from src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C rename to src/turbulenceModels/RAS/incompressible/turbulenceModel/turbulenceModel.C index 3f1e371f96..7c157e8940 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C +++ b/src/turbulenceModels/RAS/incompressible/turbulenceModel/turbulenceModel.C @@ -31,6 +31,8 @@ License namespace Foam { +namespace incompressible +{ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -197,6 +199,7 @@ bool turbulenceModel::read() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +} // End namespace incompressible } // End namespace Foam // ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/RAS/incompressible/turbulenceModel/turbulenceModel.H similarity index 97% rename from src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H rename to src/turbulenceModels/RAS/incompressible/turbulenceModel/turbulenceModel.H index a8bd512763..aaeb320f1d 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H +++ b/src/turbulenceModels/RAS/incompressible/turbulenceModel/turbulenceModel.H @@ -23,14 +23,13 @@ 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::turbulenceModel Description Abstract base class for incompressible turbulence models. @@ -61,6 +60,8 @@ SourceFiles namespace Foam { +namespace incompressible +{ /*---------------------------------------------------------------------------*\ Class turbulenceModel Declaration @@ -277,6 +278,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +} // 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 97% rename from src/turbulenceModels/incompressible/wallFunctions/nutWallFunctions/nutStandardRoughWallFunction/nutStandardRoughWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutStandardRoughWallFunction/nutStandardRoughWallFunctionFvPatchScalarField.C index 90553c8466..ac6cfb35ec 100644 --- a/src/turbulenceModels/incompressible/wallFunctions/nutWallFunctions/nutStandardRoughWallFunction/nutStandardRoughWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutStandardRoughWallFunction/nutStandardRoughWallFunctionFvPatchScalarField.C @@ -34,7 +34,9 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -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 96% rename from src/turbulenceModels/incompressible/wallFunctions/nutWallFunctions/nutStandardWallFunction/nutStandardWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutStandardWallFunction/nutStandardWallFunctionFvPatchScalarField.C index 95dc6ffdf2..d4be48e28f 100644 --- a/src/turbulenceModels/incompressible/wallFunctions/nutWallFunctions/nutStandardWallFunction/nutStandardWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutStandardWallFunction/nutStandardWallFunctionFvPatchScalarField.C @@ -34,7 +34,9 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -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 95% rename from src/turbulenceModels/incompressible/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C index fee8408704..b25cc9f079 100644 --- a/src/turbulenceModels/incompressible/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C @@ -34,7 +34,9 @@ License namespace Foam { -namespace turbulenceModels +namespace incompressible +{ +namespace RAS { // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -103,12 +105,12 @@ void nutWallFunctionFvPatchScalarField::evaluate(const Pstream::commsTypes) 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 100% rename from src/turbulenceModels/incompressible/wallFunctions/wallFunctionsI.H rename to src/turbulenceModels/RAS/incompressible/wallFunctions/wallFunctionsI.H 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 100% rename from src/turbulenceModels/incompressible/wallFunctions/wallViscosityI.H rename to src/turbulenceModels/RAS/incompressible/wallFunctions/wallViscosityI.H