particle.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::particle
26 
27 Description
28  Cloud with spherical, variable density, particles
29 
30 SourceFiles
31  particle.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef particle_H
36 #define particle_H
37 
38 #include "massive.H"
39 #include "coupledToFluid.H"
40 #include "sphericalCoupled.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 namespace clouds
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class particle Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class particle
54 :
55  public cloud,
56  public spherical,
57  public massive,
58  public coupledToFluid,
59  public sphericalCoupled
60 {
61 protected:
62 
63  // Protected Member Functions
64 
65  //- Initialisation hook
66  virtual void initialise(const bool predict);
67 
68  //- Partition hook
69  virtual void partition();
70 
71  //- Return the acceleration with which to do second-order tracking
73  (
74  const LagrangianSubMesh&
75  ) const;
76 
77  //- Do we need to re-calculate particles that are modified?
78  virtual bool reCalculateModified();
79 
80  //- Update the cloud properties
81  virtual void calculate
82  (
83  const LagrangianSubScalarField& deltaT,
84  const bool final
85  );
86 
87 
88 public:
89 
90  // Public Static Data
91 
92  //- Run-time type information
93  TypeName("particle");
94 
95 
96  // Constructors
97 
98  //- Construct from a mesh and a name
99  particle
100  (
101  const polyMesh& mesh,
102  const word& name,
103  const contextType context,
106  );
107 
108 
109  //- Destructor
110  virtual ~particle();
111 
112 
113  // Member Functions
114 
115  //- Solve the cloud's evolution over the current time-step
116  virtual void solve();
117 };
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 } // End namespace clouds
122 } // End namespace Foam
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 #endif
127 
128 // ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
readOption
Enumeration defining the read options.
Definition: IOobject.H:117
const word & name() const
Return name.
Definition: IOobject.H:307
writeOption
Enumeration defining the write options.
Definition: IOobject.H:126
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:63
contextType
Context in which this cloud is used.
Definition: cloud.H:222
enum Foam::cloud::contextType context
const LagrangianMesh & mesh() const
Access the mesh.
Definition: cloud.H:276
Base class for clouds which are coupled to a fluid.
Base class for clouds with particles with mass.
Definition: massive.H:51
Cloud with spherical, variable density, particles.
Definition: particle.H:59
virtual bool reCalculateModified()
Do we need to re-calculate particles that are modified?
Definition: particle.C:83
virtual ~particle()
Destructor.
Definition: particle.C:204
virtual tmp< LagrangianSubVectorField > dUdt(const LagrangianSubMesh &) const
Return the acceleration with which to do second-order tracking.
Definition: particle.C:69
virtual void initialise(const bool predict)
Initialisation hook.
Definition: particle.C:54
TypeName("particle")
Run-time type information.
virtual void partition()
Partition hook.
Definition: particle.C:61
particle(const polyMesh &mesh, const word &name, const contextType context, const IOobject::readOption readOption=IOobject::READ_IF_PRESENT, const IOobject::writeOption writeOption=IOobject::AUTO_WRITE)
Construct from a mesh and a name.
Definition: particle.C:184
virtual void calculate(const LagrangianSubScalarField &deltaT, const bool final)
Update the cloud properties.
Definition: particle.C:116
virtual void solve()
Solve the cloud's evolution over the current time-step.
Definition: particle.C:210
Base class for clouds of spherical particles which are coupled to a fluid.
Base class for clouds with spherical particles.
Definition: spherical.H:53
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:80
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.