tabulatedAccelerationSource.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::tabulatedAccelerationSource
26 
27 Description
28  Solid-body 6-DoF acceleration source
29 
30 Usage
31  Example usage:
32  \verbatim
33  SBM
34  {
35  type tabulatedAccelerationSource;
36  active yes;
37 
38  timeDataFileName "constant/acceleration-terms.dat";
39  }
40  \endverbatim
41 
42 SourceFiles
43  tabulatedAccelerationSource.C
44 
45 \*---------------------------------------------------------------------------*/
46 
47 #ifndef tabulatedAccelerationSource_H
48 #define tabulatedAccelerationSource_H
49 
50 #include "fvOption.H"
52 #include "dimensionedTypes.H"
53 
54 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 
56 namespace Foam
57 {
58 namespace fv
59 {
60 
61 /*---------------------------------------------------------------------------*\
62  Class tabulatedAccelerationSource Declaration
63 \*---------------------------------------------------------------------------*/
64 
66 :
67  public option
68 {
69 
70 protected:
71 
72  // Protected data
73 
74  //- Run-time selectable acceleration model
76 
77  //- Velocity field name, default = U
78  word UName_;
79 
81 
82 private:
83 
84  // Private Member Functions
85 
86  //- Source term to momentum equation
87  template<class RhoFieldType>
88  void addSup
89  (
90  const RhoFieldType& rho,
91  fvMatrix<vector>& eqn,
92  const label fieldi
93  );
94 
95 
96 public:
97 
98  //- Runtime type information
99  TypeName("tabulatedAccelerationSource");
100 
101 
102  // Constructors
103 
104  //- Construct from components
106  (
107  const word& name,
108  const word& modelType,
109  const dictionary& dict,
110  const fvMesh& mesh
111  );
112 
113  //- Disallow default bitwise copy construction
115  (
117  ) = delete;
118 
119 
120  //- Destructor
122  {}
123 
124 
125  // Member Functions
126 
127  //- Source term to momentum equation
128  virtual void addSup
129  (
130  fvMatrix<vector>& eqn,
131  const label fieldi
132  );
133 
134  //- Source term to compressible momentum equation
135  virtual void addSup
136  (
137  const volScalarField& rho,
138  fvMatrix<vector>& eqn,
139  const label fieldi
140  );
141 
142  //- Read dictionary
143  virtual bool read(const dictionary& dict);
144 
145 
146  // Member Operators
147 
148  //- Disallow default bitwise assignment
149  void operator=(const tabulatedAccelerationSource&) = delete;
150 };
151 
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 
155 } // End namespace fv
156 } // End namespace Foam
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 #ifdef NoRepository
162 #endif
163 
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 
166 #endif
167 
168 // ************************************************************************* //
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
tabulatedAccelerationSource(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from components.
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvOptionI.H:34
word UName_
Velocity field name, default = U.
Tabulated 6DoF acceleration.
A class for handling words, derived from string.
Definition: word.H:59
labelList fv(nPoints)
TypeName("tabulatedAccelerationSource")
Runtime type information.
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
const word & name() const
Return const access to the source name.
Definition: fvOptionI.H:28
tabulated6DoFAcceleration motion_
Run-time selectable acceleration model.
void operator=(const tabulatedAccelerationSource &)=delete
Disallow default bitwise assignment.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
Solid-body 6-DoF acceleration source.
Namespace for OpenFOAM.
Finite volume options abstract base class. Provides a base set of controls, e.g.: ...
Definition: fvOption.H:66
virtual bool read(const dictionary &dict)
Read dictionary.