propellerDiskAdjustment.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) 2025 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::fv::propellerDiskAdjustment
26 
27 Description
28  Automatic adjustment option for the propellerDisk momentum source
29 
30  A proportional-integral (PI) controller is used to adjust the propeller
31  rotation speed to achieve balance between the propeller thrust and the hull
32  resistance. A user-specified relaxation time is used to control the rate
33  at which the porpeller speed is adjusted.
34 
35  Reference:
36  \verbatim
37  Nuutinen, M. (2019).
38  Automated self-propulsion point search algorithm for ship performance
39  CFD simulations.
40  Sixth International Symposium on Marine Propulsors, SMP’19 Rome, Italy.
41  \endverbatim
42 
43 Usage
44  Example usage:
45  \verbatim
46  diskSource
47  {
48  type propellerDisk;
49 
50  libs ("libpropellerDisk.so");
51 
52  cellZone propeller;
53 
54  normal (1 0 0); // Normal direction of the propeller
55 
56  n 26.03; // Rotation speed [1/s]
57 
58  dPropeller 0.203; // Propeller diameter
59  dHub 0.039179; // Hub diameter
60 
61  // Automatic adjustment controls
62  adjustment yes;
63  startTime 0; // Start time of rotation speed adjustment
64  deltaTStar 0.1; // Relaxation time scaler [s]
65  nFraction 0.1; // Maximum fractional change of rotation speed
66  sfc 0; // Skin-friction correction [N]
67  Tmin 1; // Minimum thrust for beta [N]
68 
69  resistanceFraction 1; // Defaults to 1
70  resistanceDirection $normal; // Defaults to $normal
71 
72  forces
73  {
74  type forces;
75  libs ("libforces.so");
76  patches (pod pod_end napa napa_karki rako);
77  log on;
78  writeControl timeStep;
79  writeInterval 1;
80  CofR (0 0 0);
81 
82  rho rhoInf;
83  rhoInf 998.8;
84  }
85 
86  propellerCurve
87  {
88  type table;
89 
90  // J Kt Kq
91  values
92  (
93  (0.10 (0.3267 0.03748))
94  (0.15 (0.3112 0.03629))
95  (0.20 (0.2949 0.03500))
96  (0.25 (0.2777 0.03361))
97  (0.30 (0.2598 0.03210))
98  (0.35 (0.2410 0.03047))
99  (0.40 (0.2214 0.02871))
100  (0.45 (0.2010 0.02682))
101  (0.50 (0.1798 0.02479))
102  (0.55 (0.1577 0.02261))
103  (0.60 (0.1349 0.02027))
104  (0.65 (0.1112 0.01777))
105  (0.70 (0.0867 0.01509))
106  (0.75 (0.0614 0.01224))
107  (0.80 (0.0353 0.00921))
108  );
109  }
110  }
111  \endverbatim
112 
113 SourceFiles
114  propellerDiskAdjustment.C
115  propellerDiskAdjustmentTemplates.C
116 
117 \*---------------------------------------------------------------------------*/
118 
119 #ifndef propellerDiskAdjustment_H
120 #define propellerDiskAdjustment_H
121 
122 #include "propellerDisk.H"
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 namespace Foam
127 {
128 namespace fv
129 {
130 
131 /*---------------------------------------------------------------------------*\
132  Class propellerDiskAdjustment Declaration
133 \*---------------------------------------------------------------------------*/
134 
136 {
137 protected:
138 
139  // Protected Data
140 
141  //- Reference to the propellerDisk fvModel
143 
144  //- Function object to calculate the resistance force
146 
147  //- Start time for rotation speed adjustment
148  scalar startTime_;
149 
150  //- Relaxation time scale for rotation speed adjustment
151  scalar deltaTStar_;
152 
153  //- Maximum fractional change of rotation speed
154  scalar nFraction_;
155 
156  //- Minimum thrust for beta [N]
157  scalar Tmin_;
158 
159  //- Skin friction correction for model-scale ship [N]
160  scalar sfc_;
161 
162  //- Resistance fraction for multi-propulsor configurations
163  scalar resistanceFraction_;
164 
165  //- Resistance force direction
167 
168  //- Self-propulsion corrected rotational speed [1/s]
169  mutable uniformDimensionedScalarField n_;
170 
171 
172  // Protected Member Functions
173 
174  //- Return the ship resistance (for self-propulsion correction)
175  scalar resistance() const;
176 
177  //- Return the current rotation speed
178  scalar n() const
179  {
180  return n_.value();
181  }
182 
183  //- Correct the rotation speed from the current propulsion force
184  void correctn(const scalar T) const;
185 
186  friend class propellerDisk;
187 
188 
189 private:
190 
191  // Private Member Functions
192 
193  //- Read the model coefficients
194  void readCoeffs(const dictionary& dict);
195 
196 
197 public:
198 
199  // Constructors
200 
201  //- Construct from components
203  (
204  const propellerDisk&,
205  const dictionary& dict
206  );
207 
208  //- Disallow default bitwise copy construction
210 
211 
212  //- Destructor
214  {}
215 
216 
217  // Member Operators
218 
219  //- Disallow default bitwise assignment
220  void operator=(const propellerDiskAdjustment&) = delete;
221 };
222 
223 
224 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
225 
226 } // End namespace fv
227 } // End namespace Foam
228 
229 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
230 
231 #endif
232 
233 // ************************************************************************* //
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Automatic adjustment option for the propellerDisk momentum source.
scalar nFraction_
Maximum fractional change of rotation speed.
const propellerDisk & propellerDisk_
Reference to the propellerDisk fvModel.
scalar sfc_
Skin friction correction for model-scale ship [N].
autoPtr< functionObjects::forces > forces_
Function object to calculate the resistance force.
propellerDiskAdjustment(const propellerDisk &, const dictionary &dict)
Construct from components.
scalar deltaTStar_
Relaxation time scale for rotation speed adjustment.
scalar n() const
Return the current rotation speed.
vector resistanceDirection_
Resistance force direction.
scalar Tmin_
Minimum thrust for beta [N].
scalar resistanceFraction_
Resistance fraction for multi-propulsor configurations.
uniformDimensionedScalarField n_
Self-propulsion corrected rotational speed [1/s].
void operator=(const propellerDiskAdjustment &)=delete
Disallow default bitwise assignment.
scalar startTime_
Start time for rotation speed adjustment.
scalar resistance() const
Return the ship resistance (for self-propulsion correction)
void correctn(const scalar T) const
Correct the rotation speed from the current propulsion force.
Disk momentum source which approximates a propeller based on a given propeller curve.
Namespace for OpenFOAM.
void T(GeometricField< Type, GeoMesh, PrimitiveField1 > &gf, const GeometricField< Type, GeoMesh, PrimitiveField2 > &gf1)
labelList fv(nPoints)
dictionary dict