radialActuationDiskSource.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) 2011-2015 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  \heading Source usage
54 
55  Example usage:
56  \verbatim
57  actuationDiskSourceCoeffs
58  {
59  fieldName U; // name of field to apply source
60  diskDir (-1 0 0); // disk direction
61  Cp 0.1; // power coefficient
62  Ct 0.5; // thrust coefficient
63  diskArea 5.0; // disk area
64  coeffs (0.1 0.5 0.01); // radial distribution coefficients
65  upstreamPoint (0 0 0); // upstream point
66  }
67  \endverbatim
68 
69 
70 SourceFiles
71  radialActuationDiskSource.C
72  radialActuationDiskSourceTemplates.C
73 
74 \*---------------------------------------------------------------------------*/
75 
76 #ifndef radialActuationDiskSource_H
77 #define radialActuationDiskSource_H
78 
79 #include "actuationDiskSource.H"
80 #include "FixedList.H"
81 
82 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
83 
84 namespace Foam
85 {
86 namespace fv
87 {
88 
89 /*---------------------------------------------------------------------------*\
90  Class radialActuationDiskSource Declaration
91 \*---------------------------------------------------------------------------*/
92 
93 class radialActuationDiskSource
94 :
95  public actuationDiskSource
96 {
97  // Private data
98 
99  //- Coeffcients for the radial distribution
100  FixedList<scalar, 3> radialCoeffs_;
101 
102 
103  // Private Member Functions
104 
105  //- Add resistance to the UEqn
106  template<class RhoFieldType>
108  (
109  vectorField& Usource,
110  const labelList& cells,
111  const scalarField& V,
112  const RhoFieldType& rho,
113  const vectorField& U
114  ) const;
115 
116  //- Disallow default bitwise copy construct
118 
119  //- Disallow default bitwise assignment
121 
122 
123 public:
124 
125  //- Runtime type information
126  TypeName("radialActuationDiskSource");
127 
128 
129  // Constructors
130 
131  //- Construct from components
133  (
134  const word& name,
135  const word& modelType,
136  const dictionary& dict,
137  const fvMesh& mesh
138  );
139 
140 
141  //- Destructor
143  {}
144 
145 
146  // Member Functions
147 
148  //- Source term to momentum equation
149  virtual void addSup
150  (
151  fvMatrix<vector>& eqn,
152  const label fieldI
153  );
154 
155  //- Source term to compressible momentum equation
156  virtual void addSup
157  (
158  const volScalarField& rho,
159  fvMatrix<vector>& eqn,
160  const label fieldI
161  );
162 
163 
164  // IO
165 
166  //- Read dictionary
167  virtual bool read(const dictionary& dict);
168 };
169 
170 
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 
173 } // End namespace fv
174 } // End namespace Foam
175 
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177 
178 #ifdef NoRepository
180 #endif
181 
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183 
184 #endif
185 
186 // ************************************************************************* //
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::fv::radialActuationDiskSource::read
virtual bool read(const dictionary &dict)
Read dictionary.
Definition: radialActuationDiskSource.C:114
Foam::fv::option::name
const word & name() const
Return const access to the source name.
Definition: fvOptionI.H:28
Foam::fv::radialActuationDiskSource::radialActuationDiskSource
radialActuationDiskSource(const radialActuationDiskSource &)
Disallow default bitwise copy construct.
Foam::fv::radialActuationDiskSource::TypeName
TypeName("radialActuationDiskSource")
Runtime type information.
Foam::fv::cellSetOption::V
scalar V() const
Return const access to the total cell volume.
Definition: cellSetOptionI.H:67
Foam::fv::radialActuationDiskSource
Actuation disk source including radial thrust.
Definition: radialActuationDiskSource.H:108
Foam::fv::cellSetOption::cells
const labelList & cells() const
Return const access to the cell set.
Definition: cellSetOptionI.H:73
U
U
Definition: pEqn.H:46
Foam::label
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
radialActuationDiskSourceTemplates.C
Foam::fv::actuationDiskSource
Actuation disk source.
Definition: actuationDiskSource.H:100
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::fv::radialActuationDiskSource::~radialActuationDiskSource
virtual ~radialActuationDiskSource()
Destructor.
Definition: radialActuationDiskSource.H:157
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::fv::radialActuationDiskSource::radialCoeffs_
FixedList< scalar, 3 > radialCoeffs_
Coeffcients for the radial distribution.
Definition: radialActuationDiskSource.H:115
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
rho
rho
Definition: pEqn.H:3
fv
labelList fv(nPoints)
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::FixedList< scalar, 3 >
Foam::fv::radialActuationDiskSource::addSup
virtual void addSup(fvMatrix< vector > &eqn, const label fieldI)
Source term to momentum equation.
Definition: radialActuationDiskSource.C:66
Foam::fv::option::mesh
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvOptionI.H:34
Foam::fv::radialActuationDiskSource::operator=
void operator=(const radialActuationDiskSource &)
Disallow default bitwise assignment.
Foam::fvMatrix
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Definition: fvPatchField.H:68
FixedList.H
Foam::GeometricField
Generic GeometricField class.
Definition: surfaceFieldsFwd.H:52
actuationDiskSource.H
Foam::fv::radialActuationDiskSource::addRadialActuationDiskAxialInertialResistance
void addRadialActuationDiskAxialInertialResistance(vectorField &Usource, const labelList &cells, const scalarField &V, const RhoFieldType &rho, const vectorField &U) const
Add resistance to the UEqn.
Definition: radialActuationDiskSourceTemplates.C:37