LiftForce.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) 2012-2020 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  // Protected Member Functions
69 
70  //- Calculate the lift coefficient
71  virtual scalar Cl
72  (
73  const typename CloudType::parcelType& p,
74  const typename CloudType::parcelType::trackingData& td,
75  const vector& curlUc,
76  const scalar Re,
77  const scalar muc
78  ) const;
79 
80 
81 public:
82 
83  // Constructors
84 
85  //- Construct from mesh
86  LiftForce
87  (
89  const fvMesh& mesh,
90  const dictionary& dict,
91  const word& forceType
92  );
93 
94  //- Construct copy
95  LiftForce(const LiftForce& lf);
96 
97  //- Construct and return a clone
99  {
101  (
102  new LiftForce<CloudType>(*this)
103  );
104  }
105 
106 
107  //- Destructor
108  virtual ~LiftForce();
109 
110 
111  // Member Functions
112 
113  // Access
114 
115  //- Return the curl of the carrier phase velocity interpolator
116  inline const interpolation<vector>& curlUcInterp() const;
117 
118 
119  // Evaluation
120 
121  //- Cache fields
122  virtual void cacheFields(const bool store);
123 
124  //- Calculate the non-coupled force
125  virtual forceSuSp calcCoupled
126  (
127  const typename CloudType::parcelType& p,
128  const typename CloudType::parcelType::trackingData& td,
129  const scalar dt,
130  const scalar mass,
131  const scalar Re,
132  const scalar muc
133  ) const;
134 };
135 
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 } // End namespace Foam
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 #include "LiftForceI.H"
144 
145 #ifdef NoRepository
146  #include "LiftForce.C"
147 #endif
148 
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 
151 #endif
152 
153 // ************************************************************************* //
virtual void cacheFields(const bool store)
Cache fields.
Definition: LiftForce.C:82
dictionary dict
LiftForce(CloudType &owner, const fvMesh &mesh, const dictionary &dict, const word &forceType)
Construct from mesh.
Definition: LiftForce.C:50
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
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.
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
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 non-coupled force.
Definition: LiftForce.C:130
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:75
virtual autoPtr< ParticleForce< CloudType > > clone() const
Construct and return a clone.
Definition: LiftForce.H:97
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:221
virtual scalar Cl(const typename CloudType::parcelType &p, const typename CloudType::parcelType::trackingData &td, const vector &curlUc, const scalar Re, const scalar muc) const
Calculate the lift coefficient.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
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:75
scalarField Re(const UList< complex > &cf)
Definition: complexFields.C:97
const word UName_
Name of velocity field.
Definition: LiftForce.H:61
Namespace for OpenFOAM.