49 const word& sourceName,
50 const word& modelType,
55 fa::faceSetOption(sourceName, modelType,
dict, m),
56 TName_(
dict.getOrDefault<
word>(
"T",
"T")),
61 typeName +
":V_" + regionName_,
62 regionMesh().thisDb().time().
timeName(),
63 regionMesh().thisDb(),
69 scalarSigmaVsTPtr_(nullptr),
70 tensorSigmaVsTPtr_(nullptr),
73 anisotropicElectricalConductivity_(false)
79 if (anisotropicElectricalConductivity_)
81 Info<<
" Using tensor electrical conductivity" <<
endl;
83 initialiseSigma(
coeffs_, tensorSigmaVsTPtr_);
87 Info<<
" Using scalar electrical conductivity" <<
endl;
89 initialiseSigma(
coeffs_, scalarSigmaVsTPtr_);
109 <<
name() <<
": applying source to " 114 for (label i = 0; i < nIter_; ++i)
116 if (anisotropicElectricalConductivity_)
120 updateSigma(tensorSigmaVsTPtr_);
131 updateSigma(scalarSigmaVsTPtr_);
140 curTimeIndex_ =
mesh().time().timeIndex();
146 if (
debug > 1 &&
mesh().time().outputTime())
152 tmp<areaScalarField> tsource;
154 if (anisotropicElectricalConductivity_)
159 typeName +
":sigma_" + regionName_
162 tsource = (
h*
sigma & gradV) & gradV;
169 typeName +
":sigma_" + regionName_
172 tsource = (
h*
sigma*gradV) & gradV;
187 dict.readIfPresent(
"T", TName_);
189 dict.readIfPresent(
"nIter", nIter_);
191 anisotropicElectricalConductivity_ =
192 dict.get<
bool>(
"anisotropicElectricalConductivity");
addToRunTimeSelectionTable(option, limitHeight, dictionary)
Namespace of functions to calculate implicit derivatives returning a matrix. Time derivatives are cal...
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...
const word & name() const noexcept
Return the object name.
Ostream & endl(Ostream &os)
Add newline and flush stream.
jouleHeatingSource(const word &sourceName, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from explicit source name and mesh.
dimensionedScalar sigma("sigma", dimMass/sqr(dimTime), transportProperties)
Macros for easy insertion into run-time selection tables.
tmp< faMatrix< Type > > laplacian(const GeometricField< Type, faPatchField, areaMesh > &vf)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
A class for handling words, derived from Foam::string.
defineTypeNameAndDebug(limitHeight, 0)
virtual bool read(const dictionary &dict)
Read source dictionary.
GeometricField< tensor, faPatchField, areaMesh > areaTensorField
#define DebugInfo
Report an information message using Foam::Info.
virtual void addSup(const areaScalarField &h, const areaScalarField &rho, faMatrix< scalar > &eqn, const label fieldi)
Add explicit contribution to compressible momentum equation.
int debug
Static debugging option.
const dimensionedScalar h
Planck constant.
void resetApplied()
Resize/reset applied flag list for all fieldNames_ entries.
Mesh data needed to do the Finite Volume discretisation.
A special matrix type and solver, designed for finite area solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
Template specialisation for scalar faMatrix.
messageStream Info
Information stream (stdout output on master, null elsewhere)
void subsetFilter(List< Type > &field) const
Zero all non-selected locations within field.
const GeometricField< Type, faPatchField, areaMesh > & psi() const
virtual bool read(const dictionary &dict)
Read source dictionary.
Defines the attributes of an object for which implicit objectRegistry management is supported...
GeometricField< vector, faPatchField, areaMesh > areaVectorField
dictionary coeffs_
Dictionary containing source coefficients.
tmp< GeometricField< typename outerProduct< vector, Type >::type, faPatchField, areaMesh >> grad(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
GeometricField< scalar, faPatchField, areaMesh > areaScalarField