Loading...
Searching...
No Matches
HerschelBulkley.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::HerschelBulkley
29
30Description
31 Herschel-Bulkley non-Newtonian viscosity model.
32
33SourceFiles
34 HerschelBulkley.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef HerschelBulkley_H
39#define HerschelBulkley_H
40
41#include "viscosityModel.H"
42#include "dimensionedScalar.H"
43#include "volFields.H"
44
45// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47namespace Foam
48{
49namespace viscosityModels
50{
52/*---------------------------------------------------------------------------*\
53 Class HerschelBulkley Declaration
54\*---------------------------------------------------------------------------*/
55
57:
58 public viscosityModel
59{
60 // Private data
61
62 dictionary HerschelBulkleyCoeffs_;
63
68
70protected:
71
72 // Protected data
73
75
76
77 // Protected Member Functions
78
79 //- Calculate and return the laminar viscosity
81
82
83public:
84
85 //- Runtime type information
86 TypeName("HerschelBulkley");
87
88
89 // Constructors
90
91 //- Construct from components
93 (
94 const word& name,
96 const volVectorField& U,
98 );
99
100
101 //- Destructor
102 virtual ~HerschelBulkley() = default;
103
104
105 // Member Functions
106
107 //- Return the laminar viscosity
108 virtual tmp<volScalarField> nu() const
109 {
110 return nu_;
111 }
112
113 //- Return the laminar viscosity for patch
114 virtual tmp<scalarField> nu(const label patchi) const
115 {
116 return nu_.boundaryField()[patchi];
117 }
118
119 //- Correct the laminar viscosity
120 virtual void correct()
122 nu_ = calcNu();
123 }
124
125 //- Read transportProperties dictionary
126 virtual bool read(const dictionary& viscosityProperties);
127};
128
130// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131
132} // End namespace viscosityModels
133} // End namespace Foam
134
135// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136
137#endif
138
139// ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
A class for managing temporary objects.
Definition tmp.H:75
viscosityModel(const viscosityModel &)=delete
No copy construct.
const dictionary & viscosityProperties() const
Return the phase transport properties dictionary.
virtual bool read(const dictionary &viscosityProperties)
Read transportProperties dictionary.
virtual ~HerschelBulkley()=default
Destructor.
tmp< volScalarField > calcNu() const
Calculate and return the laminar viscosity.
HerschelBulkley(const word &name, const dictionary &viscosityProperties, const volVectorField &U, const surfaceScalarField &phi)
Construct from components.
virtual void correct()
Correct the laminar viscosity.
TypeName("HerschelBulkley")
Runtime type information.
virtual tmp< volScalarField > nu() const
Return the laminar viscosity.
virtual tmp< scalarField > nu(const label patchi) const
Return the laminar viscosity for patch.
A class for handling words, derived from Foam::string.
Definition word.H:66
U
Definition pEqn.H:72
A namespace for various incompressible viscosityModel implementations.
Definition Arrhenius.H:48
Namespace for OpenFOAM.
GeometricField< vector, fvPatchField, volMesh > volVectorField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition exprTraits.C:127
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68