cosine.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) 2016-2023 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::wallBoilingModels::partitioningModels::cosine
26 
27 Description
28  Cosine wall heat flux partitioning model.
29 
30  Proposed threshold liquid fractions:
31  - alphaLiquid1 0.1
32  - alphaLiquid0 0.05
33 
34  \verbatim
35  Tentner, A., Lo, S., & Kozlov, V. (2006).
36  Advances in computational fluid dynamics modeling
37  of two-phase flow in boiling water reactor fuel assemblies.
38  In International Conference of Nuclear Engineering,
39  Miami, Florida, USA.
40  \endverbatim
41 
42 SourceFiles
43  cosine.C
44 
45 \*---------------------------------------------------------------------------*/
46 
47 #ifndef cosine_H
48 #define cosine_H
49 
50 #include "partitioningModel.H"
51 
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 
54 namespace Foam
55 {
56 namespace wallBoilingModels
57 {
58 namespace partitioningModels
59 {
60 
61 /*---------------------------------------------------------------------------*\
62  Class cosine Declaration
63 \*---------------------------------------------------------------------------*/
64 
65 class cosine
66 :
67  public partitioningModel
68 {
69  // Private Data
70 
71  //- Lower threshold liquid phase fraction
72  const scalar alphaLiquid0_;
73 
74  //- Upper threshold liquid phase fraction
75  const scalar alphaLiquid1_;
76 
77 
78  // Private Member Functions
79 
80  //- Calculate and return the wet fraction
81  template<class ScalarFieldType>
82  tmp<ScalarFieldType> calculate
83  (
84  const ScalarFieldType& alphaLiquid
85  ) const;
86 
87 
88 public:
89 
90  //- Runtime type information
91  TypeName("cosine");
92 
93 
94  // Constructors
95 
96  //- Construct from a dictionary
97  cosine(const dictionary& dict);
98 
99  //- Copy construct
100  cosine(const cosine& model);
101 
102  //- Construct and return a clone
103  virtual autoPtr<partitioningModel> clone() const
104  {
105  return autoPtr<partitioningModel>(new cosine(*this));
106  }
107 
108 
109  //- Destructor
110  virtual ~cosine();
111 
112 
113  // Member Functions
114 
115  //- Return the wet fraction
117  (
118  const scalarField& alphaLiquid
119  ) const;
120 
121  //- Return the wet fraction
123  (
124  const volScalarField& alphaLiquid
125  ) const;
126 
127  //- Write to stream
128  virtual void write(Ostream& os) const;
129 };
130 
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 } // End namespace partitioningModels
135 } // End namespace wallBoilingModels
136 } // End namespace Foam
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 #endif
141 
142 // ************************************************************************* //
Generic GeometricField class.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
A class for managing temporary objects.
Definition: tmp.H:55
Base class for wall heat flux partitioning models.
Cosine wall heat flux partitioning model.
Definition: cosine.H:67
virtual autoPtr< partitioningModel > clone() const
Construct and return a clone.
Definition: cosine.H:102
virtual tmp< scalarField > wetFraction(const scalarField &alphaLiquid) const
Return the wet fraction.
Definition: cosine.C:112
TypeName("cosine")
Runtime type information.
virtual void write(Ostream &os) const
Write to stream.
Definition: cosine.C:131
cosine(const dictionary &dict)
Construct from a dictionary.
Definition: cosine.C:81
Namespace for OpenFOAM.
dictionary dict