OpenFOAM
7
The OpenFOAM Foundation
linearAxialAngularSpring.H
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
========= |
3
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
\\ / O peration | Website: https://openfoam.org
5
\\ / A nd | Copyright (C) 2016-2019 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::RBD::restraints::linearAxialAngularSpring
26
27
Description
28
Linear axial angular spring restraint.
29
30
SourceFiles
31
linearAxialAngularSpring.C
32
33
\*---------------------------------------------------------------------------*/
34
35
#ifndef linearAxialAngularSpring_H
36
#define linearAxialAngularSpring_H
37
38
#include "
rigidBodyRestraint.H
"
39
40
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41
42
namespace
Foam
43
{
44
namespace
RBD
45
{
46
namespace
restraints
47
{
48
49
/*---------------------------------------------------------------------------*\
50
Class linearAxialAngularSpring Declaration
51
\*---------------------------------------------------------------------------*/
52
53
class
linearAxialAngularSpring
54
:
55
public
restraint
56
{
57
// Private Data
58
59
//- Reference orientation where there is no moment
60
tensor
refQ_;
61
62
//- Global unit axis around which the motion is sprung
63
vector
axis_;
64
65
//- Spring stiffness coefficient [Nm/rad]
66
scalar stiffness_;
67
68
//- Damping coefficient [Nms/rad]
69
scalar damping_;
70
71
72
public
:
73
74
//- Runtime type information
75
TypeName
(
"linearAxialAngularSpring"
);
76
77
78
// Constructors
79
80
//- Construct from components
81
linearAxialAngularSpring
82
(
83
const
word
&
name
,
84
const
dictionary
&
dict
,
85
const
rigidBodyModel
& model
86
);
87
88
//- Construct and return a clone
89
virtual
autoPtr<restraint>
clone
()
const
90
{
91
return
autoPtr<restraint>
92
(
93
new
linearAxialAngularSpring
(*
this
)
94
);
95
}
96
97
98
//- Destructor
99
virtual
~linearAxialAngularSpring
();
100
101
102
// Member Functions
103
104
//- Accumulate the retraint internal joint forces into the tau field and
105
// external forces into the fx field
106
virtual
void
restrain
107
(
108
scalarField
& tau,
109
Field<spatialVector>
& fx
110
)
const
;
111
112
//- Update properties from given dictionary
113
virtual
bool
read
(
const
dictionary
& dict);
114
115
//- Write
116
virtual
void
write
(
Ostream
&)
const
;
117
};
118
119
120
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121
122
}
// End namespace RBD
123
}
// End namespace RBD
124
}
// End namespace Foam
125
126
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127
128
#endif
129
130
// ************************************************************************* //
dict
dictionary dict
Definition:
searchingEngine.H:14
Foam::RBD::restraints::linearAxialAngularSpring::~linearAxialAngularSpring
virtual ~linearAxialAngularSpring()
Destructor.
Definition:
linearAxialAngularSpring.C:68
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition:
dictionary.H:158
Foam::RBD::restraint
Base class for defining restraints for rigid-body dynamics.
Definition:
rigidBodyRestraint.H:65
Foam::RBD::restraints::linearAxialAngularSpring::read
virtual bool read(const dictionary &dict)
Update properties from given dictionary.
Definition:
linearAxialAngularSpring.C:141
Foam::RBD::restraints::linearAxialAngularSpring::clone
virtual autoPtr< restraint > clone() const
Construct and return a clone.
Definition:
linearAxialAngularSpring.H:88
Foam::RBD::restraints::linearAxialAngularSpring::write
virtual void write(Ostream &) const
Write.
Definition:
linearAxialAngularSpring.C:181
Foam::Field< scalar >
Foam::RBD::restraint::name
const word & name() const
Return the name.
Definition:
rigidBodyRestraint.H:149
Foam::word
A class for handling words, derived from string.
Definition:
word.H:59
Foam::RBD::restraints::linearAxialAngularSpring::restrain
virtual void restrain(scalarField &tau, Field< spatialVector > &fx) const
Accumulate the retraint internal joint forces into the tau field and.
Definition:
linearAxialAngularSpring.C:75
Foam::Vector< scalar >
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition:
Ostream.H:53
Foam::RBD::restraints::linearAxialAngularSpring::TypeName
TypeName("linearAxialAngularSpring")
Runtime type information.
Foam::RBD::restraints::linearAxialAngularSpring
Linear axial angular spring restraint.
Definition:
linearAxialAngularSpring.H:52
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition:
PtrList.H:52
Foam::RBD::rigidBodyModel
Basic rigid-body model representing a system of rigid-bodies connected by 1-6 DoF joints...
Definition:
rigidBodyModel.H:76
Foam::Tensor< scalar >
rigidBodyRestraint.H
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.H:213
Foam::RBD::restraints::linearAxialAngularSpring::linearAxialAngularSpring
linearAxialAngularSpring(const word &name, const dictionary &dict, const rigidBodyModel &model)
Construct from components.
Definition:
linearAxialAngularSpring.C:54
src
rigidBodyDynamics
restraints
linearAxialAngularSpring
linearAxialAngularSpring.H
Generated by
1.8.13