generalisedNewtonianViscosityModel.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) 2018-2021 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::laminarModels::generalisedNewtonianViscosityModels
26 
27 Description
28  A namespace for various generalised Newtonian viscosity model
29  implementations.
30 
31 Class
32  Foam::laminarModels::generalisedNewtonianViscosityModel
33 
34 Description
35  An abstract base class for generalised Newtonian viscosity models.
36 
37 SourceFiles
38  generalisedNewtonianViscosityModel.C
39  generalisedNewtonianViscosityModelNew.C
40 
41 \*---------------------------------------------------------------------------*/
42 
43 #ifndef generalisedNewtonianViscosityModel_H
44 #define generalisedNewtonianViscosityModel_H
45 
46 #include "dictionary.H"
47 #include "volFieldsFwd.H"
48 #include "runTimeSelectionTables.H"
49 
50 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 
52 namespace Foam
53 {
54 namespace laminarModels
55 {
56 
57 /*---------------------------------------------------------------------------*\
58  Class generalisedNewtonianViscosityModel Declaration
59 \*---------------------------------------------------------------------------*/
60 
62 {
63 protected:
64 
65  // Protected data
66 
68 
69 
70 public:
71 
72  //- Runtime type information
73  TypeName("generalisedNewtonianViscosityModel");
74 
75 
76  // Declare run-time constructor selection table
77 
79  (
80  autoPtr,
82  dictionary,
83  (
85  ),
86  (viscosityProperties)
87  );
88 
89 
90  // Selectors
91 
92  //- Return a reference to the selected viscosity model
94  (
95  const dictionary& viscosityProperties
96  );
97 
98 
99  // Constructors
100 
101  //- Construct from components
103  (
104  const dictionary& viscosityProperties
105  );
106 
107  //- Disallow default bitwise copy construction
109  (
111  );
112 
113 
114  //- Destructor
116  {}
117 
118 
119  // Member Functions
120 
121  //- Return the phase transport properties dictionary
122  const dictionary& viscosityProperties() const
123  {
124  return viscosityProperties_;
125  }
126 
127  //- Return the laminar viscosity
128  virtual tmp<volScalarField> nu
129  (
130  const volScalarField& nu0,
131  const volScalarField& strainRate
132  ) const = 0;
133 
134  //- Read transportProperties dictionary
135  virtual bool read(const dictionary& viscosityProperties) = 0;
136 
137 
138  // Member Operators
139 
140  //- Disallow default bitwise assignment
141  void operator=(const generalisedNewtonianViscosityModel&) = delete;
142 };
143 
144 
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 
147 } // End namespace laminarModels
148 } // End namespace Foam
149 
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 
152 #endif
153 
154 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
virtual tmp< volScalarField > nu(const volScalarField &nu0, const volScalarField &strainRate) const =0
Return the laminar viscosity.
static autoPtr< generalisedNewtonianViscosityModel > New(const dictionary &viscosityProperties)
Return a reference to the selected viscosity model.
declareRunTimeSelectionTable(autoPtr, generalisedNewtonianViscosityModel, dictionary,(const dictionary &viscosityProperties),(viscosityProperties))
const dictionary & viscosityProperties() const
Return the phase transport properties dictionary.
An abstract base class for generalised Newtonian viscosity models.
TypeName("generalisedNewtonianViscosityModel")
Runtime type information.
void operator=(const generalisedNewtonianViscosityModel &)=delete
Disallow default bitwise assignment.
generalisedNewtonianViscosityModel(const dictionary &viscosityProperties)
Construct from components.
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
Namespace for OpenFOAM.
virtual bool read(const dictionary &viscosityProperties)=0
Read transportProperties dictionary.