heatTransferModel.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::heatTransferModel
26 
27 Description
28  Model for heat transfer between phases
29 
30 SourceFiles
31  heatTransferModel.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef heatTransferModel_H
36 #define heatTransferModel_H
37 
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
39 
40 #include "volFields.H"
41 #include "dictionary.H"
42 #include "runTimeSelectionTables.H"
44 #include "SidedInterfacialModel.H"
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class heatTransferModel Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 {
55 protected:
56 
57  // Protected data
58 
59  //- Residual phase fraction
61 
62 
63 public:
64 
65  //- Runtime type information
66  TypeName("heatTransferModel");
67 
68 
69  // Declare runtime construction
70 
72  (
73  autoPtr,
75  dictionary,
76  (
77  const dictionary& dict,
78  const phaseInterface& interface
79  ),
80  (dict, interface)
81  );
82 
83 
84  // Static Data Members
85 
86  //- Coefficient dimensions
87  static const dimensionSet dimK;
88 
89  //- Does this model require correcting on fixed flux boundaries?
90  static const bool correctFixedFluxBCs = false;
91 
92 
93  // Constructors
94 
95  //- Construct from a dictionary and an interface
97  (
98  const dictionary& dict,
99  const phaseInterface& interface
100  );
101 
102 
103  //- Destructor
104  virtual ~heatTransferModel();
105 
106 
107  // Selectors
108 
110  (
111  const dictionary& dict,
112  const phaseInterface& interface,
113  const bool outer=true
114  );
115 
116 
117  // Member Functions
118 
119  //- The heat transfer function K used in the enthalpy equation
120  // ddt(alpha1*rho1*ha) + ... = ... K*(Ta - Tb)
121  // ddt(alpha2*rho2*hb) + ... = ... K*(Tb - Ta)
122  tmp<volScalarField> K() const;
123 
124  //- The heat transfer function K used in the enthalpy equation
125  // ddt(alpha1*rho1*ha) + ... = ... K*(Ta - Tb)
126  // ddt(alpha2*rho2*hb) + ... = ... K*(Tb - Ta)
127  // with a specified residual volume fraction
128  virtual tmp<volScalarField> K(const scalar residualAlpha) const = 0;
129 };
130 
131 
132 /*---------------------------------------------------------------------------*\
133  Class blendedHeatTransferModel Declaration
134 \*---------------------------------------------------------------------------*/
137 :
138  public BlendedInterfacialModel<heatTransferModel>
139 {
140 public:
141 
142  // Constructors
143 
144  //- Inherit base class constructors
145  using
147  BlendedInterfacialModel;
148 
149 
150  // Selectors
151 
153  (
154  const dictionary& dict,
155  const phaseInterface& interface
156  );
157 
158 
159  // Member Functions
160 
161  //- Return the heatTransfer coefficient K
162  tmp<volScalarField> K() const;
163 
164  //- Return the heatTransfer coefficient K
165  tmp<volScalarField> K(const scalar residualAlpha) const;
166 };
167 
168 
169 /*---------------------------------------------------------------------------*\
170  Class sidedBlendedHeatTransferModel Declaration
171 \*---------------------------------------------------------------------------*/
174 :
175  public SidedInterfacialModel<blendedHeatTransferModel>
176 {
177 public:
178 
179  // Constructors
180 
181  //- Inherit base class constructors
182  using
184  SidedInterfacialModel;
185 
186 
187  // Selectors
188 
190  (
191  const dictionary& dict,
192  const phaseInterface& interface
193  );
194 };
195 
196 
197 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
198 
199 } // End namespace Foam
200 
201 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
202 
203 #endif
204 
205 // ************************************************************************* //
dictionary dict
tmp< volScalarField > K() const
The heat transfer function K used in the enthalpy equation.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
void outer(FieldField< Field1, typename outerProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Class to represent an interface between phases. Derivations can further specify the configuration of ...
static const dimensionSet dimK
Coefficient dimensions.
Dimension set for the base types.
Definition: dimensionSet.H:121
declareRunTimeSelectionTable(autoPtr, heatTransferModel, dictionary,(const dictionary &dict, const phaseInterface &interface),(dict, interface))
heatTransferModel(const dictionary &dict, const phaseInterface &interface)
Construct from a dictionary and an interface.
virtual ~heatTransferModel()
Destructor.
static const bool correctFixedFluxBCs
Does this model require correcting on fixed flux boundaries?
Model for heat transfer between phases.
static autoPtr< heatTransferModel > New(const dictionary &dict, const phaseInterface &interface, const bool outer=true)
TypeName("heatTransferModel")
Runtime type information.
const dimensionedScalar residualAlpha_
Residual phase fraction.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Macros to ease declaration of run-time selection tables.
A class for managing temporary objects.
Definition: PtrList.H:53
Namespace for OpenFOAM.