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  Copyright (C) 2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::heatTransferModel
29 
30 Description
31 
32 SourceFiles
33  heatTransferModel.C
34  newHeatTransferModel.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef heatTransferModel_H
39 #define heatTransferModel_H
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 #include "dictionary.H"
44 #include "phaseModel.H"
45 #include "runTimeSelectionTables.H"
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class heatTransferModel Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 {
56 protected:
57 
58  // Protected Data
59 
63  const phaseModel& phase2_;
64 
65 
66 public:
67 
68  //- Runtime type information
69  TypeName("heatTransferModel");
70 
71 
72  // Declare runtime construction
73 
75  (
76  autoPtr,
78  dictionary,
79  (
80  const dictionary& dict,
81  const volScalarField& alpha1,
82  const phaseModel& phase1,
83  const phaseModel& phase2
84  ),
86  );
87 
88 
89  // Constructors
90 
92  (
93  const dictionary& dict,
94  const volScalarField& alpha1,
95  const phaseModel& phase1,
96  const phaseModel& phase2
97  );
98 
99 
100  //- Destructor
101  virtual ~heatTransferModel() = default;
102 
103 
104  // Selectors
105 
107  (
108  const dictionary& dict,
109  const volScalarField& alpha1,
110  const phaseModel& phase1,
111  const phaseModel& phase2
112  );
113 
114 
115  // Member Functions
116 
117  //- The heat-transfer function K used in the enthalpy eq.
118  // ddt(alpha1*rho1*ha) + ... = ... alpha1*alpha2*K*(Ta - Tb)
119  // ddt(alpha2*rho2*hb) + ... = ... alpha1*alpha2*K*(Tb - Ta)
120  // ********************************** NB! *****************************
121  // for numerical reasons alpha1 and alpha2 has been
122  // extracted from the heat-transfer function K,
123  // so you MUST divide K by alpha1*alpha2 when implementing the
124  // heat-transfer function
125  // ********************************** NB! *****************************
126  virtual tmp<volScalarField> K(const volScalarField& Ur) const = 0;
127 };
128 
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 } // End namespace Foam
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 #endif
137 
138 // ************************************************************************* //
Foam::phaseModel
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:54
Foam::heatTransferModel::interfaceDict_
const dictionary & interfaceDict_
Definition: heatTransferModel.H:59
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::heatTransferModel::phase1_
const phaseModel & phase1_
Definition: heatTransferModel.H:61
Foam::heatTransferModel::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, heatTransferModel, dictionary,(const dictionary &dict, const volScalarField &alpha1, const phaseModel &phase1, const phaseModel &phase2),(dict, alpha1, phase1, phase2))
alpha1
const volScalarField & alpha1
Definition: setRegionFluidFields.H:8
Foam::heatTransferModel::heatTransferModel
heatTransferModel(const dictionary &dict, const volScalarField &alpha1, const phaseModel &phase1, const phaseModel &phase2)
Definition: heatTransferModel.C:43
dict
dictionary dict
Definition: searchingEngine.H:14
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:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::heatTransferModel::alpha1_
const volScalarField & alpha1_
Definition: heatTransferModel.H:60
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.
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
dictionary.H
Foam::heatTransferModel
Definition: heatTransferModel.H:53
Foam::heatTransferModel::~heatTransferModel
virtual ~heatTransferModel()=default
Destructor.
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:102
Foam::heatTransferModel::New
static autoPtr< heatTransferModel > New(const dictionary &dict, const volScalarField &alpha1, const phaseModel &phase1, const phaseModel &phase2)
Definition: heatTransferModel.C:60
Foam::heatTransferModel::phase2_
const phaseModel & phase2_
Definition: heatTransferModel.H:62