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-2018 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 
86  (
87  const word& modelName,
88  const dictionary& dict,
89  const wordList& phaseNames
90  );
91 
92 
93  //- Destructor
94  virtual ~blendingMethod();
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::phaseModel
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:57
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::tmp< volScalarField >
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::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::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::blendingMethod
Definition: blendingMethod.H:51
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
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.
Foam::List< word >
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