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 \c U to enable actuator disk models with radial thrust
35  distribution for aero/hydro thrust loading of horizontal axis turbines
36  on surrounding flow field in terms of energy conversion processes.
37 
38  Corrections applied to:
39  \verbatim
40  U | Velocity [m/s]
41  \endverbatim
42 
43  Required fields:
44  \verbatim
45  U | Velocity [m/s]
46  \endverbatim
47 
48  Thrust, which is computed by \link actuationDiskSource.H \endlink is
49  distributed as a function of actuator disk radius through a given forth
50  order polynomial function:
51 
52  \f[
53  T(r) = T (C_0 + C_1 r^2 + C_2 r^4)
54  \f]
55  where
56  \vartable
57  T | Thrust magnitude computed by actuationDiskSource setup
58  T(r) | Thrust magnitude as a function of "r"
59  r | Local actuator disk radius
60  C_* | Polynomial coefficients
61  \endvartable
62 
63 Usage
64  Example by using \c constant/fvOptions:
65  \verbatim
66  radialActuationDiskSource1
67  {
68  // Mandatory entries (unmodifiable)
69  type radialActuationDiskSource;
70  coeffs (0.1 0.5 0.01);
71 
72  // Mandatory and optional (inherited) entries
73  ...
74  }
75  \endverbatim
76 
77  where the entries mean:
78  \table
79  Property | Description | Type | Req'd | Dflt
80  type | Type name: radialActuationDiskSource | word | yes | -
81  coeffs | Radial distribution function coefficients | vector | yes | -
82  \endtable
83 
84  The inherited entries are elaborated in:
85  - \link fvOption.H \endlink
86  - \link cellSetOption.H \endlink
87  - \link writeFile.H \endlink
88  - \link Function1.H \endlink
89  - \link actuationDiskSource.H \endlink
90 
91 Note
92  - \c radialActuationDiskSource computes only \c Froude force computation
93  method of \c actuationDiskSource.
94 
95 SourceFiles
96  radialActuationDiskSource.C
97  radialActuationDiskSourceTemplates.C
98 
99 \*---------------------------------------------------------------------------*/
100 
101 #ifndef radialActuationDiskSource_H
102 #define radialActuationDiskSource_H
103 
104 #include "actuationDiskSource.H"
105 #include "FixedList.H"
106 
107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108 
109 namespace Foam
110 {
111 namespace fv
112 {
113 
114 /*---------------------------------------------------------------------------*\
115  Class radialActuationDiskSource Declaration
116 \*---------------------------------------------------------------------------*/
117 
118 class radialActuationDiskSource
119 :
120  public actuationDiskSource
121 {
122  // Private Data
123 
124  //- Coefficients for the radial distribution
125  FixedList<scalar, 3> radialCoeffs_;
126 
127 
128  // Private Member Functions
129 
130  //- Add resistance to the UEqn
131  template<class RhoFieldType>
132  void addRadialActuationDiskAxialInertialResistance
133  (
134  vectorField& Usource,
135  const labelList& cells,
136  const scalarField& V,
137  const RhoFieldType& rho,
138  const vectorField& U
139  );
140 
141 
142 public:
143 
144  //- Runtime type information
145  TypeName("radialActuationDiskSource");
146 
147 
148  // Constructors
149 
150  //- Construct from components
152  (
153  const word& name,
154  const word& modelType,
155  const dictionary& dict,
156  const fvMesh& mesh
157  );
158 
159  //- No copy construct
161 
162  //- No copy assignment
163  void operator=(const radialActuationDiskSource&) = delete;
164 
165 
166  //- Destructor
167  virtual ~radialActuationDiskSource() = default;
168 
169 
170  // Member Functions
171 
172  //- Source term to momentum equation
173  virtual void addSup
174  (
175  fvMatrix<vector>& eqn,
176  const label fieldi
177  );
178 
179  //- Source term to compressible momentum equation
180  virtual void addSup
181  (
182  const volScalarField& rho,
183  fvMatrix<vector>& eqn,
184  const label fieldi
185  );
186 
187 
188  //- Read dictionary
189  virtual bool read(const dictionary& dict);
190 };
191 
192 
193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194 
195 } // End namespace fv
196 } // End namespace Foam
197 
198 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 
200 #ifdef NoRepository
202 #endif
203 
204 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
205 
206 #endif
207 
208 // ************************************************************************* //
Foam::labelList
List< label > labelList
A List of labels.
Definition: List.H:71
Foam::scalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Definition: primitiveFieldsFwd.H:52
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::fv::radialActuationDiskSource::read
virtual bool read(const dictionary &dict)
Read dictionary.
Definition: radialActuationDiskSource.C:112
Foam::fv::option::name
const word & name() const
Return const access to the source name.
Definition: fvOptionI.H:30
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:69
rho
rho
Definition: readInitialConditions.H:88
Foam::fv::radialActuationDiskSource
Applies sources on U to enable actuator disk models with radial thrust distribution for aero/hydro th...
Definition: radialActuationDiskSource.H:151
Foam::fv::cellSetOption::cells
const labelList & cells() const
Return const access to the cell set.
Definition: cellSetOptionI.H:75
Foam::vectorField
Field< vector > vectorField
Specialisation of Field<T> for vector.
Definition: primitiveFieldsFwd.H:54
radialActuationDiskSourceTemplates.C
Foam::fv::actuationDiskSource
Applies sources on velocity, i.e. U, to enable actuator disk models for aero/hydro thrust loading of ...
Definition: actuationDiskSource.H:368
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:121
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:84
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
fv
labelList fv(nPoints)
U
U
Definition: pEqn.H:72
Foam::fv::radialActuationDiskSource::addSup
virtual void addSup(fvMatrix< vector > &eqn, const label fieldi)
Source term to momentum equation.
Definition: radialActuationDiskSource.C:64
Foam::List< label >
Foam::FixedList< scalar, 3 >
Foam::fv::option::mesh
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvOptionI.H:36
Foam::fvMatrix
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Definition: fvPatchField.H:76
Foam::fv::radialActuationDiskSource::~radialActuationDiskSource
virtual ~radialActuationDiskSource()=default
Destructor.
FixedList.H
Foam::GeometricField< scalar, fvPatchField, volMesh >
actuationDiskSource.H