52 void Foam::fv::heatSource::readCoeffs()
54 if (!coeffs().
found(
"q") && !coeffs().
found(
"Q"))
57 <<
"Neither heat source per unit volume, q, or total heat source, " 61 if (coeffs().
found(
"q") && coeffs().
found(
"Q"))
64 <<
"Both heat source per unit volume, q, and total heat source, " 65 <<
"Q, have been specified. One is required." 69 if (coeffs().
found(
"q"))
77 new Function1s::Scale<scalar>
80 Function1s::Constant<scalar>(
"1/V", 1/set_.V()),
81 Function1s::Constant<scalar>(
"1", 1),
94 const word& modelType,
99 fvModel(name, modelType, dict, mesh),
100 set_(coeffs(), mesh),
127 const word& fieldName
132 const scalar t =
mesh().time().userTimeValue();
133 const scalar q = q_->value(t);
137 eqn.
source()[cells[i]] -=
mesh().V()[cells[i]]*q;
146 const word& fieldName
149 addSup(eqn, fieldName);
162 set_.topoChange(map);
174 set_.distribute(map);
virtual bool movePoints()
Update for mesh motion.
virtual ~heatSource()
Destructor.
defineTypeNameAndDebug(fixedTemperatureConstraint, 0)
#define forAll(list, i)
Loop across all elements in list.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
const word & name() const
Return name.
fluidReactionThermo & thermo
Base-class for fluid and solid thermodynamic properties.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
virtual wordList addSupFields() const
Return the list of fields for which the fvModel adds source term.
virtual bool read(const dictionary &dict)
Read dictionary.
virtual bool read(const dictionary &dict)
Read source dictionary.
Finite volume model abstract base class.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
Macros for easy insertion into run-time selection tables.
virtual volScalarField & he()=0
Enthalpy/Internal energy [J/kg].
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
virtual void addSup(fvMatrix< scalar > &eqn, const word &fieldName) const
Source term to energy equation.
A class for handling words, derived from string.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
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.
heatSource(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from dictionary.
addToRunTimeSelectionTable(fvConstraint, fixedTemperatureConstraint, dictionary)
List< word > wordList
A List of words.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Mesh data needed to do the Finite Volume discretisation.
Class containing mesh-to-mesh mapping information.
static autoPtr< Function1< scalar > > New(const word &name, const dictionary &dict)
Selector.