powerLaw.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-2022 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::laminarModels::generalisedNewtonianViscosityModels::powerLaw
26 
27 Description
28  Standard power-law generalised Newtonian viscosity model
29 
30  The power-law model provides a function for viscosity, limited by
31  minimum and maximum values \f$\nu_{\min}\f$ and \f$\nu_{\max}\f$
32  respectively.
33 
34  Kinematic viscosity [m^2/s]
35 
36  \f[
37  \nu = k\gamma^{n - 1}, \nu_{\min} \le \nu \le \nu_{\max}
38  \f]
39 
40  Example specification:
41  \verbatim
42  viscosityModel powerLaw;
43 
44  nuMax 1e-3;
45  nuMin 1e-5;
46  k 1;
47  n 0.5;
48  \endverbatim
49 
50 SourceFiles
51  powerLaw.C
52 
53 \*---------------------------------------------------------------------------*/
54 
55 #ifndef powerLaw_H
56 #define powerLaw_H
57 
59 
60 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
61 
62 namespace Foam
63 {
64 namespace laminarModels
65 {
66 namespace generalisedNewtonianViscosityModels
67 {
68 
69 /*---------------------------------------------------------------------------*\
70  Class powerLaw Declaration
71 \*---------------------------------------------------------------------------*/
72 
73 class powerLaw
74 :
76 {
77  // Private Data
78 
81  dimensionedScalar nuMin_;
82  dimensionedScalar nuMax_;
83 
84 
85 public:
86 
87  //- Runtime type information
88  TypeName("powerLaw");
89 
90 
91  // Constructors
92 
93  //- Construct from components
94  powerLaw
95  (
96  const dictionary& viscosityProperties,
98  const volVectorField& U
99  );
100 
101 
102  //- Destructor
103  virtual ~powerLaw()
104  {}
105 
106 
107  // Member Functions
108 
109  //- Read transportProperties dictionary
110  virtual bool read(const dictionary& viscosityProperties);
111 
112  //- Return the laminar viscosity
113  virtual tmp<volScalarField> nu
114  (
115  const volScalarField& nu0,
117  ) const;
118 };
119 
120 
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 
123 } // End namespace generalisedNewtonianViscosityModels
124 } // End namespace laminarModels
125 } // End namespace Foam
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 #endif
130 
131 // ************************************************************************* //
powerLaw(const dictionary &viscosityProperties, const Foam::viscosity &viscosity, const volVectorField &U)
Construct from components.
Definition: powerLaw.C:53
U
Definition: pEqn.H:72
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
virtual tmp< volScalarField > strainRate() const
Return the strain-rate obtained from the velocity field.
Standard power-law generalised Newtonian viscosity model.
Definition: powerLaw.H:72
An abstract base class for strain-rate dependent generalised Newtonian viscosity models.
virtual bool read(const dictionary &viscosityProperties)
Read transportProperties dictionary.
Definition: powerLaw.C:73
Abstract base class for all fluid physical properties.
Definition: viscosity.H:49
A class for managing temporary objects.
Definition: PtrList.H:53
virtual tmp< volScalarField > nu() const
Return the laminar viscosity.
Namespace for OpenFOAM.