47const Foam::word Foam::fv::jouleHeatingSource::sigmaName(typeName +
":sigma");
53Foam::fv::jouleHeatingSource::transformSigma
55 const volVectorField& sigmaLocal
73 auto& sigma = tsigma.ref();
79 <<
"Coordinate system undefined"
83 const auto& csys = *csysPtr_;
87 sigma.primitiveFieldRef() =
88 csys.transformPrincipal(sigmaLocal);
92 sigma.primitiveFieldRef() =
96 sigma.correctBoundaryConditions();
106 const word& sourceName,
107 const word& modelType,
126 anisotropicElectricalConductivity_(false),
127 scalarSigmaVsTPtr_(nullptr),
128 vectorSigmaVsTPtr_(nullptr),
156 if (curTimeIndex_ != mesh_.time().timeIndex())
158 if (anisotropicElectricalConductivity_)
161 const volVectorField& sigmaLocal = updateSigma(vectorSigmaVsTPtr_);
181 curTimeIndex_ = mesh_.time().timeIndex();
187 if (anisotropicElectricalConductivity_)
189 const auto& sigmaLocal = mesh_.lookupObject<
volVectorField>(sigmaName);
193 eqn += (sigma & gradV) & gradV;
197 const auto& sigma = mesh_.lookupObject<
volScalarField>(sigmaName);
199 eqn += (sigma*gradV) & gradV;
208 coeffs_.readIfPresent(
"T", TName_);
210 anisotropicElectricalConductivity_ =
211 coeffs_.get<
bool>(
"anisotropicElectricalConductivity");
213 if (anisotropicElectricalConductivity_)
215 Info<<
" Using vector electrical conductivity" <<
endl;
217 initialiseSigma(coeffs_, vectorSigmaVsTPtr_);
224 coordinateSystem::typeName_()
229 Info<<
" Using scalar electrical conductivity" <<
endl;
231 initialiseSigma(coeffs_, scalarSigmaVsTPtr_);
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.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
static word timeName(const scalar t, const int precision=precision_)
Abstract base-class for fluid and solid thermodynamic properties.
static const word dictName
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Evolves an electrical potential equation.
A special matrix type and solver, designed for finite volume 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, fvPatchField, volMesh > & psi(const label i=0) const
Return psi.
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
Evolves an electrical potential equation.
virtual void addSup(const volScalarField &rho, fvMatrix< 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 volume options (i.e. fvOption).
const fvMesh & mesh_
Reference to the mesh database.
wordList fieldNames_
Field names to apply source to - populated by derived models.
void resetApplied()
Resize/reset applied flag list for all fieldNames_ entries.
const Type & lookupObject(const word &name, const bool recursive=false) const
const vectorField & cellCentres() const
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A special matrix type and solver, designed for finite volume solutions of scalar equations.
Calculate the gradient of the given field.
Calculate the matrix for the laplacian of the field.
#define DebugInfo
Report an information message using Foam::Info.
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m2/K4].
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > > grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< symmTensor > dimensionedSymmTensor
Dimensioned tensor obtained from generic dimensioned type.
errorManip< error > abort(error &err)
static constexpr const zero Zero
Global zero (0)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
static const char *const typeName
The type name used in ensight case files.