coneDiskVelocityLagrangianVectorFieldSource.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-2026 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::coneDiskVelocityLagrangianVectorFieldSource
26 
27 Description
28  This source condition provides a conical velocity profile over a disk,
29  characterised by a velocity magnitude and inner and outer cone angles. The
30  velocity magnitude is a Function1 and can vary with time. This condition
31  must be used in conjunction with a disk injection model.
32 
33 Usage
34  \table
35  Property | Description | Required? | Default
36  Umag | The velocity magnitude | yes |
37  thetaInner | The inner cone angle | yes |
38  thetaOuter | The outer cone angle | yes |
39  \endtable
40 
41  Example specification:
42  \verbatim
43  <LagrangianModelName>
44  {
45  type coneDiskVelocity;
46  Umag 0.4 [m/s];
47  thetaInner 5 [deg];
48  thetaOuter 30 [deg];
49  }
50  \endverbatim
51 
52 SourceFiles
53  coneDiskVelocityLagrangianVectorFieldSource.C
54 
55 \*---------------------------------------------------------------------------*/
56 
57 #ifndef coneDiskVelocityLagrangianVectorFieldSource_H
58 #define coneDiskVelocityLagrangianVectorFieldSource_H
59 
60 #include "LagrangianFieldSources.H"
63 
64 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65 
66 namespace Foam
67 {
68 
69 /*---------------------------------------------------------------------------*\
70  Class coneDiskVelocityLagrangianVectorFieldSource Declaration
71 \*---------------------------------------------------------------------------*/
72 
73 class coneDiskVelocityLagrangianVectorFieldSource
74 :
75  public LagrangianVectorFieldSource,
76  private Function1LagrangianFieldSource,
77  private coneDiskDirectionLagrangianVectorFieldSource
78 {
79 private:
80 
81  // Private Data
82 
83  //- Velocity magnitude
84  const autoPtr<Function1<scalar>> Umag_;
85 
86 
87  // Private Member Functions
88 
89  //- Use the base class' value method
91 
92 
93 public:
94 
95  //- Runtime type information
96  TypeName("coneDiskVelocity");
97 
98 
99  // Constructors
100 
101  //- Construct from internal field and dictionary
103  (
104  const regIOobject&,
105  const dictionary& dict
106  );
107 
108  //- Copy constructor setting the internal field reference
110  (
112  const regIOobject&
113  );
114 
115  //- Construct and return a clone setting the internal field reference
117  (
118  const regIOobject& iIo
119  ) const
120  {
122  (
124  );
125  }
126 
127 
128  //- Destructor
130 
131 
132  // Member Functions
133 
134  //- Use the base class' value method
135  using LagrangianVectorFieldSource::value;
136 
137  //- Return the value for an instantaneous injection
139  (
140  const LagrangianInjection&,
141  const LagrangianSubMesh&
142  ) const;
143 
144  //- Write
145  virtual void write(Ostream&) const;
146 };
147 
148 
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 
151 } // End namespace Foam
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 
155 #endif
156 
157 // ************************************************************************* //
tmp< LagrangianSubField< Type > > value(const LagrangianSubMesh &subMesh, const Function1< Type > &function) const
Return the source value.
Base class for Lagrangian injections. Minimal wrapper over LagrangianSource. Implements some utility ...
Mesh that relates to a sub-section of a Lagrangian mesh. This is used to construct fields that relate...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
This source condition provides a conical velocity profile over a disk, characterised by a velocity ma...
virtual tmp< LagrangianSubVectorField > value(const LagrangianInjection &, const LagrangianSubMesh &) const
Return the value for an instantaneous injection.
virtual autoPtr< LagrangianVectorFieldSource > clone(const regIOobject &iIo) const
Construct and return a clone setting the internal field reference.
coneDiskVelocityLagrangianVectorFieldSource(const regIOobject &, const dictionary &dict)
Construct from internal field and dictionary.
TypeName("coneDiskVelocity")
Runtime type information.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition: regIOobject.H:55
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.
dictionary dict