diff --git a/BuildIssues.txt b/BuildIssues.txt index 2cd8ff0124..011b5dc048 100644 --- a/BuildIssues.txt +++ b/BuildIssues.txt @@ -1,4 +1,4 @@ -OpenFOAM-v1612+ +OpenFOAM-1706 ================== Known Build Issues ================== @@ -22,16 +22,15 @@ VTK --- If using the runTimePostProcessing to create on-the-fly images, you -can simply just compile ParaView-5.0.1 and these libraries will -be used. +can simply just compile ParaView and these libraries will be used. If you elect to use a separate VTK compilation (for example for off-screen rendering), it is advisable to reuse the VTK libraries that -are provided with ParaView-5.0.1, by making an appropriate symlink +are provided with ParaView by making an appropriate symlink prior to using makeVTK. This doesn't just reduce disk-space, but works -much better than using the VTK-7.1.0.tar file. +much better than using the VTK tar file. -Using runTimePostProcessing with the 'plain' VTK-7.1.0 libraries does +Using runTimePostProcessing with the 'plain' VTK libraries does generally work, but does not exit cleanly: symbol lookup error: .../linux64Gcc/VTK-7.1.0/lib/libvtkCommonExecutionModel-7.1.so.1: @@ -60,4 +59,21 @@ there are also minimum gcc/g++ requirements there: If your system compiler is too old to build the minimum required gcc or clang/llvm, it is just simply too old. + +------------------------- +Building with spack +------------------------- + +If you are building with spack, note that the depends_on for paraview +resolves poorly. The +qt dependency (for building the reader module) +may need to be specified as a preference by including the following in +your `~/.spack/packages.yaml` file: + + packages: + paraview: + variants: +qt + +It appears that spack will otherwise ignore any paraview+qt version +and attempt to install a paraview~qt version instead. + -- diff --git a/applications/solvers/multiphase/interFoam/interFoam.C b/applications/solvers/multiphase/interFoam/interFoam.C index 858624b2d5..356d795e15 100644 --- a/applications/solvers/multiphase/interFoam/interFoam.C +++ b/applications/solvers/multiphase/interFoam/interFoam.C @@ -110,6 +110,11 @@ int main(int argc, char *argv[]) mixture.correct(); + if (pimple.frozenFlow()) + { + continue; + } + #include "UEqn.H" // --- Pressure corrector loop diff --git a/applications/solvers/multiphase/interIsoFoam/createIsoAdvection.H b/applications/solvers/multiphase/interIsoFoam/createIsoAdvection.H index 889af7228f..3360cdae65 100644 --- a/applications/solvers/multiphase/interIsoFoam/createIsoAdvection.H +++ b/applications/solvers/multiphase/interIsoFoam/createIsoAdvection.H @@ -1,10 +1,2 @@ // Defining isoAdvection isoAdvection advector(alpha1, phi, U); - -bool frozenFlow = pimple.dict().lookupOrDefault("frozenFlow", false); -if (frozenFlow) -{ - Info<< "Employing frozen-flow assumption: " - << "pressure-velocity system will not be updated" - << endl; -} diff --git a/applications/solvers/multiphase/interIsoFoam/interIsoFoam.C b/applications/solvers/multiphase/interIsoFoam/interIsoFoam.C index 1514c5c0cb..14242048fc 100644 --- a/applications/solvers/multiphase/interIsoFoam/interIsoFoam.C +++ b/applications/solvers/multiphase/interIsoFoam/interIsoFoam.C @@ -108,7 +108,7 @@ int main(int argc, char *argv[]) mixture.correct(); - if (frozenFlow) + if (pimple.frozenFlow()) { continue; } diff --git a/applications/test/parallelOverset/heatTransfer/0.orig/T b/applications/test/parallelOverset/heatTransfer/0.orig/T index c775c6f0c5..ae5157b7e0 100644 --- a/applications/test/parallelOverset/heatTransfer/0.orig/T +++ b/applications/test/parallelOverset/heatTransfer/0.orig/T @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/parallelOverset/heatTransfer/0.orig/pointDisplacement b/applications/test/parallelOverset/heatTransfer/0.orig/pointDisplacement index a1dda3a417..29acef2de5 100644 --- a/applications/test/parallelOverset/heatTransfer/0.orig/pointDisplacement +++ b/applications/test/parallelOverset/heatTransfer/0.orig/pointDisplacement @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/parallelOverset/heatTransfer/0.orig/zoneID b/applications/test/parallelOverset/heatTransfer/0.orig/zoneID index 3e3f18697d..2edf36c2cd 100644 --- a/applications/test/parallelOverset/heatTransfer/0.orig/zoneID +++ b/applications/test/parallelOverset/heatTransfer/0.orig/zoneID @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev-OpenCFD.overlap | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/parallelOverset/heatTransfer/constant/dynamicMeshDict b/applications/test/parallelOverset/heatTransfer/constant/dynamicMeshDict index 69054196e6..9f766ac272 100644 --- a/applications/test/parallelOverset/heatTransfer/constant/dynamicMeshDict +++ b/applications/test/parallelOverset/heatTransfer/constant/dynamicMeshDict @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/parallelOverset/heatTransfer/constant/transportProperties b/applications/test/parallelOverset/heatTransfer/constant/transportProperties index 2c17a95828..f182863c08 100644 --- a/applications/test/parallelOverset/heatTransfer/constant/transportProperties +++ b/applications/test/parallelOverset/heatTransfer/constant/transportProperties @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/parallelOverset/heatTransfer/system/blockMeshDict b/applications/test/parallelOverset/heatTransfer/system/blockMeshDict index c3dd3573eb..d04d518b0a 100644 --- a/applications/test/parallelOverset/heatTransfer/system/blockMeshDict +++ b/applications/test/parallelOverset/heatTransfer/system/blockMeshDict @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: http://www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/parallelOverset/heatTransfer/system/controlDict b/applications/test/parallelOverset/heatTransfer/system/controlDict index 535f677519..0fe692435c 100644 --- a/applications/test/parallelOverset/heatTransfer/system/controlDict +++ b/applications/test/parallelOverset/heatTransfer/system/controlDict @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/parallelOverset/heatTransfer/system/fvSchemes b/applications/test/parallelOverset/heatTransfer/system/fvSchemes index 43c631a1f2..007f617df6 100644 --- a/applications/test/parallelOverset/heatTransfer/system/fvSchemes +++ b/applications/test/parallelOverset/heatTransfer/system/fvSchemes @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/parallelOverset/heatTransfer/system/fvSolution b/applications/test/parallelOverset/heatTransfer/system/fvSolution index 66c7f94747..773fadd0c1 100644 --- a/applications/test/parallelOverset/heatTransfer/system/fvSolution +++ b/applications/test/parallelOverset/heatTransfer/system/fvSolution @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/parallelOverset/heatTransfer/system/setFieldsDict b/applications/test/parallelOverset/heatTransfer/system/setFieldsDict index 2ebc58f23a..8efb92d610 100644 --- a/applications/test/parallelOverset/heatTransfer/system/setFieldsDict +++ b/applications/test/parallelOverset/heatTransfer/system/setFieldsDict @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/parallelOverset/heatTransfer/system/topoSetDict b/applications/test/parallelOverset/heatTransfer/system/topoSetDict index 06a8182d40..8c550002ee 100644 --- a/applications/test/parallelOverset/heatTransfer/system/topoSetDict +++ b/applications/test/parallelOverset/heatTransfer/system/topoSetDict @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/utilities/mesh/advanced/snappyRefineMesh/snappyRefineMesh.C b/applications/utilities/mesh/advanced/snappyRefineMesh/snappyRefineMesh.C index 6b5e74c71f..1edd75e560 100644 --- a/applications/utilities/mesh/advanced/snappyRefineMesh/snappyRefineMesh.C +++ b/applications/utilities/mesh/advanced/snappyRefineMesh/snappyRefineMesh.C @@ -651,7 +651,7 @@ int main(int argc, char *argv[]) ); // corrector for mesh motion - twoDPointCorrector* correct2DPtr = NULL; + twoDPointCorrector* correct2DPtr = nullptr; if (motionObj.typeHeaderOk(true)) { diff --git a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_set_filenames.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_set_filenames.H index 6c58a72c09..ea12f0aef7 100644 --- a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_set_filenames.H +++ b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_set_filenames.H @@ -28,7 +28,7 @@ int USERD_set_filenames // remove the last '/' from rootDir if (the_path[lRoot-1] == '/') { - the_path[lRoot-1] = char(NULL); + the_path[lRoot-1] = '\0'; } else { diff --git a/bin/tools/foamCreateBashCompletions b/bin/tools/foamCreateBashCompletions index ccc65a2313..f7c384f482 100755 --- a/bin/tools/foamCreateBashCompletions +++ b/bin/tools/foamCreateBashCompletions @@ -97,6 +97,7 @@ done cat << HEADER > $outFile #----------------------------------*-sh-*-------------------------------------- # Bash completions for OpenFOAM applications +# Formatted as "complete ... -F _of_APPNAME APPNAME unset -f _of_filter_opts 2>/dev/null _of_filter_opts() diff --git a/bin/tools/pre-commit-hook b/bin/tools/pre-commit-hook index b4f847d15f..fdf6c50a57 100755 --- a/bin/tools/pre-commit-hook +++ b/bin/tools/pre-commit-hook @@ -62,6 +62,14 @@ die() exit 1 } +# Automatically upgrade copyrights in files. +# Disabled by default since some changes (eg, spelling) do not automatically +# imply an update copyright. +optCopyright=false + +# Run all tests (do not exit on first failure) +optAll=false + #----------------------------------------------------------------------------- # Check content that will be added by this commit. @@ -76,11 +84,27 @@ fi # called manually with arguments for the files/directories to be tested? if [ "$#" -gt 0 ] then - case "$1" in - -h | -help) - die "interactive usage: supply list of files/directories to check" - ;; - esac + while [ "$#" -gt 0 ] + do + case "$1" in + -h | -help) + die "interactive usage: supply list of files/directories to check" + ;; + -copy) + echo "$hookName: adjust copyright enabled" 1>&2 + optCopyright=true + shift + ;; + -all) + echo "$hookName: do all tests (no premature exit)" 1>&2 + optAll=true + shift + ;; + *) + break + ;; + esac + done # obtain list of all specified files/directories fileList=$(git ls-files -- $@ 2>/dev/null) @@ -100,6 +124,8 @@ unset badFiles # join list of files with this amount of space Indent=" " +exitCode=0 + # # report bad files and die if there are any # @@ -114,7 +140,14 @@ dieOnBadFiles() echo "File(s):" 1>&2 echo "$badFiles" 1>&2 echo '' 1>&2 - exit 1 + + exitCode=1 + if [ "$optAll" = true ] + then + return 0 # Continue to the next test + else + exit $exitCode + fi fi } @@ -314,7 +347,7 @@ MESSAGE # -# check that OpenFOAM Foundation copyright is current +# check that copyright date is current # checkCopyright() { @@ -327,9 +360,9 @@ checkCopyright() startYear=`grep "Copyright.*OpenCFD" $f | sed 's/[^0-9]*\([0-9]*\).*/\1/g'` endYear=`grep "Copyright.*-.*OpenCFD" $f | sed 's/[^-]*-\([0-9]*\).*/\1/g'` #echo "startYear=$startYear endYear=$endYear" - if [ "$startYear" != "" ] + if [ -n "$startYear" ] then - if [ "$endYear" != "" ] + if [ -n "$endYear" ] then # Date is of type 2011-2012 OpenCFD Ltd. if [ "$year" != "$endYear" ] @@ -371,7 +404,11 @@ checkLineLengthNonDirective # check for non-standard code patterns checkNonStandardCodePatterns -checkCopyright +# Stop now if there were any errors +[ "$exitCode" = 0 ] || exit $exitCode + +# check copyright date (normally disabled) +[ "$optCopyright" = true ] && checkCopyright exit 0 #------------------------------------------------------------------------------ diff --git a/doc/Doxygen/customdoxygen.css b/doc/Doxygen/customdoxygen.css index 6c648daa85..d957f7b833 100644 --- a/doc/Doxygen/customdoxygen.css +++ b/doc/Doxygen/customdoxygen.css @@ -65,4 +65,24 @@ -ms-transform: translateY(-50%); content: "C++ Source Code Guide"; font-size: 180%; -} \ No newline at end of file +} + +.OFTable { + width: 100%; + border: 0px; + margin-top: 10px; + margin-bottom: 10px; + background-color: rgb(245,245,245); + padding: 5px; +} + + +.OFTable th { + text-align: left; + padding: 5px; + border-bottom: 2px solid rgb(175,175,175); +} + +.OFTable td { + padding-left: 5px; +} diff --git a/etc/config.sh/bashcompletion b/etc/config.sh/bashcompletion index 82714979d2..27a189a6ce 100644 --- a/etc/config.sh/bashcompletion +++ b/etc/config.sh/bashcompletion @@ -1,5 +1,6 @@ #----------------------------------*-sh-*-------------------------------------- # Bash completions for OpenFOAM applications +# Formatted as "complete ... -F _of_APPNAME APPNAME unset -f _of_filter_opts 2>/dev/null _of_filter_opts() diff --git a/etc/config.sh/unset b/etc/config.sh/unset index d9aa0639eb..95afc82534 100644 --- a/etc/config.sh/unset +++ b/etc/config.sh/unset @@ -181,6 +181,17 @@ unset -f wmRefresh 2>/dev/null unset -f foamVersion 2>/dev/null unset -f foamPV 2>/dev/null +# Cleanup bash completions, which look like this: +# "complete ... -F _of_APPNAME APPNAME +# For economy, obtain list first but also add in 'filter_opts' helper +foamClean="$(complete 2>/dev/null | sed -n -e 's/complete.*-F _of_.* \(..*\)$/\1/p')" +for cleaned in $foamClean filter_opts +do + unset -f _of_$cleaned 2>/dev/null + complete -r $cleaned 2>/dev/null +done + + #------------------------------------------------------------------------------ # Intermediate variables (do as last for a clean exit code) diff --git a/src/OSspecific/POSIX/POSIX.C b/src/OSspecific/POSIX/POSIX.C index 8f6c26fbbe..3fbc3b2684 100644 --- a/src/OSspecific/POSIX/POSIX.C +++ b/src/OSspecific/POSIX/POSIX.C @@ -1284,7 +1284,7 @@ int Foam::system(const Foam::UList& command) { // in child: // Need command and arguments separately. - // args is a NULL-terminated list of c-strings + // args is a nullptr-terminated list of c-strings CStringList args(SubList(command, 0)); if (argc > 1) diff --git a/src/OSspecific/POSIX/endianI.H b/src/OSspecific/POSIX/endianI.H index 5f47fbd780..ca869ce0c2 100644 --- a/src/OSspecific/POSIX/endianI.H +++ b/src/OSspecific/POSIX/endianI.H @@ -97,10 +97,11 @@ inline uint64_t Foam::endian::swap64(uint64_t u) ); // alternative formulation - // - // u = ((u<< 8) & 0xFF00FF00FF00FF00ull) | ((u>> 8) & 0x00FF00FF00FF00FFull); - // u = ((u<<16) & 0xFFFF0000FFFF0000ull) | ((u>>16) & 0x0000FFFF0000FFFFull); - // return (u >> 32) | (u << 32); + /* + u = ((u<< 8) & 0xFF00FF00FF00FF00ull) | ((u>> 8) & 0x00FF00FF00FF00FFull); + u = ((u<<16) & 0xFFFF0000FFFF0000ull) | ((u>>16) & 0x0000FFFF0000FFFFull); + return (u >> 32) | (u << 32); + */ #endif } diff --git a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C index a7af08b8ef..a3141abb91 100644 --- a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C +++ b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C @@ -39,6 +39,14 @@ namespace Foam bool Foam::functionObject::postProcess(false); +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +Foam::word Foam::functionObject::scopedName(const word& name) const +{ + return name_ + ":" + name; +} + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::functionObject::functionObject(const word& name) diff --git a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.H b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.H index 367c0094ee..febb76de10 100644 --- a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.H +++ b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.H @@ -154,6 +154,14 @@ class functionObject void operator=(const functionObject&) = delete; +protected: + + // Protected Member Functions + + //- Return a scoped name, e.g. used to construct local field names + word scopedName(const word& name) const; + + public: //- Runtime type information diff --git a/src/OpenFOAM/db/functionObjects/regionFunctionObject/regionFunctionObject.C b/src/OpenFOAM/db/functionObjects/regionFunctionObject/regionFunctionObject.C index b1d9f5f59f..e976c4c689 100644 --- a/src/OpenFOAM/db/functionObjects/regionFunctionObject/regionFunctionObject.C +++ b/src/OpenFOAM/db/functionObjects/regionFunctionObject/regionFunctionObject.C @@ -158,7 +158,7 @@ Foam::functionObjects::regionFunctionObject::~regionFunctionObject() bool Foam::functionObjects::regionFunctionObject::read(const dictionary& dict) { - return functionObject::read(dict); + return stateFunctionObject::read(dict); } diff --git a/src/OpenFOAM/db/functionObjects/timeControl/timeControl.C b/src/OpenFOAM/db/functionObjects/timeControl/timeControl.C index e8647eed49..816049967d 100644 --- a/src/OpenFOAM/db/functionObjects/timeControl/timeControl.C +++ b/src/OpenFOAM/db/functionObjects/timeControl/timeControl.C @@ -248,7 +248,7 @@ bool Foam::timeControl::execute() default: { FatalErrorInFunction - << "Undefined output control: " + << "Undefined time control: " << timeControlNames_[timeControl_] << nl << abort(FatalError); break; diff --git a/src/OpenFOAM/primitives/strings/lists/CStringList.H b/src/OpenFOAM/primitives/strings/lists/CStringList.H index c90ebcb337..42d762a6f0 100644 --- a/src/OpenFOAM/primitives/strings/lists/CStringList.H +++ b/src/OpenFOAM/primitives/strings/lists/CStringList.H @@ -73,7 +73,7 @@ class CStringList // Does not include the final nul-character size_t len_; - //- List of strings, including trailing NULL pointer + //- List of strings, including trailing nullptr char** argv_; //- Flattened content with interspersed nul-characters @@ -109,8 +109,8 @@ public: // Public Members - //- Count the number of parameters until the first NULL pointer. - // Return 0 if argv is NULL. + //- Count the number of parameters until the first nullptr + // Return 0 if argv is nullptr. static inline int count(const char * const argv[]); @@ -120,7 +120,7 @@ public: inline int size() const; //- Return the list of C-strings (ie, argv) - // The position at argc is a NULL pointer + // The position at argc is a nullptr inline char** strings() const; @@ -148,8 +148,8 @@ public: template static List asList(int argc, const char * const argv[]); - //- Create a list from a NULL-terminated list of argv parameters. - // A null pointer for argv is permissible. + //- Create a list from a nullptr-terminated list of argv parameters. + // Using a nullptr for argv is permissible. template static inline List asList(const char * const argv[]); diff --git a/src/conversion/ccm/common/ccmBase.C b/src/conversion/ccm/common/ccmBase.C index 14efe10a5e..82768621d4 100644 --- a/src/conversion/ccm/common/ccmBase.C +++ b/src/conversion/ccm/common/ccmBase.C @@ -85,10 +85,10 @@ bool Foam::ccm::base::close() { if (CCMIOIsValidEntity(globalState_->root)) { - CCMIOCloseFile(NULL, globalState_->root); + CCMIOCloseFile(nullptr, globalState_->root); } delete globalState_; - globalState_ = 0; + globalState_ = nullptr; return true; } diff --git a/src/conversion/ccm/reader/ccmReaderSolution.C b/src/conversion/ccm/reader/ccmReaderSolution.C index e849823b34..76c6fb363a 100644 --- a/src/conversion/ccm/reader/ccmReaderSolution.C +++ b/src/conversion/ccm/reader/ccmReaderSolution.C @@ -52,7 +52,7 @@ void Foam::ccm::reader::determineFieldInfo ( CCMIONextEntity ( - NULL, + nullptr, fieldSetNode, kCCMIOFieldPhase, &phaseI, @@ -74,7 +74,7 @@ void Foam::ccm::reader::determineFieldInfo ( CCMIONextEntity ( - NULL, + nullptr, phaseNode, kCCMIOField, &fieldI, @@ -84,12 +84,12 @@ void Foam::ccm::reader::determineFieldInfo && CCMIOReadField ( - NULL, + nullptr, fieldNode, fullName, shortName, &dims, - NULL + nullptr ) == kCCMIONoErr ) @@ -139,7 +139,7 @@ void Foam::ccm::reader::determineFieldInfo ( CCMIONextEntity ( - NULL, + nullptr, fieldNode, kCCMIOFieldData, &dataI, @@ -149,20 +149,20 @@ void Foam::ccm::reader::determineFieldInfo && CCMIOEntitySize ( - NULL, + nullptr, dataNode, - NULL, + nullptr, &maxId ) == kCCMIONoErr && CCMIOReadFieldDatad ( - NULL, + nullptr, dataNode, - NULL, + nullptr, &dataLocation, - NULL, + nullptr, kCCMIOStart, kCCMIOEnd ) @@ -212,7 +212,7 @@ bool Foam::ccm::reader::detectSolution() ( CCMIONextEntity ( - NULL, + nullptr, (globalState_->root), kCCMIOState, &stateI, @@ -230,7 +230,7 @@ bool Foam::ccm::reader::detectSolution() ( CCMIONextEntity ( - NULL, + nullptr, stateNode, kCCMIOProcessor, &procI, @@ -240,11 +240,11 @@ bool Foam::ccm::reader::detectSolution() && CCMIOReadProcessor ( - NULL, + nullptr, processorNode, - NULL, // Ignore verticesNode - NULL, // Ignore topologyNode - NULL, // Ignore initialField + nullptr, // Ignore verticesNode + nullptr, // Ignore topologyNode + nullptr, // Ignore initialField &solutionNode ) == kCCMIONoErr @@ -263,7 +263,7 @@ bool Foam::ccm::reader::detectSolution() ( CCMIONextEntity ( - NULL, + nullptr, solutionNode, kCCMIORestart, &restartI, @@ -273,7 +273,7 @@ bool Foam::ccm::reader::detectSolution() && CCMIOEntityName ( - NULL, + nullptr, stateNode, solutionName ) @@ -281,13 +281,13 @@ bool Foam::ccm::reader::detectSolution() && CCMIOReadRestartInfo ( - NULL, + nullptr, restartNode, - NULL, // Ignore solverName + nullptr, // Ignore solverName &iteration, &timeValue, - NULL, // Ignore timeUnits - NULL // Ignore startAngle + nullptr, // Ignore timeUnits + nullptr // Ignore startAngle ) == kCCMIONoErr ) @@ -310,7 +310,7 @@ bool Foam::ccm::reader::detectSolution() ( CCMIONextEntity ( - NULL, + nullptr, processorNode, kCCMIOLagrangianData, &lagrangianI, @@ -320,9 +320,9 @@ bool Foam::ccm::reader::detectSolution() && CCMIOReadLagrangianData ( - NULL, + nullptr, lagrangianNode, - NULL, + nullptr, &lagrangianSolutions ) == kCCMIONoErr @@ -366,10 +366,10 @@ Foam::ccm::reader::readField ( CCMIOGetState ( - NULL, + nullptr, (globalState_->root), solutionName.c_str(), - NULL, + nullptr, &stateNode ) != kCCMIONoErr @@ -420,7 +420,7 @@ Foam::ccm::reader::readField ( CCMIONextEntity ( - NULL, + nullptr, stateNode, kCCMIOProcessor, &procI, @@ -430,11 +430,11 @@ Foam::ccm::reader::readField && CCMIOReadProcessor ( - NULL, + nullptr, processorNode, - NULL, // Ignore verticesNode - NULL, // Ignore topologyNode - NULL, // Ignore initialField + nullptr, // Ignore verticesNode + nullptr, // Ignore topologyNode + nullptr, // Ignore initialField &solutionNode ) == kCCMIONoErr @@ -448,7 +448,7 @@ Foam::ccm::reader::readField ( CCMIONextEntity ( - NULL, + nullptr, solutionNode, kCCMIOFieldPhase, &phaseI, @@ -465,7 +465,7 @@ Foam::ccm::reader::readField ( CCMIONextEntity ( - NULL, + nullptr, phaseNode, kCCMIOField, &fieldI, @@ -480,10 +480,10 @@ Foam::ccm::reader::readField ( &(globalState_->error), fieldNode, - NULL, + nullptr, shortName, &dims, - NULL + nullptr ); assertNoError ( @@ -501,7 +501,7 @@ Foam::ccm::reader::readField ( CCMIONextEntity ( - NULL, + nullptr, fieldNode, kCCMIOFieldData, &dataI, @@ -518,20 +518,20 @@ Foam::ccm::reader::readField ( CCMIOEntitySize ( - NULL, + nullptr, dataNode, &n, - NULL + nullptr ) == kCCMIONoErr && CCMIOReadFieldDatad ( - NULL, + nullptr, dataNode, &mapId, &dataLocation, - NULL, + nullptr, kCCMIOStart, kCCMIOEnd ) @@ -549,10 +549,10 @@ Foam::ccm::reader::readField ( CCMIOEntityDescription ( - NULL, + nullptr, dataNode, &len, - NULL + nullptr ) == kCCMIONoErr ) @@ -563,7 +563,7 @@ Foam::ccm::reader::readField ( CCMIOEntityDescription ( - NULL, + nullptr, dataNode, &len, dataLabel @@ -577,7 +577,7 @@ Foam::ccm::reader::readField strstr(fieldName.c_str(), "SIG") || strstr(fieldName.c_str(), "EPS") ) - && strstr(dataLabel, "So") == NULL + && strstr(dataLabel, "So") == nullptr ) { okayCombination = false; @@ -607,8 +607,8 @@ Foam::ccm::reader::readField ( &(globalState_->error), dataNode, - NULL, - NULL, + nullptr, + nullptr, rawData.begin(), kCCMIOStart, kCCMIOEnd diff --git a/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.C b/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.C index 6e686a10f5..c5a47ca61e 100644 --- a/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.C +++ b/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.C @@ -46,6 +46,7 @@ void Foam::solutionControl::read(const bool absTolOnly) solutionDict.lookupOrDefault("momentumPredictor", true); transonic_ = solutionDict.lookupOrDefault("transonic", false); consistent_ = solutionDict.lookupOrDefault("consistent", false); + frozenFlow_ = solutionDict.lookupOrDefault("frozenFlow", false); // Read residual information const dictionary residualDict @@ -228,6 +229,7 @@ Foam::solutionControl::solutionControl(fvMesh& mesh, const word& algorithmName) momentumPredictor_(true), transonic_(false), consistent_(false), + frozenFlow_(false), corr_(0), corrNonOrtho_(0) {} diff --git a/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.H b/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.H index c9c7b87633..19b45f724b 100644 --- a/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.H +++ b/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.H @@ -87,6 +87,10 @@ protected: // "consistent" approach of SIMPLEC bool consistent_; + //- Flag to indicate that the flow system of equations should not + // be evolved + bool frozenFlow_; + // Evolution @@ -199,6 +203,10 @@ public: // "consistent" approach of SIMPLEC inline bool consistent() const; + //- Flag to indicate that the flow system of equations should not + // be evolved + inline bool frozenFlow() const; + // Evolution diff --git a/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControlI.H b/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControlI.H index 61a647e408..d2316407c0 100644 --- a/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControlI.H +++ b/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControlI.H @@ -73,6 +73,12 @@ inline bool Foam::solutionControl::consistent() const } +inline bool Foam::solutionControl::frozenFlow() const +{ + return frozenFlow_; +} + + inline bool Foam::solutionControl::correctNonOrthogonal() { corrNonOrtho_++; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C index 62957304cc..1f81e6fb63 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C @@ -592,7 +592,7 @@ Foam::vector Foam::turbulentDFSEMInletFvPatchVectorField::uDashEddy void Foam::turbulentDFSEMInletFvPatchVectorField::calcOverlappingProcEddies ( - List >& overlappingEddies + List>& overlappingEddies ) const { int oldTag = UPstream::msgType(); @@ -604,7 +604,7 @@ void Foam::turbulentDFSEMInletFvPatchVectorField::calcOverlappingProcEddies Pstream::scatterList(patchBBs); // Per processor indices into all segments to send - List > dynSendMap(Pstream::nProcs()); + List> dynSendMap(Pstream::nProcs()); forAll(eddies_, i) { @@ -1050,7 +1050,7 @@ void Foam::turbulentDFSEMInletFvPatchVectorField::updateCoeffs() } // Add contributions from overlapping eddies - List > overlappingEddies(Pstream::nProcs()); + List> overlappingEddies(Pstream::nProcs()); calcOverlappingProcEddies(overlappingEddies); forAll(overlappingEddies, procI) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.H index d14d82266f..8b1e38f805 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.H @@ -231,7 +231,7 @@ class turbulentDFSEMInletFvPatchVectorField //- Helper function to interpolate values from the boundary data or // read from dictionary template - tmp > interpolateOrRead + tmp> interpolateOrRead ( const word& fieldName, const dictionary& dict, @@ -240,7 +240,7 @@ class turbulentDFSEMInletFvPatchVectorField //- Helper function to interpolate values from the boundary data template - tmp > interpolateBoundaryData + tmp> interpolateBoundaryData ( const word& fieldName ) const; @@ -258,7 +258,7 @@ class turbulentDFSEMInletFvPatchVectorField // processor void calcOverlappingProcEddies ( - List >& overlappingEddies + List>& overlappingEddies ) const; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorFieldTemplates.C b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorFieldTemplates.C index 1a3cb11434..2a17b6f76a 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorFieldTemplates.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorFieldTemplates.C @@ -30,7 +30,7 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // template -Foam::tmp > +Foam::tmp> Foam::turbulentDFSEMInletFvPatchVectorField::interpolateOrRead ( const word& fieldName, @@ -40,7 +40,7 @@ Foam::turbulentDFSEMInletFvPatchVectorField::interpolateOrRead { if (dict.found(fieldName)) { - tmp > tFld + tmp> tFld ( new Field ( @@ -62,7 +62,7 @@ Foam::turbulentDFSEMInletFvPatchVectorField::interpolateOrRead template -Foam::tmp > +Foam::tmp> Foam::turbulentDFSEMInletFvPatchVectorField::interpolateBoundaryData ( const word& fieldName diff --git a/src/functionObjects/field/Curle/Curle.C b/src/functionObjects/field/Curle/Curle.C new file mode 100644 index 0000000000..200568ef75 --- /dev/null +++ b/src/functionObjects/field/Curle/Curle.C @@ -0,0 +1,186 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2017 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 3 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, see . + +\*---------------------------------------------------------------------------*/ + +#include "Curle.H" +#include "fvcDdt.H" +#include "mathematicalConstants.H" +#include "addToRunTimeSelectionTable.H" + +using namespace Foam::constant; + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace functionObjects +{ + defineTypeNameAndDebug(Curle, 0); + + addToRunTimeSelectionTable + ( + functionObject, + Curle, + dictionary + ); +} +} + + +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +bool Foam::functionObjects::Curle::calc() +{ + if (foundObject(fieldName_)) + { + // Evaluate pressure force time derivative + + const volScalarField& p = lookupObject(fieldName_); + const volScalarField dpdt(scopedName("dpdt"), fvc::ddt(p)); + const volScalarField::Boundary& dpdtBf = dpdt.boundaryField(); + const surfaceVectorField::Boundary& SfBf = mesh_.Sf().boundaryField(); + + dimensionedVector dfdt + ( + "0", + p.dimensions()*dimArea/dimTime, + vector::zero + ); + + for (auto patchi : patchSet_) + { + dfdt.value() += sum(dpdtBf[patchi]*SfBf[patchi]); + } + + reduce(dfdt.value(), sumOp()); + + + // Construct and store Curle acoustic pressure + + const volVectorField& C = mesh_.C(); + + tmp tpDash + ( + new volScalarField + ( + IOobject + ( + resultName_, + mesh_.time().timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedScalar("0", p.dimensions(), 0) + ) + ); + + volScalarField& pDash = tpDash.ref(); + const volVectorField d(scopedName("d"), C - x0_); + pDash = 4*mathematical::pi/c0_*(d/magSqr(d) & dfdt); + + return store(resultName_, tpDash); + } + else + { + return false; + } +} + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::functionObjects::Curle::Curle +( + const word& name, + const Time& runTime, + const dictionary& dict +) +: + fieldExpression(name, runTime, dict, "p"), + patchSet_(), + x0_("x0", dimLength, vector::zero), + c0_("c0", dimVelocity, 0) +{ + read(dict); + + setResultName(typeName, fieldName_); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::functionObjects::Curle::~Curle() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +bool Foam::functionObjects::Curle::read(const dictionary& dict) +{ + if (fieldExpression::read(dict)) + { + patchSet_ = + mesh_.boundaryMesh().patchSet(wordReList(dict.lookup("patches"))); + + if (patchSet_.empty()) + { + WarningInFunction + << "No patches defined" + << endl; + + return false; + } + + // Read the reference speed of sound + dict.lookup("c0") >> c0_; + + + // Set the location of the effective point source to the area-average + // of the patch face centres + const volVectorField::Boundary& Cbf = mesh_.C().boundaryField(); + const surfaceScalarField::Boundary& magSfBf = + mesh_.magSf().boundaryField(); + + x0_.value() = vector::zero; + scalar sumMagSf = 0; + for (auto patchi : patchSet_) + { + x0_.value() += sum(Cbf[patchi]*magSfBf[patchi]); + sumMagSf += sum(magSfBf[patchi]); + } + + reduce(x0_.value(), sumOp()); + reduce(sumMagSf, sumOp()); + + x0_.value() /= sumMagSf + ROOTVSMALL; + + return true; + } + + return false; +} + + +// ************************************************************************* // diff --git a/src/functionObjects/field/Curle/Curle.H b/src/functionObjects/field/Curle/Curle.H new file mode 100644 index 0000000000..050970a05b --- /dev/null +++ b/src/functionObjects/field/Curle/Curle.H @@ -0,0 +1,173 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2017 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 3 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, see . + +Class + Foam::functionObjects::Curle + +Group + grpFieldFunctionObjects + +Description + Calculates the acoustic pressure based on Curle's analogy. + + Curle's analogy is implemented as: + + \f[ + p' = 4 \frac{\pi}{c_0}\frac{\vec d}{|\vec d|^2}\frac{d(F)}{d(t)} + \f] + + + where + \vartable + p' | Curle's acoustic pressure [Pa] or [Pa (m3/rho)] + c_0 | Reference speed of sound [m/s] + \vec d | Distance vector to observer locations [m] + F | Force [N] or [N (m3/rho)] + \endvartable + +Note + Only the normal-pressure force is included in the force calculation + + +Usage + Example of function object specification: + \verbatim + Curle1 + { + type Curle; + libs ("libfieldFunctionObjects.so"); + ... + patches (surface1 surface2); + c0 330; + } + \endverbatim + + Where the entries comprise: + \table + Property | Description | Required | Default value + type | Type name: Curle | yes | + field | Pressure field name | no | p + result | Acoustic pressure field name | no | Curle + patches | Sound generation patch names | yes | + c0 | Reference speed of sound | yes | + \endtable + + +See also + - Foam::functionObjects::fieldExpression + - Foam::functionObjects::fvMeshFunctionObject + +SourceFiles + Curle.C + +\*---------------------------------------------------------------------------*/ + +#ifndef functionObjects_Curle_H +#define functionObjects_Curle_H + +#include "fieldExpression.H" +#include "dimensionedScalar.H" +#include "dimensionedVector.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace functionObjects +{ + +/*---------------------------------------------------------------------------*\ + Class Curle Declaration +\*---------------------------------------------------------------------------*/ + +class Curle +: + public fieldExpression +{ + // Private data + + // Read from dictionary + + //- Patches to integrate forces over + labelHashSet patchSet_; + + //- Area-averaged centre of patch faces + dimensionedVector x0_; + + //- Reference speed of souund + dimensionedScalar c0_; + + + // Private Member Functions + + //- Disallow default bitwise copy construct + Curle(const Curle&) = delete; + + //- Disallow default bitwise assignment + void operator=(const Curle&) = delete; + + +protected: + + //- Calculate the acoustic pressure field and return true if successful + virtual bool calc(); + + +public: + + //- Runtime type information + TypeName("Curle"); + + + // Constructors + + //- Construct from Time and dictionary + Curle + ( + const word& name, + const Time& runTime, + const dictionary& dict + ); + + + //- Destructor + virtual ~Curle(); + + + // Member Functions + + //- Read the Curle data + virtual bool read(const dictionary&); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace functionObjects +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/functionObjects/field/Make/files b/src/functionObjects/field/Make/files index 27a5790b3b..b44dc3819f 100644 --- a/src/functionObjects/field/Make/files +++ b/src/functionObjects/field/Make/files @@ -52,6 +52,7 @@ PecletNo/PecletNo.C blendingFactor/blendingFactor.C pressure/pressure.C MachNo/MachNo.C +Curle/Curle.C fieldsExpression/fieldsExpression.C add/add.C diff --git a/src/functionObjects/field/pressure/pressure.H b/src/functionObjects/field/pressure/pressure.H index a3978f1f5d..586deb14c6 100644 --- a/src/functionObjects/field/pressure/pressure.H +++ b/src/functionObjects/field/pressure/pressure.H @@ -92,14 +92,14 @@ Usage Where the entries comprise: \table Property | Description | Required | Default value - type | type name: pressure | yes | + type | type name: pressure | yes | field | Name of the pressure field | no | p U | Name of the velocity field | no | U rho | Name of the density field | no | rho result | Name of the resulting field | no | derived from p calcTotal | Calculate total coefficient | yes | pRef | Reference pressure for total pressure | no | 0 - calcCoeff | Calculate pressure coefficient | yes | + calcCoeff | Calculate pressure coefficient | yes | pInf | Freestream pressure for coefficient calculation | no | UInf | Freestream velocity for coefficient calculation | no | rhoInf | Freestream density for coefficient calculation | no | diff --git a/src/functionObjects/field/valueAverage/valueAverage.C b/src/functionObjects/field/valueAverage/valueAverage.C index e8d1a0faa8..3e74e5f4b6 100644 --- a/src/functionObjects/field/valueAverage/valueAverage.C +++ b/src/functionObjects/field/valueAverage/valueAverage.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -114,7 +114,10 @@ bool Foam::functionObjects::valueAverage::read(const dictionary& dict) dict.lookup("functionObject") >> functionObjectName_; dict.lookup("fields") >> fieldNames_; - window_ = dict.lookupOrDefault("window", -1); + if (dict.readIfPresent("window", window_)) + { + window_ = obr().time().userTimeToTime(window_); + } totalTime_.setSize(fieldNames_.size()); forAll(totalTime_, i) diff --git a/src/functionObjects/utilities/ensightWrite/ensightWrite.H b/src/functionObjects/utilities/ensightWrite/ensightWrite.H index ce9592f99c..94aae0d714 100644 --- a/src/functionObjects/utilities/ensightWrite/ensightWrite.H +++ b/src/functionObjects/utilities/ensightWrite/ensightWrite.H @@ -72,6 +72,11 @@ Description patches and suppress writing the internalMesh. Consecutive output numbering can be used in conjunction with \c overwrite. +See also + Foam::functionObjects::vtkWrite + Foam::functionObjects::fvMeshFunctionObject + Foam::functionObjects::timeControl + SourceFiles ensightWrite.C ensightWriteTemplates.C diff --git a/src/functionObjects/utilities/vtkWrite/vtkWrite.H b/src/functionObjects/utilities/vtkWrite/vtkWrite.H index 025e92bdab..2ea05fb3cf 100644 --- a/src/functionObjects/utilities/vtkWrite/vtkWrite.H +++ b/src/functionObjects/utilities/vtkWrite/vtkWrite.H @@ -62,6 +62,7 @@ Usage \endtable See also + Foam::functionObjects::ensightWrite Foam::functionObjects::fvMeshFunctionObject Foam::functionObjects::timeControl diff --git a/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C b/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C index 9276992b91..0eb597a1c2 100644 --- a/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C +++ b/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C @@ -123,7 +123,7 @@ void Foam::pairPatchAgglomeration::setEdgeWeights const label nCoarseI = max(fineToCoarse) + 1; labelListList coarseToFine(invertOneToMany(nCoarseI, fineToCoarse)); - HashSet > fineFeaturedFaces(coarsePatch.nEdges()/10); + HashSet> fineFeaturedFaces(coarsePatch.nEdges()/10); // Map fine faces with featured edge into coarse faces forAllConstIter(EdgeMap, facePairWeight_, iter) diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectedParticleDistributionInjection/InjectedParticleDistributionInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectedParticleDistributionInjection/InjectedParticleDistributionInjection.H index 3ccfa5db27..f492bf6c1f 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectedParticleDistributionInjection/InjectedParticleDistributionInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectedParticleDistributionInjection/InjectedParticleDistributionInjection.H @@ -180,9 +180,9 @@ public: ); //- Construct and return a clone - virtual autoPtr > clone() const + virtual autoPtr> clone() const { - return autoPtr > + return autoPtr> ( new InjectedParticleDistributionInjection(*this) ); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectedParticleInjection/InjectedParticleInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectedParticleInjection/InjectedParticleInjection.H index b96cdd33a8..a87c72ecfd 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectedParticleInjection/InjectedParticleInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectedParticleInjection/InjectedParticleInjection.H @@ -145,9 +145,9 @@ public: ); //- Construct and return a clone - virtual autoPtr > clone() const + virtual autoPtr> clone() const { - return autoPtr > + return autoPtr> ( new InjectedParticleInjection(*this) ); diff --git a/src/meshTools/coordinateSystems/coordinateSystem.H b/src/meshTools/coordinateSystems/coordinateSystem.H index 561482a2fd..ee81ee365a 100644 --- a/src/meshTools/coordinateSystems/coordinateSystem.H +++ b/src/meshTools/coordinateSystems/coordinateSystem.H @@ -274,7 +274,7 @@ public: return R_(); } - //- Update and return the co-ordinate roation for a list of cells + //- Update and return the co-ordinate rotation for a list of cells const coordinateRotation& R ( const polyMesh& mesh, diff --git a/src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolation.C b/src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolation.C index b191f076a2..38551410c0 100644 --- a/src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolation.C +++ b/src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolation.C @@ -358,8 +358,8 @@ Foam::pointToPointPlanarInterpolation::pointToPointPlanarInterpolation const bool nearestOnly, const coordinateSystem& referenceCS, const label sourceSize, - const List >& nearestVertex, - const List >& nearestVertexWeight + const List>& nearestVertex, + const List>& nearestVertexWeight ) : perturb_(perturb), diff --git a/src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolation.H b/src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolation.H index ce468fcc02..8fee32b443 100644 --- a/src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolation.H +++ b/src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolation.H @@ -123,8 +123,8 @@ public: const bool nearestOnly, const coordinateSystem& referenceCS, const label sourceSize, - const List >& nearestVertex, - const List >& nearestVertexWeight + const List>& nearestVertex, + const List>& nearestVertexWeight ); //- Construct and return a clone diff --git a/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C b/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C index 9e7001454d..d22979477c 100644 --- a/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C +++ b/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C @@ -1047,7 +1047,7 @@ bool Foam::cellCellStencils::cellVolumeWeight::update() interpolationCells_.transfer(interpolationCells); - List > compactMap; + List> compactMap; mapDistribute map(globalCells, cellStencil_, compactMap); cellInterpolationMap_.transfer(map); diff --git a/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C b/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C index 4a5cdbe8a2..8e7c96247e 100644 --- a/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C +++ b/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C @@ -488,7 +488,7 @@ void Foam::cellCellStencils::inverseDistance::markDonors // Indices of tgtcells to send over to each processor - List > tgtSendCells(Pstream::nProcs()); + List> tgtSendCells(Pstream::nProcs()); forAll(srcOverlapProcs, i) { label procI = srcOverlapProcs[i]; @@ -1548,7 +1548,7 @@ void Foam::cellCellStencils::inverseDistance::createStencil } // Re-do the mapDistribute - List > compactMap; + List> compactMap; mapDistribute map(globalCells, cellStencil_, compactMap); cellInterpolationMap_.transfer(map); } @@ -1902,7 +1902,7 @@ bool Foam::cellCellStencils::inverseDistance::update() } interpolationCells_.transfer(interpolationCells); - List > compactMap; + List> compactMap; mapDistribute map(globalCells, cellStencil_, compactMap); cellInterpolationMap_.transfer(map); diff --git a/src/overset/cellCellStencil/trackingInverseDistance/trackingInverseDistanceCellCellStencil.C b/src/overset/cellCellStencil/trackingInverseDistance/trackingInverseDistanceCellCellStencil.C index ed4e2e251e..7a9b2906f6 100644 --- a/src/overset/cellCellStencil/trackingInverseDistance/trackingInverseDistanceCellCellStencil.C +++ b/src/overset/cellCellStencil/trackingInverseDistance/trackingInverseDistanceCellCellStencil.C @@ -317,7 +317,7 @@ void Foam::cellCellStencils::trackingInverseDistance::markDonors // Indices of tgtcells to send over to each processor - List > tgtSendCells(Pstream::nProcs()); + List> tgtSendCells(Pstream::nProcs()); forAll(srcOverlapProcs, i) { label procI = srcOverlapProcs[i]; @@ -768,7 +768,7 @@ bool Foam::cellCellStencils::trackingInverseDistance::update() } interpolationCells_.transfer(interpolationCells); - List > compactMap; + List> compactMap; mapDistribute map(globalCells, cellStencil_, compactMap); cellInterpolationMap_.transfer(map); diff --git a/src/overset/oversetPolyPatch/oversetFvPatchField.C b/src/overset/oversetPolyPatch/oversetFvPatchField.C index 0d38b83514..de61b8c118 100644 --- a/src/overset/oversetPolyPatch/oversetFvPatchField.C +++ b/src/overset/oversetPolyPatch/oversetFvPatchField.C @@ -80,16 +80,8 @@ Foam::oversetFvPatchField::oversetFvPatchField { if (!isA(p)) { - FatalIOErrorIn - ( - "oversetFvPatchField::oversetFvPatchField" - "(" - "const fvPatch&, " - "const DimensionedField&, " - "const dictionary&" - ")", - dict - ) << " patch type '" << p.type() + FatalIOErrorInFunction(dict) + << " patch type '" << p.type() << "' not constraint type '" << typeName << "'" << "\n for patch " << p.name() << " of field " << this->internalField().name() diff --git a/src/overset/oversetPolyPatch/oversetFvPatchField.H b/src/overset/oversetPolyPatch/oversetFvPatchField.H index 3a337996ee..b7c923fcd5 100644 --- a/src/overset/oversetPolyPatch/oversetFvPatchField.H +++ b/src/overset/oversetPolyPatch/oversetFvPatchField.H @@ -103,9 +103,9 @@ public: oversetFvPatchField(const oversetFvPatchField&); //- Construct and return a clone - virtual tmp > clone() const + virtual tmp> clone() const { - return tmp > + return tmp> ( new oversetFvPatchField(*this) ); @@ -119,12 +119,12 @@ public: ); //- Construct and return a clone setting internal field reference - virtual tmp > clone + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp > + return tmp> ( new oversetFvPatchField(*this, iF) ); diff --git a/src/overset/regionsToCell/findRefCells.C b/src/overset/regionsToCell/findRefCells.C index 289bb1959b..67ac1ba0f8 100644 --- a/src/overset/regionsToCell/findRefCells.C +++ b/src/overset/regionsToCell/findRefCells.C @@ -108,19 +108,8 @@ void Foam::setRefCells if (refCells.size() != regionNeedReference.size()) { - FatalIOErrorIn - ( - "setRefCell\n" - "(\n" - " const volScalarField&,\n" - " const volScalarField&,\n" - " const dictionary&,\n" - " labelList&,\n" - " scalarField&,\n" - " const bool\n" - ")\n", - dict - ) << "Number of refCells " << refCells.size() + FatalIOErrorInFunction(dict) + << "Number of refCells " << refCells.size() << " does not correspond to number of regions " << regionNeedReference.size() << exit(FatalIOError); @@ -146,19 +135,8 @@ void Foam::setRefCells && regionRefCells[regionI] == -1 ) { - FatalIOErrorIn - ( - "setRefCell\n" - "(\n" - " const volScalarField&,\n" - " const volScalarField&,\n" - " const dictionary&,\n" - " labelList&,\n" - " scalarField&,\n" - " const bool\n" - ")\n", - dict - ) << "Have no reference cell for region " << regionI + FatalIOErrorInFunction(dict) + << "Have no reference cell for region " << regionI << nl << "Overall per-region reference cells " << regionRefCells @@ -173,19 +151,8 @@ void Foam::setRefCells if (refPoints.size() != regionNeedReference.size()) { - FatalIOErrorIn - ( - "setRefCell\n" - "(\n" - " const volScalarField&,\n" - " const volScalarField&,\n" - " const dictionary&,\n" - " labelList&,\n" - " scalarField&,\n" - " const bool\n" - ")\n", - dict - ) << "Number of refPoints " << refPoints.size() + FatalIOErrorInFunction(dict) + << "Number of refPoints " << refPoints.size() << " does not correspond to number of regions " << regionNeedReference.size() << exit(FatalIOError); @@ -226,19 +193,8 @@ void Foam::setRefCells { if (hasRef[regionI] != 1) { - FatalIOErrorIn - ( - "setRefCell\n" - "(\n" - " const volScalarField&,\n" - " const volScalarField&,\n" - " const dictionary&,\n" - " labelList&,\n" - " scalarField&,\n" - " const bool\n" - ")\n", - dict - ) << "Unable to set reference cell for field " << field.name() + FatalIOErrorInFunction(dict) + << "Unable to set reference cell for field " << field.name() << nl << " Reference points " << refPointName << " " << refPoints @@ -251,19 +207,8 @@ void Foam::setRefCells } else { - FatalIOErrorIn - ( - "setRefCell\n" - "(\n" - " const volScalarField&,\n" - " const volScalarField&,\n" - " const dictionary&,\n" - " labelList&,\n" - " scalarField&,\n" - " const bool\n" - ")\n", - dict - ) << "Unable to set reference cell for field " << field.name() + FatalIOErrorInFunction(dict) + << "Unable to set reference cell for field " << field.name() << nl << " Please supply either " << refCellName << " or " << refPointName << nl << exit(FatalIOError); diff --git a/src/randomProcesses/windowModels/windowModel/windowModel.H b/src/randomProcesses/windowModels/windowModel/windowModel.H index b9e1845fe0..c5219830ac 100644 --- a/src/randomProcesses/windowModels/windowModel/windowModel.H +++ b/src/randomProcesses/windowModels/windowModel/windowModel.H @@ -118,7 +118,7 @@ public: //- Return the windowed data template - tmp > apply + tmp> apply ( const Field& fld, const label windowI diff --git a/src/randomProcesses/windowModels/windowModel/windowModelNew.C b/src/randomProcesses/windowModels/windowModel/windowModelNew.C index d4dd15b07e..7b1c8a7e72 100644 --- a/src/randomProcesses/windowModels/windowModel/windowModelNew.C +++ b/src/randomProcesses/windowModels/windowModel/windowModelNew.C @@ -42,10 +42,8 @@ Foam::autoPtr Foam::windowModel::New if (!cstrIter.found()) { - FatalErrorIn - ( - "windowModel::New(const dictionary&, const label)" - ) << "Unknown windowModel type " + FatalErrorInFunction + << "Unknown windowModel type " << modelType << nl << nl << "Valid windowModel types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() diff --git a/src/randomProcesses/windowModels/windowModel/windowModelTemplates.C b/src/randomProcesses/windowModels/windowModel/windowModelTemplates.C index 76f1241a83..9d3e478c04 100644 --- a/src/randomProcesses/windowModels/windowModel/windowModelTemplates.C +++ b/src/randomProcesses/windowModels/windowModel/windowModelTemplates.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ template -Foam::tmp > Foam::windowModel::apply +Foam::tmp> Foam::windowModel::apply ( const Field& fld, const label windowI @@ -44,7 +44,7 @@ Foam::tmp > Foam::windowModel::apply } - tmp > tresult(new Field(nSamples, pTraits::zero)); + tmp> tresult(new Field(nSamples, pTraits::zero)); Field& result = tresult.ref(); label nWindow = nWindowsTotal(fld.size()); diff --git a/src/sampling/sampledSurface/readers/surfaceReader.H b/src/sampling/sampledSurface/readers/surfaceReader.H index 2ccdc470de..9b2b242e88 100644 --- a/src/sampling/sampledSurface/readers/surfaceReader.H +++ b/src/sampling/sampledSurface/readers/surfaceReader.H @@ -108,7 +108,7 @@ public: virtual wordList fieldNames(const label timeIndex) const = 0; //- Return a scalar field at a given time - virtual tmp > field + virtual tmp> field ( const label timeIndex, const label fieldIndex, @@ -116,7 +116,7 @@ public: ) const = 0; //- Return a vector field at a given time - virtual tmp > field + virtual tmp> field ( const label timeIndex, const label fieldIndex, @@ -124,7 +124,7 @@ public: ) const = 0; //- Return a sphericalTensor field at a given time - virtual tmp > field + virtual tmp> field ( const label timeIndex, const label fieldIndex, @@ -132,7 +132,7 @@ public: ) const = 0; //- Return a symmTensor field at a given time - virtual tmp > field + virtual tmp> field ( const label timeIndex, const label fieldIndex, @@ -140,7 +140,7 @@ public: ) const = 0; //- Return a tensor field at a given time - virtual tmp > field + virtual tmp> field ( const label timeIndex, const label fieldIndex, diff --git a/src/surfMesh/surfaceFormats/fire/FLMAsurfaceFormat.C b/src/surfMesh/surfaceFormats/fire/FLMAsurfaceFormat.C index de258c1010..43eecf8ae5 100644 --- a/src/surfMesh/surfaceFormats/fire/FLMAsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/fire/FLMAsurfaceFormat.C @@ -159,11 +159,7 @@ void Foam::fileFormats::FLMAsurfaceFormat::write { if (!os.good()) { - FatalErrorIn - ( - "fileFormats::FLMAsurfaceFormat::write" - "(OSstream&, const MeshedSurfaceProxy&)" - ) + FatalErrorInFunction << "bad output state " << exit(FatalError); } @@ -352,11 +348,7 @@ void Foam::fileFormats::FLMAsurfaceFormat::write } else { - FatalErrorIn - ( - "fileFormats::FLMAsurfaceFormat::write" - "(const fileName&, const MeshedSurfaceProxy&)" - ) + FatalErrorInFunction << "Cannot open file for writing " << filename << exit(FatalError); } diff --git a/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.H b/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.H index 86f253d215..69e1d84665 100644 --- a/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.H +++ b/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.H @@ -64,7 +64,7 @@ class boundaryRadiationProperties // Private data //- Ptr list of boundaryRadiationProperties - List > + List> radBoundaryPropertiesPtrList_; diff --git a/src/thermophysicalModels/solidChemistryModel/basicSolidChemistryModel/basicSolidChemistryModel.H b/src/thermophysicalModels/solidChemistryModel/basicSolidChemistryModel/basicSolidChemistryModel.H index 6c4bb39ef1..d8b2a19e3c 100644 --- a/src/thermophysicalModels/solidChemistryModel/basicSolidChemistryModel/basicSolidChemistryModel.H +++ b/src/thermophysicalModels/solidChemistryModel/basicSolidChemistryModel/basicSolidChemistryModel.H @@ -153,7 +153,7 @@ public: ) const = 0; //- Return net solid sensible enthalpy [J/Kg] - virtual tmp > RRsHs() const = 0; + virtual tmp> RRsHs() const = 0; //- Return specie Table for gases virtual const speciesTable& gasTable() const = 0; diff --git a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.H b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.H index 4d022e2870..6ccf451bc5 100644 --- a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.H +++ b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.H @@ -188,7 +188,7 @@ public: inline tmp RRs() const; //- Return net solid sensible enthalpy - inline tmp > RRsHs() const; + inline tmp> RRsHs() const; //- Solve the reaction system for the given time step // and return the characteristic time diff --git a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModelI.H b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModelI.H index 067f7d823c..74cf06d7dd 100644 --- a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModelI.H +++ b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModelI.H @@ -97,10 +97,10 @@ Foam::solidChemistryModel::RRs() const template -inline Foam::tmp > +inline Foam::tmp> Foam::solidChemistryModel::RRsHs() const { - tmp > tRRsHs + tmp> tRRsHs ( new DimensionedField ( diff --git a/src/waveModels/waveGenerationModels/derived/Grimshaw/GrimshawWaveModel.C b/src/waveModels/waveGenerationModels/derived/Grimshaw/GrimshawWaveModel.C index 4086598f34..d344fe7cb3 100644 --- a/src/waveModels/waveGenerationModels/derived/Grimshaw/GrimshawWaveModel.C +++ b/src/waveModels/waveGenerationModels/derived/Grimshaw/GrimshawWaveModel.C @@ -72,7 +72,8 @@ Foam::scalar Foam::waveModels::Grimshaw::eta const scalar eps2 = eps*eps; const scalar eps3 = eps*eps2; - const scalar C = sqrt(mag(g_)*h)*sqrt(1.0 + eps - 0.05*eps2 - (3.0/70.0)*eps3); + const scalar C = + sqrt(mag(g_)*h)*sqrt(1.0 + eps - 0.05*eps2 - (3.0/70.0)*eps3); const scalar ts = 3.5*h/sqrt(H/h); const scalar xa = -C*t + ts - X0 + x*cos(theta) + y*sin(theta); @@ -109,7 +110,8 @@ Foam::vector Foam::waveModels::Grimshaw::Uf const scalar eps2 = eps*eps; const scalar eps3 = eps*eps2; - const scalar C = sqrt(mag(g_)*h)*sqrt(1.0 + eps - 0.05*eps2 - (3.0/70.0)*eps3); + const scalar C = + sqrt(mag(g_)*h)*sqrt(1.0 + eps - 0.05*eps2 - (3.0/70.0)*eps3); const scalar ts = 3.5*h/sqrt(eps); const scalar xa = -C*t + ts - X0 + x*cos(theta) + y*sin(theta); @@ -228,19 +230,19 @@ void Foam::waveModels::Grimshaw::setVelocity if (fraction > 0) { - const label paddlei = faceToPaddle_[facei]; + const label paddlei = faceToPaddle_[facei]; - const vector Uf = this->Uf - ( - waveHeight_, - waterDepthRef_, - xPaddle_[paddlei], - yPaddle_[paddlei], - waveAngle_, - t, - x0_, - z - ); + const vector Uf = this->Uf + ( + waveHeight_, + waterDepthRef_, + xPaddle_[paddlei], + yPaddle_[paddlei], + waveAngle_, + t, + x0_, + z + ); U_[facei] = fraction*Uf*tCoeff; } diff --git a/src/waveModels/waveGenerationModels/derived/McCowan/McCowanWaveModel.C b/src/waveModels/waveGenerationModels/derived/McCowan/McCowanWaveModel.C index 6ef4fd3f94..5fc76286a9 100644 --- a/src/waveModels/waveGenerationModels/derived/McCowan/McCowanWaveModel.C +++ b/src/waveModels/waveGenerationModels/derived/McCowan/McCowanWaveModel.C @@ -320,19 +320,19 @@ void Foam::waveModels::McCowan::setVelocity if (fraction > 0) { - const label paddlei = faceToPaddle_[facei]; + const label paddlei = faceToPaddle_[facei]; - const vector Uf = this->Uf - ( - waveHeight_, - waterDepthRef_, - xPaddle_[paddlei], - yPaddle_[paddlei], - waveAngle_, - t, - x0_, - z - ); + const vector Uf = this->Uf + ( + waveHeight_, + waterDepthRef_, + xPaddle_[paddlei], + yPaddle_[paddlei], + waveAngle_, + t, + x0_, + z + ); U_[facei] = fraction*Uf*tCoeff; } diff --git a/src/waveModels/waveGenerationModels/derived/McCowan/McCowanWaveModel.H b/src/waveModels/waveGenerationModels/derived/McCowan/McCowanWaveModel.H index 0ad144bea0..93abfc6d63 100644 --- a/src/waveModels/waveGenerationModels/derived/McCowan/McCowanWaveModel.H +++ b/src/waveModels/waveGenerationModels/derived/McCowan/McCowanWaveModel.H @@ -74,14 +74,14 @@ protected: virtual scalar newtonRapsonF1 ( const scalar x0, - const scalar H, + const scalar H, const scalar h ) const; virtual scalar newtonRapsonF2 ( const scalar x0, - const scalar H, + const scalar H, const scalar h, const scalar xa, const scalar m, diff --git a/src/waveModels/waveGenerationModels/derived/StokesV/StokesVWaveModel.C b/src/waveModels/waveGenerationModels/derived/StokesV/StokesVWaveModel.C index 433723cc27..ccf5861605 100644 --- a/src/waveModels/waveGenerationModels/derived/StokesV/StokesVWaveModel.C +++ b/src/waveModels/waveGenerationModels/derived/StokesV/StokesVWaveModel.C @@ -615,7 +615,11 @@ void Foam::waveModels::StokesV::initialise f1 = pi*H/d - 2*pi/(k*d)*(lambda + l3*b33 + l5*(b35 + b55)); - f2 = (2*pi*d)/(mag(g_)*sqr(T)) - k*d/(2*pi)*tanh(k*d)*(1 + l2*c1 + l4*c2); + f2 = + ( + (2*pi*d)/(mag(g_)*sqr(T)) + - k*d/(2*pi)*tanh(k*d)*(1 + l2*c1 + l4*c2) + ); const scalar lambdaPr = (f1*Bmat21 - f2*Bmat11)/(Bmat11*Bmat22 - Bmat12*Bmat21); diff --git a/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS_GRI_TDAC/constant/thermo.compressibleGas b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS_GRI_TDAC/constant/thermo.compressibleGas index f64aa41569..4bbb98aa34 100644 --- a/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS_GRI_TDAC/constant/thermo.compressibleGas +++ b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS_GRI_TDAC/constant/thermo.compressibleGas @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 3.0.x | +| \\ / O peration | Version: plus | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/0.orig/solid/T b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/0.orig/solid/T index 302392cd2c..efcdaf1d52 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/0.orig/solid/T +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/0.orig/solid/T @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v1612+ | +| \\ / O peration | Version: plus | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/0.orig/solid/jouleHeatingSource:V b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/0.orig/solid/jouleHeatingSource:V index 407005dbd4..febd0d35b7 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/0.orig/solid/jouleHeatingSource:V +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/0.orig/solid/jouleHeatingSource:V @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v1612+ | +| \\ / O peration | Version: plus | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/0.orig/solid/jouleHeatingSource:sigma b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/0.orig/solid/jouleHeatingSource:sigma index b3acde6b36..db3be38224 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/0.orig/solid/jouleHeatingSource:sigma +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/0.orig/solid/jouleHeatingSource:sigma @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v1612+ | +| \\ / O peration | Version: plus | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/0.orig/solid/p b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/0.orig/solid/p index d0b8fa4f65..95605fc758 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/0.orig/solid/p +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/0.orig/solid/p @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v1612+ | +| \\ / O peration | Version: plus | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderAndBackground/system/blockMeshDict b/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderAndBackground/system/blockMeshDict index b2e40c26c8..6e5e98888b 100644 --- a/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderAndBackground/system/blockMeshDict +++ b/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderAndBackground/system/blockMeshDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v3.0+ | +| \\ / O peration | Version: plus | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderAndBackground/system/controlDict b/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderAndBackground/system/controlDict index cc974a94e6..126edad1b1 100644 --- a/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderAndBackground/system/controlDict +++ b/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderAndBackground/system/controlDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v3.0+ | +| \\ / O peration | Version: plus | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderAndBackground/system/fvSchemes b/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderAndBackground/system/fvSchemes index a8031a5b63..c0bf1c9a59 100644 --- a/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderAndBackground/system/fvSchemes +++ b/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderAndBackground/system/fvSchemes @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v3.0+ | +| \\ / O peration | Version: plus | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderAndBackground/system/fvSolution b/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderAndBackground/system/fvSolution index 889491adf9..c7b2a3f44d 100644 --- a/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderAndBackground/system/fvSolution +++ b/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderAndBackground/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v3.0+ | +| \\ / O peration | Version: plus | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderMesh/system/controlDict b/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderMesh/system/controlDict index 933969693b..52dc7243d3 100644 --- a/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderMesh/system/controlDict +++ b/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderMesh/system/controlDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v3.0+ | +| \\ / O peration | Version: plus | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderMesh/system/extrudeMeshDict b/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderMesh/system/extrudeMeshDict index 56563f90d3..594cab7254 100644 --- a/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderMesh/system/extrudeMeshDict +++ b/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderMesh/system/extrudeMeshDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v3.0+ | +| \\ / O peration | Version: plus | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderMesh/system/fvSchemes b/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderMesh/system/fvSchemes index 471fef0143..593e432ee1 100644 --- a/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderMesh/system/fvSchemes +++ b/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderMesh/system/fvSchemes @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v3.0+ | +| \\ / O peration | Version: plus | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderMesh/system/fvSolution b/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderMesh/system/fvSolution index 852422eb08..a2c699b46c 100644 --- a/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderMesh/system/fvSolution +++ b/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderMesh/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v3.0+ | +| \\ / O peration | Version: plus | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/incompressible/overSimpleFoam/aeroFoil/background_overset/0.orig/include/frontBackTopBottomfreePatches b/tutorials/incompressible/overSimpleFoam/aeroFoil/background_overset/0.orig/include/frontBackTopBottomfreePatches index 04f861bd8e..3296403f09 100644 --- a/tutorials/incompressible/overSimpleFoam/aeroFoil/background_overset/0.orig/include/frontBackTopBottomfreePatches +++ b/tutorials/incompressible/overSimpleFoam/aeroFoil/background_overset/0.orig/include/frontBackTopBottomfreePatches @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | +| \\ / O peration | Version: plus | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/incompressible/overSimpleFoam/aeroFoil/background_overset/0.orig/include/initialConditions b/tutorials/incompressible/overSimpleFoam/aeroFoil/background_overset/0.orig/include/initialConditions index f9af913104..e0b2bd996e 100644 --- a/tutorials/incompressible/overSimpleFoam/aeroFoil/background_overset/0.orig/include/initialConditions +++ b/tutorials/incompressible/overSimpleFoam/aeroFoil/background_overset/0.orig/include/initialConditions @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/