OpenFOAM: API Guide
v2112
The open source CFD toolbox
softWall.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) 2019 OpenCFD Ltd.
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::softWall
28
29
Group
30
grpRigidBodyDynamicsRestraints
31
32
Description
33
Soft wall is a Damper-Linear spring restraint. Acts as a "soft" wall
34
when the distance between 'anchor' and 'refAttachmentPt' in the
35
wallNormal direction becomes negative.
36
37
A system of spring-damper is activated to simulate a soft collision
38
de-acceleration.
39
40
41
SourceFiles
42
softWall.C
43
44
\*---------------------------------------------------------------------------*/
45
46
#ifndef RBD_restraints_softWall_H
47
#define RBD_restraints_softWall_H
48
49
#include "
rigidBodyRestraint.H
"
50
51
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52
53
namespace
Foam
54
{
55
namespace
RBD
56
{
57
namespace
restraints
58
{
59
60
/*---------------------------------------------------------------------------*\
61
Class softWall Declaration
62
\*---------------------------------------------------------------------------*/
63
64
class
softWall
65
:
66
public
restraint
67
{
68
// Private data
69
70
//- Anchor point, where the spring is attached to an immovable
71
// object
72
point
anchor_;
73
74
//- Reference point of attachment to the solid body
75
point
refAttachmentPt_;
76
77
//- Damping factor
78
scalar psi_;
79
80
//- Damping coefficient [1/sec]
81
scalar C_;
82
83
//- Wall normal
84
vector
wallNormal_;
85
86
87
public
:
88
89
//- Runtime type information
90
TypeName
(
"softWall"
);
91
92
93
// Constructors
94
95
//- Construct from components
96
softWall
97
(
98
const
word
&
name
,
99
const
dictionary
&
dict
,
100
const
rigidBodyModel
& model
101
);
102
103
//- Construct and return a clone
104
virtual
autoPtr<restraint>
clone
()
const
105
{
106
return
autoPtr<restraint>
107
(
108
new
softWall
(*
this
)
109
);
110
}
111
112
113
//- Destructor
114
virtual
~softWall
();
115
116
117
// Member Functions
118
119
120
// Restrain forces
121
virtual
void
restrain
122
(
123
scalarField
& tau,
124
Field<spatialVector>
& fx,
125
const
rigidBodyModelState
& state
126
)
const
;
127
128
//- Update properties from given dictionary
129
virtual
bool
read
(
const
dictionary
&
dict
);
130
131
//- Write
132
virtual
void
write
(
Ostream
&)
const
;
133
};
134
135
136
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137
138
}
// End namespace restraints
139
}
// End namespace RBD
140
}
// End namespace Foam
141
142
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143
144
#endif
145
146
// ************************************************************************* //
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::softWall::read
virtual bool read(const dictionary &dict)
Update properties from given dictionary.
Definition:
softWall.C:131
Foam::RBD::restraints::softWall::~softWall
virtual ~softWall()
Destructor.
Definition:
softWall.C:71
Foam::RBD::restraints::softWall::write
virtual void write(Ostream &) const
Write.
Definition:
softWall.C:148
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::softWall::softWall
softWall(const word &name, const dictionary &dict, const rigidBodyModel &model)
Construct from components.
Definition:
softWall.C:57
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition:
HashPtrTable.H:53
Foam::Vector< scalar >
Foam::RBD::restraint
Base class for defining restraints for rigid-body dynamics.
Definition:
rigidBodyRestraint.H:68
Foam::RBD::restraints::softWall::clone
virtual autoPtr< restraint > clone() const
Construct and return a clone.
Definition:
softWall.H:103
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition:
Ostream.H:56
Foam::RBD::restraints::softWall
Soft wall is a Damper-Linear spring restraint. Acts as a "soft" wall when the distance between 'ancho...
Definition:
softWall.H:63
Foam::RBD::restraints::softWall::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:
softWall.C:78
Foam::RBD::restraints::softWall::TypeName
TypeName("softWall")
Runtime type information.
rigidBodyRestraint.H
src
rigidBodyDynamics
restraints
softWall
softWall.H
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.