sphericalAngularDamper.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) 2013 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::sixDoFRigidBodyMotionRestraints::sphericalAngularDamper
26 
27 Description
28  sixDoFRigidBodyMotionRestraints model. Spherical angular damper.
29 
30 SourceFiles
31  sphericalAngularDamper.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef sphericalAngularDamper_H
36 #define sphericalAngularDamper_H
37 
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 namespace sixDoFRigidBodyMotionRestraints
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class sphericalAngularDamper Declaration
50 \*---------------------------------------------------------------------------*/
51 
53 :
55 {
56  // Private data
57 
58  //- Damping coefficient (Nms/rad)
59  scalar coeff_;
60 
61 
62 public:
63 
64  //- Runtime type information
65  TypeName("sphericalAngularDamper");
66 
67 
68  // Constructors
69 
70  //- Construct from components
72  (
73  const word& name,
74  const dictionary& sDoFRBMRDict
75  );
76 
77  //- Construct and return a clone
79  {
81  (
82  new sphericalAngularDamper(*this)
83  );
84  }
85 
86 
87  //- Destructor
88  virtual ~sphericalAngularDamper();
89 
90 
91  // Member Functions
92 
93  //- Calculate the restraint position, force and moment.
94  // Global reference frame vectors.
95  virtual void restrain
96  (
97  const sixDoFRigidBodyMotion& motion,
98  vector& restraintPosition,
99  vector& restraintForce,
100  vector& restraintMoment
101  ) const;
102 
103  //- Update properties from given dictionary
104  virtual bool read(const dictionary& sDoFRBMRCoeff);
105 
106  //- Write
107  virtual void write(Ostream&) const;
108 };
109 
110 
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112 
113 } // End namespace solidBodyMotionFunctions
114 } // End namespace Foam
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 #endif
119 
120 // ************************************************************************* //
Six degree of freedom motion for a rigid body.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
virtual autoPtr< sixDoFRigidBodyMotionRestraint > clone() const
Construct and return a clone.
Base class for defining restraints for sixDoF motions.
virtual void restrain(const sixDoFRigidBodyMotion &motion, vector &restraintPosition, vector &restraintForce, vector &restraintMoment) const
Calculate the restraint position, force and moment.
A class for handling words, derived from string.
Definition: word.H:59
virtual bool read(const dictionary &sDoFRBMRCoeff)
Update properties from given dictionary.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
sixDoFRigidBodyMotionRestraints model. Spherical angular damper.
const word & name() const
Return the name.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:53
sphericalAngularDamper(const word &name, const dictionary &sDoFRBMRDict)
Construct from components.
TypeName("sphericalAngularDamper")
Runtime type information.
Namespace for OpenFOAM.