43Foam::SIMPLEControl::SIMPLEControl
46 const word& managerType,
52 managerType_(managerType),
66 const word& managerType,
70 auto* ctorPtr = dictionaryConstructorTable(managerType);
78 *dictionaryConstructorTablePtr_
92 if (average_ && averageStartIter_ > nIters_)
95 <<
"Average start iteration is larger than nIter in solver "
96 << solver_.solverName() <<
nl
97 <<
tab <<
"Disabling averaging ..." <<
nl
114 if (average_ && iter_ < averageStartIter_)
117 <<
"Solver " << solver_.solverName()
118 <<
" converged before averaging started" <<
nl <<
tab
119 <<
"Using instantaneous fields ..." <<
nl
SIMPLE control class to supply convergence information/checks for the SIMPLE loop.
label pRefCell_
Pressure reference cell.
virtual bool converged()
Is the solver converged.
static autoPtr< SIMPLEControl > New(fvMesh &mesh, const word &managerType, const solver &solver)
Return a reference to the selected turbulence model.
virtual void incrementIter()
Increment iteration counter.
label nIters_
Number of SIMPLE iterations.
const word & managerType_
Optimisation type.
scalar pRefValue_
Pressure reference value.
void checkMeanSolution() const
virtual bool performIter()
Perform this iteration?
virtual bool read()
Read controls from optimisationDict.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T. FatalIOError if not found, or if the number of tokens is incorrect.
Mesh data needed to do the Finite Volume discretisation.
SIMPLE control class to supply convergence information/checks for the SIMPLE loop.
bool criteriaSatisfied()
Return true if all convergence checks are satisfied.
bool read()
Read controls from fvSolution dictionary.
Base class for solver control classes.
const solver & solver_
Reference to the underlaying solver.
bool average_
Do averaging.
label averageStartIter_
Averaging start index.
label iter_
Current iteration index.
virtual bool read()
Read controls from optimisationDict.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInLookup(lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalError.
#define WarningInFunction
Report a warning using Foam::Warning.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static constexpr const zero Zero
Global zero (0).
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a).
constexpr char tab
The tab '\t' character(0x09).
#define defineRunTimeSelectionTable(baseType, argNames)
Define run-time selection table.