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...
#include <externalHeatFluxSource.H>


Public Types | |
| enum | operationMode { fixedPower , fixedHeatFlux , fixedHeatTransferCoeff } |
| Options for the heat transfer condition mode. More... | |
| Public Types inherited from faceSetOption | |
| enum | selectionModeType { smAll , smFaceSet , smFaceZone , smPatch } |
| Enumeration for selection mode types. More... | |
Public Member Functions | |
| TypeName ("externalHeatFluxSource") | |
| Runtime type information. | |
| externalHeatFluxSource (const word &sourceName, const word &modelType, const dictionary &dict, const fvMesh &mesh, const word &defaultAreaName=word()) | |
| Construct from explicit source name and mesh. | |
| externalHeatFluxSource (const externalHeatFluxSource &)=delete | |
| No copy construct. | |
| void | operator= (const externalHeatFluxSource &)=delete |
| No copy assignment. | |
| virtual | ~externalHeatFluxSource ()=default |
| Destructor. | |
| virtual void | addSup (const areaScalarField &h, const areaScalarField &rho, faMatrix< scalar > &eqn, const label fieldi) |
| Add explicit contribution to compressible momentum equation. | |
| virtual bool | read (const dictionary &dict) |
| Read source dictionary. | |
| Public Member Functions inherited from faceSetOption | |
| TypeName ("faceSetOption") | |
| Runtime type information. | |
| faceSetOption (const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh, const word &defaultAreaName=word()) | |
| Construct from components. | |
| virtual | ~faceSetOption ()=default |
| Destructor. | |
| scalar | timeStart () const noexcept |
| Return const access to the time start. | |
| scalar | duration () const noexcept |
| Return const access to the duration. | |
| bool | inTimeLimits (const scalar timeValue) const |
| Return true if within time limits. | |
| bool | useSubMesh () const noexcept |
| True if sub-selection should be used. | |
| selectionModeType | selectionMode () const noexcept |
| Return the face selection mode. | |
| const wordRes & | selectionNames () const noexcept |
| Return const access to the selection names (set, zone or patch selection). | |
| const wordRe & | zoneName () const |
| Return const access to the first set/zone/patch name. | |
| scalar | A () const noexcept |
| Return const access to the total face area. | |
| const labelList & | faces () const noexcept |
| Return const access to the local finite-area face selection. | |
| scalar | timeStart (scalar val) noexcept |
| Adjust the time start, return the old value. | |
| scalar | duration (scalar val) noexcept |
| Adjust the duration, return the old value. | |
| virtual bool | isActive () |
| Is the source active? | |
| Public Member Functions inherited from option | |
| TypeName ("option") | |
| Runtime type information. | |
| declareRunTimeSelectionTable (autoPtr, option, dictionary,(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh, const word &areaName),(name, modelType, dict, mesh, areaName)) | |
| option (const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh, const word &defaultAreaName=word()) | |
| Construct from components. | |
| autoPtr< option > | clone () const |
| Return clone. | |
| virtual | ~option ()=default |
| Destructor. | |
| const word & | name () const noexcept |
| The source name. | |
| const fvMesh & | mesh () const noexcept |
| Return const access to the volume mesh. | |
| const dictionary & | coeffs () const noexcept |
| Return dictionary. | |
| bool | active () const noexcept |
| True if source is active. | |
| void | setApplied (const label fieldi) |
| Set the applied flag to true for field index fieldi. | |
| const word & | areaName () const noexcept |
| The finite-area mesh name. | |
| const word & | regionName () const noexcept |
| The model region name. | |
| const faMesh & | regionMesh () const |
| Return the region mesh database (demand-driven). | |
| const volSurfaceMapping & | vsm () const |
| Return volSurfaceMapping (demand-driven). | |
| bool | active (bool on) noexcept |
| Change source active flag, return previous value. | |
| const word & | suffixHint () const noexcept |
| The suffix hint when generating variable names. | |
| word | suffixed (const char *base) const |
Return the concatenation of base and the suffix hint. | |
| word | suffixed (const std::string &base) const |
Return the concatenation of base and the suffix hint. | |
| virtual label | applyToField (const word &fieldName) const |
| Return index of field name if found in fieldNames list. | |
| virtual void | checkApplied () const |
| Check that the source has been applied. | |
| 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. | |
| virtual void | writeFooter (Ostream &) const |
| Write the source footer information. | |
| virtual void | writeData (Ostream &) const |
| Write the source properties. | |
Static Public Attributes | |
| static const Enum< operationMode > | operationModeNames |
| Names for operationMode. | |
| Static Public Attributes inherited from faceSetOption | |
| static const Enum< selectionModeType > | selectionModeTypeNames_ |
| List of selection mode type names. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from option | |
| static autoPtr< option > | New (const word &name, const dictionary &dict, const fvMesh &mesh, const word &defaultAreaName=word()) |
| Return a reference to the selected faOption model. | |
| static bool | sameRegionNames (const word &name1, const word &name2) |
| Compare the region names. | |
| Public Attributes inherited from option | |
| bool | log |
| Switch write log to Info. | |
| Protected Member Functions inherited from faceSetOption | |
| void | setSelection (const dictionary &dict) |
| Set face selection name from dictionary input. | |
| void | setFaceSelection () |
| Set face selection based on user input selection mode. | |
| void | setArea () |
| Recalculate the area. | |
| template<class Type> | |
| void | subsetFilter (List< Type > &field) const |
| Zero all non-selected locations within field. | |
| Protected Member Functions inherited from option | |
| void | resetApplied () |
| Resize/reset applied flag list for all fieldNames_ entries. | |
| Protected Attributes inherited from faceSetOption | |
| scalar | timeStart_ |
| Time start. | |
| scalar | duration_ |
| Duration. | |
| selectionModeType | selectionMode_ |
| Face selection mode. | |
| wordRes | selectionNames_ |
| Face selection names (for set, zone or patch selections). | |
| labelList | faces_ |
| Set of faces to apply source to. | |
| scalar | A_ |
| Sum of face area. | |
| Protected Attributes inherited from option | |
| const word | name_ |
| Source name. | |
| const word | modelType_ |
| Model type. | |
| const fvMesh & | mesh_ |
| Reference to the mesh database. | |
| dictionary | dict_ |
| Top level source dictionary. | |
| dictionary | coeffs_ |
| Dictionary containing source coefficients. | |
| wordList | fieldNames_ |
| Field names to apply source to - populated by derived models. | |
| List< bool > | applied_ |
| Applied flag list - corresponds to each fieldNames_ entry. | |
| word | areaName_ |
| The finite-area mesh name. | |
| word | regionName_ |
| The model region name (finite-area). | |
| word | suffixHint_ |
| Suffix hint for variable names (default: ""). | |
Applies a heat flux condition for a specified faMesh region to temperature on an external wall for compressible flows in one of three modes:
Q q h and Ta where
![]() | = | Power [W] |
![]() | = | Heat flux [W/m^2] |
![]() | = | Heat transfer coefficient [W/m^2/K] |
![]() | = | Ambient temperature [K] |
The ambient temperature Ta is specified as a Foam::Function1 of time but uniform in space.
constant/faOptions: externalHeatFluxSource1
{
// Mandatory entries (unmodifiable)
type externalHeatFluxSource;
// Mandatory entries (runtime modifiable)
mode <mode>;
// Optional entries (runtime modifiable)
Ts <TshellName>;
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 | - |
Ts | Name of shell temperature field | word | no | Ts(suffix) |
emissivity | Surface emissivity for radiative flux to ambient | scalar | no | 0 |
Q | Fixed heat power [W] | Function1 | cndtnl | - |
q | Fixed heat flux [W/m2] | Function1 | cndtnl | - |
h | Heat transfer coefficient [W/m^2/K] | Function1 | 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 Ta)
Naming changes from 2506 and earlier:
| Keyword | Description | Keyword (old) | Deflt (old) |
|---|---|---|---|
Ts | Temperature (shell) | T | T |
If Ts is missing, the keyword T is still accepted.
Definition at line 219 of file externalHeatFluxSource.H.
| enum 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 230 of file externalHeatFluxSource.H.
| externalHeatFluxSource | ( | const word & | sourceName, |
| const word & | modelType, | ||
| const dictionary & | dict, | ||
| const fvMesh & | mesh, | ||
| const word & | defaultAreaName = word() ) |
Construct from explicit source name and mesh.
| defaultAreaName | The expected finite-area mesh name |
Definition at line 56 of file externalHeatFluxSource.C.
References dict, faceSetOption::faceSetOption(), and operationModeNames.
Referenced by externalHeatFluxSource(), and operator=().


