tabulatedAxialAngularSpring.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) 2011-2013 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::sixDoFRigidBodyMotionRestraints::tabulatedAxialAngularSpring
28
29Description
30 sixDoFRigidBodyMotionRestraints model. Axial angular spring with moment
31 values drawn from an interpolation table. Linear damping.
32
33SourceFiles
34 tabulatedAxialAngularSpring.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef tabulatedAxialAngularSpring_H
39#define tabulatedAxialAngularSpring_H
40
42#include "point.H"
43#include "tensor.H"
44#include "interpolationTable.H"
45
46// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48namespace Foam
49{
50
51namespace sixDoFRigidBodyMotionRestraints
52{
53
54/*---------------------------------------------------------------------------*\
55 Class tabulatedAxialAngularSpring Declaration
56\*---------------------------------------------------------------------------*/
59:
61{
62 // Private data
63
64 //- Reference orientation where there is no moment
65 tensor refQ_;
66
67 //- Global unit axis around which the motion is sprung
68 vector axis_;
69
70 //- Spring moment interpolation table, depending on angleFormat
72
73 //- Boolean stating whether the angle around the axis needs to
74 // be converted to degrees before asking the
75 // interpolationTable for a moment value
76 bool convertToDegrees_;
77
78 //- Damping coefficient (Nms/rad)
79 scalar damping_;
80
81
82public:
83
84 //- Runtime type information
85 TypeName("tabulatedAxialAngularSpring");
86
87
88 // Constructors
89
90 //- Construct from components
92 (
93 const word& name,
94 const dictionary& sDoFRBMRDict
95 );
96
97 //- Construct and return a clone
99 {
101 (
103 );
104 }
105
106
107 //- Destructor
109
110
111 // Member Functions
112
113 //- Calculate the restraint position, force and moment.
114 // Global reference frame vectors.
115 virtual void restrain
116 (
117 const sixDoFRigidBodyMotion& motion,
118 vector& restraintPosition,
119 vector& restraintForce,
120 vector& restraintMoment
121 ) const;
122
123 //- Update properties from given dictionary
124 virtual bool read(const dictionary& sDoFRBMRCoeff);
125
126 //- Write
127 virtual void write(Ostream&) const;
128};
129
130
131// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132
133} // End namespace solidBodyMotionFunctions
134} // End namespace Foam
135
136// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137
138#endif
139
140// ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
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
An interpolation/look-up table of scalar vs <Type> values. The reference scalar values must be monoto...
Base class for defining restraints for sixDoF motions.
const word & name() const
Return the name.
sixDoFRigidBodyMotionRestraints model. Axial angular spring with moment values drawn from an interpol...
TypeName("tabulatedAxialAngularSpring")
Runtime type information.
virtual void restrain(const sixDoFRigidBodyMotion &motion, vector &restraintPosition, vector &restraintForce, vector &restraintMoment) const
Calculate the restraint position, force and moment.
virtual autoPtr< sixDoFRigidBodyMotionRestraint > clone() const
Construct and return a clone.
virtual bool read(const dictionary &sDoFRBMRCoeff)
Update properties from given dictionary.
Six degree of freedom motion for a rigid body.
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73