mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: fieldAverage - renamed cleanRestart to resetOnRestart
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -245,7 +245,7 @@ void Foam::fieldAverage::writeAveragingProperties() const
|
|||||||
|
|
||||||
void Foam::fieldAverage::readAveragingProperties()
|
void Foam::fieldAverage::readAveragingProperties()
|
||||||
{
|
{
|
||||||
if (cleanRestart_)
|
if (resetOnRestart_)
|
||||||
{
|
{
|
||||||
Info<< "fieldAverage: starting averaging at time "
|
Info<< "fieldAverage: starting averaging at time "
|
||||||
<< obr_.time().timeName() << nl << endl;
|
<< obr_.time().timeName() << nl << endl;
|
||||||
@ -306,7 +306,7 @@ Foam::fieldAverage::fieldAverage
|
|||||||
obr_(obr),
|
obr_(obr),
|
||||||
active_(true),
|
active_(true),
|
||||||
prevTimeIndex_(-1),
|
prevTimeIndex_(-1),
|
||||||
cleanRestart_(false),
|
resetOnRestart_(false),
|
||||||
resetOnOutput_(false),
|
resetOnOutput_(false),
|
||||||
faItems_(),
|
faItems_(),
|
||||||
meanScalarFields_(),
|
meanScalarFields_(),
|
||||||
@ -354,7 +354,7 @@ void Foam::fieldAverage::read(const dictionary& dict)
|
|||||||
{
|
{
|
||||||
if (active_)
|
if (active_)
|
||||||
{
|
{
|
||||||
dict.readIfPresent("cleanRestart", cleanRestart_);
|
dict.readIfPresent("resetOnRestart", resetOnRestart_);
|
||||||
dict.readIfPresent("resetOnOutput", resetOnOutput_);
|
dict.readIfPresent("resetOnOutput", resetOnOutput_);
|
||||||
dict.lookup("fields") >> faItems_;
|
dict.lookup("fields") >> faItems_;
|
||||||
|
|
||||||
|
|||||||
@ -55,29 +55,23 @@ Description
|
|||||||
\c fieldAveragingProperties dictionary, located in \<time\>/uniform
|
\c fieldAveragingProperties dictionary, located in \<time\>/uniform
|
||||||
|
|
||||||
When restarting form a previous calculation, the averaging is continuous.
|
When restarting form a previous calculation, the averaging is continuous.
|
||||||
However, the averaging process can be restarted using the \c cleanRestart
|
However, the averaging process can be restarted using the \c resetOnRestart
|
||||||
option.
|
option.
|
||||||
|
|
||||||
To restart the averaging process after each calculation output time,
|
To restart the averaging process after each calculation output time, use
|
||||||
the \c resetOnOutput option can be applied.
|
the \c resetOnOutput option.
|
||||||
|
|
||||||
Example of function object specification:
|
Example of function object specification:
|
||||||
\verbatim
|
\verbatim
|
||||||
fieldAverage1
|
fieldAverage1
|
||||||
{
|
{
|
||||||
// Type of functionObject
|
|
||||||
type fieldAverage;
|
type fieldAverage;
|
||||||
|
|
||||||
// Where to load it from (if not already in solver)
|
|
||||||
functionObjectLibs ("libfieldFunctionObjects.so");
|
functionObjectLibs ("libfieldFunctionObjects.so");
|
||||||
|
|
||||||
// Perform a clean restart?
|
resetOnRestart true;
|
||||||
cleanRestart true;
|
|
||||||
|
|
||||||
// Reset the averaged fields after they have been written?
|
|
||||||
resetOnOutput false;
|
resetOnOutput false;
|
||||||
|
|
||||||
// Fields to be averaged
|
|
||||||
fields
|
fields
|
||||||
(
|
(
|
||||||
U
|
U
|
||||||
@ -96,9 +90,23 @@ Description
|
|||||||
}
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
|
\heading Function object usage
|
||||||
|
\table
|
||||||
|
Property | Description | Required | Default value
|
||||||
|
type | type name: fieldAverage | yes |
|
||||||
|
resetOnRestart | flag to reset the averaging on restart | yes |
|
||||||
|
resetOnOutput| flag to reset the averaging on output | yes |
|
||||||
|
fields | list of fields and averaging options | yes |
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
|
||||||
Note
|
Note
|
||||||
To employ the \c prime2Mean option, the \c mean option must be selecetd.
|
To employ the \c prime2Mean option, the \c mean option must be selecetd.
|
||||||
|
|
||||||
|
SeeAlso
|
||||||
|
functionObject.H
|
||||||
|
OutputFilterFunctionObject.H
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
fieldAverage.C
|
fieldAverage.C
|
||||||
fieldAverageTemplates.C
|
fieldAverageTemplates.C
|
||||||
@ -158,10 +166,10 @@ protected:
|
|||||||
//- Time at last call, prevents repeated averaging
|
//- Time at last call, prevents repeated averaging
|
||||||
label prevTimeIndex_;
|
label prevTimeIndex_;
|
||||||
|
|
||||||
//- Clean restart flag
|
//- Reset the averaging process on restart flag
|
||||||
Switch cleanRestart_;
|
Switch resetOnRestart_;
|
||||||
|
|
||||||
//- resetOnOutput flag
|
//- Reset the averaging process on output flag
|
||||||
Switch resetOnOutput_;
|
Switch resetOnOutput_;
|
||||||
|
|
||||||
//- List of field average items, describing what averages to be
|
//- List of field average items, describing what averages to be
|
||||||
|
|||||||
Reference in New Issue
Block a user