linearAxialAngularSpring.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::linearAxialAngularSpring
28
29Description
30 sixDoFRigidBodyMotionRestraints model. Linear axial angular spring.
31
32SourceFiles
33 linearAxialAngularSpring.C
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef linearAxialAngularSpring_H
38#define linearAxialAngularSpring_H
39
41#include "point.H"
42#include "tensor.H"
43
44// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46namespace Foam
47{
48
49namespace sixDoFRigidBodyMotionRestraints
50{
51
52/*---------------------------------------------------------------------------*\
53 Class linearAxialAngularSpring Declaration
54\*---------------------------------------------------------------------------*/
57:
59{
60 // Private data
61
62 //- Reference orientation where there is no moment
63 tensor refQ_;
64
65 //- Global unit axis around which the motion is sprung
66 vector axis_;
67
68 //- Spring stiffness coefficient (Nm/rad)
69 scalar stiffness_;
70
71 //- Damping coefficient (Nms/rad)
72 scalar damping_;
73
74
75public:
76
77 //- Runtime type information
78 TypeName("linearAxialAngularSpring");
79
80
81 // Constructors
82
83 //- Construct from components
85 (
86 const word& name,
87 const dictionary& sDoFRBMRDict
88 );
89
90 //- Construct and return a clone
92 {
94 (
96 );
97 }
98
99
100 //- Destructor
102
103
104 // Member Functions
105
106 //- Calculate the restraint position, force and moment.
107 // Global reference frame vectors.
108 virtual void restrain
109 (
110 const sixDoFRigidBodyMotion& motion,
111 vector& restraintPosition,
112 vector& restraintForce,
113 vector& restraintMoment
114 ) const;
115
116 //- Update properties from given dictionary
117 virtual bool read(const dictionary& sDoFRBMRCoeff);
118
119 //- Write
120 virtual void write(Ostream&) const;
121};
122
123
124// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125
126} // End namespace solidBodyMotionFunctions
127} // End namespace Foam
128
129// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130
131#endif
132
133// ************************************************************************* //
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
Base class for defining restraints for sixDoF motions.
const word & name() const
Return the name.
sixDoFRigidBodyMotionRestraints model. Linear axial angular spring.
virtual void restrain(const sixDoFRigidBodyMotion &motion, vector &restraintPosition, vector &restraintForce, vector &restraintMoment) const
Calculate the restraint position, force and moment.
TypeName("linearAxialAngularSpring")
Runtime type information.
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