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