Implicit.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2013-2016 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::PackingModels::Implicit
28
29Group
30 grpLagrangianIntermediateMPPICPackingSubModels
31
32Description
33 Implicit model for applying an inter-particle stress to the particles.
34
35 The time evolution of particulate volume fraction is solved for implicitly
36 on the eulerian mesh. The computed flux is then applied to the lagrangian
37 field. The gravity force can optionally be applied to the particles as part
38 of this model, using the keyword "applyGravity".
39
40SourceFiles
41 Implicit.C
42
43\*---------------------------------------------------------------------------*/
44
45#ifndef Implicit_H
46#define Implicit_H
47
48#include "PackingModel.H"
49
50// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51
52namespace Foam
53{
54namespace PackingModels
55{
56
57/*---------------------------------------------------------------------------*\
58 Class Implicit Declaration
59\*---------------------------------------------------------------------------*/
60
61template<class CloudType>
62class Implicit
63:
64 public PackingModel<CloudType>
65{
66 //- Private data
67
68 //- Volume fraction field
69 volScalarField alpha_;
70
71 //- Correction flux
72 tmp<surfaceScalarField> phiCorrect_;
73
74 //- Correction cell-centred velocity
75 tmp<volVectorField> uCorrect_;
76
77 //- Flag to indicate whether implicit limiting is applied
78 Switch applyLimiting_;
79
80 //- Flag to indicate whether gravity is applied
81 Switch applyGravity_;
82
83 //- Minimum stable volume fraction
84 scalar alphaMin_;
85
86 //- Minimum stable density
87 scalar rhoMin_;
88
89
90public:
91
92 //- Runtime type information
93 TypeName("implicit");
94
95 // Constructors
96
97 //- Construct from components
99
100 //- Construct copy
101 Implicit(const Implicit<CloudType>& cm);
102
103 //- Construct and return a clone
105 {
107 (
108 new Implicit<CloudType>(*this)
109 );
110 }
111
112
113 //- Destructor
114 virtual ~Implicit();
115
116
117 // Member Functions
118
119 //- Calculate the inter particles stresses
120 virtual void cacheFields(const bool store);
121
122 //- Calculate the velocity correction
124 (
125 typename CloudType::parcelType& p,
126 const scalar deltaT
127 ) const;
128};
129
130
131// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132
133} // End namespace PackingModels
134} // End namespace Foam
135
136// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137
138#ifdef NoRepository
139 #include "Implicit.C"
140#endif
141
142// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143
144#endif
145
146// ************************************************************************* //
const CloudType & owner() const
Return const access to the owner cloud.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:75
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:220
Base class for packing models.
Definition: PackingModel.H:71
Implicit model for applying an inter-particle stress to the particles.
Definition: Implicit.H:64
virtual ~Implicit()
Destructor.
Definition: Implicit.C:95
virtual autoPtr< PackingModel< CloudType > > clone() const
Construct and return a clone.
Definition: Implicit.H:103
virtual void cacheFields(const bool store)
Calculate the inter particles stresses.
Definition: Implicit.C:102
virtual vector velocityCorrection(typename CloudType::parcelType &p, const scalar deltaT) const
Calculate the velocity correction.
Definition: Implicit.C:334
TypeName("implicit")
Runtime type information.
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:78
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:113
A class for managing temporary objects.
Definition: tmp.H:65
volScalarField & p
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73