buoyancyEnergy.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 | Copyright (C) 2015-2016 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::fv::buoyancyEnergy
26 
27 Description
28  Calculates and applies the buoyancy energy source rho*(U&g) to the energy
29  equation.
30 
31 Usage
32  Example usage:
33  \verbatim
34  buoyancyEnergyCoeffs
35  {
36  fields (h); // Name of energy field
37  }
38  \endverbatim
39 
40 SourceFiles
41  buoyancyEnergy.C
42 
43 \*---------------------------------------------------------------------------*/
44 
45 #ifndef buoyancyEnergy_H
46 #define buoyancyEnergy_H
47 
48 #include "fvOption.H"
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 namespace Foam
54 {
55 namespace fv
56 {
57 
58 /*---------------------------------------------------------------------------*\
59  Class buoyancyEnergy Declaration
60 \*---------------------------------------------------------------------------*/
61 
62 class buoyancyEnergy
63 :
64  public option
65 {
66  // Private data
67 
68  //- Name of velocity field; default = U
69  word UName_;
70 
71 
72  // Private Member Functions
73 
74  //- Disallow default bitwise copy construct
76 
77  //- Disallow default bitwise assignment
78  void operator=(const buoyancyEnergy&);
79 
80 
81 public:
82 
83  //- Runtime type information
84  TypeName("buoyancyEnergy");
85 
86 
87  // Constructors
88 
89  //- Construct from explicit source name and mesh
91  (
92  const word& sourceName,
93  const word& modelType,
94  const dictionary& dict,
95  const fvMesh& mesh
96  );
97 
98 
99  // Member Functions
100 
101  // Evaluate
102 
103  //- Add explicit contribution to compressible momentum equation
104  virtual void addSup
105  (
106  const volScalarField& rho,
107  fvMatrix<scalar>& eqn,
108  const label fieldi
109  );
110 
111 
112  // IO
113 
114  //- Read source dictionary
115  virtual bool read(const dictionary& dict);
116 };
117 
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 } // End namespace fv
122 } // End namespace Foam
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 #endif
127 
128 // ************************************************************************* //
dictionary dict
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
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
Calculates and applies the buoyancy energy source rho*(U&g) to the energy equation.
TypeName("buoyancyEnergy")
Runtime type information.
virtual void addSup(const volScalarField &rho, fvMatrix< scalar > &eqn, const label fieldi)
Add explicit contribution to compressible momentum equation.
A class for handling words, derived from string.
Definition: word.H:59
labelList fv(nPoints)
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
Definition: fvPatchField.H:71
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvOptionI.H:34
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
virtual bool read(const dictionary &dict)
Read source dictionary.
Namespace for OpenFOAM.
Finite volume options abstract base class. Provides a base set of controls, e.g.: ...
Definition: fvOption.H:66