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