viscosityModel.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-2018 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::kineticTheoryModels::viscosityModel
29 
30 Description
31 
32 SourceFiles
33  viscosityModel.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef viscosityModel_H
38 #define viscosityModel_H
39 
40 #include "dictionary.H"
41 #include "volFields.H"
42 #include "dimensionedTypes.H"
43 #include "runTimeSelectionTables.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 namespace kineticTheoryModels
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class viscosityModel Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 class viscosityModel
57 {
58 protected:
59 
60  // Protected Data
61 
62  const dictionary& dict_;
63 
64 
65 public:
66 
67  //- Runtime type information
68  TypeName("viscosityModel");
69 
70  // Declare runtime constructor selection table
72  (
73  autoPtr,
75  dictionary,
76  (
77  const dictionary& dict
78  ),
79  (dict)
80  );
81 
82 
83  // Constructors
84 
85  //- Construct from components
86  explicit viscosityModel(const dictionary& dict);
87 
88 
89  // Selectors
90 
92  (
93  const dictionary& dict
94  );
95 
96 
97  //- Destructor
98  virtual ~viscosityModel() = default;
99 
100 
101  // Member Functions
102 
103  virtual tmp<volScalarField> nu
104  (
105  const volScalarField& alpha1,
106  const volScalarField& Theta,
107  const volScalarField& g0,
108  const volScalarField& rho1,
109  const volScalarField& da,
110  const dimensionedScalar& e
111  ) const = 0;
112 
113  virtual bool read()
114  {
115  return true;
116  }
117 };
118 
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 } // End namespace kineticTheoryModels
123 } // End namespace Foam
124 
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 
127 #endif
128 
129 // ************************************************************************* //
volFields.H
Foam::kineticTheoryModels::viscosityModel::~viscosityModel
virtual ~viscosityModel()=default
Destructor.
Foam::kineticTheoryModels::viscosityModel::read
virtual bool read()
Definition: viscosityModel.H:112
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::kineticTheoryModels::viscosityModel::nu
virtual tmp< volScalarField > nu(const volScalarField &alpha1, const volScalarField &Theta, const volScalarField &g0, const volScalarField &rho1, const volScalarField &da, const dimensionedScalar &e) const =0
Foam::kineticTheoryModels::viscosityModel
Definition: viscosityModel.H:55
alpha1
const volScalarField & alpha1
Definition: setRegionFluidFields.H:8
Foam::kineticTheoryModels::viscosityModel::TypeName
TypeName("viscosityModel")
Runtime type information.
Foam::kineticTheoryModels::viscosityModel::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, viscosityModel, dictionary,(const dictionary &dict),(dict))
rho1
volScalarField & rho1
Definition: setRegionFluidFields.H:27
dict
dictionary dict
Definition: searchingEngine.H:14
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::kineticTheoryModels::viscosityModel::dict_
const dictionary & dict_
Definition: viscosityModel.H:61
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::kineticTheoryModels::viscosityModel::New
static autoPtr< viscosityModel > New(const dictionary &dict)
Definition: viscosityModel.C:58
Foam::constant::electromagnetic::e
const dimensionedScalar e
Elementary charge.
Definition: createFields.H:11
dictionary.H
dimensionedTypes.H
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::kineticTheoryModels::viscosityModel::viscosityModel
viscosityModel(const dictionary &dict)
Construct from components.
Definition: viscosityModel.C:46