mixtureViscosityModel.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-2019 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 Namespace
25  Foam::mixtureViscosityModels
26 
27 Description
28  A namespace for incompressible mixtureViscosityModel implementations.
29 
30 Class
31  Foam::mixtureViscosityModel
32 
33 Description
34  An abstract base class for incompressible mixtureViscosityModels.
35 
36 SourceFiles
37  mixtureViscosityModel.C
38  mixtureViscosityModelNew.C
39 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef mixtureViscosityModel_H
43 #define mixtureViscosityModel_H
44 
45 #include "dictionary.H"
46 #include "volFieldsFwd.H"
47 #include "surfaceFieldsFwd.H"
48 #include "dimensionedScalar.H"
49 #include "runTimeSelectionTables.H"
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 namespace Foam
54 {
55 
56 /*---------------------------------------------------------------------------*\
57  Class mixtureViscosityModel Declaration
58 \*---------------------------------------------------------------------------*/
59 
61 {
62 
63 protected:
64 
65  // Protected data
66 
69 
71  const surfaceScalarField& phi_;
72 
73 
74 public:
75 
76  //- Runtime type information
77  TypeName("mixtureViscosityModel");
78 
79 
80  // Declare run-time constructor selection table
81 
83  (
84  autoPtr,
86  dictionary,
87  (
88  const word& name,
90  const volVectorField& U,
91  const surfaceScalarField& phi
92  ),
93  (name, viscosityProperties, U, phi)
94  );
95 
96 
97  // Constructors
98 
99  //- Construct from components
101  (
102  const word& name,
103  const dictionary& viscosityProperties,
104  const volVectorField& U,
105  const surfaceScalarField& phi
106  );
107 
108  //- Disallow default bitwise copy construction
110 
111 
112  // Selectors
113 
114  //- Return a reference to the selected viscosity model
116  (
117  const word& name,
118  const dictionary& viscosityProperties,
119  const volVectorField& U,
120  const surfaceScalarField& phi
121  );
122 
123 
124  //- Destructor
125  virtual ~mixtureViscosityModel()
126  {}
127 
128 
129  // Member Functions
130 
131  //- Return the phase transport properties dictionary
132  const dictionary& viscosityProperties() const
133  {
134  return viscosityProperties_;
135  }
136 
137  //- Return the mixture viscosity
138  // given the viscosity of the continuous phase
139  virtual tmp<volScalarField> mu(const volScalarField& muc) const = 0;
140 
141  //- Read transportProperties dictionary
142  virtual bool read(const dictionary& viscosityProperties) = 0;
143 
144 
145  // Member Operators
146 
147  //- Disallow default bitwise assignment
148  void operator=(const mixtureViscosityModel&) = delete;
149 };
150 
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 } // End namespace Foam
155 
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 
158 #endif
159 
160 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
virtual ~mixtureViscosityModel()
Destructor.
Generic GeometricField class.
phi
Definition: pEqn.H:104
virtual bool read(const dictionary &viscosityProperties)=0
Read transportProperties dictionary.
An abstract base class for incompressible mixtureViscosityModels.
A class for handling words, derived from string.
Definition: word.H:59
virtual tmp< volScalarField > mu(const volScalarField &muc) const =0
Return the mixture viscosity.
const surfaceScalarField & phi_
const dictionary & viscosityProperties() const
Return the phase transport properties dictionary.
static autoPtr< mixtureViscosityModel > New(const word &name, const dictionary &viscosityProperties, const volVectorField &U, const surfaceScalarField &phi)
Return a reference to the selected viscosity model.
mixtureViscosityModel(const word &name, const dictionary &viscosityProperties, const volVectorField &U, const surfaceScalarField &phi)
Construct from components.
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
TypeName("mixtureViscosityModel")
Runtime type information.
U
Definition: pEqn.H:72
declareRunTimeSelectionTable(autoPtr, mixtureViscosityModel, dictionary,(const word &name, const dictionary &viscosityProperties, const volVectorField &U, const surfaceScalarField &phi),(name, viscosityProperties, U, phi))
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.
A class for managing temporary objects.
Definition: PtrList.H:53
void operator=(const mixtureViscosityModel &)=delete
Disallow default bitwise assignment.
Namespace for OpenFOAM.