externalHeatFluxSource Class Reference

Applies a heat flux condition for a specified faMesh region to temperature on an external wall for compressible flows in one of three modes: More...

Inheritance diagram for externalHeatFluxSource:
[legend]
Collaboration diagram for externalHeatFluxSource:
[legend]

Public Types

enum  operationMode { fixedPower, fixedHeatFlux, fixedHeatTransferCoeff }
 Options for the heat transfer condition mode. More...
 
- Public Types inherited from faceSetOption
enum  selectionModeType { smAll, smVolFaceZone }
 Enumeration for selection mode types. More...
 

Public Member Functions

 TypeName ("externalHeatFluxSource")
 Runtime type information. More...
 
 externalHeatFluxSource (const word &sourceName, const word &modelType, const dictionary &dict, const fvPatch &patch)
 Construct from explicit source name and mesh. More...
 
 externalHeatFluxSource (const externalHeatFluxSource &)=delete
 No copy construct. More...
 
void operator= (const externalHeatFluxSource &)=delete
 No copy assignment. More...
 
virtual ~externalHeatFluxSource ()=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...
 
- Public Member Functions inherited from faceSetOption
 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
 Return const access to the time start. More...
 
scalar duration () const
 Return const access to the duration. More...
 
bool inTimeLimits (const scalar time) const
 Return true if within time limits. More...
 
const selectionModeTypeselectionMode () const
 Return const access to the face selection mode. More...
 
const wordfaceSetName () const
 
scalar A () const
 Return const access to the total face area. More...
 
const labelListfaces () const
 Return const access to the face set. More...
 
scalar & timeStart ()
 Return access to the time start. More...
 
scalar & duration ()
 Return access to the duration. More...
 
virtual bool isActive ()
 Is the source active? More...
 
- Public Member Functions inherited from option
 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< optionclone () const
 Return clone. More...
 
virtual ~option ()=default
 Destructor. More...
 
const wordname () const
 Return const access to the source name. More...
 
const fvMeshmesh () const
 Return const access to the mesh database. More...
 
const fvPatchpatch () const
 Return const access to fvPatch. More...
 
const dictionarycoeffs () const
 Return dictionary. More...
 
bool active () const
 Return const access to the source active flag. More...
 
void setApplied (const label fieldi)
 Set the applied flag to true for field index fieldi. More...
 
const faMeshregionMesh () const
 Return the region mesh database. More...
 
const volSurfaceMappingvsm () const
 Return volSurfaceMapping. More...
 
const wordregionName () const
 Region name. More...
 
Switchactive ()
 Return access to the source active flag. 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< 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...
 

Static Public Attributes

static const Enum< operationModeoperationModeNames
 Names for operationMode. More...
 
- Static Public Attributes inherited from faceSetOption
static const Enum< selectionModeTypeselectionModeTypeNames_
 List of selection mode type names. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from option
static autoPtr< optionNew (const word &name, const dictionary &dict, const fvPatch &patch)
 Return a reference to the selected faOption model. More...
 
- Protected Member Functions inherited from faceSetOption
void setSelection (const dictionary &dict)
 Set the face selection. More...
 
void setFaceSet ()
 Set the face set based on the user input selection mode. More...
 
void setArea ()
 Recalculate the area. More...
 
- Protected Attributes inherited from faceSetOption
scalar timeStart_
 Time start. More...
 
scalar duration_
 Duration. More...
 
selectionModeType selectionMode_
 Face selection mode. More...
 
word faceSetName_
 Name of zone for "faceZone" selectionMode. More...
 
labelList faces_
 Set of faces to apply source to. More...
 
scalar A_
 Sum of face area. More...
 
- Protected Attributes inherited from option
const word name_
 Source name. More...
 
const word modelType_
 Model type. More...
 
const fvMeshmesh_
 Reference to the mesh database. More...
 
const fvPatchpatch_
 Reference to the patch. More...
 
dictionary dict_
 Top level source dictionary. More...
 
dictionary coeffs_
 Dictionary containing source coefficients. More...
 
Switch active_
 Source active flag. More...
 
wordList fieldNames_
 Field names to apply source to - populated by derived models. More...
 
List< boolapplied_
 Applied flag list - corresponds to each fieldNames_ entry. More...
 
word regionName_
 Region name. More...
 
autoPtr< faMeshregionMeshPtr_
 Pointer to the region mesh database. More...
 
autoPtr< volSurfaceMappingvsmPtr_
 Volume-to surface mapping. More...
 

Detailed Description

Applies a heat flux condition for a specified faMesh region to temperature on an external wall for compressible flows in one of three modes:

- fixed power: supply Q

  • fixed heat flux: supply q
  • fixed heat transfer coefficient: supply h and Ta

where

\( Q \) = Power [W]
\( q \) = Heat flux [W/m^2]
\( h \) = Heat transfer coefficient [W/m^2/K]
\( Ta \) = Ambient temperature [K]

The ambient temperature Ta is specified as a Foam::Function1 of time but uniform in space.

Usage
Minimal example by using constant/faOptions:
externalHeatFluxSource1
{
    // Mandatory entries (unmodifiable)
    type            externalHeatFluxSource;

    // Mandatory entries (runtime modifiable)
    mode            <mode>;

    // Optional entries (runtime modifiable)
    T               <Tname>;
    emissivity      0;

    // Conditional mandatory entries (runtime modifiable)

        // when mode=power
        Q           1.0;

        // when mode=flux
        q           1.0;

        // when mode=coefficient
        h           1.0;
        Ta          <Function1>;

    // Mandatory/Optional (inherited) entries
    ...
}

where the entries mean:

Property Description Type Reqd Dflt
type Type name: externalHeatFluxSource word yes -
mode Mode of heat flux condition word yes -
T Name of operand temperature field word no T
emissivity Surface emissivity for radiative flux to ambient scalar no 0
Q Fixed heat power [W] scalar cndtnl -
q Fixed heat flux [W/m2] scalar cndtnl -
h Heat transfer coefficient [W/m^2/K] scalar cndtnl -
Ta Ambient temperature [K] Function1 cndtnl -

The inherited entries are elaborated in:

Options for the mode entry:

      power       | Use fixed power (supply Q)
      flux        | Use fixed heat flux (supply q)
      coefficient | Use fixes heat transfer coefficient (supply h and T)
See also
Source files

Definition at line 208 of file externalHeatFluxSource.H.

Member Enumeration Documentation

◆ operationMode

Options for the heat transfer condition mode.

Enumerator
fixedPower 

Fixed heat power [W].

fixedHeatFlux 

Fixed heat flux [W/m2].

fixedHeatTransferCoeff 

Fixed heat transfer coefficient.

Definition at line 217 of file externalHeatFluxSource.H.

Constructor & Destructor Documentation

◆ externalHeatFluxSource() [1/2]

externalHeatFluxSource ( const word sourceName,
const word modelType,
const dictionary dict,
const fvPatch patch 
)

Construct from explicit source name and mesh.

Definition at line 63 of file externalHeatFluxSource.C.

References dict, and Foam::blockMeshTools::read().

Here is the call graph for this function:

◆ externalHeatFluxSource() [2/2]

No copy construct.

◆ ~externalHeatFluxSource()

virtual ~externalHeatFluxSource ( )
virtualdefault

Destructor.

Member Function Documentation

◆ TypeName()

TypeName ( "externalHeatFluxSource"  )

Runtime type information.

◆ operator=()

void operator= ( const externalHeatFluxSource )
delete

No copy assignment.

◆ addSup()

void addSup ( const areaScalarField h,
const areaScalarField rho,
faMatrix< scalar > &  eqn,
const label  fieldi 
)
virtual

Add explicit contribution to compressible momentum equation.

Reimplemented from option.

Definition at line 90 of file externalHeatFluxSource.C.

References DebugInfo, Foam::dimLength, Foam::dimPower, Foam::dimTemperature, Foam::endl(), Foam::name(), Foam::pow3(), GeometricField< Type, PatchField, GeoMesh >::primitiveFieldRef(), faMatrix< Type >::psi(), sigma(), Foam::sqr(), Foam::fam::SuSp(), and dimensioned< Type >::value().

Here is the call graph for this function:

◆ read()

bool read ( const dictionary dict)
virtual

Read source dictionary.

Reimplemented from faceSetOption.

Definition at line 172 of file externalHeatFluxSource.C.

References dict, externalHeatFluxSource::fixedHeatFlux, externalHeatFluxSource::fixedHeatTransferCoeff, externalHeatFluxSource::fixedPower, Enum< EnumType >::get(), externalHeatFluxSource::operationModeNames, option::read(), dictionary::readEntry(), and dictionary::readIfPresent().

Here is the call graph for this function:

Member Data Documentation

◆ operationModeNames

const Foam::Enum< Foam::fa::externalHeatFluxSource::operationMode > operationModeNames
static

Names for operationMode.

Definition at line 225 of file externalHeatFluxSource.H.

Referenced by externalHeatFluxSource::read().


The documentation for this class was generated from the following files: