heatExchangerModel Class Referenceabstract

Base class for heat exchanger models to handle various characteristics for the heatExchangerSource fvOption. More...

Inheritance diagram for heatExchangerModel:
Collaboration diagram for heatExchangerModel:

Public Member Functions

 TypeName ("heatExchangerModel")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, heatExchangerModel, dictionary,(const fvMesh &mesh, const word &name, const dictionary &coeffs),(mesh, name, coeffs))
 
 heatExchangerModel (const fvMesh &mesh, const word &name, const dictionary &coeffs)
 Construct from components. More...
 
 heatExchangerModel (const heatExchangerModel &)=delete
 No copy construct. More...
 
void operator= (const heatExchangerModel &)=delete
 No copy assignment. More...
 
virtual ~heatExchangerModel ()=default
 Destructor. More...
 
virtual const wordU () const
 Return const reference to the name of velocity field. More...
 
virtual void initialise ()
 Initialise data members of the model. More...
 
virtual tmp< scalarFieldenergyDensity (const labelList &cells)=0
 Return energy density per unit length [J/m3/m]. More...
 
virtual bool read (const dictionary &dict)=0
 Read top-level dictionary. More...
 
virtual void write (const bool log)=0
 Write data to stream and files. More...
 
- Public Member Functions inherited from writeFile
 writeFile (const objectRegistry &obr, const fileName &prefix, const word &name="undefined", const bool writeToFile=true)
 Construct from objectRegistry, prefix, fileName. More...
 
 writeFile (const objectRegistry &obr, const fileName &prefix, const word &name, const dictionary &dict, const bool writeToFile=true)
 Construct from objectRegistry, prefix, fileName and read options from dictionary. More...
 
 writeFile (const writeFile &wf)
 Construct copy. More...
 
virtual ~writeFile ()=default
 Destructor. More...
 
virtual OFstreamfile ()
 Return access to the file (if only 1) More...
 
virtual bool writeToFile () const
 Flag to allow writing to file. More...
 
virtual bool canWriteToFile () const
 Flag to allow writing to the file. More...
 
virtual bool canResetFile () const
 Flag to allow resetting the file. More...
 
virtual bool canWriteHeader () const
 Flag to allow writing the header. More...
 
virtual label charWidth () const
 Return width of character stream output. More...
 
virtual void writeCommented (Ostream &os, const string &str) const
 Write a commented string to stream. More...
 
virtual void writeTabbed (Ostream &os, const string &str) const
 Write a tabbed string to stream. More...
 
virtual void writeHeader (Ostream &os, const string &str) const
 Write a commented header to stream. More...
 
virtual void writeCurrentTime (Ostream &os) const
 Write the current time to stream. More...
 
virtual void writeBreak (Ostream &os) const
 Write a break marker to the stream. More...
 
template<class Type >
void writeHeaderValue (Ostream &os, const string &property, const Type &value) const
 Write a (commented) header property and value pair. More...
 
template<class Type >
void writeValue (Ostream &os, const Type &val) const
 Write a given value to stream with the space delimiter. More...
 

Static Public Member Functions

static autoPtr< heatExchangerModelNew (const fvMesh &mesh, const word &name, const dictionary &coeffs)
 Return a reference to the selected heat exchanger model. More...
 

Protected Attributes

const fvMeshmesh_
 Reference to the mesh. More...
 
const dictionarycoeffs_
 Dictionary containing coefficients specific to the chosen model. More...
 
const wordname_
 Reference to the name of the fvOption source. More...
 
word UName_
 Name of operand velocity field. More...
 
word TName_
 Name of operand temperature field. More...
 
word phiName_
 Name of operand flux field. More...
 
word faceZoneName_
 Name of the faceZone at the heat exchanger inlet. More...
 
labelList faceId_
 Local list of face IDs. More...
 
labelList facePatchId_
 Local list of patch IDs per face. More...
 
labelList faceSign_
 List of +1/-1 representing face flip map (1 use as is, -1 negate) More...
 
- Protected Attributes inherited from writeFile
const objectRegistryfileObr_
 Reference to the region objectRegistry. More...
 
const fileName prefix_
 Prefix. More...
 
word fileName_
 Name of file. More...
 
autoPtr< OFstreamfilePtr_
 File pointer. More...
 
label writePrecision_
 Write precision. More...
 
bool writeToFile_
 Flag to enable/disable writing to file. More...
 
bool updateHeader_
 Flag to update the header, e.g. on mesh changes. Default is true. More...
 
bool writtenHeader_
 Flag to identify whether the header has been written. More...
 
bool useUserTime_
 Flag to use the specified user time, e.g. CA deg instead of seconds. Default = true. More...
 
scalar startTime_
 Start time value. More...
 

Additional Inherited Members

- Static Public Attributes inherited from writeFile
static label addChars = 8
 Additional characters for writing. More...
 
- Protected Member Functions inherited from writeFile
void initStream (Ostream &os) const
 Initialise the output stream for writing. More...
 
fileName baseFileDir () const
 Return the base directory for output. More...
 
fileName baseTimeDir () const
 Return the base directory for the current time value. More...
 
