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 
84  (
85  const word& modelName,
86  const dictionary& dict,
87  const wordList& phaseNames
88  );
89 
90 
91  //- Destructor
92  virtual ~blendingMethod();
93 
94 
95  // Member Functions
96 
97  //- Factor for first phase
98  virtual tmp<volScalarField> f1
99  (
100  const phaseModel& phase1,
101  const phaseModel& phase2
102  ) const = 0;
103 
104  //- Factor for second phase
105  virtual tmp<volScalarField> f2
106  (
107  const phaseModel& phase1,
108  const phaseModel& phase2
109  ) const = 0;
110 };
111 
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 } // End namespace Foam
116 
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118 
119 #endif
120 
121 // ************************************************************************* //
dictionary dict
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
declareRunTimeSelectionTable(autoPtr, blendingMethod, dictionary,(const dictionary &dict, const wordList &phaseNames),(dict, phaseNames))
A class for handling words, derived from string.
Definition: word.H:59
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.
virtual tmp< volScalarField > f2(const phaseModel &phase1, const phaseModel &phase2) const =0
Factor for second phase.
TypeName("blendingMethod")
Runtime type information.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Macros to ease declaration of run-time selection tables.
phaseModel & phase2
A class for managing temporary objects.
Definition: PtrList.H:53
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:53
Namespace for OpenFOAM.
virtual tmp< volScalarField > f1(const phaseModel &phase1, const phaseModel &phase2) const =0
Factor for first phase.