blendingMethod.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) 2014-2018 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::blendingMethod
26 
27 Description
28 
29 SourceFiles
30  blendingMethod.C
31 
32 \*---------------------------------------------------------------------------*/
33 
34 #ifndef blendingMethod_H
35 #define blendingMethod_H
36 
37 #include "dictionary.H"
38 #include "runTimeSelectionTables.H"
39 #include "phaseModel.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class blendingMethod Declaration
48 \*---------------------------------------------------------------------------*/
49 
50 class blendingMethod
51 {
52 public:
53 
54  //- Runtime type information
55  TypeName("blendingMethod");
56 
57 
58  // Declare runtime construction
60  (
61  autoPtr,
63  dictionary,
64  (
65  const dictionary& dict,
66  const wordList& phaseNames
67  ),
68  (dict, phaseNames)
69  );
70 
71 
72  // Constructors
73 
74  //- Construct from a dictionary
76  (
77  const dictionary& dict
78  );
79 
80 
81  // Selector
82 
83  static autoPtr<blendingMethod> New
84  (
85  const dictionary& dict,
86  const wordList& phaseNames
87  );
88 
89 
90  //- Destructor
91  virtual ~blendingMethod();
92 
93 
94  // Member Functions
95 
96  //- Factor for first phase
97  virtual tmp<volScalarField> f1
98  (
99  const phaseModel& phase1,
100  const phaseModel& phase2
101  ) const = 0;
102 
103  //- Factor for second phase
104  virtual tmp<volScalarField> f2
105  (
106  const phaseModel& phase1,
107  const phaseModel& phase2
108  ) const = 0;
109 };
110 
111 
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113 
114 } // End namespace Foam
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 #endif
119 
120 // ************************************************************************* //
dictionary dict
declareRunTimeSelectionTable(autoPtr, blendingMethod, dictionary,(const dictionary &dict, const wordList &phaseNames),(dict, phaseNames))
static autoPtr< blendingMethod > New(const word &modelName, const dictionary &dict, const wordList &phaseNames)
phaseModel & phase1
virtual ~blendingMethod()
Destructor.
blendingMethod(const dictionary &dict)
Construct from a dictionary.
List< word > wordList
A List of words.
Definition: fileName.H:54
virtual tmp< volScalarField > f2(const phaseModel &phase1, const phaseModel &phase2) const =0
Factor for second phase.
TypeName("blendingMethod")
Runtime type information.
Macros to ease declaration of run-time selection tables.
phaseModel & phase2
Namespace for OpenFOAM.
virtual tmp< volScalarField > f1(const phaseModel &phase1, const phaseModel &phase2) const =0
Factor for first phase.