Merge remote-tracking branch 'origin/master' into develop

This commit is contained in:
Mark Olesen
2022-03-13 22:37:22 +01:00
15 changed files with 71 additions and 49 deletions

View File

@ -1,2 +1,2 @@
api=2112 api=2112
patch=0 patch=220310

View File

@ -5,7 +5,7 @@
# \\ / A nd | www.openfoam.com # \\ / A nd | www.openfoam.com
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Copyright (C) 2017-2020 OpenCFD Ltd. # Copyright (C) 2017-2022 OpenCFD Ltd.
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later. # This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
@ -20,7 +20,7 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# USER EDITABLE PART: Changes made here may be lost with the next upgrade # USER EDITABLE PART: Changes made here may be lost with the next upgrade
set adios2_version=ADIOS2-2.6.0 set adios2_version=ADIOS2-2.7.1
setenv ADIOS2_ARCH_PATH "$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$adios2_version" setenv ADIOS2_ARCH_PATH "$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$adios2_version"
# END OF (NORMAL) USER EDITABLE PART # END OF (NORMAL) USER EDITABLE PART

View File

@ -5,7 +5,7 @@
# \\ / A nd | www.openfoam.com # \\ / A nd | www.openfoam.com
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Copyright (C) 2017-2020 OpenCFD Ltd. # Copyright (C) 2017-2022 OpenCFD Ltd.
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later. # This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
@ -21,7 +21,7 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# USER EDITABLE PART: Changes made here may be lost with the next upgrade # USER EDITABLE PART: Changes made here may be lost with the next upgrade
adios2_version=ADIOS2-2.6.0 adios2_version=ADIOS2-2.7.1
export ADIOS2_ARCH_PATH="$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$adios2_version" export ADIOS2_ARCH_PATH="$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$adios2_version"
# END OF (NORMAL) USER EDITABLE PART # END OF (NORMAL) USER EDITABLE PART

View File

@ -149,7 +149,7 @@ then
then then
case "$foamVar_end" in case "$foamVar_end" in
(/*) # Absolute path (/*) # Absolute path
_foamAddLib "foamVar_end" _foamAddLib "$foamVar_end"
;; ;;
(*) # Relative to prefix (*) # Relative to prefix
_foamAddLib "$foamVar_prefix/$foamVar_end" _foamAddLib "$foamVar_prefix/$foamVar_end"

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2019-2021 OpenCFD Ltd. Copyright (C) 2019-2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -37,8 +37,8 @@ Description
#include "token.H" #include "token.H"
#ifndef runTimeSelectionTables_H #ifndef Foam_runTimeSelectionTables_H
#define runTimeSelectionTables_H #define Foam_runTimeSelectionTables_H
#include <memory> // For std::unique_ptr #include <memory> // For std::unique_ptr
#include <utility> // For std::pair #include <utility> // For std::pair
@ -89,6 +89,7 @@ Description
// Not used directly: storage and helper methods for runtime tables // Not used directly: storage and helper methods for runtime tables
// - uses automatic cleanup for compat table (issue #2314)
#define defineRunTimeSelectionTableBase(baseType,prefix,Tspecialize) \ #define defineRunTimeSelectionTableBase(baseType,prefix,Tspecialize) \
\ \
/* Define table singleton (storage) */ \ /* Define table singleton (storage) */ \
@ -124,8 +125,6 @@ Description
{ \ { \
delete prefix##TablePtr_; \ delete prefix##TablePtr_; \
prefix##TablePtr_ = nullptr; \ prefix##TablePtr_ = nullptr; \
prefix##CompatTablePtr_.reset(nullptr); \
constructed = false; \
} \ } \
} \ } \
\ \

View File

