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 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"
62 #include "randomGenerator.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<vector>
77 {
78 private:
79 
80  // Private Data
81 
82  //- Velocity magnitude
83  const autoPtr<Function1<scalar>> Umag_;
84 
85  //- Inner half-cone angle
86  const autoPtr<Function1<scalar>> thetaInner_;
87 
88  //- Outer half-cone angle
89  const autoPtr<Function1<scalar>> thetaOuter_;
90 
91 
92  // Private Member Functions
93 
94  //- Use the base class' value method
96 
97 
98 public:
99 
100  //- Runtime type information
101  TypeName("coneDiskVelocity");
102 
103 
104  // Constructors
105 
106  //- Construct from internal field and dictionary
108  (
109  const regIOobject&,
110  const dictionary& dict
111  );
112 
113  //- Copy constructor setting the internal field reference
115  (
117  const regIOobject&
118  );
119 
120  //- Construct and return a clone setting the internal field reference
122  (
123  const regIOobject& iIo
124  ) const
125  {
127  (
129  );
130  }
131 
132 
133  //- Destructor
135 
136 
137  // Member Functions
138 
139  //- Return the value for an instantaneous injection
141  (
142  const LagrangianInjection&,
143  const LagrangianSubMesh&
144  ) const;
145 
146  //- Write
147  virtual void write(Ostream&) const;
148 };
149 
150 
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 
153 } // End namespace Foam
154 
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 
157 #endif
158 
159 // ************************************************************************* //
Mix-in for source conditions that provides functions for evaluating Function1s at variable times.
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