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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2015-2017 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::fv::buoyancyEnergy
28 
29 Group
30  grpFvOptionsSources
31 
32 Description
33  Calculates and applies the buoyancy energy source rho*(U&g) to the energy
34  equation.
35 
36 Usage
37  Example usage:
38  \verbatim
39  fields (h); // Name of energy field
40  \endverbatim
41 
42 SourceFiles
43  buoyancyEnergy.C
44 
45 \*---------------------------------------------------------------------------*/
46 
47 #ifndef buoyancyEnergy_H
48 #define buoyancyEnergy_H
49 
50 #include "fvOption.H"
52 
53 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54 
55 namespace Foam
56 {
57 namespace fv
58 {
59 
60 /*---------------------------------------------------------------------------*\
61  Class buoyancyEnergy Declaration
62 \*---------------------------------------------------------------------------*/
63 
64 class buoyancyEnergy
65 :
66  public option
67 {
68  // Private data
69 
70  //- Name of velocity field; default = U
71  word UName_;
72 
73 
74  // Private Member Functions
75 
76  //- No copy construct
77  buoyancyEnergy(const buoyancyEnergy&) = delete;
78 
79  //- No copy assignment
80  void operator=(const buoyancyEnergy&) = delete;
81 
82 
83 public:
84 
85  //- Runtime type information
86  TypeName("buoyancyEnergy");
87 
88 
89  // Constructors
90 
91  //- Construct from explicit source name and mesh
93  (
94  const word& sourceName,
95  const word& modelType,
96  const dictionary& dict,
97  const fvMesh& mesh
98  );
99 
100 
101  // Member Functions
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  //- Read source dictionary
113  virtual bool read(const dictionary& dict);
114 };
115 
116 
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118 
119 } // End namespace fv
120 } // End namespace Foam
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 #endif
125 
126 // ************************************************************************* //
Foam::fv::buoyancyEnergy::addSup
virtual void addSup(const volScalarField &rho, fvMatrix< scalar > &eqn, const label fieldi)
Add explicit contribution to compressible momentum equation.
Definition: buoyancyEnergy.C:80
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::fv::buoyancyEnergy::read
virtual bool read(const dictionary &dict)
Read source dictionary.
Definition: buoyancyEnergy.C:95
Foam::fv::buoyancyEnergy
Calculates and applies the buoyancy energy source rho*(U&g) to the energy equation.
Definition: buoyancyEnergy.H:63
rho
rho
Definition: readInitialConditions.H:88
Foam::fv::option
Finite volume options abstract base class. Provides a base set of controls, e.g.:
Definition: fvOption.H:69
Foam::fv::buoyancyEnergy::TypeName
TypeName("buoyancyEnergy")
Runtime type information.
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:121
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:84
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
fv
labelList fv(nPoints)
uniformDimensionedFields.H
fvOption.H
Foam::fv::option::mesh
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvOptionI.H:36
Foam::fvMatrix
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Definition: fvPatchField.H:76
Foam::GeometricField< scalar, fvPatchField, volMesh >