sixDoFSolverI.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) 2015 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
26\*---------------------------------------------------------------------------*/
27
28// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
29
31{
32 return body_.motionState_.centreOfRotation();
33}
34
36{
37 return body_.motionState_.Q();
38}
39
41{
42 return body_.motionState_.v();
43}
44
46{
47 return body_.motionState_.a();
48}
49
51{
52 return body_.motionState_.pi();
53}
54
56{
57 return body_.motionState_.tau();
58}
59
60
62{
63 return body_.motionState0_.centreOfRotation();
64}
65
67{
68 return body_.motionState0_.Q();
69}
70
71
73{
74 return body_.motionState0_.v();
75}
76
77
79{
80 return body_.motionState0_.a();
81}
82
83
85{
86 return body_.motionState0_.pi();
87}
88
89
91{
92 return body_.motionState0_.tau();
93}
94
95inline Foam::scalar Foam::sixDoFSolver::aDamp() const
96{
97 return body_.aDamp_;
98}
99
101{
102 return body_.tConstraints_;
103}
104
106{
107 return body_.rConstraints_;
108}
109
110//- Apply rotation tensors to Q0 for the given torque (pi) and deltaT
111// and return the rotated Q and pi as a tuple
113(
114 const tensor& Q0,
115 const vector& pi,
116 const scalar deltaT
117) const
118{
119 return body_.rotate(Q0, pi, deltaT);
120}
121
122//- Update and relax accelerations from the force and torque
124(
125 const vector& fGlobal,
126 const vector& tauGlobal
127)
128{
129 body_.updateAcceleration(fGlobal, tauGlobal);
130}
131
132
133// ************************************************************************* //
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...
Definition: Tuple2.H:58
const point & centreOfRotation() const
Return access to the centre of mass.
tensor tConstraints() const
Translational constraint tensor.
void updateAcceleration(const vector &fGlobal, const vector &tauGlobal)
Update and relax accelerations from the force and torque.
const vector & tau0() const
Return the torque at previous time-step.
Definition: sixDoFSolverI.H:90
vector & pi()
Return non-const access to angular momentum.
Definition: sixDoFSolverI.H:50
point & centreOfRotation()
Return the current centre of rotation.
Definition: sixDoFSolverI.H:30
const point & centreOfRotation0() const
Return the centre of rotation at previous time-step.
Definition: sixDoFSolverI.H:61
Tuple2< tensor, vector > rotate(const tensor &Q0, const vector &pi, const scalar deltaT) const
Apply rotation tensors to Q0 for the given torque (pi) and deltaT.
sixDoFRigidBodyMotion & body_
The rigid body.
Definition: sixDoFSolver.H:61
tensor & Q()
Return the orientation.
Definition: sixDoFSolverI.H:35
scalar aDamp() const
Acceleration damping coefficient (for steady-state simulations)
Definition: sixDoFSolverI.H:95
const vector & v0() const
Return the velocity at previous time-step.
Definition: sixDoFSolverI.H:72
const vector & a0() const
Return the acceleration at previous time-step.
Definition: sixDoFSolverI.H:78
const vector & pi0() const
Return the angular momentum at previous time-step.
Definition: sixDoFSolverI.H:84
const tensor & Q0() const
Return the orientation at previous time-step.
Definition: sixDoFSolverI.H:66
tensor rConstraints() const
Rotational constraint tensor.
vector & a()
Return non-const access to acceleration.
Definition: sixDoFSolverI.H:45
vector & tau()
Return non-const access to torque.
Definition: sixDoFSolverI.H:55
vector & v()
Return non-const access to vector.
Definition: sixDoFSolverI.H:40