Go to the documentation of this file.
53 const Foam::word Foam::fv::jouleHeatingSource::sigmaName(typeName +
":sigma");
60 if (!csysPtr_ || !csysPtr_.valid())
63 <<
"Coordinate system invalid"
72 Foam::fv::jouleHeatingSource::transformSigma
82 mesh_.time().timeName(),
90 zeroGradientFvPatchField<symmTensor>::typeName
92 auto&
sigma = tsigma.ref();
96 sigma.primitiveFieldRef() =
97 csys().transformPrincipal(sigmaLocal);
101 sigma.primitiveFieldRef() =
102 csys().transformPrincipal(mesh_.cellCentres(), sigmaLocal);
105 sigma.correctBoundaryConditions();
113 Foam::fv::jouleHeatingSource::jouleHeatingSource
115 const word& sourceName,
116 const word& modelType,
128 mesh.time().timeName(),
135 anisotropicElectricalConductivity_(
false),
136 scalarSigmaVsTPtr_(
nullptr),
137 vectorSigmaVsTPtr_(
nullptr),
147 fieldNames_.setSize(1,
thermo.he().name());
149 applied_.setSize(fieldNames_.size(),
false);
172 if (curTimeIndex_ != mesh_.time().timeIndex())
174 if (anisotropicElectricalConductivity_)
177 const volVectorField& sigmaLocal = updateSigma(vectorSigmaVsTPtr_);
197 curTimeIndex_ = mesh_.time().timeIndex();
203 if (anisotropicElectricalConductivity_)
210 eqn += (
sigma & gradV) & gradV;
217 eqn += (
sigma*gradV) & gradV;
226 coeffs_.readIfPresent(
"T", TName_);
228 anisotropicElectricalConductivity_ =
229 coeffs_.get<
bool>(
"anisotropicElectricalConductivity");
231 if (anisotropicElectricalConductivity_)
233 Info<<
" Using vector electrical conductivity" <<
endl;
235 initialiseSigma(coeffs_, vectorSigmaVsTPtr_);
242 coordinateSystem::typeName_()
247 Info<<
" Using scalar electrical conductivity" <<
endl;
249 initialiseSigma(coeffs_, scalarSigmaVsTPtr_);
Defines the attributes of an object for which implicit objectRegistry management is supported,...
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
virtual ~jouleHeatingSource()
Destructor.
A class for handling words, derived from Foam::string.
dimensioned< symmTensor > dimensionedSymmTensor
Dimensioned tensor obtained from generic dimensioned type.
A class for managing temporary objects.
static constexpr const zero Zero
Global zero.
bool read(const char *buf, int32_t &val)
Same as readInt32.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
Abstract base-class for fluid and solid thermodynamic properties.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const GeometricField< Type, fvPatchField, volMesh > & psi() const
A special matrix type and solver, designed for finite volume solutions of scalar equations.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Finite volume options abstract base class. Provides a base set of controls, e.g.:
messageStream Info
Information stream (uses stdout - output is on the master only)
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
word name(const complex &c)
Return string representation of complex.
virtual void addSup(const volScalarField &rho, fvMatrix< scalar > &eqn, const label fieldi)
Add explicit contribution to compressible momentum equation.
void relax(const scalar alpha)
Relax matrix (for steady-state solution).
Calculate the matrix for the laplacian of the field.
static autoPtr< coordinateSystem > New(word modelType, const objectRegistry &obr, const dictionary &dict)
word dictName() const
The local dictionary name (final part of scoped name)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Macros for easy insertion into run-time selection tables.
Mesh data needed to do the Finite Volume discretisation.
errorManip< error > abort(error &err)
virtual bool read(const dictionary &dict)
Read source dictionary.
GeometricField< vector, fvPatchField, volMesh > volVectorField
defineTypeNameAndDebug(option, 0)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
addToRunTimeSelectionTable(option, fixedTemperatureConstraint, dictionary)
#define DebugInfo
Report an information message using Foam::Info.
virtual bool read(const dictionary &dict)
Read source dictionary.
Calculate the gradient of the given field.
static tmp< T > New(Args &&... args)
Construct tmp of T with forwarding arguments.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
SolverPerformance< Type > solve(const dictionary &)
Solve returning the solution statistics.
dimensionedScalar sigma("sigma", dimMass/sqr(dimTime), transportProperties)
Base class for coordinate system specification, the default coordinate system type is cartesian .