Loading...
Searching...
No Matches
heatExchangerSource.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2013-2017 OpenFOAM Foundation
9 Copyright (C) 2016-2022 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::fv::heatExchangerSource
29
30Group
31 grpFvOptionsSources
32
33Description
34 Heat exchanger source model for compressible flows, where the heat
35 exchanger is modelled as an energy source using a selection of cells.
36
37 Sources applied to either of the below, if exist:
38 \verbatim
39 e | Internal energy [m2/s2]
40 h | Enthalphy [m2/s2]
41 \endverbatim
42
43 Required fields:
44 \verbatim
45 T | Temperature [K]
46 U | Velocity [m/s]
47 phi | Mass flux [kg/s]
48 \endverbatim
49
50Usage
51 Minimal example by using \c constant/fvOptions:
52 \verbatim
53 <name>
54 {
55 // Mandatory entries
56 type heatExchangerSource;
57 model <word>;
58 faceZone <word>;
59
60 // Conditional entries
61
62 // Option-1: when model == effectivenessTable
63
64 // Option-2: when model == referenceTemperature
65
66 // Optional entries
67 U <word>;
68 T <word>;
69 phi <word>;
70
71 // Inherited entries
72 ...
73 }
74 \endverbatim
75
76 where the entries mean:
77 \table
78 Property | Description | Type | Reqd | Deflt
79 type | Type name: heatExchangerSource | word | yes | -
80 model | Name of the heat exchanger model | word | yes | -
81 faceZone | Name of the faceZone at the heat exchanger inlet <!--
82 --> | word | yes | -
83 U | Name of operand velocity field | word | no | U
84 T | Name of operand temperature field | word | no | T
85 phi | Name of operand flux field | word | no | phi
86 \endtable
87
88 Options for the \c model entry:
89 \verbatim
90 effectivenessTable | Calculate heat exchange via an effectiveness table
91 referenceTemperature | Calculate heat exchange via a temperature table
92 \endverbatim
93
94 The inherited entries are elaborated in:
95 - \link fvOption.H \endlink
96 - \link cellSetOption.H \endlink
97 - \link writeFile.H \endlink
98 - \link Function1.H \endlink
99
100SourceFiles
101 heatExchangerSource.C
102
103\*---------------------------------------------------------------------------*/
104
105#ifndef Foam_fv_heatExchangerSource_H
106#define Foam_fv_heatExchangerSource_H
107
108#include "cellSetOption.H"
109
110// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111
112namespace Foam
113{
114
115// Forward Declarations
117
118namespace fv
119{
120
121/*---------------------------------------------------------------------------*\
122 Class heatExchangerSource Declaration
123\*---------------------------------------------------------------------------*/
124
126:
127 public fv::cellSetOption
128{
129 // Private Data
130
131 //- Heat exchanger model
132 autoPtr<heatExchangerModel> heatExchangerModelPtr_;
133
134
135public:
136
137 //- Runtime type information
138 TypeName("heatExchangerSource");
139
140
141 // Constructors
142
143 //- Construct from components
145 (
146 const word& name,
147 const word& modelType,
148 const dictionary& dict,
149 const fvMesh& mesh
150 );
151
152 //- No copy construct
154
155 //- No copy assignment
156 void operator=(const heatExchangerSource&) = delete;
157
158
159 //- Destructor
160 virtual ~heatExchangerSource() = default;
161
162
163 // Member Functions
165 //- Add explicit/implicit contribution to momentum equation
166 virtual void addSup
167 (
168 fvMatrix<scalar>& eqn,
169 const label fieldi
170 )
171 {
173 }
174
175 //- Add explicit/implicit contribution
176 //- to compressible momentum equation
177 virtual void addSup
178 (
179 const volScalarField& rho,
180 fvMatrix<scalar>& eqn,
181 const label fieldi
182 );
183
184
185 // I-O
186
187 //- Read top-level dictionary
188 virtual bool read(const dictionary& dict);
189};
190
191
192// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193
194} // End namespace fv
195} // End namespace Foam
196
197// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
198
199#endif
201// ************************************************************************* //
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Definition fvMatrix.H:118
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
Intermediate abstract class for handling cell-set options for the derived fvOptions.
Heat exchanger source model for compressible flows, where the heat exchanger is modelled as an energy...
virtual ~heatExchangerSource()=default
Destructor.
TypeName("heatExchangerSource")
Runtime type information.
void operator=(const heatExchangerSource &)=delete
No copy assignment.
virtual bool read(const dictionary &dict)
Read top-level dictionary.
virtual void addSup(fvMatrix< scalar > &eqn, const label fieldi)
Add explicit/implicit contribution to momentum equation.
heatExchangerSource(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from components.
heatExchangerSource(const heatExchangerSource &)=delete
No copy construct.
const word & name() const noexcept
Return const access to the source name.
Definition fvOptionI.H:24
const fvMesh & mesh() const noexcept
Return const access to the mesh database.
Definition fvOptionI.H:30
Base class for heat exchanger models to handle various characteristics for the heatExchangerSource fv...
A class for handling words, derived from Foam::string.
Definition word.H:66
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition error.H:688
Namespace for finite-volume.
Namespace for OpenFOAM.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68