generalizedNewtonianViscosityModel.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) 2018-2020 OpenFOAM Foundation
9 Copyright (C) 2020 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
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
27Namespace
28 Foam::laminarModels::generalizedNewtonianViscosityModels
29
30Description
31 A namespace for various generalized Newtonian viscosity model
32 implementations.
33
34Class
35 Foam::laminarModels::generalizedNewtonianViscosityModel
36
37Description
38 An abstract base class for generalized Newtonian viscosity models.
39
40SourceFiles
41 generalizedNewtonianViscosityModel.C
42 generalizedNewtonianViscosityModelNew.C
43
44\*---------------------------------------------------------------------------*/
45
46#ifndef generalizedNewtonianViscosityModel_H
47#define generalizedNewtonianViscosityModel_H
48
49#include "dictionary.H"
50#include "volFieldsFwd.H"
52
53// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54
55namespace Foam
56{
57namespace laminarModels
58{
59
60/*---------------------------------------------------------------------------*\
61 Class generalizedNewtonianViscosityModel Declaration
62\*---------------------------------------------------------------------------*/
65{
66protected:
67
68 // Protected Data
71
72
73public:
74
75 //- Runtime type information
76 TypeName("generalizedNewtonianViscosityModel");
77
78
79 // Declare run-time constructor selection table
82 (
83 autoPtr,
86 (
88 ),
90 );
91
92
93 // Generated Methods
94
95 //- No copy construct
97 (
99 ) = delete;
100
101 //- No copy assignment
102 void operator=(const generalizedNewtonianViscosityModel&) = delete;
103
104
105 // Selectors
106
107 //- Select a viscosity model
109 (
110 const dictionary& dict
111 );
112
113
114 // Constructors
115
116 //- Construct from dictionary (components)
118 (
120 );
121
122
123 //- Destructor
124 virtual ~generalizedNewtonianViscosityModel() = default;
125
126
127 // Member Functions
128
129 //- Return the phase transport properties dictionary
130 const dictionary& viscosityProperties() const
131 {
133 }
134
135 //- Return the laminar viscosity
136 virtual tmp<volScalarField> nu
137 (
138 const volScalarField& nu0,
139 const volScalarField& strainRate
140 ) const = 0;
141
142 //- Read transportProperties dictionary
143 virtual bool read(const dictionary& viscosityProperties) = 0;
144};
145
146
147// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148
149} // End namespace laminarModels
150} // End namespace Foam
151
152// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153
154#endif
155
156// ************************************************************************* //
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
An abstract base class for generalized Newtonian viscosity models.
generalizedNewtonianViscosityModel(const generalizedNewtonianViscosityModel &)=delete
No copy construct.
void operator=(const generalizedNewtonianViscosityModel &)=delete
No copy assignment.
TypeName("generalizedNewtonianViscosityModel")
Runtime type information.
virtual tmp< volScalarField > nu(const volScalarField &nu0, const volScalarField &strainRate) const =0
Return the laminar viscosity.
static autoPtr< generalizedNewtonianViscosityModel > New(const dictionary &dict)
Select a viscosity model.
virtual ~generalizedNewtonianViscosityModel()=default
Destructor.
const dictionary & viscosityProperties() const
Return the phase transport properties dictionary.
declareRunTimeSelectionTable(autoPtr, generalizedNewtonianViscosityModel, dictionary,(const dictionary &viscosityProperties),(viscosityProperties))
virtual bool read(const dictionary &viscosityProperties)=0
Read transportProperties dictionary.
A class for managing temporary objects.
Definition: tmp.H:65
Namespace for OpenFOAM.
volScalarField & nu
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73