Go to the documentation of this file.
47 const Foam::word Foam::fv::jouleHeatingSource::sigmaName(typeName +
":sigma");
53 Foam::fv::jouleHeatingSource::transformSigma
71 zeroGradientFvPatchField<symmTensor>::typeName
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,
119 mesh.time().timeName(),
126 anisotropicElectricalConductivity_(
false),
127 scalarSigmaVsTPtr_(
nullptr),
128 vectorSigmaVsTPtr_(
nullptr),
137 fieldNames_.resize(1,
thermo.he().name());
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;
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_);
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)
void resetApplied()
Resize/reset applied flag list for all fieldNames_ entries.
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 fvMesh & mesh_
Reference to the mesh database.
A special matrix type and solver, designed for finite volume solutions of scalar equations.
Base abstract class for handling finite volume options (i.e. fvOption).
messageStream Info
Information stream (stdout output on master, null elsewhere)
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
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)
const GeometricField< Type, fvPatchField, volMesh > & psi(const label i=0) const
Return psi.
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.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
const Time & time() const
Return the top-level database.
defineTypeNameAndDebug(atmAmbientTurbSource, 0)
addToRunTimeSelectionTable(option, atmAmbientTurbSource, dictionary)
dimensionedScalar sigma("sigma", dimMass/sqr(dimTime), transportProperties)
jouleHeatingSource(const word &sourceName, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from explicit source name and mesh.
word dictName() const
The local dictionary name (final part of scoped name)