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