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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::RBD::joints::Rs
28
29Group
30 grpRigidBodyDynamicsJoints
31
32Description
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
44SourceFiles
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
56namespace Foam
57{
58namespace RBD
59{
60namespace joints
61{
62
63/*---------------------------------------------------------------------------*\
64 Class Rs Declaration
65\*---------------------------------------------------------------------------*/
67class Rs
68:
69 public joint
70{
71
72public:
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 state returned by jcalc.
Definition: joint.H:125
Abstract base-class for all rigid-body joints.
Definition: joint.H:85
Spherical joint for rotation about the x/y/z-axes using a quaternion (Euler parameters) to avoid gimb...
Definition: Rs.H:69
virtual autoPtr< joint > clone() const
Clone this joint.
Definition: Rs.C:75
TypeName("Rs")
Runtime type information.
virtual void jcalc(joint::XSvc &J, const scalarField &q, const scalarField &qDot) const
Update the model state for this joint.
Definition: Rs.C:96
virtual ~Rs()
Destructor.
Definition: Rs.C:83
virtual bool unitQuaternion() const
Return true as this joint describes rotation using a quaternion.
Definition: Rs.C:89
Rs()
Construct for given model.
Definition: Rs.C:55
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73