granularPressureModel.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) 2011-2018 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::kineticTheoryModels::granularPressureModel
26 
27 SourceFiles
28  granularPressureModel.C
29 
30 \*---------------------------------------------------------------------------*/
31 
32 #ifndef granularPressureModel_H
33 #define granularPressureModel_H
34 
35 #include "dictionary.H"
36 #include "volFields.H"
37 #include "dimensionedTypes.H"
38 #include "runTimeSelectionTables.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 namespace kineticTheoryModels
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class granularPressureModel Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 class granularPressureModel
52 {
53  // Private member functions
54 
55  //- Disallow default bitwise copy construct
56  granularPressureModel(const granularPressureModel&);
57 
58  //- Disallow default bitwise assignment
59  void operator=(const granularPressureModel&);
60 
61 
62 protected:
63 
64  // Protected data
65 
66  const dictionary& dict_;
67 
68 
69 public:
70 
71  //- Runtime type information
72  TypeName("granularPressureModel");
73 
74  // Declare runtime constructor selection table
76  (
77  autoPtr,
78  granularPressureModel,
79  dictionary,
80  (
81  const dictionary& dict
82  ),
83  (dict)
84  );
85 
86 
87  // Constructors
88 
89  //- Construct from components
90  granularPressureModel(const dictionary& dict);
91 
92 
93  // Selectors
94 
95  static autoPtr<granularPressureModel> New
96  (
97  const dictionary& dict
98  );
99 
100 
101  //- Destructor
102  virtual ~granularPressureModel();
103 
104 
105  // Member Functions
106 
107  //- Granular pressure coefficient
108  virtual tmp<volScalarField> granularPressureCoeff
109  (
110  const volScalarField& alpha1,
111  const volScalarField& g0,
112  const volScalarField& rho1,
113  const dimensionedScalar& e
114  ) const = 0;
115 
116  //- Derivative of the granular pressure coefficient
117  virtual tmp<volScalarField> granularPressureCoeffPrime
118  (
119  const volScalarField& alpha1,
120  const volScalarField& g0,
121  const volScalarField& g0prime,
122  const volScalarField& rho1,
123  const dimensionedScalar& e
124  ) const = 0;
126  virtual bool read()
127  {
128  return true;
129  }
130 };
131 
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 } // End namespace kineticTheoryModels
136 } // End namespace Foam
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 #endif
141 
142 // ************************************************************************* //
dictionary dict
declareRunTimeSelectionTable(autoPtr, granularPressureModel, dictionary,(const dictionary &dict),(dict))
virtual tmp< volScalarField > granularPressureCoeffPrime(const volScalarField &alpha1, const volScalarField &g0, const volScalarField &g0prime, const volScalarField &rho1, const dimensionedScalar &e) const =0
Derivative of the granular pressure coefficient.
TypeName("granularPressureModel")
Runtime type information.
virtual tmp< volScalarField > granularPressureCoeff(const volScalarField &alpha1, const volScalarField &g0, const volScalarField &rho1, const dimensionedScalar &e) const =0
Granular pressure coefficient.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
const volScalarField & alpha1
static autoPtr< granularPressureModel > New(const dictionary &dict)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const doubleScalar e
Elementary charge.
Definition: doubleScalar.H:98
Macros to ease declaration of run-time selection tables.
const dimensionedScalar & rho1
Definition: createFields.H:39
Namespace for OpenFOAM.