radialActuationDiskSource.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) 2011-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::radialActuationDiskSource
26 
27 Description
28  Actuation disk source including radial thrust
29 
30  Constant values for momentum source for actuation disk
31  \f[
32  T = 2 \rho A U_{o}^2 a (1-a)
33  \f]
34  and
35  \f[
36  U_1 = (1 - a)U_{o}
37  \f]
38 
39  where:
40  \vartable
41  A | disk area
42  U_o | upstream velocity
43  a | 1 - Cp/Ct
44  U_1 | velocity at the disk
45  \endvartable
46 
47 
48  The thrust is distributed by a radial function:
49  \f[
50  thrust(r) = T (C_0 + C_1 r^2 + C_2 r^4)
51  \f]
52 
53 Usage
54  Example usage:
55  \verbatim
56  fieldName U; // name of field to apply source
57  diskDir (-1 0 0); // disk direction
58  Cp 0.1; // power coefficient
59  Ct 0.5; // thrust coefficient
60  diskArea 5.0; // disk area
61  coeffs (0.1 0.5 0.01); // radial distribution coefficients
62  upstreamPoint (0 0 0); // upstream point
63  \endverbatim
64 
65 
66 SourceFiles
67  radialActuationDiskSource.C
68  radialActuationDiskSourceTemplates.C
69 
70 \*---------------------------------------------------------------------------*/
71 
72 #ifndef radialActuationDiskSource_H
73 #define radialActuationDiskSource_H
74 
75 #include "actuationDiskSource.H"
76 #include "FixedList.H"
77 
78 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
79 
80 namespace Foam
81 {
82 namespace fv
83 {
84 
85 /*---------------------------------------------------------------------------*\
86  Class radialActuationDiskSource Declaration
87 \*---------------------------------------------------------------------------*/
88 
89 class radialActuationDiskSource
90 :
91  public actuationDiskSource
92 {
93  // Private Data
94 
95  //- Coefficients for the radial distribution
96  FixedList<scalar, 3> radialCoeffs_;
97 
98 
99  // Private Member Functions
100 
101  //- Add resistance to the UEqn
102  template<class RhoFieldType>
103  void addRadialActuationDiskAxialInertialResistance
104  (
105  vectorField& Usource,
106  const labelList& cells,
107  const scalarField& V,
108  const RhoFieldType& rho,
109  const vectorField& U
110  ) const;
111 
112 
113 public:
114 
115  //- Runtime type information
116  TypeName("radialActuationDiskSource");
117 
118 
119  // Constructors
120 
121  //- Construct from components
123  (
124  const word& name,
125  const word& modelType,
126  const dictionary& dict,
127  const fvMesh& mesh
128  );
129 
130  //- Disallow default bitwise copy construction
132 
133 
134  //- Destructor
136  {}
137 
138 
139  // Member Functions
140 
141  //- Source term to momentum equation
142  virtual void addSup
143  (
144  fvMatrix<vector>& eqn,
145  const label fieldi
146  );
147 
148  //- Source term to compressible momentum equation
149  virtual void addSup
150  (
151  const volScalarField& rho,
152  fvMatrix<vector>& eqn,
153  const label fieldi
154  );
155 
156 
157  // IO
158 
159  //- Read dictionary
160  virtual bool read(const dictionary& dict);
161 
162 
163  // Member Operators
164 
165  //- Disallow default bitwise assignment
166  void operator=(const radialActuationDiskSource&) = delete;
167 };
168 
169 
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 
172 } // End namespace fv
173 } // End namespace Foam
174 
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 
177 #ifdef NoRepository
179 #endif
180 
181 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 
183 #endif
184 
185 // ************************************************************************* //
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
const labelList & cells() const
Return const access to the cell set.
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvOptionI.H:34
virtual void addSup(fvMatrix< vector > &eqn, const label fieldi)
Source term to momentum equation.
scalar V() const
Return const access to the total cell volume.
radialActuationDiskSource(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from components.
Actuation disk source including radial thrust.
A class for handling words, derived from string.
Definition: word.H:59
labelList fv(nPoints)
void operator=(const radialActuationDiskSource &)=delete
Disallow default bitwise assignment.
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
virtual bool read(const dictionary &dict)
Read dictionary.
U
Definition: pEqn.H:72
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
TypeName("radialActuationDiskSource")
Runtime type information.
Namespace for OpenFOAM.