buoyancyForce.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2015-2019 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 public:
69 
70  //- Runtime type information
71  TypeName("buoyancyForce");
72 
73 
74  // Constructors
75 
76  //- Construct from explicit source name and mesh
78  (
79  const word& sourceName,
80  const word& modelType,
81  const dictionary& dict,
82  const fvMesh& mesh
83  );
84 
85  //- Disallow default bitwise copy construction
86  buoyancyForce(const buoyancyForce&) = delete;
87 
88 
89  // Member Functions
90 
91  // Evaluate
92 
93  //- Add explicit contribution to incompressible momentum equation
94  virtual void addSup
95  (
96  fvMatrix<vector>& eqn,
97  const label fieldi
98  );
99 
100  //- Add explicit contribution to compressible momentum equation
101  virtual void addSup
102  (
103  const volScalarField& rho,
104  fvMatrix<vector>& eqn,
105  const label fieldi
106  );
107 
108 
109  // IO
110 
111  //- Read source dictionary
112  virtual bool read(const dictionary& dict);
113 
114 
115  // Member Operators
116 
117  //- Disallow default bitwise assignment
118  void operator=(const buoyancyForce&) = delete;
119 };
120 
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 } // End namespace fv
125 } // End namespace Foam
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 #endif
130 
131 // ************************************************************************* //
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:158
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)
void operator=(const buoyancyForce &)=delete
Disallow default bitwise assignment.
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
buoyancyForce(const word &sourceName, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from explicit source name and mesh.
Definition: buoyancyForce.C:51
virtual void addSup(fvMatrix< vector > &eqn, const label fieldi)
Add explicit contribution to incompressible momentum equation.
Definition: buoyancyForce.C:86
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
Namespace for OpenFOAM.
Finite volume options abstract base class. Provides a base set of controls, e.g.: ...
Definition: fvOption.H:66