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-2018 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  // Private Member Functions
75 
76  //- Disallow copy construct
78 
79  //- Disallow default bitwise assignment
80  void operator=(const mixtureViscosityModel&);
81 
82 
83 public:
84 
85  //- Runtime type information
86  TypeName("mixtureViscosityModel");
87 
88 
89  // Declare run-time constructor selection table
90 
92  (
93  autoPtr,
95  dictionary,
96  (
97  const word& name,
99  const volVectorField& U,
100  const surfaceScalarField& phi
101  ),
102  (name, viscosityProperties, U, phi)
103  );
104 
105 
106  // Selectors
107 
108  //- Return a reference to the selected viscosity model
110  (
111  const word& name,
112  const dictionary& viscosityProperties,
113  const volVectorField& U,
114  const surfaceScalarField& phi
115  );
116 
117 
118  // Constructors
119 
120  //- Construct from components
122  (
123  const word& name,
124  const dictionary& viscosityProperties,
125  const volVectorField& U,
126  const surfaceScalarField& phi
127  );
128 
129 
130  //- Destructor
131  virtual ~mixtureViscosityModel()
132  {}
133 
134 
135  // Member Functions
136 
137  //- Return the phase transport properties dictionary
138  const dictionary& viscosityProperties() const
139  {
140  return viscosityProperties_;
141  }
142 
143  //- Return the mixture viscosity
144  // given the viscosity of the continuous phase
145  virtual tmp<volScalarField> mu(const volScalarField& muc) const = 0;
146 
147  //- Read transportProperties dictionary
148  virtual bool read(const dictionary& viscosityProperties) = 0;
149 };
150 
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 } // End namespace Foam
155 
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 
158 #endif
159 
160 // ************************************************************************* //
surfaceScalarField & phi
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
virtual ~mixtureViscosityModel()
Destructor.
Generic GeometricField class.
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.
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))
void operator=(const mixtureViscosityModel &)
Disallow default bitwise assignment.
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
mixtureViscosityModel(const mixtureViscosityModel &)
Disallow copy construct.
Namespace for OpenFOAM.