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 -------------------------------------------------------------------------------
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 \*---------------------------------------------------------------------------*/
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 
66 inline const Foam::tensor& Foam::sixDoFSolver::Q0() const
67 {
68  return body_.motionState0_.Q();
69 }
70 
71 
72 inline const Foam::vector& Foam::sixDoFSolver::v0() const
73 {
74  return body_.motionState0_.v();
75 }
76 
77 
78 inline const Foam::vector& Foam::sixDoFSolver::a0() const
79 {
80  return body_.motionState0_.a();
81 }
82 
83 
84 inline const Foam::vector& Foam::sixDoFSolver::pi0() const
85 {
86  return body_.motionState0_.pi();
87 }
88 
89 
90 inline const Foam::vector& Foam::sixDoFSolver::tau0() const
91 {
92  return body_.motionState0_.tau();
93 }
94 
95 inline 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 // ************************************************************************* //
Foam::Tensor
A templated (3 x 3) tensor of objects of <T> derived from MatrixSpace.
Definition: complexI.H:268
Foam::sixDoFSolver::rConstraints
tensor rConstraints() const
Definition: sixDoFSolverI.H:98
Foam::sixDoFSolver::Q
tensor & Q()
Definition: sixDoFSolverI.H:28
Foam::sixDoFSolver::tau0
const vector & tau0() const
Definition: sixDoFSolverI.H:83
Foam::sixDoFSolver::centreOfRotation
point & centreOfRotation()
Definition: sixDoFSolverI.H:23
Foam::sixDoFSolver::a
vector & a()
Definition: sixDoFSolverI.H:38
Foam::sixDoFSolver::v0
const vector & v0() const
Definition: sixDoFSolverI.H:65
Foam::sixDoFSolver::v
vector & v()
Definition: sixDoFSolverI.H:33
Foam::sixDoFSolver::Q0
const tensor & Q0() const
Definition: sixDoFSolverI.H:59
Foam::sixDoFSolver::rotate
Tuple2< tensor, vector > rotate(const tensor &Q0, const vector &pi, const scalar deltaT) const
Definition: sixDoFSolverI.H:109
Foam::sixDoFRigidBodyMotionState::centreOfRotation
const point & centreOfRotation() const
Definition: sixDoFRigidBodyMotionStateI.H:24
Foam::sixDoFSolver::centreOfRotation0
const point & centreOfRotation0() const
Definition: sixDoFSolverI.H:54
Foam::sixDoFSolver::pi
vector & pi()
Definition: sixDoFSolverI.H:43
Foam::constant::mathematical::pi
constexpr scalar pi(M_PI)
Foam::sixDoFSolver::aDamp
scalar aDamp() const
Definition: sixDoFSolverI.H:88
Foam::Vector< scalar >
Foam::sixDoFSolver::updateAcceleration
void updateAcceleration(const vector &fGlobal, const vector &tauGlobal)
Definition: sixDoFSolverI.H:122
Foam::sixDoFSolver::tConstraints
tensor tConstraints() const
Definition: sixDoFSolverI.H:93
Foam::sixDoFSolver::pi0
const vector & pi0() const
Definition: sixDoFSolverI.H:77
Foam::sixDoFSolver::tau
vector & tau()
Definition: sixDoFSolverI.H:48
Foam::Tuple2
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...
Definition: stringOps.H:56
Foam::sixDoFSolver::body_
sixDoFRigidBodyMotion & body_
Definition: sixDoFSolver.H:57
Foam::sixDoFSolver::a0
const vector & a0() const
Definition: sixDoFSolverI.H:71