ENH: Multiple updates to function objects

Updated objects
- corrected Peclet number for compressible cases
- propagated log flag and resultName across objects

New function objects
- new fluxSummary:
  - calculates positive, negative, absolute and net flux across face
    zones
- new runTimeControl
  - abort the calculation when a user-defined metric is achieved.
    Available options include:
    - average value remains unchanged wrt a given threshold
    - equation initial residual exceeds a threshold - useful to abort
      diverging cases
    - equation max iterations exceeds a threshold - useful to abort
      diverging cases
    - min/max of a function object value
    - min time step exceeds a threshold - useful to abort diverging
      cases
- new valueAverage:
  - average singular values from other function objects, e.g. Cd, Cl and
    Cm from the forceCoeffs function object
This commit is contained in:
Andrew Heather
2015-11-25 17:19:06 +00:00
parent f4de5d17e4
commit 6838df9cd2
129 changed files with 9233 additions and 3546 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -31,7 +31,7 @@ License
namespace Foam
{
template<>
const char* NamedEnum<outputFilterOutputControl::outputControls, 7>::
const char* NamedEnum<outputFilterOutputControl::outputControls, 8>::
names[] =
{
"timeStep",
@ -40,11 +40,12 @@ namespace Foam
"runTime",
"clockTime",
"cpuTime",
"onEnd",
"none"
};
}
const Foam::NamedEnum<Foam::outputFilterOutputControl::outputControls, 7>
const Foam::NamedEnum<Foam::outputFilterOutputControl::outputControls, 8>
Foam::outputFilterOutputControl::outputControlNames_;
@ -113,6 +114,7 @@ void Foam::outputFilterOutputControl::read(const dictionary& dict)
break;
}
case ocOnEnd:
default:
{
// do nothing
@ -196,6 +198,13 @@ bool Foam::outputFilterOutputControl::output()
break;
}
case ocOnEnd:
{
scalar endTime = time_.endTime().value() - 0.5*time_.deltaTValue();
return time_.value() > endTime;
break;
}
case ocNone:
{
return false;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -62,6 +62,7 @@ public:
ocRunTime, /*!< run time for dumping */
ocClockTime, /*!< clock time for dumping */
ocCpuTime, /*!< cpu time for dumping */
ocOnEnd, /*!< on end of run*/
ocNone /*!< no output */
};
@ -77,7 +78,7 @@ private:
const word prefix_;
//- String representation of outputControls enums
static const NamedEnum<outputControls, 7> outputControlNames_;
static const NamedEnum<outputControls, 8> outputControlNames_;
//- Type of output
outputControls outputControl_;