78 const word& modelType,
84 modelType_(modelType),
105 !dictionaryConstructorTablePtr_
106 || dictionaryConstructorTablePtr_->find(
type)
107 == dictionaryConstructorTablePtr_->end()
116 dictionaryConstructorTablePtr_
123 if (!dictionaryConstructorTablePtr_)
126 <<
"Unknown model type "
128 <<
"Table of fvModels is empty"
133 dictionaryConstructorTable::iterator cstrIter =
134 dictionaryConstructorTablePtr_->find(
type);
136 if (cstrIter == dictionaryConstructorTablePtr_->end())
139 <<
"Unknown fvModel " <<
type <<
nl <<
nl
140 <<
"Valid fvModels are:" <<
nl
141 << dictionaryConstructorTablePtr_->sortedToc()
165 return findIndex(addSupFields(), fieldName) != -1;
Generic GeometricField class.
A HashTable with keys but without contents.
static const List< word > & null()
Return a null List.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
bool open(const fileName &libName, const bool verbose=true)
Open the named library, optionally with warnings if problems occur.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Mesh data needed to do the Finite Volume discretisation.
Finite volume model abstract base class.
static autoPtr< fvModel > New(const word &name, const fvMesh &mesh, const dictionary &dict)
Return a reference to the selected fvModel.
virtual wordList addSupFields() const
Return the list of fields for which the fvModel adds source term.
void addSupType(const VolField< Type > &field, fvMatrix< Type > &eqn) const
Add a source term to an equation.
virtual ~fvModel()
Destructor.
virtual void correct()
Correct the fvModel.
virtual scalar maxDeltaT() const
Return the maximum time-step for stable operation.
virtual bool read(const dictionary &dict)
Read source dictionary.
static const wordHashSet keywords
The keywords read by this class.
virtual bool write(const bool write=true) const
Write fvModel data.
virtual void addSup(fvMatrix< scalar > &eqn) const
Add a source term to a field-less proxy equation.
fvModel(const word &name, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from components.
virtual bool addsSupToField(const word &fieldName) const
Return true if the fvModel adds a source term to the given.
Enables the printing of a dictionary and subsequently looked-up defaulted entries.
A class for handling words, derived from string.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define IMPLEMENT_FV_MODEL_ADD_FIELD_SUP(Type, modelType)
#define IMPLEMENT_FV_MODEL_ADD_ALPHA_RHO_FIELD_SUP(Type, modelType)
#define IMPLEMENT_FV_MODEL_ADD_RHO_FIELD_SUP(Type, modelType)
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
void write(std::ostream &os, const bool binary, List< floatScalar > &fField)
Write floats ascii or binary.
errorManipArg< error, int > exit(error &err, const int errNo=1)
dlLibraryTable libs
Table of loaded dynamic libraries.
Ostream & endl(Ostream &os)
Add newline and flush stream.
FOR_ALL_FIELD_TYPES(makeDimensionedPointFieldFunctions)
defineRunTimeSelectionTable(fvConstraint, dictionary)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
Ostream & indentOrNl(Ostream &os)
Indent stream or add newline if indent level == 0.
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.
defineTypeNameAndDebug(atmosphericBoundaryLayer, 0)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.