heatTransferModel.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) 2011-2015 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::heatTransferModel
28 
29 Description
30 
31 SourceFiles
32  heatTransferModel.C
33  newHeatTransferModel.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef heatTransferModel_H
38 #define heatTransferModel_H
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 #include "dictionary.H"
43 #include "phaseModel.H"
44 #include "runTimeSelectionTables.H"
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class heatTransferModel Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class heatTransferModel
54 {
55 protected:
56 
57  // Protected data
58 
62  const phaseModel& phase2_;
63 
64 
65 public:
66 
67  //- Runtime type information
68  TypeName("heatTransferModel");
69 
70 
71  // Declare runtime construction
72 
74  (
75  autoPtr,
77  dictionary,
78  (
79  const dictionary& interfaceDict,
80  const volScalarField& alpha1,
81  const phaseModel& phase1,
82  const phaseModel& phase2
83  ),
84  (interfaceDict, alpha1, phase1, phase2)
85  );
86 
87 
88  // Constructors
89 
91  (
92  const dictionary& interfaceDict,
93  const volScalarField& alpha1,
94  const phaseModel& phase1,
95  const phaseModel& phase2
96  );
97 
98 
99  //- Destructor
100  virtual ~heatTransferModel();
101 
102 
103  // Selectors
104 
106  (
107  const dictionary& interfaceDict,
108  const volScalarField& alpha1,
109  const phaseModel& phase1,
110  const phaseModel& phase2
111  );
112 
113 
114  // Member Functions
115 
116  //- The heat-transfer function K used in the enthalpy eq.
117  // ddt(alpha1*rho1*ha) + ... = ... alpha1*alpha2*K*(Ta - Tb)
118  // ddt(alpha2*rho2*hb) + ... = ... alpha1*alpha2*K*(Tb - Ta)
119  // ********************************** NB! *****************************
120  // for numerical reasons alpha1 and alpha2 has been
121  // extracted from the heat-transfer function K,
122  // so you MUST divide K by alpha1*alpha2 when implementing the
123  // heat-transfer function
124  // ********************************** NB! *****************************
125  virtual tmp<volScalarField> K(const volScalarField& Ur) const = 0;
126 };
127 
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
131 } // End namespace Foam
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 #endif
136 
137 // ************************************************************************* //
Foam::phaseModel
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:57
Foam::heatTransferModel::interfaceDict_
const dictionary & interfaceDict_
Definition: heatTransferModel.H:58
Foam::tmp< volScalarField >
Foam::heatTransferModel::phase1_
const phaseModel & phase1_
Definition: heatTransferModel.H:60
alpha1
const volScalarField & alpha1
Definition: setRegionFluidFields.H:8
Foam::heatTransferModel::New
static autoPtr< heatTransferModel > New(const dictionary &dict, const phasePair &pair)
Definition: newHeatTransferModel.C:35
Foam::heatTransferModel::heatTransferModel
heatTransferModel(const dictionary &dict, const phasePair &pair)
Construct froma dictionary and a phase pair.
Definition: heatTransferModel.C:47
phase2
phaseModel & phase2
Definition: setRegionFluidFields.H:6
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::heatTransferModel::alpha1_
const volScalarField & alpha1_
Definition: heatTransferModel.H:59
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::heatTransferModel::TypeName
TypeName("heatTransferModel")
Runtime type information.
Foam::heatTransferModel::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, heatTransferModel, dictionary,(const dictionary &dict, const phasePair &pair),(dict, pair))
Foam::heatTransferModel::~heatTransferModel
virtual ~heatTransferModel()
Destructor.
Definition: heatTransferModel.C:70
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
dictionary.H
Foam::heatTransferModel
Definition: heatTransferModel.H:53
phase1
phaseModel & phase1
Definition: setRegionFluidFields.H:5
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::heatTransferModel::K
tmp< volScalarField > K() const
The heat transfer function K used in the enthalpy equation.
Definition: heatTransferModel.C:77
Foam::heatTransferModel::phase2_
const phaseModel & phase2_
Definition: heatTransferModel.H:61