fileName filePath (const fileName &fName) const
 Return the full path for the supplied file name. More...
 
virtual autoPtr< OFstreamnewFile (const fileName &fName) const
 Return autoPtr to a new file using file name. More...
 
virtual autoPtr< OFstreamnewFileAtTime (const word &name, scalar timeValue) const
 Return autoPtr to a new file for a given time. More...
 
virtual autoPtr< OFstreamnewFileAtStartTime (const word &name) const
 Return autoPtr to a new file using the simulation start time. More...
 
virtual void resetFile (const word &name)
 Reset internal file pointer to new file with new name. More...
 
Omanip< int > valueWidth (const label offset=0) const
 Return the value width when writing to stream with optional offset. More...
 
void operator= (const writeFile &)=delete
 No copy assignment. More...
 
virtual autoPtr< OFstreamcreateFile (const word &name, scalar timeValue) const
 Deprecated(2022-09) Return autoPtr to a new file for a given time. More...
 
virtual autoPtr< OFstreamcreateFile (const word &name) const
 Deprecated(2022-09) Return autoPtr to a new file using the simulation start time. More...
 

Detailed Description

Base class for heat exchanger models to handle various characteristics for the heatExchangerSource fvOption.

Source files

Definition at line 56 of file heatExchangerModel.H.

Constructor & Destructor Documentation

◆ heatExchangerModel() [1/2]

heatExchangerModel ( const fvMesh mesh,
const word name,
const dictionary coeffs 
)

Construct from components.

Definition at line 37 of file heatExchangerModel.C.

◆ heatExchangerModel() [2/2]

heatExchangerModel ( const heatExchangerModel )
delete

No copy construct.

◆ ~heatExchangerModel()

virtual ~heatExchangerModel ( )
virtualdefault

Destructor.

Member Function Documentation

◆ TypeName()

TypeName ( "heatExchangerModel"  )

Runtime type information.

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr  ,
heatExchangerModel  ,
dictionary  ,
(const fvMesh &mesh, const word &name, const dictionary &coeffs)  ,
(mesh, name, coeffs)   
)

◆ New()

Foam::autoPtr< Foam::heatExchangerModel > New ( const fvMesh mesh,
const word name,
const dictionary coeffs 
)
static

Return a reference to the selected heat exchanger model.

Definition at line 26 of file heatExchangerModelNew.C.

References Foam::exit(), Foam::FatalIOError, FatalIOErrorInLookup, dictionary::get(), mesh, and Foam::name().

Here is the call graph for this function:

◆ operator=()

void operator= ( const heatExchangerModel )
delete

No copy assignment.

◆ U()

virtual const word& U ( ) const
inlinevirtual

Return const reference to the name of velocity field.

Definition at line 188 of file heatExchangerModel.H.

References heatExchangerModel::UName_.

◆ initialise()

◆ energyDensity()

virtual tmp<scalarField> energyDensity ( const labelList cells)
pure virtual

Return energy density per unit length [J/m3/m].

Implemented in effectivenessTable, and referenceTemperature.

◆ read()

virtual bool read ( const dictionary dict)
pure virtual

Read top-level dictionary.

Reimplemented from writeFile.

Implemented in effectivenessTable, and referenceTemperature.

◆ write()

virtual void write ( const bool  log)
pure virtual

Write data to stream and files.

Implemented in effectivenessTable, and referenceTemperature.

Member Data Documentation

◆ mesh_

const fvMesh& mesh_
protected

Reference to the mesh.

Definition at line 67 of file heatExchangerModel.H.

Referenced by heatExchangerModel::initialise().

◆ coeffs_

const dictionary& coeffs_
protected

Dictionary containing coefficients specific to the chosen model.

Definition at line 72 of file heatExchangerModel.H.

◆ name_

const word& name_
protected

Reference to the name of the fvOption source.

Definition at line 77 of file heatExchangerModel.H.

Referenced by heatExchangerModel::initialise().

◆ UName_

word UName_
protected

Name of operand velocity field.

Definition at line 82 of file heatExchangerModel.H.

Referenced by heatExchangerModel::U().

◆ TName_

word TName_
protected

Name of operand temperature field.

Definition at line 87 of file heatExchangerModel.H.

◆ phiName_

word phiName_
protected

Name of operand flux field.

Definition at line 92 of file heatExchangerModel.H.

◆ faceZoneName_

word faceZoneName_
protected

Name of the faceZone at the heat exchanger inlet.

Definition at line 97 of file heatExchangerModel.H.

Referenced by heatExchangerModel::initialise().

◆ faceId_

labelList faceId_
protected

Local list of face IDs.

Definition at line 102 of file heatExchangerModel.H.

Referenced by heatExchangerModel::initialise().

◆ facePatchId_

labelList facePatchId_
protected

Local list of patch IDs per face.

Definition at line 107 of file heatExchangerModel.H.

Referenced by heatExchangerModel::initialise().

◆ faceSign_

labelList faceSign_
protected

List of +1/-1 representing face flip map (1 use as is, -1 negate)

Definition at line 112 of file heatExchangerModel.H.

Referenced by heatExchangerModel::initialise().


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