actuationDisk.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-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::actuationDisk
26 
27 Description
28  Actuation disk source
29 
30  Constant values for momentum source for actuation disk
31  \f[
32  T = 2 \rho A (\hat{d}\dot U_{o})^2 a (1-a) \hat{d}
33  \f]
34 
35  where:
36  \vartable
37  A | Disk area
38  dHat | Unit disk direction
39  U_o | Upstream velocity
40  a | 1 - Cp/Ct
41  Cp | Power coefficient
42  Ct | Thrust coefficient
43  \endvartable
44 
45 Usage
46  Example usage:
47  \verbatim
48  actuationDisk1
49  {
50  type actuationDisk;
51 
52  cellZone actuationDisk1;
53 
54  diskDir (-1 0 0); // Disk direction
55  Cp 0.1; // Power coefficient
56  Ct 0.5; // Thrust coefficient
57  diskArea 5.0; // Disk area
58  upstreamPoint (0 0 0); // Upstream point
59  }
60  \endverbatim
61 
62 SourceFiles
63  actuationDisk.C
64  actuationDiskTemplates.C
65 
66 \*---------------------------------------------------------------------------*/
67 
68 #ifndef actuationDisk_H
69 #define actuationDisk_H
70 
71 #include "fvModel.H"
72 #include "fvCellZone.H"
73 
74 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
75 
76 namespace Foam
77 {
78 namespace fv
79 {
80 
81 /*---------------------------------------------------------------------------*\
82  Class actuationDisk Declaration
83 \*---------------------------------------------------------------------------*/
84 
85 class actuationDisk
86 :
87  public fvModel
88 {
89 protected:
90 
91  // Protected Data
92 
93  //- The cellZone the fvConstraint applies to
94  fvCellZone zone_;
95 
96  //- The name of the phase to which this fvModel applies
97  word phaseName_;
98 
99  //- Name of the velocity field
100  word UName_;
101 
102  //- Disk area normal
104 
105  //- Power coefficient
106  scalar Cp_;
107 
108  //- Thrust coefficient
109  scalar Ct_;
110 
111  //- Disk area
112  scalar diskArea_;
113 
114  //- Upstream point sample
116 
117  //- Upstream cell ID
119 
120 
121 private:
122 
123  // Private Member Functions
124 
125  //- Non-virtual read
126  void readCoeffs(const dictionary& dict);
127 
128  //- Add resistance to the UEqn
129  template<class AlphaFieldType, class RhoFieldType>
130  inline void addActuationDiskAxialInertialResistance
131  (
132  vectorField& Usource,
133  const labelList& cells,
134  const scalarField& V,
135  const AlphaFieldType& alpha,
136  const RhoFieldType& rho,
137  const vectorField& U
138  ) const;
139 
140 
141 public:
142 
143  //- Runtime type information
144  TypeName("actuationDisk");
145 
146 
147  // Constructors
148 
149  //- Construct from components
151  (
152  const word& name,
153  const word& modelType,
154  const fvMesh& mesh,
155  const dictionary& dict
156  );
157 
158  //- Disallow default bitwise copy construction
159  actuationDisk(const actuationDisk&) = delete;
160 
161 
162  //- Destructor
163  virtual ~actuationDisk()
164  {}
165 
166 
167  // Member Functions
168 
169  // Checks
170 
171  //- Return the list of fields for which the fvModel adds source term
172  // to the transport equation
173  virtual wordList addSupFields() const;
174 
175 
176  // Add explicit and implicit contributions
177 
178  //- Source term to momentum equation
179  virtual void addSup
180  (
181  const volVectorField& U,
183  ) const;
184 
185  //- Source term to compressible momentum equation
186  virtual void addSup
187  (
188  const volScalarField& rho,
189  const volVectorField& U,
190  fvMatrix<vector>& eqn
191  ) const;
192 
193  //- Explicit and implicit sources for phase equations
194  virtual void addSup
195  (
196  const volScalarField& alpha,
197  const volScalarField& rho,
198  const volVectorField& U,
199  fvMatrix<vector>& eqn
200  ) const;
201 
202 
203  // Mesh changes
204 
205  //- Update for mesh motion
206  virtual bool movePoints();
207 
208  //- Update topology using the given map
209  virtual void topoChange(const polyTopoChangeMap&);
210 
211  //- Update from another mesh using the given map
212  virtual void mapMesh(const polyMeshMap&);
213 
214  //- Redistribute or update using the given distribution map
215  virtual void distribute(const polyDistributionMap&);
216 
217 
218  // IO
219 
220  //- Read dictionary
221  virtual bool read(const dictionary& dict);
222 
223 
224  // Member Operators
225 
226  //- Disallow default bitwise assignment
227  void operator=(const actuationDisk&) = delete;
228 };
229 
230 
231 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
232 
233 } // End namespace fv
234 } // End namespace Foam
235 
236 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
237 
238 #endif
239 
240 // ************************************************************************* //
Generic GeometricField class.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Definition: fvMatrix.H:118
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:96
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvModelI.H:69
const word & name() const
Return const access to the source name.
Definition: fvModelI.H:57
Actuation disk source.
virtual bool movePoints()
Update for mesh motion.
virtual void addSup(const volVectorField &U, fvMatrix< vector > &eqn) const
Source term to momentum equation.
virtual wordList addSupFields() const
Return the list of fields for which the fvModel adds source term.
scalar Cp_
Power coefficient.
virtual ~actuationDisk()
Destructor.
word UName_
Name of the velocity field.
word phaseName_
The name of the phase to which this fvModel applies.
fvCellZone zone_
The cellZone the fvConstraint applies to.
vector diskDir_
Disk area normal.
void operator=(const actuationDisk &)=delete
Disallow default bitwise assignment.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
virtual bool read(const dictionary &dict)
Read dictionary.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
point upstreamPoint_
Upstream point sample.
actuationDisk(const word &name, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from components.
label upstreamCellId_
Upstream cell ID.
TypeName("actuationDisk")
Runtime type information.
scalar diskArea_
Disk area.
scalar Ct_
Thrust coefficient.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Definition: polyMeshMap.H:51
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
A class for handling words, derived from string.
Definition: word.H:62
const cellShapeList & cells
U
Definition: pEqn.H:72
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
Namespace for OpenFOAM.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Vector< scalar > vector
A scalar version of the templated Vector.
Definition: vector.H:49
labelList fv(nPoints)
dictionary dict