Go to the documentation of this file.
49 const word& sourceName,
50 const word& modelType,
56 TName_(
dict.getOrDefault<
word>(
"T",
"T")),
61 typeName +
":V_" + regionName_,
69 scalarSigmaVsTPtr_(
nullptr),
70 tensorSigmaVsTPtr_(
nullptr),
73 anisotropicElectricalConductivity_(
false)
75 fieldNames_.resize(1, TName_);
77 fa::option::resetApplied();
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_);
113 for (label i = 0; i < nIter_; ++i)
115 if (anisotropicElectricalConductivity_)
119 updateSigma(tensorSigmaVsTPtr_);
130 updateSigma(scalarSigmaVsTPtr_);
139 curTimeIndex_ =
mesh().time().timeIndex();
145 if (anisotropicElectricalConductivity_)
150 typeName +
":sigma_" + regionName_
153 eqn += (
h*
sigma & gradV) & gradV;
160 typeName +
":sigma_" + regionName_
163 eqn += (
h*
sigma*gradV) & gradV;
179 dict.readIfPresent(
"T", TName_);
181 dict.readIfPresent(
"nIter", nIter_);
183 anisotropicElectricalConductivity_ =
184 dict.get<
bool>(
"anisotropicElectricalConductivity");
int debug
Static debugging option.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A special matrix type and solver, designed for finite area solutions of scalar equations....
A class for handling words, derived from Foam::string.
virtual void addSup(const areaScalarField &h, const areaScalarField &rho, faMatrix< scalar > &eqn, const label fieldi)
Add explicit contribution to compressible momentum equation.
Namespace of functions to calculate implicit derivatives returning a matrix. Time derivatives are cal...
Intermediate abstract class for handling face-set options for the derived faOptions.
tmp< GeometricField< typename outerProduct< vector, Type >::type, faPatchField, areaMesh >> grad(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Ostream & endl(Ostream &os)
Add newline and flush stream.
SolverPerformance< Type > solve(const dictionary &)
Solve returning the solution statistics.
defineTypeNameAndDebug(limitVelocity, 0)
const dimensionedScalar h
Planck constant.
messageStream Info
Information stream (stdout output on master, null elsewhere)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
jouleHeatingSource(const word &sourceName, const word &modelType, const dictionary &dict, const fvPatch &patch)
Construct from explicit source name and mesh.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool read(const dictionary &dict)
Read source dictionary.
Macros for easy insertion into run-time selection tables.
virtual bool read(const dictionary &dict)
Read source dictionary.
#define DebugInfo
Report an information message using Foam::Info.
const std::string patch
OpenFOAM patch number as a std::string.
const GeometricField< Type, faPatchField, areaMesh > & psi() const
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
addToRunTimeSelectionTable(option, limitVelocity, dictionary)
dimensionedScalar sigma("sigma", dimMass/sqr(dimTime), transportProperties)
tmp< GeometricField< Type, faPatchField, areaMesh > > laplacian(const GeometricField< Type, faPatchField, areaMesh > &vf, const word &name)
void relax(const scalar alpha)
Relax matrix (for steady-state solution).