49 const word& sourceName,
50 const word& modelType,
55 fa::faceSetOption(sourceName, modelType,
dict, m),
56 TName_(
dict.getOrDefault<
word>(
"T",
"T")),
61 IOobject::scopedName(typeName,
"V_" + regionName_),
62 regionMesh().thisDb().time().
timeName(),
63 regionMesh().thisDb(),
70 scalarSigmaVsTPtr_(nullptr),
71 tensorSigmaVsTPtr_(nullptr),
74 anisotropicElectricalConductivity_(false)
80 if (anisotropicElectricalConductivity_)
82 Info<<
" Using tensor electrical conductivity" <<
endl;
84 initialiseSigma(
coeffs_, tensorSigmaVsTPtr_);
88 Info<<
" Using scalar electrical conductivity" <<
endl;
90 initialiseSigma(
coeffs_, scalarSigmaVsTPtr_);
110 <<
name() <<
": applying source to " 115 for (label i = 0; i < nIter_; ++i)
117 if (anisotropicElectricalConductivity_)
121 updateSigma(tensorSigmaVsTPtr_);
132 updateSigma(scalarSigmaVsTPtr_);
141 curTimeIndex_ =
mesh().time().timeIndex();
152 if (
debug > 1 &&
mesh().time().writeTime())
158 tmp<areaScalarField> tsource;
160 const auto& obr = regionMesh().thisDb();
162 if (anisotropicElectricalConductivity_)
167 tsource = (
h*
sigma & gradV) & gradV;
174 tsource = (
h*
sigma*gradV) & gradV;
189 dict.readIfPresent(
"T", TName_);
191 dict.readIfPresent(
"nIter", nIter_);
193 anisotropicElectricalConductivity_ =
194 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)
static word scopedName(const std::string &scope, const word &name)
Create scope:name or scope_name string.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::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