33 void Foam::fa::jouleHeatingSource::initialiseSigma
35 const dictionary&
dict,
36 autoPtr<Function1<Type>>& sigmaVsTPtr
39 typedef GeometricField<Type, faPatchField, areaMesh> FieldType;
46 obr.time().timeName(),
53 autoPtr<FieldType> tsigma;
55 if (
dict.found(
"sigma"))
58 sigmaVsTPtr = Function1<Type>::New(
"sigma",
dict, &
mesh_);
71 Info<<
" Conductivity 'sigma' read from dictionary as f(T)" 81 Info<<
" Conductivity 'sigma' read from file" <<
nl <<
endl;
90 Foam::fa::jouleHeatingSource::updateSigma
97 const auto& obr = regionMesh().thisDb();
100 obr.lookupObjectRef<FieldType>
116 sigma[i] = sigmaVsTPtr->value(
T[i]);
121 auto& bf =
sigma.boundaryFieldRef();
124 faPatchField<Type>& pf = bf[patchi];
125 if (!isA<emptyFaPatch>(pf))
130 pf[facei] = sigmaVsTPtr->value(Tbf[facei]);
136 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.
Generic GeometricField class.
dimensionedScalar sigma("sigma", dimMass/sqr(dimTime), transportProperties)
virtual const objectRegistry & thisDb() const
Reference to the mesh database.
#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
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)
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...
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
Request registration (bool: true)
const faMesh & regionMesh() const
Return the region mesh database (demand-driven)