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