31 void Foam::fv::jouleHeatingSource::initialiseSigma
33 const dictionary&
dict,
34 autoPtr<Function1<Type>>& sigmaVsTPtr
37 typedef GeometricField<Type, fvPatchField, volMesh> FieldType;
49 autoPtr<FieldType> tsigma;
51 if (
dict.found(
"sigma"))
54 sigmaVsTPtr = Function1<Type>::New(
"sigma",
dict, &
mesh_);
67 Info<<
" Conductivity 'sigma' read from dictionary as f(T)" 75 tsigma.reset(
new FieldType(
io,
mesh_));
77 Info<<
" Conductivity 'sigma' read from file" <<
nl <<
endl;
86 Foam::fv::jouleHeatingSource::updateSigma
93 auto&
sigma = mesh_.lookupObjectRef<FieldType>
109 sigma[i] = sigmaVsTPtr->value(
T[i]);
114 auto& bf =
sigma.boundaryFieldRef();
117 fvPatchField<Type>& pf = bf[patchi];
118 if (!
isA<emptyFvPatchField<Type>>(pf))
123 pf[facei] = sigmaVsTPtr->value(Tbf[facei]);
129 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.
bool store()
Register object with its registry and transfer ownership to the registry.
const Time & time() const
Return the top-level database.
dimensionedScalar sigma("sigma", dimMass/sqr(dimTime), transportProperties)
virtual const objectRegistry & thisDb() const
Return the object registry - resolve conflict polyMesh/lduMesh.
#define forAll(list, i)
Loop across all elements in list.
static word scopedName(const std::string &scope, const word &name)
Create scope:name or scope_name string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const dimensionSet dimPower
static word timeName(const scalar t, const int precision=precision_)
Return a time name for the given scalar time value 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)
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
Request registration (bool: true)