75 const word& modelType,
81 modelType_(modelType),
84 coeffs_(
dict.optionalSubDict(modelType +
"Coeffs"))
103 <<
"Selecting finite volume model type " << modelType <<
endl;
107 !dictionaryConstructorTablePtr_
108 || dictionaryConstructorTablePtr_->find(modelType)
109 == dictionaryConstructorTablePtr_->end()
118 dictionaryConstructorTablePtr_
125 if (!dictionaryConstructorTablePtr_)
128 <<
"Unknown model type "
129 << modelType <<
nl <<
nl
130 <<
"Table of fvModels is empty"
135 dictionaryConstructorTable::iterator cstrIter =
136 dictionaryConstructorTablePtr_->find(modelType);
138 if (cstrIter == dictionaryConstructorTablePtr_->end())
141 <<
"Unknown fvModel " << modelType <<
nl <<
nl
142 <<
"Valid fvModels are:" <<
nl
143 << dictionaryConstructorTablePtr_->sortedToc()
149 cstrIter()(
name, modelType, mesh,
dict)
168 return findIndex(addSupFields(), fieldName) != -1;
Generic GeometricField class.
static const List< word > & null()
Return a null List.
A list of keyword definitions, which are a keyword followed by any number of values (e....
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
const dictionary & optionalSubDict(const word &) const
Find and return a sub-dictionary if found.
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.
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.
bool remove(const char)
Remove all occurrences of character returning true if string changed.
A class for handling words, derived from string.
#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 & decrIndent(Ostream &os)
Decrement the indent level.
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
defineTypeNameAndDebug(combustionModel, 0)
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.
FOR_ALL_FIELD_TYPES(makeFieldSourceTypedef)
Ostream & indent(Ostream &os)
Indent stream.