Evolves an electrical potential equation. More...
Public Member Functions | |
TypeName ("jouleHeatingSource") | |
Runtime type information. More... | |
jouleHeatingSource (const word &sourceName, const word &modelType, const dictionary &dict, const fvPatch &patch) | |
Construct from explicit source name and mesh. More... | |
jouleHeatingSource (const jouleHeatingSource &)=delete | |
No copy construct. More... | |
void | operator= (const jouleHeatingSource &)=delete |
No copy assignment. More... | |
virtual | ~jouleHeatingSource ()=default |
Destructor. More... | |
virtual void | addSup (const areaScalarField &h, const areaScalarField &rho, faMatrix< scalar > &eqn, const label fieldi) |
Add explicit contribution to compressible momentum equation. More... | |
virtual bool | read (const dictionary &dict) |
Read source dictionary. More... | |
template<class Type > | |
const Foam::GeometricField< Type, Foam::faPatchField, Foam::areaMesh > & | updateSigma (const autoPtr< Function1< Type > > &sigmaVsTPtr) const |
template<class Type > | |
const Foam::GeometricField< Type, Foam::fvPatchField, Foam::volMesh > & | updateSigma (const autoPtr< Function1< Type > > &sigmaVsTPtr) const |
![]() | |
TypeName ("faceSetOption") | |
Runtime type information. More... | |
faceSetOption (const word &name, const word &modelType, const dictionary &dict, const fvPatch &patch) | |
Construct from components. More... | |
virtual | ~faceSetOption ()=default |
Destructor. More... | |
scalar | timeStart () const noexcept |
Return const access to the time start. More... | |
scalar | duration () const noexcept |
Return const access to the duration. More... | |
bool | inTimeLimits (const scalar timeValue) const |
Return true if within time limits. More... | |
selectionModeType | selectionMode () const noexcept |
Return const access to the face selection mode. More... | |
bool | useSubMesh () const noexcept |
True if sub-selection should be used. More... | |
const wordRe & | zoneName () const noexcept |
scalar | A () const noexcept |
Return const access to the total face area. More... | |
const labelList & | faces () const noexcept |
Return const access to the face selection. More... | |
scalar | timeStart (scalar val) noexcept |
Adjust the time start, return the old value. More... | |
scalar | duration (scalar val) noexcept |
Adjust the duration, return the old value. More... | |
virtual bool | isActive () |
Is the source active? More... | |
virtual bool | read (const dictionary &dict) |
Read source dictionary. More... | |
![]() | |
TypeName ("option") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, option, dictionary,(const word &name, const word &modelType, const dictionary &dict, const fvPatch &patch),(name, modelType, dict, patch)) | |
option (const word &name, const word &modelType, const dictionary &dict, const fvPatch &patch) | |
Construct from components. More... | |
autoPtr< option > | clone () const |
Return clone. More... | |
virtual | ~option ()=default |
Destructor. More... | |
const word & | name () const noexcept |
Return const access to the source name. More... | |
const fvMesh & | mesh () const noexcept |
Return const access to the mesh database. More... | |
const fvPatch & | patch () const noexcept |
Return const access to fvPatch. More... | |
const dictionary & | coeffs () const noexcept |
Return dictionary. More... | |
bool | active () const noexcept |
True if source is active. More... | |
void | setApplied (const label fieldi) |
Set the applied flag to true for field index fieldi. More... | |
const word & | regionName () const noexcept |
The region name. More... | |
const faMesh & | regionMesh () const |
Return the region mesh database (demand-driven) More... | |
const volSurfaceMapping & | vsm () const |
Return volSurfaceMapping (demand-driven) More... | |
bool | active (const bool on) noexcept |
Change source active flag, return previous value. More... | |
virtual bool | isActive () |
Is the source active? More... | |
virtual label | applyToField (const word &fieldName) const |
Return index of field name if found in fieldNames list. More... | |
virtual void | checkApplied () const |
Check that the source has been applied. More... | |
virtual void | addSup (const areaScalarField &h, faMatrix< scalar > &eqn, const label fieldi) |
virtual void | addSup (const areaScalarField &h, faMatrix< vector > &eqn, const label fieldi) |
virtual void | addSup (const areaScalarField &h, faMatrix< symmTensor > &eqn, const label fieldi) |
virtual void | addSup (const areaScalarField &h, faMatrix< sphericalTensor > &eqn, const label fieldi) |
virtual void | addSup (const areaScalarField &h, faMatrix< tensor > &eqn, const label fieldi) |
virtual void | addSup (const areaScalarField &h, const areaScalarField &rho, faMatrix< scalar > &eqn, const label fieldi) |
virtual void | addSup (const areaScalarField &h, const areaScalarField &rho, faMatrix< vector > &eqn, const label fieldi) |
virtual void | addSup (const areaScalarField &h, const areaScalarField &rho, faMatrix< symmTensor > &eqn, const label fieldi) |
virtual void | addSup (const areaScalarField &h, const areaScalarField &rho, faMatrix< sphericalTensor > &eqn, const label fieldi) |
virtual void | addSup (const areaScalarField &h, const areaScalarField &rho, faMatrix< tensor > &eqn, const label fieldi) |
virtual void | constrain (faMatrix< scalar > &eqn, const label fieldi) |
virtual void | constrain (faMatrix< vector > &eqn, const label fieldi) |
virtual void | constrain (faMatrix< sphericalTensor > &eqn, const label fieldi) |
virtual void | constrain (faMatrix< symmTensor > &eqn, const label fieldi) |
virtual void | constrain (faMatrix< tensor > &eqn, const label fieldi) |
virtual void | correct (areaScalarField &field) |
virtual void | correct (areaVectorField &field) |
virtual void | correct (areaSphericalTensorField &field) |
virtual void | correct (areaSymmTensorField &field) |
virtual void | correct (areaTensorField &field) |
virtual void | writeHeader (Ostream &) const |
Write the source header information. More... | |
virtual void | writeFooter (Ostream &) const |
Write the source footer information. More... | |
virtual void | writeData (Ostream &) const |
Write the source properties. More... | |
virtual bool | read (const dictionary &dict) |
Read source dictionary. More... | |
Additional Inherited Members | |
![]() | |
enum | selectionModeType { smAll , smVolFaceZone } |
Enumeration for selection mode types. More... | |
![]() | |
static autoPtr< option > | New (const word &name, const dictionary &dict, const fvPatch &patch) |
Return a reference to the selected faOption model. More... | |
![]() | |
bool | log |
Switch write log to Info. More... | |
![]() | |
static const Enum< selectionModeType > | selectionModeTypeNames_ |
List of selection mode type names. More... | |
![]() | |
void | setSelection (const dictionary &dict) |
Set face selection name from dictionary input. More... | |
void | setFaceSelection () |
Set face selection based on user input selection mode. More... | |
void | setArea () |
Recalculate the area. More... | |
![]() | |
void | resetApplied () |
Resize/reset applied flag list for all fieldNames_ entries. More... | |
![]() | |
scalar | timeStart_ |
Time start. More... | |
scalar | duration_ |
Duration. More... | |
selectionModeType | selectionMode_ |
Face selection mode. More... | |
wordRe | zoneName_ |
Name of zone for (volume) "faceZone" selection. More... | |
labelList | faces_ |
Set of faces to apply source to. More... | |
scalar | A_ |
Sum of face area. More... | |
![]() | |
const word | name_ |
Source name. More... | |
const word | modelType_ |
Model type. More... | |
const fvMesh & | mesh_ |
Reference to the mesh database. More... | |
const fvPatch & | patch_ |
Reference to the patch. More... | |
dictionary | dict_ |
Top level source dictionary. More... | |
dictionary | coeffs_ |
Dictionary containing source coefficients. More... | |
wordList | fieldNames_ |
Field names to apply source to - populated by derived models. More... | |
List< bool > | applied_ |
Applied flag list - corresponds to each fieldNames_ entry. More... | |
word | regionName_ |
Region name (finite-area) More... | |
Evolves an electrical potential equation.
\[ \grad \left( \sigma \grad V \right) \]
where \( V \) is electrical potential and \(\sigma\) is the electrical current.
To provide a Joule heating contribution according to:
Differential form of Joule heating - power per unit volume:
\[ \frac{d(P)}{d(V)} = J \cdot E \]
where \( J \) is the current density and \( E \) the electric field. If no magnetic field is present:
\[ J = \sigma E \]
The electric field given by
\[ E = \grad V \]
Therefore:
\[ \frac{d(P)}{d(V)} = J \cdot E = (sigma E) \cdot E = (sigma \grad V) \cdot \grad V \]
constant/faOptions
: jouleHeatingSource1 { // Mandatory entries (unmodifiable) type jouleHeatingSource; // Mandatory entries (runtime modifiable) anisotropicElectricalConductivity true; // Optional entries (runtime modifiable) T <Tname>; nIter -1; // Conditional mandatory entries (runtime modifiable) // when the entry "sigma" is present sigma <Function1>; // when when the entry "sigma" is not present // read "sigma" from file // Mandatory/Optional (inherited) entries ... }
where the entries mean:
Property | Description | Type | Reqd | Dflt |
---|---|---|---|---|
type | Type name: jouleHeatingSource | word | yes | - |
anisotropicElectricalConductivity | Flag to indicate that if the electrical conductivity is anisotropic | bool | yes | - |
T | Name of operand temperature field | word | no | T |
sigma | Electrical conductivity as a function of temperature | table | no | - |
nIter | Number of iterations for electrical potential equation solution | label | no | -1 |
The inherited entries are elaborated in:
anisotropicElectricalConductivity=true
enables anisotropic (tensorial) electrical conductivity.anisotropicElectricalConductivity=false
enables isotropic (scalar) electrical conductivity.sigma
entry is present the electrical conductivity is specified as a function of temperature using a Function1
type.sigma
field will be read from file.anisotropicElectricalConductivity
flag is set to true
, sigma
should be specified as a tensor quantity.Definition at line 200 of file jouleHeatingSource.H.
jouleHeatingSource | ( | const word & | sourceName, |
const word & | modelType, | ||
const dictionary & | dict, | ||
const fvPatch & | patch | ||
) |
Construct from explicit source name and mesh.
Definition at line 47 of file jouleHeatingSource.C.
References option::coeffs_, dict, Foam::endl(), option::fieldNames_, Foam::Info, jouleHeatingSource::read(), option::resetApplied(), and List< T >::resize().
|
delete |
No copy construct.
|
virtualdefault |
Destructor.
TypeName | ( | "jouleHeatingSource" | ) |
Runtime type information.
|
delete |
No copy assignment.
|
virtual |
Add explicit contribution to compressible momentum equation.
Reimplemented from option.
Definition at line 98 of file jouleHeatingSource.C.
References DebugInfo, Foam::endl(), Foam::fac::grad(), h, Foam::fam::laplacian(), mesh, Foam::name(), faMatrix< Type >::psi(), faMatrix< Type >::relax(), faMatrix< Type >::solve(), timeIndex, and regIOobject::write().
|
virtual |
Read source dictionary.
Reimplemented from faceSetOption.
Definition at line 175 of file jouleHeatingSource.C.
References dict, and kEpsilonLopesdaCosta< BasicTurbulenceModel >::read().
Referenced by jouleHeatingSource::jouleHeatingSource().
const Foam::GeometricField< Type, Foam::faPatchField, Foam::areaMesh > & updateSigma | ( | const autoPtr< Function1< Type > > & | sigmaVsTPtr | ) | const |
Definition at line 90 of file jouleHeatingSourceTemplates.C.
References forAll, mesh, T, and dimensioned< Type >::value().
const Foam::GeometricField< Type, Foam::fvPatchField, Foam::volMesh > & updateSigma | ( | const autoPtr< Function1< Type > > & | sigmaVsTPtr | ) | const |
Definition at line 88 of file jouleHeatingSourceTemplates.C.
References forAll, Foam::isA(), T, and dimensioned< Type >::value().