Loading...
Searching...
No Matches
GravityForce.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::GravityForce
28
29Group
30 grpLagrangianIntermediateForceSubModels
31
32Description
33 Calculates particle gravity force
34
35SourceFiles
36 GravityForceI.H
37 GravityForce.C
38
39\*---------------------------------------------------------------------------*/
40
41#ifndef Foam_GravityForce_H
42#define Foam_GravityForce_H
43
44#include "ParticleForce.H"
45
46// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48namespace Foam
49{
50
51// Forward Declarations
52class fvMesh;
53
54/*---------------------------------------------------------------------------*\
55 Class GravityForce Declaration
56\*---------------------------------------------------------------------------*/
57
58template<class CloudType>
59class GravityForce
60:
61 public ParticleForce<CloudType>
62{
63 // Private Data
64
65 //- Reference to the acceleration due to gravity
66 const vector& g_;
67
68
69public:
70
71 //- Runtime type information
72 TypeName("gravity");
73
74
75 // Constructors
76
77 //- Construct from mesh
79 (
81 const fvMesh& mesh,
82 const dictionary& dict
83 );
84
85 //- Construct copy
86 GravityForce(const GravityForce& gf);
87
88 //- Construct and return a clone
90 {
92 (
94 );
95 }
96
97
98 //- Destructor
99 virtual ~GravityForce();
100
101
102 // Member Functions
103
104 // Access
105
106 //- Return the acceleration due to gravity
107 const vector& g() const noexcept { return g_; }
108
109
110 // Evaluation
111
112 //- Calculate the non-coupled force
113 virtual forceSuSp calcNonCoupled
114 (
115 const typename CloudType::parcelType& p,
116 const typename CloudType::parcelType::trackingData& td,
117 const scalar dt,
118 const scalar mass,
119 const scalar Re,
120 const scalar muc
121 ) const;
122};
123
124
125// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126
127} // End namespace Foam
128
129// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130
131#ifdef NoRepository
132 #include "GravityForce.C"
133#endif
134
135// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136
137#endif
138
139// ************************************************************************* //
virtual ~GravityForce()
Destructor.
virtual autoPtr< ParticleForce< CloudType > > clone() const
Construct and return a clone.
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.
TypeName("gravity")
Runtime type information.
GravityForce(CloudType &owner, const fvMesh &mesh, const dictionary &dict)
Construct from mesh.
const vector & g() const noexcept
Return the acceleration due to gravity.
const fvMesh & mesh() const noexcept
Return the mesh database.
const CloudType & owner() const noexcept
Return const access to the cloud owner.
ParticleForce(CloudType &owner, const fvMesh &mesh, const dictionary &dict, const word &forceType, const bool readCoeffs)
Construct from mesh.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
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
const direction noexcept
Definition scalarImpl.H:265
scalarField Re(const UList< complex > &cmplx)
Extract real component.
Vector< scalar > vector
Definition vector.H:57
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68