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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2017 OpenFOAM Foundation
9  Copyright (C) 2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::fv::radialActuationDiskSource
29 
30 Group
31  grpFvOptionsSources
32 
33 Description
34  Applies sources on velocity field (i.e. \c U) within a specified region
35  to enable actuator disk models with radial thrust distribution for
36  aero/hydro thrust loading of horizontal axis turbines on surrounding
37  flow field in terms of energy conversion processes.
38 
39  Sources applied to:
40  \verbatim
41  U | Velocity [m/s]
42  \endverbatim
43 
44  Required fields:
45  \verbatim
46  U | Velocity [m/s]
47  \endverbatim
48 
49  Thrust, which is computed by \link actuationDiskSource.H \endlink is
50  distributed as a function of actuator disk radius through a given forth
51  order polynomial function:
52 
53  \f[
54  T(r) = T (C_0 + C_1 r^2 + C_2 r^4)
55  \f]
56  where
57  \vartable
58  T | Thrust magnitude computed by actuationDiskSource setup
59  T(r) | Thrust magnitude as a function of "r"
60  r | Local actuator disk radius
61  C_* | Polynomial coefficients
62  \endvartable
63 
64 Usage
65  Minimal example by using \c constant/fvOptions:
66  \verbatim
67  radialActuationDiskSource1
68  {
69  // Mandatory entries (unmodifiable)
70  type radialActuationDiskSource;
71 
72  // Mandatory entries (runtime modifiable)
73  coeffs (0.1 0.5 0.01);
74 
75  // Mandatory/Optional (inherited) entries
76  ...
77  }
78  \endverbatim
79 
80  where the entries mean:
81  \table
82  Property | Description | Type | Reqd | Dflt
83  type | Type name: radialActuationDiskSource | word | yes | -
84  coeffs | Radial distribution function coefficients | vector | yes | -
85  \endtable
86 
87  The inherited entries are elaborated in:
88  - \link fvOption.H \endlink
89  - \link cellSetOption.H \endlink
90  - \link writeFile.H \endlink
91  - \link Function1.H \endlink
92  - \link actuationDiskSource.H \endlink
93 
94 Note
95  - \c radialActuationDiskSource computes only
96  \c Froude force computation method of \c actuationDiskSource.
97 
98 SourceFiles
99  radialActuationDiskSource.C
100  radialActuationDiskSourceTemplates.C
101 
102 \*---------------------------------------------------------------------------*/
103 
104 #ifndef radialActuationDiskSource_H
105 #define radialActuationDiskSource_H
106 
107 #include "actuationDiskSource.H"
108 #include "FixedList.H"
109 
110 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111 
112 namespace Foam
113 {
114 namespace fv
115 {
116 
117 /*---------------------------------------------------------------------------*\
118  Class radialActuationDiskSource Declaration
119 \*---------------------------------------------------------------------------*/
120 
121 class radialActuationDiskSource
122 :
123  public actuationDiskSource
124 {
125  // Private Data
126 
127  //- Coefficients for the radial distribution
128  FixedList<scalar, 3> radialCoeffs_;
129 
130 
131  // Private Member Functions
132 
133  //- Add resistance to the UEqn
134  template<class RhoFieldType>
135  void addRadialActuationDiskAxialInertialResistance
136  (
137  vectorField& Usource,
138  const labelList& cells,
139  const scalarField& V,
140  const RhoFieldType& rho,
141  const vectorField& U
142  );
143 
144 
145 public:
146 
147  //- Runtime type information
148  TypeName("radialActuationDiskSource");
149 
150 
151  // Constructors
152 
153  //- Construct from components
155  (
156  const word& name,
157  const word& modelType,
158  const dictionary& dict,
159  const fvMesh& mesh
160  );
161 
162  //- No copy construct
164 
165  //- No copy assignment
166  void operator=(const radialActuationDiskSource&) = delete;
167 
168 
169  //- Destructor
170  virtual ~radialActuationDiskSource() = default;
171 
172 
173  // Member Functions
174 
175  //- Add explicit contribution to momentum equation
176  virtual void addSup
177  (
178  fvMatrix<vector>& eqn,
179  const label fieldi
180  );
181 
182  //- Add explicit contribution to compressible momentum equation
183  virtual void addSup
184  (
185  const volScalarField& rho,
186  fvMatrix<vector>& eqn,
187  const label fieldi
188  );
189 
190 
191  //- Read source dictionary
192  virtual bool read(const dictionary& dict);
193 };
194 
195 
196 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
197 
198 } // End namespace fv
199 } // End namespace Foam
200 
201 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
202 
203 #ifdef NoRepository
205 #endif
206 
207 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
208 
209 #endif
210 
211 // ************************************************************************* //
Foam::labelList
List< label > labelList
A List of labels.
Definition: List.H:67
Foam::scalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Definition: primitiveFieldsFwd.H:52
Foam::fv::option::name
const word & name() const noexcept
Return const access to the source name.
Definition: fvOptionI.H:31
Foam::fv::cellSetOption::cells
const labelList & cells() const noexcept
Return const access to the cell selection.
Definition: cellSetOptionI.H:82
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::fv::radialActuationDiskSource::read
virtual bool read(const dictionary &dict)
Read source dictionary.
Definition: radialActuationDiskSource.C:112
Foam::fv::radialActuationDiskSource::TypeName
TypeName("radialActuationDiskSource")
Runtime type information.
rho
rho
Definition: readInitialConditions.H:88
Foam::fv::radialActuationDiskSource
Applies sources on velocity field (i.e. U) within a specified region to enable actuator disk models w...
Definition: radialActuationDiskSource.H:154
Foam::vectorField
Field< vector > vectorField
Specialisation of Field<T> for vector.
Definition: primitiveFieldsFwd.H:54
Foam::fv::cellSetOption::V
scalar V() const noexcept
Return const access to the total cell volume.
Definition: cellSetOptionI.H:76
radialActuationDiskSourceTemplates.C
Foam::fv::actuationDiskSource
Applies sources on velocity (i.e. U) within a specified region to enable actuator disk models for aer...
Definition: actuationDiskSource.H:365
Foam::Field< vector >
Foam::fv::radialActuationDiskSource::operator=
void operator=(const radialActuationDiskSource &)=delete
No copy assignment.
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:123
Foam::fv::radialActuationDiskSource::radialActuationDiskSource
radialActuationDiskSource(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from components.
Definition: radialActuationDiskSource.C:47
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
fv
labelList fv(nPoints)
U
U
Definition: pEqn.H:72
Foam::fv::option::mesh
const fvMesh & mesh() const noexcept
Return const access to the mesh database.
Definition: fvOptionI.H:37
Foam::fv::radialActuationDiskSource::addSup
virtual void addSup(fvMatrix< vector > &eqn, const label fieldi)
Add explicit contribution to momentum equation.
Definition: radialActuationDiskSource.C:64
Foam::List< label >
Foam::FixedList< scalar, 3 >
Foam::fvMatrix
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Definition: fvPatchField.H:68
Foam::fv::radialActuationDiskSource::~radialActuationDiskSource
virtual ~radialActuationDiskSource()=default
Destructor.
FixedList.H
Foam::GeometricField< scalar, fvPatchField, volMesh >
actuationDiskSource.H