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-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::fv::radialActuationDiskSource
29
30Group
31 grpFvOptionsSources
32
33Description
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
64Usage
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
94Note
95 - \c radialActuationDiskSource computes only
96 \c Froude force computation method of \c actuationDiskSource.
97
98SourceFiles
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
112namespace Foam
113{
114namespace fv
115{
116
117/*---------------------------------------------------------------------------*\
118 Class radialActuationDiskSource Declaration
119\*---------------------------------------------------------------------------*/
120
121class 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
145public:
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 );
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// ************************************************************************* //
A 1D vector of objects of type <T> with a fixed length <N>.
Definition: FixedList.H:81
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Definition: fvMatrix.H:121
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
Applies sources on velocity (i.e. U) within a specified region to enable actuator disk models for aer...
scalar V() const noexcept
Return const access to the total cell volume.
const labelList & cells() const noexcept
Return const access to the cell selection.
const word & name() const noexcept
Return const access to the source name.
Definition: fvOptionI.H:31
const fvMesh & mesh() const noexcept
Return const access to the mesh database.
Definition: fvOptionI.H:37
Applies sources on velocity field (i.e. U) within a specified region to enable actuator disk models w...
TypeName("radialActuationDiskSource")
Runtime type information.
radialActuationDiskSource(const radialActuationDiskSource &)=delete
No copy construct.
void operator=(const radialActuationDiskSource &)=delete
No copy assignment.
virtual bool read(const dictionary &dict)
Read source dictionary.
virtual ~radialActuationDiskSource()=default
Destructor.
virtual void addSup(fvMatrix< vector > &eqn, const label fieldi)
Add explicit contribution to momentum equation.
A class for handling words, derived from Foam::string.
Definition: word.H:68
U
Definition: pEqn.H:72
Namespace for OpenFOAM.
List< label > labelList
A List of labels.
Definition: List.H:66
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Field< vector > vectorField
Specialisation of Field<T> for vector.
labelList fv(nPoints)
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73