NewtonianViscosityModel.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) 2021 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::Newtonian
26 
27 Description
28  Newtonian viscosity model which returns the fluid Newtonian viscosity
29 
30 SourceFiles
31  NewtonianViscosityModel.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef NewtonianViscosityModel_H
36 #define NewtonianViscosityModel_H
37 
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 namespace laminarModels
45 {
46 namespace generalisedNewtonianViscosityModels
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class Newtonian Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class Newtonian
54 :
56 {
57 
58 public:
59 
60  //- Runtime type information
61  TypeName("Newtonian");
62 
63 
64  // Constructors
65 
66  //- Construct from components
67  Newtonian
68  (
69  const dictionary& viscosityProperties,
70  const viscosity& viscosity,
71  const volVectorField& U
72  );
73 
74  //- Disallow default bitwise copy construction
75  Newtonian
76  (
77  const Newtonian&
78  ) = delete;
79 
80 
81  //- Destructor
82  virtual ~Newtonian()
83  {}
84 
85 
86  // Member Functions
87 
88  //- Read transportProperties dictionary
89  virtual bool read(const dictionary& viscosityProperties);
90 
91  //- Return the laminar viscosity
92  virtual tmp<volScalarField> nu() const
93  {
94  return viscosity_.nu();
95  }
96 
97  //- Return the laminar viscosity for patch
98  virtual tmp<scalarField> nu(const label patchi) const
99  {
100  return viscosity_.nu(patchi);
101  }
102 
103  //- Correct the laminar viscosity
104  virtual void correct()
105  {}
106 
107 
108  // Member Operators
109 
110  //- Disallow default bitwise assignment
111  void operator=(const Newtonian&) = delete;
112 };
113 
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 
117 } // End namespace generalisedNewtonianViscosityModels
118 } // End namespace laminarModels
119 } // End namespace Foam
120 
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 
123 #endif
124 
125 // ************************************************************************* //
Generic GeometricField class.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
An abstract base class for generalised Newtonian viscosity models.
const viscosity & viscosity_
Reference to the fluid Newtonian viscosity.
Newtonian viscosity model which returns the fluid Newtonian viscosity.
virtual bool read(const dictionary &viscosityProperties)
Read transportProperties dictionary.
virtual tmp< volScalarField > nu() const
Return the laminar viscosity.
void operator=(const Newtonian &)=delete
Disallow default bitwise assignment.
Newtonian(const dictionary &viscosityProperties, const viscosity &viscosity, const volVectorField &U)
Construct from components.
A class for managing temporary objects.
Definition: tmp.H:55
Abstract base class for all fluid physical properties.
Definition: viscosity.H:50
virtual tmp< volScalarField > nu() const =0
Return the laminar viscosity.
label patchi
U
Definition: pEqn.H:72
Namespace for OpenFOAM.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59