52 void Foam::fv::heatSource::readCoeffs(
const dictionary&
dict)
54 if (!
dict.found(
"q") && !
dict.found(
"Q"))
57 <<
"Neither heat source per unit volume, q, nor total heat source, "
61 if (
dict.found(
"q") &&
dict.found(
"Q"))
64 <<
"Both heat source per unit volume, q, and total heat source, "
65 <<
"Q, have been specified. One is required."
76 mesh().time().userUnits(),
86 new Function1s::Scale<scalar>
89 Function1s::Constant<scalar>(
"1/V", 1/zone_.
V()),
90 Function1s::Constant<scalar>(
"1", 1),
94 mesh().time().userUnits(),
109 const word& modelType,
147 const scalar q = q_->value(
mesh().time().value());
177 zone_.topoChange(map);
189 zone_.distribute(map);
197 readCoeffs(coeffs(
dict));
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
static autoPtr< Function1< scalar > > New(const word &name, const Function1s::unitConversions &units, const dictionary &dict)
Select from dictionary.
Generic GeometricField class.
Base-class for fluid and solid thermodynamic properties.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
scalar V() const
Return const access to the total cell volume.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Mesh data needed to do the Finite Volume discretisation.
const DimensionedField< scalar, volMesh > & V() const
Return cell volumes.
Finite volume model abstract base class.
static const dictionary & coeffs(const word &modelType, const dictionary &)
Return the coefficients sub-dictionary for a given model type.
virtual bool read(const dictionary &dict)
Read source dictionary.
const fvMesh & mesh() const
Return const access to the mesh database.
Model for applying a heat source. Requires either the power, Q, or the power per unit volume,...
virtual bool movePoints()
Update for mesh motion.
virtual wordList addSupFields() const
Return the list of fields for which the fvModel adds source term.
virtual ~heatSource()
Destructor.
virtual void addSup(const volScalarField &he, fvMatrix< scalar > &eqn) const
Source term to energy equation.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
virtual bool read(const dictionary &dict)
Read dictionary.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
heatSource(const word &name, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from dictionary.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type and name.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
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.
addToRunTimeSelectionTable(fvConstraint, bound, dictionary)
defineTypeNameAndDebug(bound, 0)
errorManipArg< error, int > exit(error &err, const int errNo=1)
List< word > wordList
A List of words.
const dimensionSet dimPower
const dimensionSet dimVolume
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
fluidMulticomponentThermo & thermo