incompressibleDenseParticleFluid.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) 2023 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::solvers::incompressibleDenseParticleFluid
26 
27 Description
28 
29  Solver module for transient flow of incompressible isothermal fluids coupled
30  with particle clouds including the effect of the volume fraction of
31  particles on the continuous phase, with optional mesh motion and change.
32 
33  Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
34  pseudo-transient and steady simulations.
35 
36  Optional fvModels and fvConstraints are provided to enhance the simulation
37  in many ways including adding various sources, constraining or limiting
38  the solution.
39 
40  Reference:
41  \verbatim
42  Greenshields, C. J., & Weller, H. G. (2022).
43  Notes on Computational Fluid Dynamics: General Principles.
44  CFD Direct Ltd.: Reading, UK.
45  \endverbatim
46 
47 SourceFiles
48  incompressibleDenseParticleFluid.C
49 
50 See also
51  Foam::solvers::fluidSolver
52  Foam::solvers::incompressibleFluid
53 
54 \*---------------------------------------------------------------------------*/
55 
56 #ifndef incompressibleDenseParticleFluid_H
57 #define incompressibleDenseParticleFluid_H
58 
59 #include "fluidSolver.H"
60 #include "viscosityModel.H"
62 #include "pressureReference.H"
64 #include "parcelClouds.H"
65 
66 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
67 
68 namespace Foam
69 {
70 namespace solvers
71 {
72 
73 /*---------------------------------------------------------------------------*\
74  Class incompressibleDenseParticleFluid Declaration
75 \*---------------------------------------------------------------------------*/
76 
78 :
79  public fluidSolver
80 {
81 
82 protected:
83 
84  //- Name of the continuous phase
86 
87 
88  // Pressure
89 
90  //- Pressure field
92 
93  //- Pressure reference
95 
96 
97  // Buoyancy
98 
99  //- Acceleration due to gravity
101 
102 
103  // Kinematic properties
104 
105  //- Continuous phase velocity field
107 
108  //- Continuous phase flux field
110 
111  //- Continuous phase kinematic viscosity model
113 
114 
115  // Continuous phase properties for Lagrangian cloud
116 
117  //- Continuous phase density
119 
120  //- Continuous phase viscosity
122 
123  //- Continuous phase-fraction
125 
126  //- Minimum continuous phase-fraction
127  scalar alphacMin;
128 
129  //- Interpolated continuous phase-fraction
131 
132  //- Continuous phase volumetric-flux field
134 
135 
136  // Momentum transport
137 
138  //- Pointer to the momentum transport model
140 
141 
142  // Dispersed phase Lagrangian clouds
143 
145 
146 
147  // Cached temporary fields
148 
149  //- Dispersed phase drag force
151 
152  // Continuous-dispersed phase drag coefficient
154 
155  //- Face continuous-dispersed phase drag coefficient
157 
158  //- Effective volumetric flux of the dispersed phase
160 
161  //- Pointer to the surface momentum field
162  // used to recreate the flux after mesh-change
164 
165  //- Cached momentum matrix
166  // shared between the momentum predictor and pressure corrector
168 
169 
170  // Protected Member Functions
171 
172  //- Correct the cached Courant numbers
173  void correctCoNum();
174 
175  //- Calculate and print the continuity errors
176  void continuityErrors();
177 
178  //- Construct the pressure equation
179  // and correct the pressure and velocity
180  virtual void correctPressure();
181 
182 
183 public:
184 
185  // Public Data
186 
187  //- Reference to the pressure field
188  const volScalarField& p;
189 
190  //- Reference to the continuous phase velocity field
191  const volVectorField& Uc;
192 
193  //- Reference to the continuous phase volumetric-flux field
194  const surfaceScalarField& phic;
195 
196  //- Reference continuous phase-fraction
197  const volScalarField& alphac;
198 
199 
200  //- Runtime type information
201  TypeName("incompressibleDenseParticleFluid");
202 
203 
204  // Constructors
205 
206  //- Construct from region mesh
208 
209  //- Disallow default bitwise copy construction
211  (
213  ) = delete;
214 
215 
216  //- Destructor
218 
219 
220  // Member Functions
221 
222  //- Called at the start of the time-step, before the PIMPLE loop
223  virtual void preSolve();
224 
225  //- Called at the start of the PIMPLE loop to move the mesh
226  virtual void moveMesh();
227 
228  //- Called at the start of the PIMPLE loop
229  virtual void prePredictor();
230 
231  //- Construct and optionally solve the momentum equation
232  virtual void momentumPredictor();
233 
234  //- Construct and solve the energy equation,
235  // convert to temperature
236  // and update thermophysical and transport properties
237  virtual void thermophysicalPredictor();
238 
239  //- Construct and solve the pressure equation in the PISO loop
240  virtual void pressureCorrector();
241 
242  //- Correct the momentum and thermophysical transport modelling
243  virtual void postCorrector();
244 
245  //- Called after the PIMPLE loop at the end of the time-step
246  virtual void postSolve();
247 
248 
249  // Member Operators
250 
251  //- Disallow default bitwise assignment
252  void operator=(const incompressibleDenseParticleFluid&) = delete;
253 };
254 
255 
256 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
257 
258 } // End namespace solvers
259 } // End namespace Foam
260 
261 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
262 
263 #endif
264 
265 // ************************************************************************* //
Generic GeometricField class.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:101
List of parcel clouds, with the same interface as an individual parcel cloud. Is a mesh object,...
Definition: parcelClouds.H:60
Provides controls for the pressure reference in closed-volume simulations.
const fvMesh & mesh
Region mesh.
Definition: solver.H:94
Base solver module for fluid solvers.
Definition: fluidSolver.H:62
Solver module for transient flow of incompressible isothermal fluids coupled with particle clouds inc...
virtual void thermophysicalPredictor()
Construct and solve the energy equation,.
autoPtr< surfaceScalarField > phid
Effective volumetric flux of the dispersed phase.
autoPtr< phaseIncompressible::momentumTransportModel > momentumTransport
Pointer to the momentum transport model.
uniformDimensionedVectorField g
Acceleration due to gravity.
const volVectorField & Uc
Reference to the continuous phase velocity field.
surfaceScalarField phic_
Continuous phase flux field.
surfaceScalarField alphacf
Interpolated continuous phase-fraction.
virtual void prePredictor()
Called at the start of the PIMPLE loop.
const volScalarField & alphac
Reference continuous phase-fraction.
volVectorField Uc_
Continuous phase velocity field.
virtual void postSolve()
Called after the PIMPLE loop at the end of the time-step.
surfaceScalarField alphaPhic
Continuous phase volumetric-flux field.
autoPtr< surfaceVectorField > Ucf
Pointer to the surface momentum field.
virtual void moveMesh()
Called at the start of the PIMPLE loop to move the mesh.
Definition: moveMesh.C:33
tmp< fvVectorMatrix > tUcEqn
Cached momentum matrix.
virtual void pressureCorrector()
Construct and solve the pressure equation in the PISO loop.
virtual void postCorrector()
Correct the momentum and thermophysical transport modelling.
void operator=(const incompressibleDenseParticleFluid &)=delete
Disallow default bitwise assignment.
const word continuousPhaseName
Name of the continuous phase.
autoPtr< volVectorField > Fd
Dispersed phase drag force.
virtual void momentumPredictor()
Construct and optionally solve the momentum equation.
virtual void correctPressure()
Construct the pressure equation.
Foam::pressureReference pressureReference
Pressure reference.
void continuityErrors()
Calculate and print the continuity errors.
void correctCoNum()
Correct the cached Courant numbers.
incompressibleDenseParticleFluid(fvMesh &mesh)
Construct from region mesh.
virtual void preSolve()
Called at the start of the time-step, before the PIMPLE loop.
autoPtr< surfaceScalarField > Dcf
Face continuous-dispersed phase drag coefficient.
autoPtr< viscosityModel > viscosity
Continuous phase kinematic viscosity model.
const surfaceScalarField & phic
Reference to the continuous phase volumetric-flux field.
TypeName("incompressibleDenseParticleFluid")
Runtime type information.
const volScalarField & p
Reference to the pressure field.
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.