OpenFOAM: API Guide
v2112
The open source CFD toolbox
sphericalAngularDamper.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::restraints::sphericalAngularDamper
28
29
Group
30
grpRigidBodyDynamicsRestraints
31
32
Description
33
Spherical angular damper restraint.
34
Operates in the local frame of the body.
35
36
SourceFiles
37
sphericalAngularDamper.C
38
39
\*---------------------------------------------------------------------------*/
40
41
#ifndef sphericalAngularDamper_H
42
#define sphericalAngularDamper_H
43
44
#include "
rigidBodyRestraint.H
"
45
46
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48
namespace
Foam
49
{
50
namespace
RBD
51
{
52
namespace
restraints
53
{
54
55
/*---------------------------------------------------------------------------*\
56
Class sphericalAngularDamper Declaration
57
\*---------------------------------------------------------------------------*/
58
59
class
sphericalAngularDamper
60
:
61
public
restraint
62
{
63
// Private data
64
65
//- Damping coefficient [Nms/rad]
66
scalar coeff_;
67
68
69
public
:
70
71
//- Runtime type information
72
TypeName
(
"sphericalAngularDamper"
);
73
74
75
// Constructors
76
77
//- Construct from components
78
sphericalAngularDamper
79
(
80
const
word
&
name
,
81
const
dictionary
&
dict
,
82
const
rigidBodyModel
& model
83
);
84
85
//- Construct and return a clone
86
virtual
autoPtr<restraint>
clone
()
const
87
{
88
return
autoPtr<restraint>
89
(
90
new
sphericalAngularDamper
(*
this
)
91
);
92
}
93
94
95
//- Destructor
96
virtual
~sphericalAngularDamper
();
97
98
99
// Member Functions
100
101
//- Accumulate the restraint internal joint forces into the tau field and
102
// external forces into the fx field
103
virtual
void
restrain
104
(
105
scalarField
& tau,
106
Field<spatialVector>
& fx,
107
const
rigidBodyModelState
& state
108
)
const
;
109
110
//- Update properties from given dictionary
111
virtual
bool
read
(
const
dictionary
&
dict
);
112
113
//- Write
114
virtual
void
write
(
Ostream
&)
const
;
115
};
116
117
118
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119
120
}
// End namespace restraints
121
}
// End namespace RBD
122
}
// End namespace Foam
123
124
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125
126
#endif
127
128
// ************************************************************************* //
Foam::RBD::restraint::name
const word & name() const
Return the name.
Definition:
rigidBodyRestraint.H:152
Foam::RBD::rigidBodyModelState
Holds the motion state of rigid-body model.
Definition:
rigidBodyModelState.H:67
Foam::word
A class for handling words, derived from Foam::string.
Definition:
word.H:65
Foam::RBD::restraints::sphericalAngularDamper::sphericalAngularDamper
sphericalAngularDamper(const word &name, const dictionary &dict, const rigidBodyModel &model)
Construct from components.
Definition:
sphericalAngularDamper.C:56
Foam::RBD::restraints::sphericalAngularDamper::~sphericalAngularDamper
virtual ~sphericalAngularDamper()
Destructor.
Definition:
sphericalAngularDamper.C:70
Foam::Field< scalar >
dict
dictionary dict
Definition:
searchingEngine.H:14
Foam::RBD::rigidBodyModel
Basic rigid-body model representing a system of rigid-bodies connected by 1-6 DoF joints.
Definition:
rigidBodyModel.H:83
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::RBD::restraints::sphericalAngularDamper
Spherical angular damper restraint. Operates in the local frame of the body.
Definition:
sphericalAngularDamper.H:58
Foam::RBD::restraints::sphericalAngularDamper::clone
virtual autoPtr< restraint > clone() const
Construct and return a clone.
Definition:
sphericalAngularDamper.H:85
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition:
HashPtrTable.H:53
Foam::RBD::restraints::sphericalAngularDamper::write
virtual void write(Ostream &) const
Write.
Definition:
sphericalAngularDamper.C:109
Foam::RBD::restraints::sphericalAngularDamper::read
virtual bool read(const dictionary &dict)
Update properties from given dictionary.
Definition:
sphericalAngularDamper.C:96
Foam::RBD::restraint
Base class for defining restraints for rigid-body dynamics.
Definition:
rigidBodyRestraint.H:68
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition:
Ostream.H:56
Foam::RBD::restraints::sphericalAngularDamper::restrain
virtual void restrain(scalarField &tau, Field< spatialVector > &fx, const rigidBodyModelState &state) const
Accumulate the restraint internal joint forces into the tau field and.
Definition:
sphericalAngularDamper.C:77
rigidBodyRestraint.H
Foam::RBD::restraints::sphericalAngularDamper::TypeName
TypeName("sphericalAngularDamper")
Runtime type information.
src
rigidBodyDynamics
restraints
sphericalAngularDamper
sphericalAngularDamper.H
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.