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  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 
87  (
88  const word& modelName,
89  const dictionary& dict,
90  const wordList& phaseNames
91  );
92 
93 
94  //- Destructor
95  virtual ~blendingMethod() = default;
96 
97 
98  // Member Functions
99 
100  //- Factor for first phase
101  virtual tmp<volScalarField> f1
102  (
103  const phaseModel& phase1,
104  const phaseModel& phase2
105  ) const = 0;
106 
107  //- Factor for second phase
108  virtual tmp<volScalarField> f2
109  (
110  const phaseModel& phase1,
111  const phaseModel& phase2
112  ) const = 0;
113 };
114 
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 } // End namespace Foam
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 #endif
123 
124 // ************************************************************************* //
Foam::phaseModel
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:54
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
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::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::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::blendingMethod
Definition: blendingMethod.H:52
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: blendingMethod.C:53