31 void Foam::fv::jouleHeatingSource::initialiseSigma
33 const dictionary&
dict,
34 autoPtr<Function1<Type>>& sigmaVsTPtr
37 typedef GeometricField<Type, fvPatchField, volMesh> VolFieldType;
39 if (
dict.found(
"sigma"))
42 sigmaVsTPtr = Function1<Type>::New(
"sigma",
dict, &
mesh_);
58 mesh_.objectRegistry::store(tsigma.ptr());
60 Info<<
" Conductivity 'sigma' read from dictionary as f(T)" 79 mesh_.objectRegistry::store(tsigma.ptr());
81 Info<<
" Conductivity 'sigma' read from file" <<
nl <<
endl;
88 Foam::fv::jouleHeatingSource::updateSigma
95 auto&
sigma = mesh_.lookupObjectRef<VolFieldType>(typeName +
":sigma");
108 sigma[i] = sigmaVsTPtr->value(
T[i]);
113 typename VolFieldType::Boundary& bf =
sigma.boundaryFieldRef();
116 fvPatchField<Type>& pf = bf[patchi];
117 if (!
isA<emptyFvPatchField<Type>>(pf))
122 pf[facei] = sigmaVsTPtr->value(Tbf[facei]);
128 sigma.correctBoundaryConditions();
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
const fvMesh & mesh_
Reference to the mesh database.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
const Time & time() const
Return the top-level database.
dimensionedScalar sigma("sigma", dimMass/sqr(dimTime), transportProperties)
#define forAll(list, i)
Loop across all elements in list.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
const dimensionSet dimPower
static word timeName(const scalar t, const int precision=precision_)
Return time name of given scalar time formatted with the given precision.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
const dimensionSet dimCurrent(0, 0, 0, 0, 0, 1, 0)
Automatically write from objectRegistry::writeObject()
messageStream Info
Information stream (stdout output on master, null elsewhere)
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
const Type * isA(const U &obj)
Check if dynamic_cast to Type is possible.
static constexpr const zero Zero
Global zero (0)