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