|
delete |
|
virtualdefault |
| TypeName | ( | "externalHeatFluxSource" | ) |
Runtime type information.
References dict, and option::mesh().

|
delete |
|
virtual |
Add explicit contribution to compressible momentum equation.
Reimplemented from option.
Definition at line 87 of file externalHeatFluxSource.C.
References faceSetOption::A(), DebugInfo, Foam::dimLength, Foam::dimPower, Foam::dimTemperature, Foam::endl(), faceSetOption::faces(), DimensionedField< Type, GeoMesh >::field(), fixedHeatFlux, fixedHeatTransferCoeff, fixedPower, h, faceSetOption::isActive(), option::mesh_, IOobject::name(), name, DimensionedField< Type, GeoMesh >::New(), Foam::pow3(), faMatrix< Type >::psi(), option::regionMesh(), rho, sigma(), Foam::sqr(), faceSetOption::subsetFilter(), Foam::fam::SuSp(), faceSetOption::useSubMesh(), and Foam::Zero.

|
virtual |
Read source dictionary.
Reimplemented from faceSetOption.
Definition at line 195 of file externalHeatFluxSource.C.
References dict, fixedHeatFlux, fixedHeatTransferCoeff, fixedPower, option::mesh_, operationModeNames, and option::read().

|
static |
Names for operationMode.
Definition at line 240 of file externalHeatFluxSource.H.
Referenced by externalHeatFluxSource(), and read().