FreeFOAM The Cross-Platform CFD Toolkit
PhaseChangeModel.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
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 \*---------------------------------------------------------------------------*/
25 
26 #include "PhaseChangeModel.H"
27 
28 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
29 
30 template<class CloudType>
33 (
34  IStringStream
35  (
36  "("
37  "latentHeat "
38  "enthalpyDifference"
39  ")"
40  )()
41 );
42 
43 
44 // * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
45 
46 template<class CloudType>
49 const
50 {
51  forAll(enthalpyTransferTypeNames, i)
52  {
53  if (etName == enthalpyTransferTypeNames[i])
54  {
55  return enthalpyTransferType(i);
56  }
57  }
58 
60  (
61  "PhaseChangeModel<CloudType>::enthalpyTransferType"
62  "PhaseChangeModel<CloudType>::wordToEnthalpyTransfer(const word&) const"
63  ) << "Unknown enthalpyType " << etName << ". Valid selections are:" << nl
64  << enthalpyTransferTypeNames << exit(FatalError);
65 
66  return enthalpyTransferType(0);
67 }
68 
69 
70 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
71 
72 template<class CloudType>
74 (
75  CloudType& owner
76 )
77 :
78  dict_(dictionary::null),
79  owner_(owner),
80  coeffDict_(dictionary::null),
81  enthalpyTransfer_(etLatentHeat)
82 {}
83 
84 
85 template<class CloudType>
87 (
88  const dictionary& dict,
89  CloudType& owner,
90  const word& type
91 )
92 :
93  dict_(dict),
94  owner_(owner),
95  coeffDict_(dict.subDict(type + "Coeffs")),
96  enthalpyTransfer_
97  (
98  wordToEnthalpyTransfer(coeffDict_.lookup("enthalpyTransfer"))
99  )
100 {}
101 
102 
103 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
104 
105 template<class CloudType>
107 {}
108 
109 
110 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
111 template<class CloudType>
113 {
114  return owner_;
115 }
116 
117 
118 template<class CloudType>
120 {
121  return dict_;
122 }
123 
124 
125 template<class CloudType>
127 {
128  return coeffDict_;
129 }
130 
131 
132 template<class CloudType>
135 {
136  return enthalpyTransfer_;
137 }
138 
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 #include "NewPhaseChangeModel.C"
143 
144 // ************************ vim: set sw=4 sts=4 et: ************************ //
145