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