33 void Foam::fa::jouleHeatingSource::initialiseSigma
35 const dictionary&
dict,
36 autoPtr<Function1<Type>>& sigmaVsTPtr
39 typedef GeometricField<Type, faPatchField, areaMesh> AreaFieldType;
41 if (
dict.found(
"sigma"))
44 sigmaVsTPtr = Function1<Type>::New(
"sigma",
dict, &
mesh_);
60 mesh_.objectRegistry::store(tsigma.ptr());
62 Info<<
" Conductivity 'sigma' read from dictionary as f(T)" 81 mesh().objectRegistry::store(tsigma.ptr());
83 Info<<
" Conductivity 'sigma' read from file" <<
nl <<
endl;
90 Foam::fa::jouleHeatingSource::updateSigma
98 mesh().lookupObjectRef<AreaFieldType>
100 typeName +
":sigma_" + regionName_
103 if (!sigmaVsTPtr.valid())
114 sigma[i] = sigmaVsTPtr->value(
T[i]);
119 typename AreaFieldType::Boundary& bf =
sigma.boundaryFieldRef();
122 faPatchField<Type>& pf = bf[patchi];
123 if (!isA<emptyFaPatch>(bf[patchi]))
128 pf[facei] = sigmaVsTPtr->value(Tbf[facei]);
134 sigma.correctBoundaryConditions();
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
const fvMesh & mesh() const noexcept
Return const access to the mesh database.
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.
Generic GeometricField class.
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.
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)
word regionName_
Region name (finite-area)
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 faMesh & regionMesh() const
Return the region mesh database (demand-driven)
GeometricField< scalar, faPatchField, areaMesh > areaScalarField
static constexpr const zero Zero
Global zero (0)