buoyancyForce.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-2017 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::buoyancyForce
26 
27 Description
28  Calculates and applies the buoyancy force rho*g to the momentum equation
29  corresponding to the specified velocity field.
30 
31 Usage
32  Example usage:
33  \verbatim
34  fields (U); // Name of velocity field
35  \endverbatim
36 
37 SourceFiles
38  buoyancyForce.C
39 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef buoyancyForce_H
43 #define buoyancyForce_H
44 
45 #include "fvOption.H"
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 namespace Foam
51 {
52 namespace fv
53 {
54 
55 /*---------------------------------------------------------------------------*\
56  Class buoyancyForce Declaration
57 \*---------------------------------------------------------------------------*/
58 
59 class buoyancyForce
60 :
61  public option
62 {
63  // Private data
64 
66 
67 
68  // Private Member Functions
69 
70  //- Disallow default bitwise copy construct
72 
73  //- Disallow default bitwise assignment
74  void operator=(const buoyancyForce&);
75 
76 
77 public:
78 
79  //- Runtime type information
80  TypeName("buoyancyForce");
81 
82 
83  // Constructors
84 
85  //- Construct from explicit source name and mesh
87  (
88  const word& sourceName,
89  const word& modelType,
90  const dictionary& dict,
91  const fvMesh& mesh
92  );
93 
94 
95  // Member Functions
96 
97  // Evaluate
98 
99  //- Add explicit contribution to compressible momentum equation
100  virtual void addSup
101  (
102  const volScalarField& rho,
103  fvMatrix<vector>& eqn,
104  const label fieldi
105  );
106 
107 
108  // IO
109 
110  //- Read source dictionary
111  virtual bool read(const dictionary& dict);
112 };
113 
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 
117 } // End namespace fv
118 } // End namespace Foam
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 #endif
123 
124 // ************************************************************************* //
TypeName("buoyancyForce")
Runtime type information.
Calculates and applies the buoyancy force rho*g to the momentum equation corresponding to the specifi...
Definition: buoyancyForce.H:58
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
virtual bool read(const dictionary &dict)
Read source dictionary.
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvOptionI.H:34
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:72
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
virtual void addSup(const volScalarField &rho, fvMatrix< vector > &eqn, const label fieldi)
Add explicit contribution to compressible momentum equation.
Definition: buoyancyForce.C:86
Namespace for OpenFOAM.
Finite volume options abstract base class. Provides a base set of controls, e.g.: ...
Definition: fvOption.H:66