Go to the documentation of this file.
53 const Foam::word Foam::fv::jouleHeatingSource::sigmaName(typeName +
":sigma");
59 Foam::fv::jouleHeatingSource::transformSigma
77 zeroGradientFvPatchField<symmTensor>::typeName
79 auto&
sigma = tsigma.ref();
85 <<
"Coordinate system undefined"
89 const auto& csys = *csysPtr_;
93 sigma.primitiveFieldRef() =
94 csys.transformPrincipal(sigmaLocal);
98 sigma.primitiveFieldRef() =
102 sigma.correctBoundaryConditions();
110 Foam::fv::jouleHeatingSource::jouleHeatingSource
112 const word& sourceName,
113 const word& modelType,
125 mesh.time().timeName(),
132 anisotropicElectricalConductivity_(
false),
133 scalarSigmaVsTPtr_(
nullptr),
134 vectorSigmaVsTPtr_(
nullptr),
144 fieldNames_.setSize(1,
thermo.he().name());
146 applied_.setSize(fieldNames_.size(),
false);
163 if (curTimeIndex_ != mesh_.time().timeIndex())
165 if (anisotropicElectricalConductivity_)
168 const volVectorField& sigmaLocal = updateSigma(vectorSigmaVsTPtr_);
188 curTimeIndex_ = mesh_.time().timeIndex();
194 if (anisotropicElectricalConductivity_)
201 eqn += (
sigma & gradV) & gradV;
208 eqn += (
sigma*gradV) & gradV;
217 coeffs_.readIfPresent(
"T", TName_);
219 anisotropicElectricalConductivity_ =
220 coeffs_.get<
bool>(
"anisotropicElectricalConductivity");
222 if (anisotropicElectricalConductivity_)
224 Info<<
" Using vector electrical conductivity" <<
endl;
226 initialiseSigma(coeffs_, vectorSigmaVsTPtr_);
233 coordinateSystem::typeName_()
238 Info<<
" Using scalar electrical conductivity" <<
endl;
240 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)
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 (0)
bool read(const char *buf, int32_t &val)
Same as readInt32.
static word timeName(const scalar t, const int precision=precision_)
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
const fvMesh & mesh_
Reference to the mesh database.
A special matrix type and solver, designed for finite volume solutions of scalar equations.
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
const vectorField & cellCentres() const
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#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.
const Time & time() const
Return the top-level database.
defineTypeNameAndDebug(atmAmbientTurbSource, 0)
addToRunTimeSelectionTable(option, atmAmbientTurbSource, dictionary)
dimensionedScalar sigma("sigma", dimMass/sqr(dimTime), transportProperties)