tracer.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::clouds::tracer
26 
27 Description
28  Cloud that follows the carrier flow. The elements have no size or mass and
29  they have no physical modelling associated with them.
30 
31 SourceFiles
32  tracer.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef tracer_H
37 #define tracer_H
38 
39 #include "carried.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 namespace clouds
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class tracer Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 class tracer
53 :
54  public cloud,
55  public carried
56 {
57 protected:
58 
59  // Protected Member Functions
60 
61  //- Return the acceleration with which to do second-order tracking
63  (
64  const LagrangianSubMesh&
65  ) const;
66 
67  //- Do we need to re-calculate particles that are modified?
68  virtual bool reCalculateModified();
69 
70  //- Update the cloud properties
71  virtual void calculate
72  (
73  const LagrangianSubScalarField& deltaT,
74  const bool final
75  );
76 
77  //- Partition hook
78  virtual void partition();
79 
80 
81 public:
82 
83  // Public Static Data
84 
85  //- Run-time type information
86  TypeName("tracer");
87 
88 
89  // Constructors
90 
91  //- Construct from a mesh and context
92  tracer
93  (
95  const contextType context,
96  const dictionary& dict
97  );
98 
99 
100  //- Destructor
101  virtual ~tracer();
102 
103 
104  // Member Functions
105 
106  //- Solve the cloud's evolution over the current time-step
107  virtual void solve(const bool initial, const bool final);
108 };
109 
110 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111 
112 } // End namespace clouds
113 } // End namespace Foam
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 
117 #endif
118 
119 // ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Class containing Lagrangian geometry and topology.
Mesh that relates to a sub-section of a Lagrangian mesh. This is used to construct fields that relate...
Base class for clouds. Provides a basic evolution algorithm, models, and a database for caching deriv...
Definition: cloud.H:61
contextType
Context in which this cloud is used.
Definition: cloud.H:203
enum Foam::cloud::contextType context
const LagrangianMesh & mesh() const
Access the mesh.
Definition: cloud.H:280
Base class for clouds which are carried by a fluid.
Definition: carried.H:57
Cloud that follows the carrier flow. The elements have no size or mass and they have no physical mode...
Definition: tracer.H:55
virtual void solve(const bool initial, const bool final)
Solve the cloud's evolution over the current time-step.
Definition: tracer.C:141
virtual ~tracer()
Destructor.
Definition: tracer.C:135
virtual bool reCalculateModified()
Do we need to re-calculate particles that are modified?
Definition: tracer.C:60
virtual tmp< LagrangianSubVectorField > dUdt(const LagrangianSubMesh &) const
Return the acceleration with which to do second-order tracking.
Definition: tracer.C:52
TypeName("tracer")
Run-time type information.
tracer(LagrangianMesh &mesh, const contextType context, const dictionary &dict)
Construct from a mesh and context.
Definition: tracer.C:92
virtual void partition()
Partition hook.
Definition: tracer.C:82
virtual void calculate(const LagrangianSubScalarField &deltaT, const bool final)
Update the cloud properties.
Definition: tracer.C:67
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.
dictionary dict