kineticTheoryViscosityModel.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) 2011-2024 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 Class
25  Foam::kineticTheoryModels::viscosityModel
26 
27 Description
28 
29 SourceFiles
30  viscosityModel.C
31 
32 \*---------------------------------------------------------------------------*/
33 
34 #ifndef kineticTheoryViscosityModel_H
35 #define kineticTheoryViscosityModel_H
36 
37 #include "dictionary.H"
38 #include "volFields.H"
39 #include "dimensionedTypes.H"
40 #include "runTimeSelectionTables.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 namespace kineticTheoryModels
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class viscosityModel Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class viscosityModel
54 {
55  // Private member functions
56 
57  //- Read the coefficients from coeffDict
58  virtual bool readCoeffs(const dictionary& coeffDict)
59  {
60  return true;
61  }
62 
63 
64 public:
65 
66  //- Runtime type information
67  TypeName("viscosityModel");
68 
69  // Declare runtime constructor selection table
71  (
72  autoPtr,
74  dictionary,
75  (
76  const dictionary& dict
77  ),
78  (dict)
79  );
80 
81 
82  // Constructors
83 
84  //- Construct from the coefficients dictionary
85  viscosityModel(const dictionary& coeffDict);
86 
87  //- Disallow default bitwise copy construction
88  viscosityModel(const viscosityModel&) = delete;
89 
90 
91  // Selectors
92 
94  (
95  const dictionary& dict
96  );
97 
98 
99  //- Destructor
100  virtual ~viscosityModel();
101 
102 
103  // Member Functions
104 
105  //- Read the coefficients from the optional ".*Coeffs" sub-dictionary
106  // of the given dictionary
107  bool read(const dictionary& dict);
108 
109  virtual tmp<volScalarField> nu
110  (
111  const volScalarField& alpha1,
112  const volScalarField& Theta,
113  const volScalarField& g0,
114  const volScalarField& rho1,
115  const volScalarField& da,
116  const dimensionedScalar& e
117  ) const = 0;
118 
119 
120  // Member Operators
121 
122  //- Disallow default bitwise assignment
123  void operator=(const viscosityModel&) = delete;
124 };
125 
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 } // End namespace kineticTheoryModels
130 } // End namespace Foam
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 #endif
135 
136 // ************************************************************************* //
Generic GeometricField class.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
virtual tmp< volScalarField > nu(const volScalarField &alpha1, const volScalarField &Theta, const volScalarField &g0, const volScalarField &rho1, const volScalarField &da, const dimensionedScalar &e) const =0
declareRunTimeSelectionTable(autoPtr, viscosityModel, dictionary,(const dictionary &dict),(dict))
static autoPtr< viscosityModel > New(const dictionary &dict)
bool read(const dictionary &dict)
Read the coefficients from the optional ".*Coeffs" sub-dictionary.
void operator=(const viscosityModel &)=delete
Disallow default bitwise assignment.
viscosityModel(const dictionary &coeffDict)
Construct from the coefficients dictionary.
TypeName("viscosityModel")
Runtime type information.
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.
const doubleScalar e
Definition: doubleScalar.H:106
Macros to ease declaration of run-time selection tables.
dictionary dict