coneVelocityLagrangianVectorFieldSource.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::coneVelocityLagrangianVectorFieldSource
26 
27 Description
28  This source condition provides a conical velocity profile, characterised by
29  a centreline velocity and inner and outer cone angles. The centreline
30  velocity is a Function1 and can vary with time. This is likely to be used
31  in conjunction with a point injection model.
32 
33 Usage
34  \table
35  Property | Description | Required? | Default
36  Ucentre | The velocity along the centreline | 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 coneVelocity;
46  Ucentre
47  {
48  type table;
49  values
50  (
51  (0 (0.1 0 0))
52  (0.5 (0.5 0 0))
53  );
54  }
55  thetaInner 15 [deg];
56  thetaOuter 22.5 [deg];
57  }
58  \endverbatim
59 
60 See also
61  Foam::Function1s
62 
63 SourceFiles
64  coneVelocityLagrangianVectorFieldSource.C
65 
66 \*---------------------------------------------------------------------------*/
67 
68 #ifndef coneVelocityLagrangianVectorFieldSource_H
69 #define coneVelocityLagrangianVectorFieldSource_H
70 
71 #include "LagrangianFieldSources.H"
74 
75 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
76 
77 namespace Foam
78 {
79 
80 /*---------------------------------------------------------------------------*\
81  Class coneVelocityLagrangianVectorFieldSource Declaration
82 \*---------------------------------------------------------------------------*/
83 
84 class coneVelocityLagrangianVectorFieldSource
85 :
86  public LagrangianVectorFieldSource,
87  private Function1LagrangianFieldSource,
88  private coneDirectionLagrangianVectorFieldSource
89 {
90 private:
91 
92  // Private Data
93 
94  //- Centreline velocity
95  const autoPtr<Function1<vector>> Ucentre_;
96 
97 
98  // Private Member Functions
99 
100  //- Use the base class' value method
102 
103 
104 public:
105 
106  //- Runtime type information
107  TypeName("coneVelocity");
108 
109 
110  // Constructors
111 
112  //- Construct from internal field and dictionary
114  (
115  const regIOobject&,
116  const dictionary& dict
117  );
118 
119  //- Copy constructor setting the internal field reference
121  (
123  const regIOobject&
124  );
125 
126  //- Construct and return a clone setting the internal field reference
128  (
129  const regIOobject& iIo
130  ) const
131  {
133  (
135  );
136  }
137 
138 
139  //- Destructor
141 
142 
143  // Member Functions
144 
145  //- Use the base class' value method
146  using LagrangianVectorFieldSource::value;
147 
148  //- Return the value for an instantaneous injection
150  (
151  const LagrangianInjection&,
152  const LagrangianSubMesh&
153  ) const;
154 
155  //- Write
156  virtual void write(Ostream&) const;
157 };
158 
159 
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 
162 } // End namespace Foam
163 
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 
166 #endif
167 
168 // ************************************************************************* //
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, characterised by a centreline velocity and...
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.
TypeName("coneVelocity")
Runtime type information.
coneVelocityLagrangianVectorFieldSource(const regIOobject &, const dictionary &dict)
Construct from internal field and dictionary.
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