seriesProfile.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2021 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::seriesProfile
26 
27 Description
28  Series-up based profile data - drag and lift coefficients computed as
29  sum of cosine series
30 
31  Cd = sum_i(CdCoeff)*cos(i*AOA)
32  Cl = sum_i(ClCoeff)*sin(i*AOA)
33 
34  where:
35  AOA = angle of attack [deg] converted to [rad] internally
36  Cd = drag coefficient
37  Cl = lift coefficient
38 
39  Input in two (arbitrary length) lists:
40 
41  CdCoeffs (coeff1 coeff2 ... coeffN);
42  ClCoeffs (coeff1 coeff2 ... coeffN);
43 
44 SourceFiles
45  seriesProfile.C
46 
47 \*---------------------------------------------------------------------------*/
48 
49 #ifndef seriesProfile_H
50 #define seriesProfile_H
51 
52 #include "profileModel.H"
53 #include "List.H"
54 
55 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56 
57 namespace Foam
58 {
59 
60 /*---------------------------------------------------------------------------*\
61  Class seriesProfile Declaration
62 \*---------------------------------------------------------------------------*/
63 
64 class seriesProfile
65 :
66  public profileModel
67 {
68 
69 protected:
70 
71  // Protected data
72 
73  //- List of drag coefficient values
75 
76  //- List of lift coefficient values
78 
79 
80  // Protected Member Functions
81 
82  // Evaluate
83 
84  //- Drag
85  scalar evaluateDrag
86  (
87  const scalar& xIn,
88  const List<scalar>& values
89  ) const;
90 
91  //- Lift
92  scalar evaluateLift
93  (
94  const scalar& xIn,
95  const List<scalar>& values
96  ) const;
97 
98 
99 public:
100 
101  //- Runtime type information
102  TypeName("series");
103 
104  //- Constructor
105  seriesProfile(const dictionary& dict, const word& modelName);
106 
107 
108  // Member Functions
109 
110  // Evaluation
111 
112  //- Return the Cd and Cl for a given angle-of-attack
113  virtual void Cdl(const scalar alpha, scalar& Cd, scalar& Cl) const;
114 };
115 
116 
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118 
119 } // End namespace Foam
120 
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 
123 #endif
124 
125 // ************************************************************************* //
dictionary dict
virtual void Cdl(const scalar alpha, scalar &Cd, scalar &Cl) const
Return the Cd and Cl for a given angle-of-attack.
List< scalar > ClCoeffs_
List of lift coefficient values.
Definition: seriesProfile.H:76
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
scalar evaluateLift(const scalar &xIn, const List< scalar > &values) const
Lift.
Definition: seriesProfile.C:59
seriesProfile(const dictionary &dict, const word &modelName)
Constructor.
Definition: seriesProfile.C:80
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
Series-up based profile data - drag and lift coefficients computed as sum of cosine series...
Definition: seriesProfile.H:63
A class for handling words, derived from string.
Definition: word.H:59
Base class for profile models.
Definition: profileModel.H:50
List< scalar > CdCoeffs_
List of drag coefficient values.
Definition: seriesProfile.H:73
scalar evaluateDrag(const scalar &xIn, const List< scalar > &values) const
Drag.
Definition: seriesProfile.C:42
TypeName("series")
Runtime type information.
Namespace for OpenFOAM.