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 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::blendingMethod
28 
29 Description
30 
31 SourceFiles
32  blendingMethod.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef blendingMethod_H
37 #define blendingMethod_H
38 
39 #include "dictionary.H"
40 #include "runTimeSelectionTables.H"
41 #include "phaseModel.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class blendingMethod Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 class blendingMethod
53 {
54 public:
55 
56  //- Runtime type information
57  TypeName("blendingMethod");
58 
59 
60  // Declare runtime construction
62  (
63  autoPtr,
65  dictionary,
66  (
67  const dictionary& dict,
68  const wordList& phaseNames
69  ),
70  (dict, phaseNames)
71  );
72 
73 
74  // Constructors
75 
76  //- Construct from a dictionary
78  (
79  const dictionary& dict
80  );
81 
82 
83  // Selector
84 
85  static autoPtr<blendingMethod> New
86  (
87  const dictionary& dict,
88  const wordList& phaseNames
89  );
90 
91 
92  //- Destructor
93  virtual ~blendingMethod();
94 
95 
96  // Member Functions
97 
98  //- Factor for first phase
99  virtual tmp<volScalarField> f1
100  (
101  const phaseModel& phase1,
102  const phaseModel& phase2
103  ) const = 0;
104 
105  //- Factor for second phase
106  virtual tmp<volScalarField> f2
107  (
108  const phaseModel& phase1,
109  const phaseModel& phase2
110  ) const = 0;
111 };
112 
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 } // End namespace Foam
117 
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
120 #endif
121 
122 // ************************************************************************* //
Foam::blendingMethod::~blendingMethod
virtual ~blendingMethod()
Destructor.
Definition: blendingMethod.C:50
Foam::blendingMethod::blendingMethod
blendingMethod(const dictionary &dict)
Construct from a dictionary.
Definition: blendingMethod.C:42
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:59
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: newBlendingMethod.C:34