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)
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;
165 if (
mesh().time().outputTime() && debug)
179 dict.readIfPresent(
"T", TName_);
181 dict.readIfPresent(
"nIter", nIter_);
183 anisotropicElectricalConductivity_ =
184 dict.get<
bool>(
"anisotropicElectricalConductivity");
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
void resize(const label len)
Adjust allocated size of list.
virtual bool read()
Re-read model coefficients if they have changed.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A special matrix type and solver, designed for finite area solutions of scalar equations....
void relax(const scalar alpha)
Relax matrix (for steady-state solution).
SolverPerformance< Type > solve(const dictionary &)
Solve returning the solution statistics.
const GeometricField< Type, faPatchField, areaMesh > & psi() const
Intermediate abstract class for handling face-set options for the derived faOptions.
Evolves an electrical potential equation.
virtual void addSup(const areaScalarField &h, const areaScalarField &rho, faMatrix< scalar > &eqn, const label fieldi)
Add explicit contribution to compressible momentum equation.
virtual bool read(const dictionary &dict)
Read source dictionary.
Base abstract class for handling finite area options (i.e. faOption).
wordList fieldNames_
Field names to apply source to - populated by derived models.
dictionary coeffs_
Dictionary containing source coefficients.
void resetApplied()
Resize/reset applied flag list for all fieldNames_ entries.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual bool write(const bool valid=true) const
Write using setting from DB.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Namespace of functions to calculate implicit derivatives returning a matrix. Time derivatives are cal...
#define DebugInfo
Report an information message using Foam::Info.
tmp< GeometricField< typename outerProduct< vector, Type >::type, faPatchField, areaMesh > > grad(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
tmp< faMatrix< Type > > laplacian(const GeometricField< Type, faPatchField, areaMesh > &vf)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.