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-2018 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  //- Disallow default bitwise copy construct
88 
89  //- Disallow default bitwise assignment
90  void operator=(const tabulatedAccelerationSource&);
91 
92 
93  //- Source term to momentum equation
94  template<class RhoFieldType>
95  void addSup
96  (
97  const RhoFieldType& rho,
98  fvMatrix<vector>& eqn,
99  const label fieldi
100  );
101 
102 
103 public:
104 
105  //- Runtime type information
106  TypeName("tabulatedAccelerationSource");
107 
108 
109  // Constructors
110 
111  //- Construct from components
113  (
114  const word& name,
115  const word& modelType,
116  const dictionary& dict,
117  const fvMesh& mesh
118  );
119 
120 
121  //- Destructor
123  {}
124 
125 
126  // Member Functions
127 
128  //- Source term to momentum equation
129  virtual void addSup
130  (
131  fvMatrix<vector>& eqn,
132  const label fieldi
133  );
134 
135  //- Source term to compressible momentum equation
136  virtual void addSup
137  (
138  const volScalarField& rho,
139  fvMatrix<vector>& eqn,
140  const label fieldi
141  );
142 
143  //- Read dictionary
144  virtual bool read(const dictionary& dict);
145 };
146 
147 
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 
150 } // End namespace fv
151 } // End namespace Foam
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 
155 #ifdef NoRepository
157 #endif
158 
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 
161 #endif
162 
163 // ************************************************************************* //
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
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.
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.