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