strainRateFunction.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
27Class
28 Foam::laminarModels::generalizedNewtonianViscosityModels::strainRateFunction
29
30Description
31 Run-time selected strain-rate function generalized Newtonian viscosity model
32
33 Example linear function of strain-rate:
34 \verbatim
35 generalizedNewtonianModel strainRateFunction;
36
37 function polynomial ((0 0.1) (1 1.3));
38 \endverbatim
39
40See also
41 Foam::generalizedNewtonianViscosityModel
42 Foam::Function1
43
44SourceFiles
45 strainRateFunction.C
46
47\*---------------------------------------------------------------------------*/
48
49#ifndef strainRateFunction_H
50#define strainRateFunction_H
51
53#include "Function1.H"
54
55// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56
57namespace Foam
58{
59namespace laminarModels
60{
61namespace generalizedNewtonianViscosityModels
62{
63
64/*---------------------------------------------------------------------------*\
65 Class strainRateFunction Declaration
66\*---------------------------------------------------------------------------*/
69:
71{
72 // Private Data
73
74 //- Coefficients dictionary
75 dictionary strainRateFunctionCoeffs_;
76
77 //- Strain-rate function
78 autoPtr<Function1<scalar>> strainRateFunction_;
79
80
81public:
82
83 //- Runtime type information
84 TypeName("strainRateFunction");
85
86
87 // Constructors
88
89 //- Construct from dictionary (components)
91
92
93 //- Destructor
94 virtual ~strainRateFunction() = default;
95
96
97 // Member Functions
98
99 //- Read transportProperties dictionary
100 virtual bool read(const dictionary& viscosityProperties);
101
102 //- Return the laminar viscosity
103 virtual tmp<volScalarField> nu
104 (
105 const volScalarField& nu0,
106 const volScalarField& strainRate
107 ) const;
108};
109
110
111// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112
113} // End namespace generalizedNewtonianViscosityModels
114} // End namespace laminarModels
115} // End namespace Foam
116
117// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118
119#endif
120
121// ************************************************************************* //
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.
const dictionary & viscosityProperties() const
Return the phase transport properties dictionary.
Run-time selected strain-rate function generalized Newtonian viscosity model.
virtual bool read(const dictionary &viscosityProperties)
Read transportProperties dictionary.
A class for managing temporary objects.
Definition: tmp.H:65
Namespace for OpenFOAM.
volScalarField & nu
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73