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-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::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  buoyancyForceCoeffs
35  {
36  fields (U); // Name of velocity field
37  }
38  \endverbatim
39 
40 SourceFiles
41  buoyancyForce.C
42 
43 \*---------------------------------------------------------------------------*/
44 
45 #ifndef buoyancyForce_H
46 #define buoyancyForce_H
47 
48 #include "fvOption.H"
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 namespace Foam
54 {
55 namespace fv
56 {
57 
58 /*---------------------------------------------------------------------------*\
59  Class buoyancyForce Declaration
60 \*---------------------------------------------------------------------------*/
61 
62 class buoyancyForce
63 :
64  public option
65 {
66  // Private data
67 
69 
70 
71  // Private Member Functions
72 
73  //- Disallow default bitwise copy construct
75 
76  //- Disallow default bitwise assignment
77  void operator=(const buoyancyForce&);
78 
79 
80 public:
81 
82  //- Runtime type information
83  TypeName("buoyancyForce");
84 
85 
86  // Constructors
87 
88  //- Construct from explicit source name and mesh
90  (
91  const word& sourceName,
92  const word& modelType,
93  const dictionary& dict,
94  const fvMesh& mesh
95  );
96 
97 
98  // Member Functions
99 
100  // Evaluate
101 
102  //- Add explicit contribution to compressible momentum equation
103  virtual void addSup
104  (
105  const volScalarField& rho,
106  fvMatrix<vector>& eqn,
107  const label fieldi
108  );
109 
110 
111  // IO
112 
113  //- Read source dictionary
114  virtual bool read(const dictionary& dict);
115 };
116 
117 
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
120 } // End namespace fv
121 } // End namespace Foam
122 
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 
125 #endif
126 
127 // ************************************************************************* //
TypeName("buoyancyForce")
Runtime type information.
Calculates and applies the buoyancy force rho*g to the momentum equation corresponding to the specifi...
Definition: buoyancyForce.H:61
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.
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 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