Loading...
Searching...
No Matches
ParticleForceList.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) 2011-2017 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::ParticleForceList
28
29Description
30 List of particle forces
31
32SourceFiles
33 ParticleForceListI.H
34 ParticleForceList.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef ParticleForceList_H
39#define ParticleForceList_H
40
41#include "ParticleForce.H"
42#include "forceSuSp.H"
43
44// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46namespace Foam
47{
48
49/*---------------------------------------------------------------------------*\
50 Class ParticleForceList Declaration
51\*---------------------------------------------------------------------------*/
52
53template<class CloudType>
55:
56 public PtrList<ParticleForce<CloudType>>
57{
58 // Private data
59
60 //- Reference to the owner cloud
61 CloudType& owner_;
62
63 //- Reference to the mesh database
64 const fvMesh& mesh_;
65
66 //- Forces dictionary
67 const dictionary dict_;
68
69 //- Calculate coupled forces flag
70 bool calcCoupled_;
71
72 //- Calculate non-coupled forces flag
73 bool calcNonCoupled_;
74
75
76public:
77
78 // Constructors
79
80 //- Null constructor
82
83 //- Construct from mesh
85 (
87 const fvMesh& mesh,
89 const bool readFields
90 );
91
92 //- Construct copy
94
95
96 //- Destructor
97 virtual ~ParticleForceList();
98
99
100 // Member Functions
101
102 // Access
103
104 //- Return const access to the cloud owner
105 inline const CloudType& owner() const;
106
107 //- Return reference to the cloud owner
108 inline CloudType& owner();
109
110 //- Return the mesh database
111 inline const fvMesh& mesh() const;
112
113 //- Return the forces dictionary
114 inline const dictionary& dict() const;
115
116 //- Set the calcCoupled flag
117 inline void setCalcCoupled(bool flag);
118
119 //- Set the calcNonCoupled flag
120 inline void setCalcNonCoupled(bool flag);
121
122
123 // Evaluation
124
125 //- Cache fields
126 virtual void cacheFields(const bool store);
127
128 //- Calculate the coupled force
129 virtual forceSuSp calcCoupled
131 const typename CloudType::parcelType& p,
132 const typename CloudType::parcelType::trackingData& td,
133 const scalar dt,
134 const scalar mass,
135 const scalar Re,
136 const scalar muc
137 ) const;
138
139 //- Calculate the non-coupled force
141 (
142 const typename CloudType::parcelType& p,
143 const typename CloudType::parcelType::trackingData& td,
144 const scalar dt,
145 const scalar mass,
146 const scalar Re,
147 const scalar muc
148 ) const;
149
150 //- Return the effective mass
151 virtual scalar massEff
152 (
153 const typename CloudType::parcelType& p,
154 const typename CloudType::parcelType::trackingData& td,
155 const scalar mass
156 ) const;
157};
159
160// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161
162} // End namespace Foam
163
164// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165
166#include "ParticleForceListI.H"
167
168#ifdef NoRepository
169 #include "ParticleForceList.C"
170#endif
172// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173
174#endif
175
176// ************************************************************************* //
ParticleForceList(CloudType &owner, const fvMesh &mesh)
Null constructor.
ParticleForceList(const ParticleForceList &pfl)
Construct copy.
virtual forceSuSp calcNonCoupled(const typename CloudType::parcelType &p, const typename CloudType::parcelType::trackingData &td, const scalar dt, const scalar mass, const scalar Re, const scalar muc) const
Calculate the non-coupled force.
virtual scalar massEff(const typename CloudType::parcelType &p, const typename CloudType::parcelType::trackingData &td, const scalar mass) const
Return the effective mass.
CloudType & owner()
Return reference to the cloud owner.
virtual void cacheFields(const bool store)
Cache fields.
void setCalcCoupled(bool flag)
Set the calcCoupled flag.
void setCalcNonCoupled(bool flag)
Set the calcNonCoupled flag.
virtual ~ParticleForceList()
Destructor.
virtual forceSuSp calcCoupled(const typename CloudType::parcelType &p, const typename CloudType::parcelType::trackingData &td, const scalar dt, const scalar mass, const scalar Re, const scalar muc) const
Calculate the coupled force.
ParticleForceList(CloudType &owner, const fvMesh &mesh, const dictionary &dict, const bool readFields)
Construct from mesh.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Helper container for force Su and Sp terms.
Definition forceSuSp.H:63
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
volScalarField & p
wallPoints::trackData td(isBlockedFace, regionToBlockSize)
Namespace for OpenFOAM.
DSMCCloud< dsmcParcel > CloudType
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const NameMatchPredicate &selectedFields, DynamicList< regIOobject * > &storedObjects)
Read the selected GeometricFields of the templated type and store on the objectRegistry.
scalarField Re(const UList< complex > &cmplx)
Extract real component.