All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
clouds.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) 2021 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::fv::clouds
26 
27 Description
28  Lagrangian clouds fvModel
29 
30 Usage
31  Example usage:
32  \verbatim
33  clouds
34  {
35  type clouds;
36  }
37  \endverbatim
38 
39 SourceFiles
40  clouds.C
41 
42 \*---------------------------------------------------------------------------*/
43 
44 #ifndef clouds_H
45 #define clouds_H
46 
47 #include "fvModel.H"
48 #include "fluidThermo.H"
50 #include "parcelCloudList.H"
51 
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 
54 namespace Foam
55 {
56 namespace fv
57 {
58 
59 /*---------------------------------------------------------------------------*\
60  Class clouds Declaration
61 \*---------------------------------------------------------------------------*/
62 
63 class clouds
64 :
65  public fvModel
66 {
67  // Private Data
68 
69  //- Reference to the carrier phase thermo
70  const fluidThermo& carrierThermo_;
71 
72  //- The Lagrangian cloud list
73  mutable parcelCloudList clouds_;
74 
75  //- Current time index (used for updating)
76  mutable label curTimeIndex_;
77 
78 
79 public:
80 
81  //- Runtime type information
82  TypeName("clouds");
83 
84 
85  // Constructors
86 
87  //- Construct from explicit source name and mesh
88  clouds
89  (
90  const word& sourceName,
91  const word& modelType,
92  const dictionary& dict,
93  const fvMesh& mesh
94  );
95 
96  //- Disallow default bitwise copy construction
97  clouds
98  (
99  const clouds&
100  ) = delete;
101 
102 
103  // Member Functions
104 
105  // Checks
106 
107  //- Return the list of fields for which the option adds source term
108  // to the transport equation
109  virtual wordList addSupFields() const;
110 
111 
112  // Correct
113 
114  //- Solve the Lagrangian clouds and update the sources
115  virtual void correct();
116 
117  //- Prepare for mesh update
118  virtual void preUpdateMesh();
119 
120 
121  // Add explicit and implicit contributions to compressible equation
122 
123  //- Add source to continuity equation
124  virtual void addSup
125  (
126  fvMatrix<scalar>& eqn,
127  const word& fieldName
128  ) const;
129 
130  //- Add source to pressure or enthalpy equation
131  virtual void addSup
132  (
133  const volScalarField& rho,
134  fvMatrix<scalar>& eqn,
135  const word& fieldName
136  ) const;
137 
138  //- Add source to momentum equation
139  virtual void addSup
140  (
141  const volScalarField& rho,
142  fvMatrix<vector>& eqn,
143  const word& fieldName
144  ) const;
145 
146 
147  // Member Operators
148 
149  //- Disallow default bitwise assignment
150  void operator=(const clouds&) = delete;
151 };
152 
153 
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 
156 } // End namespace fv
157 } // End namespace Foam
158 
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 
161 #endif
162 
163 // ************************************************************************* //
clouds(const word &sourceName, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from explicit source name and mesh.
Definition: clouds.C:52
dictionary dict
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
TypeName("clouds")
Runtime type information.
virtual void preUpdateMesh()
Prepare for mesh update.
Definition: clouds.C:207
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
Finite volume model abstract base class.
Definition: fvModel.H:55
List of parcel clouds, with the same interface as an individual parcel cloud. This is the object that...
Lagrangian clouds fvModel.
Definition: clouds.H:62
virtual void addSup(fvMatrix< scalar > &eqn, const word &fieldName) const
Add source to continuity equation.
Definition: clouds.C:115
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvModelI.H:34
void operator=(const clouds &)=delete
Disallow default bitwise assignment.
virtual void correct()
Solve the Lagrangian clouds and update the sources.
Definition: clouds.C:101
virtual wordList addSupFields() const
Return the list of fields for which the option adds source term.
Definition: clouds.C:77
A class for handling words, derived from string.
Definition: word.H:59
labelList fv(nPoints)
Base-class for fluid thermodynamic properties.
Definition: fluidThermo.H:53
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
Definition: fvPatchField.H:72
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
Namespace for OpenFOAM.