tabulatedAccelerationSource.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::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  tabulatedAccelerationSourceCoeffs
39  {
40  timeDataFileName "constant/acceleration-terms.dat";
41  }
42  }
43  \endverbatim
44 
45 
46 SourceFiles
47  tabulatedAccelerationSource.C
48 
49 \*---------------------------------------------------------------------------*/
50 
51 #ifndef tabulatedAccelerationSource_H
52 #define tabulatedAccelerationSource_H
53 
54 #include "fvOption.H"
56 #include "dimensionedTypes.H"
57 
58 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
59 
60 namespace Foam
61 {
62 namespace fv
63 {
64 
65 /*---------------------------------------------------------------------------*\
66  Class tabulatedAccelerationSource Declaration
67 \*---------------------------------------------------------------------------*/
68 
70 :
71  public option
72 {
73 
74 protected:
75 
76  // Protected data
77 
78  //- Run-time selectable acceleration model
80 
81  //- Velocity field name, default = U
82  word UName_;
83 
85 
86 private:
87 
88  // Private Member Functions
89 
90  //- Disallow default bitwise copy construct
92 
93  //- Disallow default bitwise assignment
94  void operator=(const tabulatedAccelerationSource&);
95 
96 
97  //- Source term to momentum equation
98  template<class RhoFieldType>
99  void addSup
100  (
101  const RhoFieldType& rho,
102  fvMatrix<vector>& eqn,
103  const label fieldi
104  );
105 
106 
107 public:
108 
109  //- Runtime type information
110  TypeName("tabulatedAccelerationSource");
111 
112 
113  // Constructors
114 
115  //- Construct from components
117  (
118  const word& name,
119  const word& modelType,
120  const dictionary& dict,
121  const fvMesh& mesh
122  );
123 
124 
125  //- Destructor
127  {}
128 
129 
130  // Member Functions
131 
132  //- Source term to momentum equation
133  virtual void addSup
134  (
135  fvMatrix<vector>& eqn,
136  const label fieldi
137  );
138 
139  //- Source term to compressible momentum equation
140  virtual void addSup
141  (
142  const volScalarField& rho,
143  fvMatrix<vector>& eqn,
144  const label fieldi
145  );
146 
147  //- Read dictionary
148  virtual bool read(const dictionary& dict);
149 };
150 
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 } // End namespace fv
155 } // End namespace Foam
156 
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 
159 #ifdef NoRepository
161 #endif
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 #endif
166 
167 // ************************************************************************* //
const word & name() const
Return const access to the source name.
Definition: fvOptionI.H:28
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
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:71
tabulated6DoFAcceleration motion_
Run-time selectable acceleration model.
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
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.