@ -1273,6 +1273,7 @@ void Foam::argList::parse
{ {
source = "-roots"; source = "-roots";
runControl_.distributed(true); runControl_.distributed(true);
if (roots.empty()) if (roots.empty())
{ {
FatalErrorInFunction FatalErrorInFunction
@ -1487,12 +1488,12 @@ void Foam::argList::parse
options_.set("case", roots[subproci-1]/globalCase_); options_.set("case", roots[subproci-1]/globalCase_);
OPstream toProc(Pstream::commsTypes::scheduled, subproci); OPstream toProc(Pstream::commsTypes::scheduled, subproci);
toProc toProc
<< args_ << options_ << args_ << options_
<< runControl_.distributed() << runControl_.distributed()
<< label(runControl_.dryRun()) << label(runControl_.dryRun())
<< label(runControl_.verbose()); << label(runControl_.verbose());
} }
options_.erase("case"); options_.erase("case");
@ -1540,6 +1541,7 @@ void Foam::argList::parse
for (const int subproci : Pstream::subProcs()) for (const int subproci : Pstream::subProcs())
{ {
OPstream toProc(Pstream::commsTypes::scheduled, subproci); OPstream toProc(Pstream::commsTypes::scheduled, subproci);
toProc toProc
<< args_ << options_ << args_ << options_
<< runControl_.distributed() << runControl_.distributed()
@ -1559,6 +1561,7 @@ void Foam::argList::parse
Pstream::commsTypes::scheduled, Pstream::commsTypes::scheduled,
Pstream::masterNo() Pstream::masterNo()
); );
fromMaster fromMaster
>> args_ >> options_ >> args_ >> options_
>> isDistributed >> isDistributed

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2020 ENERCON GmbH Copyright (C) 2020 ENERCON GmbH
Copyright (C) 2020-2021 OpenCFD Ltd. Copyright (C) 2020-2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -131,7 +131,7 @@ atmTurbulentHeatFluxTemperatureFvPatchScalarField
fixedGradientFvPatchScalarField(atmpsf), fixedGradientFvPatchScalarField(atmpsf),
heatSource_(atmpsf.heatSource_), heatSource_(atmpsf.heatSource_),
alphaEffName_(atmpsf.alphaEffName_), alphaEffName_(atmpsf.alphaEffName_),
Cp0_(atmpsf.Cp0_), Cp0_(atmpsf.Cp0_.clone()),
q_(atmpsf.q_.clone(this->patch().patch())) q_(atmpsf.q_.clone(this->patch().patch()))
{} {}
@ -146,7 +146,7 @@ atmTurbulentHeatFluxTemperatureFvPatchScalarField
fixedGradientFvPatchScalarField(atmpsf, iF), fixedGradientFvPatchScalarField(atmpsf, iF),
heatSource_(atmpsf.heatSource_), heatSource_(atmpsf.heatSource_),
alphaEffName_(atmpsf.alphaEffName_), alphaEffName_(atmpsf.alphaEffName_),
Cp0_(atmpsf.Cp0_), Cp0_(atmpsf.Cp0_.clone()),
q_(atmpsf.q_.clone(this->patch().patch())) q_(atmpsf.q_.clone(this->patch().patch()))
{} {}

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2015-2019 OpenCFD Ltd. Copyright (C) 2015-2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -67,15 +67,20 @@ void Foam::functionObjects::timeActivatedFileUpdate::updateFile()
if (i > lastIndex_) if (i > lastIndex_)
{ {
Log << nl << type() << ": copying file" << nl << timeVsFile_[i].second() const fileName& srcFile = timeVsFile_[i].second();
<< nl << "to:" << nl << fileToUpdate_ << nl << endl;
// Report case-relative path for information
Log << nl << type() << ": copying file" << nl
<< "from: " << time_.relativePath(srcFile, true) << nl
<< "to : " << time_.relativePath(fileToUpdate_, true) << nl
<< endl;
if (Pstream::master() || time_.distributed()) if (Pstream::master() || time_.distributed())
{ {
// Slaves do not copy if running non-distributed // Slaves do not copy if running non-distributed
fileName destFile(fileToUpdate_ + Foam::name(pid())); fileName tmpFile(fileToUpdate_ + Foam::name(pid()));
cp(timeVsFile_[i].second(), destFile); Foam::cp(srcFile, tmpFile);
mv(destFile, fileToUpdate_); Foam::mv(tmpFile, fileToUpdate_);
} }
lastIndex_ = i; lastIndex_ = i;
modified_ = true; modified_ = true;
@ -122,16 +127,23 @@ bool Foam::functionObjects::timeActivatedFileUpdate::read
forAll(timeVsFile_, i) forAll(timeVsFile_, i)
{ {
timeVsFile_[i].second() = timeVsFile_[i].second().expand(); timeVsFile_[i].second().expand();
if (!isFile(timeVsFile_[i].second())) const fileName& srcFile = timeVsFile_[i].second();
{
FatalErrorInFunction
<< "File: " << timeVsFile_[i].second() << " not found"
<< nl << exit(FatalError);
}
// Report case-relative path for information
Info<< " " << timeVsFile_[i].first() << tab Info<< " " << timeVsFile_[i].first() << tab
<< timeVsFile_[i].second() << endl; << time_.relativePath(srcFile, true) << endl;
if (Pstream::master() || time_.distributed())
{
if (!Foam::isFile(srcFile))
{
// Report full path on error
FatalErrorInFunction
<< "File not found: " << srcFile << endl
<< exit(FatalError);
}
}
} }
// Copy starting files // Copy starting files

View File

@ -62,7 +62,8 @@ License
makeCloudFunctionObjectType(PatchPostProcessing, CloudType); \ makeCloudFunctionObjectType(PatchPostProcessing, CloudType); \
makeCloudFunctionObjectType(PatchParticleHistogram, CloudType); \ makeCloudFunctionObjectType(PatchParticleHistogram, CloudType); \
makeCloudFunctionObjectType(RemoveParcels, CloudType); \ makeCloudFunctionObjectType(RemoveParcels, CloudType); \
makeCloudFunctionObjectType(VoidFraction, CloudType); makeCloudFunctionObjectType(VoidFraction, CloudType); \
makeCloudFunctionObjectType(KinematicReynoldsNumber, CloudType);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -51,7 +51,7 @@ Description
Operand | Type | Location Operand | Type | Location
input | - | - input | - | -
output file | - | - output file | - | -
output field | scalarField | \<time\>/lagrangian/\<cloud\>/kinematicRe output field | scalarField | \<time\>/lagrangian/\<cloud\>/Re
\endtable \endtable
Usage Usage
@ -62,15 +62,15 @@ Usage
KinematicReynoldsNumber1 KinematicReynoldsNumber1
{ {
// Mandatory entries // Mandatory entries
type KinematicReynoldsNumber; type ReynoldsNumber;
} }
} }
\endverbatim \endverbatim
where the entries mean: where the entries mean:
\table \table
Property | Description | Type | Reqd | Deflt Property | Description | Type | Reqd | Deflt
type | Type name: KinematicReynoldsNumber | word | yes | - type | Type name: ReynoldsNumber | word | yes | -
\endtable \endtable
See also See also

View File

@ -51,7 +51,7 @@ Description
Operand | Type | Location Operand | Type | Location
input | - | - input | - | -
output file | - | - output file | - | -
output field | scalarField | \<time\>/lagrangian/\<cloud\>/thermoRe output field | scalarField | \<time\>/lagrangian/\<cloud\>/Re
\endtable \endtable
Usage Usage
@ -62,22 +62,22 @@ Usage
ThermoReynoldsNumber1 ThermoReynoldsNumber1
{ {
// Mandatory entries // Mandatory entries
type ThermoReynoldsNumber; type ReynoldsNumber;
} }
} }
\endverbatim \endverbatim
where the entries mean: where the entries mean:
\table \table
Property | Description | Type | Reqd | Deflt Property | Description | Type | Reqd | Deflt
type | Type name: ThermoReynoldsNumber | word | yes | - type | Type name: ReynoldsNumber | word | yes | -
\endtable \endtable
Note Note
- Normalisation factors \c rhoc and \c muc are based on temperature - Normalisation factors \c rhoc and \c muc are based on temperature
dependent values calculated inside the film surrounding the particle dependent values calculated inside the film surrounding the particle
rather than freestream values; therefore, \c ThermoReynoldsNumber should not rather than freestream values; therefore, the thermo \c ReynoldsNumber
be expected to operate with kinematic (non-thermo) applications. should not be expected to operate with kinematic (non-thermo) applications.
See also See also
- Foam::KinematicReynoldsNumber - Foam::KinematicReynoldsNumber

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com \\ / A nd | www.openfoam.com
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2019 OpenCFD Ltd. Copyright (C) 2019-2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -106,7 +106,7 @@ void Foam::polySurface::storeField
if (dimfield) if (dimfield)
{ {
dimfield->dimensions() = dims; dimfield->dimensions().reset(dims); // Dimensions may have changed
dimfield->field() = values; dimfield->field() = values;
} }
else else
@ -147,7 +147,7 @@ void Foam::polySurface::storeField
if (dimfield) if (dimfield)
{ {
dimfield->dimensions() = dims; dimfield->dimensions().reset(dims); // Dimensions may have changed
dimfield->field() = std::move(values); dimfield->field() = std::move(values);
} }
else else

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com \\ / A nd | www.openfoam.com
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2019 OpenCFD Ltd. Copyright (C) 2019-2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -45,7 +45,7 @@ void Foam::surfMesh::storeField
if (dimfield) if (dimfield)
{ {
dimfield->dimensions() = dims; dimfield->dimensions().reset(dims); // Dimensions may have changed
dimfield->field() = values; dimfield->field() = values;
} }
else else
@ -85,7 +85,7 @@ void Foam::surfMesh::storeField
if (dimfield) if (dimfield)
{ {
dimfield->dimensions() = dims; dimfield->dimensions().reset(dims); // Dimensions may have changed
dimfield->field() = std::move(values); dimfield->field() = std::move(values);
} }
else else

View File

@ -14,6 +14,8 @@ relVelocity
name relVelocity; name relVelocity;
libs ( utilityFunctionObjects ); libs ( utilityFunctionObjects );
writeControl writeTime;
coeffs coeffs
{ {
// User input (duplicate of constant/dynamicMeshDict) // User input (duplicate of constant/dynamicMeshDict)
@ -72,7 +74,7 @@ relVelocity
} }
#}; #};
codeExecute // codeWrite codeWrite
#{ #{
const dictionary& context = this->codeContext(); const dictionary& context = this->codeContext();

View File

@ -121,7 +121,12 @@ subModels
cloudFunctions cloudFunctions
{} {
ReynoldsNumber1
{
type ReynoldsNumber;
}
}
// ************************************************************************* // // ************************************************************************* //