Rs.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) 2016 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::RBD::joints::Rs
28 
29 Group
30  grpRigidBodyDynamicsJoints
31 
32 Description
33  Spherical joint for rotation about the x/y/z-axes using a quaternion
34  (Euler parameters) to avoid gimble-lock.
35 
36  Reference:
37  \verbatim
38  Featherstone, R. (2008).
39  Rigid body dynamics algorithms.
40  Springer.
41  Chapter 4.
42  \endverbatim
43 
44 SourceFiles
45  Rs.C
46 
47 \*---------------------------------------------------------------------------*/
48 
49 #ifndef RBD_joints_Rs_H
50 #define RBD_joints_Rs_H
51 
52 #include "joint.H"
53 
54 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 
56 namespace Foam
57 {
58 namespace RBD
59 {
60 namespace joints
61 {
62 
63 /*---------------------------------------------------------------------------*\
64  Class Rs Declaration
65 \*---------------------------------------------------------------------------*/
66 
67 class Rs
68 :
69  public joint
70 {
71 
72 public:
73 
74  //- Runtime type information
75  TypeName("Rs");
76 
77 
78  // Constructors
79 
80  //- Construct for given model
81  Rs();
82 
83  //- Construct for given model from dictionary
84  Rs(const dictionary& dict);
85 
86  //- Clone this joint
87  virtual autoPtr<joint> clone() const;
88 
89 
90  //- Destructor
91  virtual ~Rs();
92 
93 
94  // Member Functions
95 
96  //- Return true as this joint describes rotation using a quaternion
97  virtual bool unitQuaternion() const;
98 
99  //- Update the model state for this joint
100  virtual void jcalc
101  (
102  joint::XSvc& J,
103  const scalarField& q,
104  const scalarField& qDot
105  ) const;
106 };
107 
108 
109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 
111 } // End namespace joints
112 } // End namespace RBD
113 } // End namespace Foam
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 
117 #endif
118 
119 // ************************************************************************* //
joint.H
Foam::RBD::joints::Rs::TypeName
TypeName("Rs")
Runtime type information.
Foam::RBD::joint::XSvc
Joint state returned by jcalc.
Definition: joint.H:124
Foam::RBD::joints::Rs::jcalc
virtual void jcalc(joint::XSvc &J, const scalarField &q, const scalarField &qDot) const
Update the model state for this joint.
Definition: Rs.C:96
Foam::RBD::joints::Rs::unitQuaternion
virtual bool unitQuaternion() const
Return true as this joint describes rotation using a quaternion.
Definition: Rs.C:89
Foam::Field< scalar >
Foam::RBD::joints::Rs
Spherical joint for rotation about the x/y/z-axes using a quaternion (Euler parameters) to avoid gimb...
Definition: Rs.H:66
Foam::RBD::joints::Rs::Rs
Rs()
Construct for given model.
Definition: Rs.C:55
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
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::RBD::joints::Rs::clone
virtual autoPtr< joint > clone() const
Clone this joint.
Definition: Rs.C:75
Foam::RBD::joints::Rs::~Rs
virtual ~Rs()
Destructor.
Definition: Rs.C:83
Foam::RBD::joint
Abstract base-class for all rigid-body joints.
Definition: joint.H:84