LiftForce.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 | Copyright (C) 2012-2016 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::LiftForce
26 
27 Description
28  Base class for particle lift force models
29 
30 SourceFiles
31  LiftForceI.H
32  LiftForce.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef LiftForce_H
37 #define LiftForce_H
38 
39 #include "ParticleForce.H"
40 #include "volFields.H"
41 #include "interpolation.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class LiftForce Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 template<class CloudType>
53 class LiftForce
54 :
55  public ParticleForce<CloudType>
56 {
57 protected:
58 
59  // Protected data
60 
61  //- Name of velocity field
62  const word UName_;
63 
64  //- Curk of carrier phase velocity interpolator
66 
67 
68  // Potected Member Functions
69 
70  //- Calculate the lift coefficient
71  virtual scalar Cl
72  (
73  const typename CloudType::parcelType& p,
74  const vector& curlUc,
75  const scalar Re,
76  const scalar muc
77  ) const;
78 
79 
80 public:
81 
82  // Constructors
83 
84  //- Construct from mesh
85  LiftForce
86  (
88  const fvMesh& mesh,
89  const dictionary& dict,
90  const word& forceType
91  );
92 
93  //- Construct copy
94  LiftForce(const LiftForce& lf);
95 
96  //- Construct and return a clone
98  {
100  (
101  new LiftForce<CloudType>(*this)
102  );
103  }
104 
105 
106  //- Destructor
107  virtual ~LiftForce();
108 
109 
110  // Member Functions
111 
112  // Access
113 
114  //- Return the curl of the carrier phase velocity interpolator
115  inline const interpolation<vector>& curlUcInterp() const;
116 
117 
118  // Evaluation
119 
120  //- Cache fields
121  virtual void cacheFields(const bool store);
122 
123  //- Calculate the non-coupled force
124  virtual forceSuSp calcCoupled
125  (
126  const typename CloudType::parcelType& p,
127  const scalar dt,
128  const scalar mass,
129  const scalar Re,
130  const scalar muc
131  ) const;
132 };
133 
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 } // End namespace Foam
138 
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 
141 #include "LiftForceI.H"
142 
143 #ifdef NoRepository
144  #include "LiftForce.C"
145 #endif
146 
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 
149 #endif
150 
151 // ************************************************************************* //
virtual void cacheFields(const bool store)
Cache fields.
Definition: LiftForce.C:81
dictionary dict
LiftForce(CloudType &owner, const fvMesh &mesh, const dictionary &dict, const word &forceType)
Construct from mesh.
Definition: LiftForce.C:49
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
const fvMesh & mesh() const
Return the mesh database.
Abstract base class for particle forces.
Definition: ParticleForce.H:53
const CloudType & owner() const
Return const access to the cloud owner.
virtual scalar Cl(const typename CloudType::parcelType &p, const vector &curlUc, const scalar Re, const scalar muc) const
Calculate the lift coefficient.
autoPtr< interpolation< vector > > curlUcInterpPtr_
Curk of carrier phase velocity interpolator.
Definition: LiftForce.H:64
Helper container for force Su and Sp terms.
Definition: forceSuSp.H:61
const interpolation< vector > & curlUcInterp() const
Return the curl of the carrier phase velocity interpolator.
Definition: LiftForceI.H:30
A class for handling words, derived from string.
Definition: word.H:59
virtual ~LiftForce()
Destructor.
Definition: LiftForce.C:74
virtual autoPtr< ParticleForce< CloudType > > clone() const
Construct and return a clone.
Definition: LiftForce.H:96
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:218
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
virtual forceSuSp calcCoupled(const typename CloudType::parcelType &p, const scalar dt, const scalar mass, const scalar Re, const scalar muc) const
Calculate the non-coupled force.
Definition: LiftForce.C:129
Abstract base class for interpolation.
Base class for particle lift force models.
Definition: LiftForce.H:52
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
volScalarField & p
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:69
scalarField Re(const UList< complex > &cf)
Definition: complexFields.C:97
const word UName_
Name of velocity field.
Definition: LiftForce.H:61
Namespace for OpenFOAM.