massLagrangianScalarFieldSource.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::massLagrangianScalarFieldSource
26 
27 Description
28  This source condition provides the mass of introduced particles. It
29  converts between the corresponding volume/diameter/density/etc...,
30  conditions to automatically produce a value for the mass. It is selected
31  automatically by the clouds that need it, so the user should never need
32  to specify this condition explicitly.
33 
34 SourceFiles
35  massLagrangianScalarFieldSource.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef massLagrangianScalarFieldSource_H
40 #define massLagrangianScalarFieldSource_H
41 
42 #include "LagrangianFieldSources.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class massLagrangianScalarFieldSource Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 :
56  public LagrangianScalarFieldSource,
57  private CloudLagrangianFieldSource<scalar>
58 {
59 public:
60 
61  //- Runtime type information
62  TypeName("mass");
63 
64 
65  // Constructors
66 
67  //- Construct from internal field
69 
70  //- Construct from internal field and dictionary
72 
73  //- Copy constructor setting the internal field reference
75  (
77  const regIOobject&
78  );
79 
80  //- Construct and return a clone setting the internal field reference
82  (
83  const regIOobject& iIo
84  ) const
85  {
87  (
88  new massLagrangianScalarFieldSource(*this, iIo)
89  );
90  }
91 
92 
93  //- Destructor
95 
96 
97  // Member Functions
98 
99  //- Return the value for an instantaneous injection
101  (
102  const LagrangianInjection&,
103  const LagrangianSubMesh&
104  ) const;
105 };
106 
107 
108 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
109 
110 } // End namespace Foam
111 
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113 
114 #endif
115 
116 // ************************************************************************* //
Templated base class for source conditions that refer to a cloud. Not a source condition in itself....
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 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
This source condition provides the mass of introduced particles. It converts between the correspondin...
virtual tmp< LagrangianSubScalarField > value(const LagrangianInjection &, const LagrangianSubMesh &) const
Return the value for an instantaneous injection.
TypeName("mass")
Runtime type information.
massLagrangianScalarFieldSource(const regIOobject &)
Construct from internal field.
virtual autoPtr< LagrangianScalarFieldSource > clone(const regIOobject &iIo) const
Construct and return a clone setting the internal field reference.
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.