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();
141 const auto* bpatchPtr = isA<boundarySourcePatch>(psib[patchi]);
145 tmp<scalarField> tsbnd = bpatchPtr->patchSource();
146 const auto& sbnd = tsbnd.cref();
148 UIndirectList<scalar>
151 mesh_.boundary()[patchi].faceCells()
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.
errorManipArg< error, int > exit(error &err, const int errNo=1)
wordList fieldNames_
Field names to apply source to - populated by derived models.
void resize(const label len)
Adjust allocated size of list.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
defineTypeNameAndDebug(atmAmbientTurbSource, 0)
const word & name() const noexcept
Return the object name.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Macros for easy insertion into run-time selection tables.
#define forAll(list, i)
Loop across all elements in list.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
const dimensionSet dimVolume(pow3(dimLength))
const GeometricField< Type, fvPatchField, volMesh > & psi(const label i=0) const
Return psi.
A class for handling words, derived from Foam::string.
virtual bool read(const dictionary &dict)
Read source dictionary.
MinMax< Type > gMinMax(const FieldField< Field, Type > &f)
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
addToRunTimeSelectionTable(option, atmAmbientTurbSource, dictionary)
int debug
Static debugging option.
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...
const dimensionSet & dimensions() const noexcept
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Mesh data needed to do the Finite Volume discretisation.
void resetApplied()
Resize/reset applied flag list for all fieldNames_ entries.
A special matrix type and solver, designed for finite volume solutions of scalar equations.
messageStream Info
Information stream (stdout output on master, null elsewhere)
const volScalarField & psi
virtual void addSup(const volScalarField &rho, fvMatrix< scalar > &eqn, const label fieldi)
Add explicit contribution to compressible (momentum, enthalpy, species) equation. ...
dictionary coeffs_
Dictionary containing source coefficients.
static tmp< DimensionedField< Type, GeoMesh > > New(const word &name, const Mesh &mesh, const dimensionSet &dims, const Field< Type > &iField)
Return tmp field from name, mesh, dimensions, copy of internal field.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
static constexpr const zero Zero
Global zero (0)