49 const word& sourceName,
50 const word& modelType,
57 isEnergySource_(false)
78 isEnergySource_ = true;
94 <<
"Must be specified for one field (U | he | species), but "
95 << nFields <<
" fields were specified!" <<
endl
112 if (curTimeIndex_ == mesh_.time().timeIndex())
116 curTimeIndex_ = mesh_.time().timeIndex();
125 name_ + eqn.
psi().
name() +
"Su",
137 const auto& psib =
psi.boundaryField();
145 tmp<scalarField> tsbnd = bpatchPtr->patchSource();
146 const auto& sbnd = tsbnd.cref();
148 UIndirectList<scalar>
151 mesh_.boundary()[patchi].faceCells()
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
static tmp< DimensionedField< Type, GeoMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const Field< Type > &iField)
Return tmp field (NO_READ, NO_WRITE) from name, mesh, dimensions, copy of internal field....
const word & name() const noexcept
Return the object name.
void resize(const label len)
Adjust allocated size of list.
A List with indirect addressing. Like IndirectList but does not store addressing.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
Find an entry if present, and assign to T val. FatalIOError if it is found and the number of tokens i...
A special matrix type and solver, designed for finite volume solutions of scalar equations....
const dimensionSet & dimensions() const noexcept
const GeometricField< Type, fvPatchField, volMesh > & psi(const label i=0) const
Return psi.
Mesh data needed to do the Finite Volume discretisation.
Base abstract class for handling finite volume options (i.e. fvOption).
const fvMesh & mesh_
Reference to the mesh database.
wordList fieldNames_
Field names to apply source to - populated by derived models.
option(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from components.
virtual bool read(const dictionary &dict)
Read source dictionary.
dictionary coeffs_
Dictionary containing source coefficients.
void resetApplied()
Resize/reset applied flag list for all fieldNames_ entries.
const fvMesh & mesh() const noexcept
Return const access to the mesh database.
const word name_
Source name.
Source defined by a boundary condition applied to cells next to patches. This fvOption needs to be us...
virtual void addSup(const volScalarField &rho, fvMatrix< scalar > &eqn, const label fieldi)
Add explicit contribution to compressible (momentum, enthalpy, species) equation.
patchCellsSource(const word &sourceName, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from explicit source name and mesh.
virtual bool read(const dictionary &dict)
Read source dictionary.
A class for managing temporary objects.
const T & cref() const
Return const reference to the object or to the contents of a (non-null) managed pointer.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
const volScalarField & psi
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
A special matrix type and solver, designed for finite volume solutions of scalar equations.
Namespace for handling debugging switches.
Namespace for finite-volume.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
messageStream Info
Information stream (stdout output on master, null elsewhere).
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
MinMax< Type > gMinMax(const FieldField< Field, Type > &f)
static constexpr const zero Zero
Global zero (0).
const dimensionSet dimVolume(pow3(dimLength))
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define forAll(list, i)
Loop across all elements in list.