CrossPowerLaw.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::CrossPowerLaw
26 
27 Description
28  Cross-Power law generalised Newtonian viscosity model
29 
30  The coefficient applied to strain rate \f$\gamma\f$ can be specified either
31  as the constant \c m or the critical stress level at the transition to
32  shear thinning \c tauStar if \c tauStar is provided:
33 
34  Kinematic viscosity [m^2/s]
35 
36  \f[
37  \nu = \nu_\infty + \frac{(\nu_0 - \nu_\infty)}{1 + (m\gamma)^n}
38  \f]
39 
40  or
41 
42  \f[
43  \nu = \nu_\infty
44  + \frac{(\nu_0 - \nu_\infty)}
45  {1 + \left(\frac{\nu_0\gamma}{\tau^*}\right)^n}
46  \f]
47 
48  Example specification:
49  \verbatim
50  viscosityModel CrossPowerLaw;
51 
52  nuInf 10;
53  m 0.4;
54  n 3;
55  \endverbatim
56 
57  Note the viscosity \c nu0 at zero strain rate is a physical property,
58  generally specified in the physicalProperties file.
59 
60 SourceFiles
61  CrossPowerLaw.C
62 
63 \*---------------------------------------------------------------------------*/
64 
65 #ifndef CrossPowerLaw_H
66 #define CrossPowerLaw_H
67 
69 
70 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
71 
72 namespace Foam
73 {
74 namespace laminarModels
75 {
76 namespace generalisedNewtonianViscosityModels
77 {
78 
79 /*---------------------------------------------------------------------------*\
80  Class CrossPowerLaw Declaration
81 \*---------------------------------------------------------------------------*/
82 
83 class CrossPowerLaw
84 :
86 {
87  // Private Data
88 
89  dimensionedScalar nuInf_;
91  dimensionedScalar tauStar_;
93 
94 
95 public:
96 
97  //- Runtime type information
98  TypeName("CrossPowerLaw");
99 
100 
101  // Constructors
102 
103  //- Construct from components
105  (
106  const dictionary& viscosityProperties,
107  const Foam::viscosity& viscosity,
108  const volVectorField& U
109  );
110 
111 
112  //- Destructor
113  virtual ~CrossPowerLaw()
114  {}
115 
116 
117  // Member Functions
118 
119  //- Read transportProperties dictionary
120  virtual bool read(const dictionary& viscosityProperties);
121 
122  //- Return the laminar viscosity
123  virtual tmp<volScalarField> nu
124  (
125  const volScalarField& nu0,
127  ) const;
128 };
129 
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 } // End namespace generalisedNewtonianViscosityModels
134 } // End namespace laminarModels
135 } // End namespace Foam
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 #endif
140 
141 // ************************************************************************* //
Generic GeometricField class.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Cross-Power law generalised Newtonian viscosity model.
Definition: CrossPowerLaw.H:85
virtual bool read(const dictionary &viscosityProperties)
Read transportProperties dictionary.
Definition: CrossPowerLaw.C:75
CrossPowerLaw(const dictionary &viscosityProperties, const Foam::viscosity &viscosity, const volVectorField &U)
Construct from components.
Definition: CrossPowerLaw.C:54
An abstract base class for strain-rate dependent generalised Newtonian viscosity models.
virtual tmp< volScalarField > strainRate() const
Return the strain-rate obtained from the velocity field.
virtual tmp< volScalarField > nu() const
Return the laminar viscosity.
A class for managing temporary objects.
Definition: tmp.H:55
Abstract base class for all fluid physical properties.
Definition: viscosity.H:50
U
Definition: pEqn.H:72
Namespace for OpenFOAM.