interfaceHeatResistance.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) 2020 Henning Scheufler
9  Copyright (C) 2020-2021 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::meltingEvaporationModels::interfaceHeatResistance
29 
30 Description
31  Interface Heat Resistance type of condensation/saturation model using
32  spread source distribution following:
33 
34  References:
35  \verbatim
36  Hardt, S., Wondra, F. (2008).
37  Evaporation model for interfacial flows based on a continuum-
38  field representation of the source term
39  Journal of Computational Physics 227 (2008), 5871-5895
40  \endverbatim
41 
42 
43 Usage
44 
45  Example usage:
46  \verbatim
47  massTransferModel
48  (
49  (liquid to gas)
50  {
51  type interfaceHeatResistance;
52  R 2e6;
53  Tactivate 373;
54  }
55  );
56  \endverbatim
57 
58  where:
59  \table
60  Property | Description | Required | Default value
61  R | Heat transfer coefficient | yes
62  includeVolChange | Volumen change | no | yes
63  isoAlpha | iso-alpha for interface | no | 0.5
64  Tactivate | Saturation temperature | yes
65  species | Specie name on the other phase | no | none
66  spread | Cells to spread the source for pEq | no | 3
67  \endtable
68 
69 SourceFiles
70  interfaceHeatResistance.C
71 
72 \*---------------------------------------------------------------------------*/
73 
74 #ifndef meltingEvaporationModels_interfaceHeatResistance_H
75 #define meltingEvaporationModels_interfaceHeatResistance_H
76 
77 #include "InterfaceCompositionModel.H"
78 
79 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *//
80 
81 namespace Foam
82 {
83 
84 // Forward Declarations
85 class phasePair;
86 
87 namespace meltingEvaporationModels
88 {
89 
90 /*---------------------------------------------------------------------------*\
91  Class interfaceHeatResistance Declaration
92 \*---------------------------------------------------------------------------*/
93 
94 template<class Thermo, class OtherThermo>
96 :
97  public InterfaceCompositionModel<Thermo, OtherThermo>
98 {
99  // Private Data
100 
101  //- Heat transfer coefficient [1/s/K]
103 
104  //- Activation temperature
105  const dimensionedScalar Tactivate_;
106 
107  //- Interface area
108  volScalarField interfaceArea_;
109 
110  //- Mass source
111  volScalarField mDotc_;
112 
113  //- Spread mass source
114  volScalarField mDotcSpread_;
115 
116  //- Heat transfer coefficient
117  volScalarField htc_;
118 
119  //- Interface Iso-value
120  scalar isoAlpha_;
121 
122  //- Spread for mass source
123  scalar spread_;
124 
125 
126  // Private Member Functions
127 
128  //- Update interface
129  void updateInterface(const volScalarField& T);
130 
131 public:
132 
133  //- Runtime type information
134  TypeName("interfaceHeatResistance");
135 
136 
137  // Constructors
138 
139  //- Construct from components
141  (
142  const dictionary& dict,
143  const phasePair& pair
144  );
145 
146 
147  //- Destructor
148  virtual ~interfaceHeatResistance() = default;
149 
150 
151  // Member Functions
152 
153  //- Explicit total mass transfer coefficient
154  virtual tmp<volScalarField> Kexp
155  (
156  const volScalarField& field
157  );
158 
159  //- Implicit mass transfer coefficient
160  virtual tmp<volScalarField> KSp
161  (
162  label modelVariable,
163  const volScalarField& field
164  );
165 
166  //- Explicit mass transfer coefficient
167  virtual tmp<volScalarField> KSu
168  (
169  label modelVariable,
170  const volScalarField& field
171  );
172 
173  //- Return Tactivate
174  virtual const dimensionedScalar& Tactivate() const noexcept
175  {
176  return Tactivate_;
177  }
178 
179  //- Add/subtract alpha*div(U) as a source term
180  //- for alpha, substituting div(U) = mDot(1/rho1 - 1/rho2)
181  virtual bool includeDivU() const noexcept
182  {
183  return true;
184  }
185 };
186 
187 
188 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 
190 } // End namespace meltingEvaporationModels
191 } // End namespace Foam
192 
193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194 
195 #ifdef NoRepository
196 # include "interfaceHeatResistance.C"
197 #endif
198 
199 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
200 #endif
201 
202 // ************************************************************************* //
Foam::phasePair
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
Definition: phasePair.H:53
Foam::InterfaceCompositionModel
Base class for interface composition models, templated on the two thermodynamic models either side of...
Definition: InterfaceCompositionModel.H:58
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::interfaceCompositionModel::pair
const phasePair & pair() const
The phase pair.
Definition: interfaceCompositionModel.C:122
Foam::meltingEvaporationModels::interfaceHeatResistance::Tactivate
virtual const dimensionedScalar & Tactivate() const noexcept
Return Tactivate.
Definition: interfaceHeatResistance.H:206
Foam::meltingEvaporationModels::interfaceHeatResistance::includeDivU
virtual bool includeDivU() const noexcept
Definition: interfaceHeatResistance.H:213
Foam::meltingEvaporationModels::interfaceHeatResistance::KSp
virtual tmp< volScalarField > KSp(label modelVariable, const volScalarField &field)
Implicit mass transfer coefficient.
Definition: interfaceHeatResistance.C:265
interfaceHeatResistance
Interface Heat Resistance type of condensation/saturation model using spread source distribution foll...
Foam::meltingEvaporationModels::interfaceHeatResistance::KSu
virtual tmp< volScalarField > KSu(label modelVariable, const volScalarField &field)
Explicit mass transfer coefficient.
Definition: interfaceHeatResistance.C:292
Foam::meltingEvaporationModels::interfaceHeatResistance::TypeName
TypeName("interfaceHeatResistance")
Runtime type information.
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:42
field
rDeltaTY field()
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::dimensioned< scalar >
Foam::meltingEvaporationModels::interfaceHeatResistance::interfaceHeatResistance
interfaceHeatResistance(const dictionary &dict, const phasePair &pair)
Construct from components.
Definition: interfaceHeatResistance.C:121
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::meltingEvaporationModels::interfaceHeatResistance::~interfaceHeatResistance
virtual ~interfaceHeatResistance()=default
Destructor.
Foam::interfaceCompositionModel::modelVariable
modelVariable
Enumeration for variable based mass transfer models.
Definition: interfaceCompositionModel.H:66
Foam::interfaceCompositionModel::T
Definition: interfaceCompositionModel.H:68
Foam::meltingEvaporationModels::interfaceHeatResistance
Interface Heat Resistance type of condensation/saturation model using spread source distribution foll...
Definition: interfaceHeatResistance.H:127
Foam::meltingEvaporationModels::interfaceHeatResistance::Kexp
virtual tmp< volScalarField > Kexp(const volScalarField &field)
Explicit total mass transfer coefficient.
Definition: interfaceHeatResistance.C:191
Foam::GeometricField< scalar, fvPatchField, volMesh >