BirdCarreau.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) 2011-2016 OpenFOAM Foundation
9 Copyright (C) 2017-2019 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::viscosityModels::BirdCarreau
29
30Description
31 An incompressible Bird-Carreau non-Newtonian viscosity model.
32
33 The Bird-Carreau-Yasuda form is also supported if the optional "a"
34 coefficient is specified. "a" defaults to 2 for the Bird-Carreau model.
35
36SourceFiles
37 BirdCarreau.C
38
39\*---------------------------------------------------------------------------*/
40
41#ifndef BirdCarreau_H
42#define BirdCarreau_H
43
44#include "viscosityModel.H"
45#include "dimensionedScalar.H"
46#include "volFields.H"
47
48// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49
50namespace Foam
51{
52namespace viscosityModels
53{
54
55/*---------------------------------------------------------------------------*\
56 Class BirdCarreau Declaration
57\*---------------------------------------------------------------------------*/
59class BirdCarreau
60:
61 public viscosityModel
62{
63 // Private data
64
65 dictionary BirdCarreauCoeffs_;
66
68 dimensionedScalar nuInf_;
72
73
74protected:
75
76 // Protected Data
79
80 // Protected Member Functions
81
82 //- Calculate and return the laminar viscosity
84
85
86public:
87
88 //- Runtime type information
89 TypeName("BirdCarreau");
90
91
92 // Constructors
93
94 //- Construct from components
96 (
97 const word& name,
99 const volVectorField& U,
101 );
102
103
104 //- Destructor
105 virtual ~BirdCarreau() = default;
106
107
108 // Member Functions
109
110 //- Return the laminar viscosity
111 virtual tmp<volScalarField> nu() const
112 {
113 return nu_;
114 }
115
116 //- Return the laminar viscosity for patch
117 virtual tmp<scalarField> nu(const label patchi) const
118 {
119 return nu_.boundaryField()[patchi];
120 }
121
122 //- Correct the laminar viscosity
123 virtual void correct()
124 {
125 nu_ = calcNu();
126 }
127
128 //- Read transportProperties dictionary
129 virtual bool read(const dictionary& viscosityProperties);
130};
131
132
133// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134
135} // End namespace viscosityModels
136} // End namespace Foam
137
138// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139
140#endif
141
142// ************************************************************************* //
surfaceScalarField & phi
const Boundary & boundaryField() const
Return const-reference to the boundary field.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A class for managing temporary objects.
Definition: tmp.H:65
An abstract base class for incompressible viscosityModels.
const dictionary & viscosityProperties() const
Return the phase transport properties dictionary.
An incompressible Bird-Carreau non-Newtonian viscosity model.
Definition: BirdCarreau.H:61
virtual bool read(const dictionary &viscosityProperties)
Read transportProperties dictionary.
Definition: BirdCarreau.C:107
TypeName("BirdCarreau")
Runtime type information.
tmp< volScalarField > calcNu() const
Calculate and return the laminar viscosity.
Definition: BirdCarreau.C:53
virtual ~BirdCarreau()=default
Destructor.
virtual void correct()
Correct the laminar viscosity.
Definition: BirdCarreau.H:122
virtual tmp< volScalarField > nu() const
Return the laminar viscosity.
Definition: BirdCarreau.H:110
virtual tmp< scalarField > nu(const label patchi) const
Return the laminar viscosity for patch.
Definition: BirdCarreau.H:116
A class for handling words, derived from Foam::string.
Definition: word.H:68
U
Definition: pEqn.H:72
Namespace for OpenFOAM.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73