trimModel.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) 2012-2014 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::trimModel
29
30Description
31 Base class for trim models for handling
32 blade characteristics and thrust-torque relations.
33
34Usage
35 Minimal example by using \c constant/fvOptions:
36 rotorDiskSource1
37 {
38 // Mandatory/Optional (inherited) entries
39 ...
40
41 // Mandatory entries (runtime modifiable)
42 trimModel <trimModel>;
43
44 <trimModel>Coeffs
45 {
46 // Conditional mandatory entries (runtime modifiable)
47
48 // when trimModel=fixedTrim
49 theta0 5.0;
50 theta1c 1.0;
51 theta1s 4.0;
52 }
53 }
54
55 where the entries mean:
56 \table
57 Property | Description | Type | Reqd | Dflt
58 trimModel | Trim model specification | word | yes | -
59 file | Name of file containing profile characteristics | word | no | -
60 \endtable
61
62 Options for the \c trimModel entry:
63 \verbatim
64 fixed | Fixed blade/angle characteristics
65 targetForce | Target thrust/torque by using time-variant blade characs.
66 \endverbatim
67
68See also
69 - Foam::fv::rotorDiskSource
70 - Foam::fixedTrim
71 - Foam::targetCoeffTrim
72
73SourceFiles
74 trimModel.C
75
76\*---------------------------------------------------------------------------*/
77
78#ifndef trimModel_H
79#define trimModel_H
80
81#include "rotorDiskSource.H"
82#include "dictionary.H"
84
85// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
86
87namespace Foam
88{
89
90/*---------------------------------------------------------------------------*\
91 Class trimModel Declaration
92\*---------------------------------------------------------------------------*/
93
94class trimModel
95{
96protected:
97
98 // Protected Data
99
100 //- Reference to the rotor source model
101 const fv::rotorDiskSource& rotor_;
102
103 //- Name of model
104 const word name_;
105
106 //- Coefficients dictionary
107 dictionary coeffs_;
108
109
110public:
112 //- Run-time type information
113 TypeName("trimModel");
114
115
116 // Declare runtime constructor selection table
117
119 (
120 autoPtr,
123 (
125 const dictionary& dict
126 ),
127 (rotor, dict)
128 );
129
131 // Constructors
132
133 //- Construct from components
136 const fv::rotorDiskSource& rotor,
137 const dictionary& dict,
138 const word& name
139 );
140
141
142 // Selectors
143
144 //- Return a reference to the selected trim model
146 (
147 const fv::rotorDiskSource& rotor,
148 const dictionary& dict
149 );
150
151
152 //- Destructor
153 virtual ~trimModel() = default;
154
155
156 // Member Functions
157
158 //- Read
159 virtual void read(const dictionary& dict);
160
161 //- Return the geometric angle of attack [rad]
162 virtual tmp<scalarField> thetag() const = 0;
163
164 //- Correct the model
165 virtual void correct
166 (
167 const vectorField& U,
168 vectorField& force
169 ) = 0;
171 //- Correct the model for compressible flow
172 virtual void correct
173 (
174 const volScalarField rho,
175 const vectorField& U,
176 vectorField& force
177 ) = 0;
178};
180
181// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183} // End namespace Foam
184
185// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186
187#endif
188
189// ************************************************************************* //
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Applies cell-based momentum sources on velocity (i.e. U) within a specified cylindrical region to app...
A class for managing temporary objects.
Definition: tmp.H:65
Base class for trim models for handling blade characteristics and thrust-torque relations.
Definition: trimModel.H:112
const fv::rotorDiskSource & rotor_
Reference to the rotor source model.
Definition: trimModel.H:118
virtual tmp< scalarField > thetag() const =0
Return the geometric angle of attack [rad].
virtual void correct(const vectorField &U, vectorField &force)=0
Correct the model.
virtual void read(const dictionary &dict)
Read.
Definition: trimModel.C:59
declareRunTimeSelectionTable(autoPtr, trimModel, dictionary,(const fv::rotorDiskSource &rotor, const dictionary &dict),(rotor, dict))
virtual void correct(const volScalarField rho, const vectorField &U, vectorField &force)=0
Correct the model for compressible flow.
dictionary coeffs_
Coefficients dictionary.
Definition: trimModel.H:124
static autoPtr< trimModel > New(const fv::rotorDiskSource &rotor, const dictionary &dict)
Return a reference to the selected trim model.
Definition: trimModelNew.C:34
TypeName("trimModel")
Run-time type information.
virtual ~trimModel()=default
Destructor.
const word name_
Name of model.
Definition: trimModel.H:121
A class for handling words, derived from Foam::string.
Definition: word.H:68
U
Definition: pEqn.H:72
thermo correct()
Namespace for OpenFOAM.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73