NonInertialFrameForce.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) 2011-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::NonInertialFrameForce
26 
27 Description
28  Calculates particle non-inertial reference frame force. Variable names as
29  from Landau and Lifshitz, Mechanics, 3rd Ed, p126-129.
30 
31 SourceFiles
32  NonInertialFrameForce.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef NonInertialFrameForce_H
37 #define NonInertialFrameForce_H
38 
39 #include "ParticleForce.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 class fvMesh;
47 
48 /*---------------------------------------------------------------------------*\
49  Class NonInertialFrameForce Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 template<class CloudType>
54 :
55  public ParticleForce<CloudType>
56 {
57  // Private data
58 
59  //- Name of the linear acceleration field
60  word WName_;
61 
62  //- The linear acceleration of the reference frame
63  vector W_;
64 
65  //- Name of the angular velocity field
66  word omegaName_;
67 
68  //- The angular velocity of the reference frame
69  vector omega_;
70 
71  //- Name of the angular acceleration field
72  word omegaDotName_;
73 
74  //- The angular acceleration of the reference frame
75  vector omegaDot_;
76 
77  //- Name of the centre of rotation field
78  word centreOfRotationName_;
79 
80  //- The centre of rotation of the reference frame
81  vector centreOfRotation_;
82 
83 
84 public:
85 
86  //- Runtime type information
87  TypeName("nonInertialFrame");
88 
89 
90  // Constructors
91 
92  //- Construct from mesh
94  (
96  const fvMesh& mesh,
97  const dictionary& dict
98  );
99 
100  //- Construct copy
102 
103  //- Construct and return a clone
104  virtual autoPtr<ParticleForce<CloudType>> clone() const
105  {
107  (
108  new ParticleForce<CloudType>(*this)
109  );
110  }
111 
112 
113  //- Destructor
114  virtual ~NonInertialFrameForce();
115 
116 
117  // Member Functions
118 
119  // Access
120 
121  //- Return the linear acceleration of the reference frame
122  inline const vector& W() const;
123 
124  //- Return the angular velocity of the reference frame
125  inline const vector& omega() const;
126 
127  //- Return the angular acceleration of the reference frame
128  inline const vector& omegaDot() const;
129 
130  //- Return the centre of rotation of the reference frame
131  inline const vector& centreOfRotation() const;
132 
133 
134  // Evaluation
135 
136  //- Cache fields
137  virtual void cacheFields(const bool store);
138 
139  //- Calculate the non-coupled force
140  virtual forceSuSp calcNonCoupled
141  (
142  const typename CloudType::parcelType& p,
143  const scalar dt,
144  const scalar mass,
145  const scalar Re,
146  const scalar muc
147  ) const;
148 };
149 
150 
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 
153 } // End namespace Foam
154 
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 
157 #include "NonInertialFrameForceI.H"
158 
159 #ifdef NoRepository
160  #include "NonInertialFrameForce.C"
161 #endif
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 #endif
166 
167 // ************************************************************************* //
const vector & omega() const
Return the angular velocity of the reference frame.
dictionary dict
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
virtual void cacheFields(const bool store)
Cache fields.
const vector & centreOfRotation() const
Return the centre of rotation of the reference frame.
Abstract base class for particle forces.
Definition: ParticleForce.H:53
const fvMesh & mesh() const
Return the mesh database.
virtual ~NonInertialFrameForce()
Destructor.
Helper container for force Su and Sp terms.
Definition: forceSuSp.H:61
TypeName("nonInertialFrame")
Runtime type information.
A class for handling words, derived from string.
Definition: word.H:59
Calculates particle non-inertial reference frame force. Variable names as from Landau and Lifshitz...
NonInertialFrameForce(CloudType &owner, const fvMesh &mesh, const dictionary &dict)
Construct from mesh.
const vector & W() const
Return the linear acceleration of the reference frame.
const vector & omegaDot() const
Return the angular acceleration of the reference frame.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:217
virtual autoPtr< ParticleForce< CloudType > > clone() const
Construct and return a clone.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
const CloudType & owner() const
Return const access to the cloud owner.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:53
volScalarField & p
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:68
scalarField Re(const UList< complex > &cf)
Definition: complexFields.C:97
virtual forceSuSp calcNonCoupled(const typename CloudType::parcelType &p, const scalar dt, const scalar mass, const scalar Re, const scalar muc) const
Calculate the non-coupled force.
Namespace for OpenFOAM.