Reorganised the location of the "sixDoFRigidBodyDisplacement" BC to avoid unnecessary
[OpenFOAM-1.6.x.git] / src / postProcessing / functionObjects / forces / pointPatchFields / derived / sixDoFRigidBodyDisplacement / sixDoFRigidBodyMotion / sixDoFRigidBodyMotionI.H
blobaeb75bdea4a0c0e03b00b464e770a9cc856b85b6
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2009-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
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 the
13     Free Software Foundation; either version 2 of the License, or (at your
14     option) any later version.
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.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 \*---------------------------------------------------------------------------*/
27 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
29 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
31 inline Foam::tensor
32 Foam::sixDoFRigidBodyMotion::rotationTensorX(scalar phi) const
34     return tensor
35     (
36         1, 0, 0,
37         0, Foam::cos(phi), -Foam::sin(phi),
38         0, Foam::sin(phi), Foam::cos(phi)
39     );
43 inline Foam::tensor
44 Foam::sixDoFRigidBodyMotion::rotationTensorY(scalar phi) const
46     return tensor
47     (
48         Foam::cos(phi), 0, Foam::sin(phi),
49         0, 1, 0,
50         -Foam::sin(phi), 0, Foam::cos(phi)
51     );
55 inline Foam::tensor
56 Foam::sixDoFRigidBodyMotion::rotationTensorZ(scalar phi) const
58     return tensor
59     (
60         Foam::cos(phi), -Foam::sin(phi), 0,
61         Foam::sin(phi), Foam::cos(phi), 0,
62         0, 0, 1
63     );
67 inline const Foam::sixDoFRigidBodyMotionState&
68 Foam::sixDoFRigidBodyMotion::motionState() const
70     return motionState_;
74 inline const Foam::point& Foam::sixDoFRigidBodyMotion::centreOfMass() const
76     return motionState_.centreOfMass();
80 inline const Foam::point& Foam::sixDoFRigidBodyMotion::refCentreOfMass() const
82     return refCentreOfMass_;
86 inline const Foam::diagTensor&
87 Foam::sixDoFRigidBodyMotion::momentOfInertia() const
89     return momentOfInertia_;
93 inline Foam::scalar Foam::sixDoFRigidBodyMotion::mass() const
95     return mass_;
99 inline const Foam::tensor& Foam::sixDoFRigidBodyMotion::Q() const
101     return motionState_.Q();
105 inline const Foam::vector& Foam::sixDoFRigidBodyMotion::v() const
107     return motionState_.v();
111 inline const Foam::vector& Foam::sixDoFRigidBodyMotion::a() const
113     return motionState_.a();
117 inline const Foam::vector& Foam::sixDoFRigidBodyMotion::pi() const
119     return motionState_.pi();
123 inline const Foam::vector& Foam::sixDoFRigidBodyMotion::tau() const
125     return motionState_.tau();
129 inline Foam::point& Foam::sixDoFRigidBodyMotion::centreOfMass()
131     return motionState_.centreOfMass();
135 inline Foam::point& Foam::sixDoFRigidBodyMotion::refCentreOfMass()
137     return refCentreOfMass_;
141 inline Foam::diagTensor& Foam::sixDoFRigidBodyMotion::momentOfInertia()
143     return momentOfInertia_;
147 inline Foam::scalar& Foam::sixDoFRigidBodyMotion::mass()
149     return mass_;
153 inline Foam::tensor& Foam::sixDoFRigidBodyMotion::Q()
155     return motionState_.Q();
159 inline Foam::vector& Foam::sixDoFRigidBodyMotion::v()
161     return motionState_.v();
165 inline Foam::vector& Foam::sixDoFRigidBodyMotion::a()
167     return motionState_.a();
171 inline Foam::vector& Foam::sixDoFRigidBodyMotion::pi()
173     return motionState_.pi();
177 inline Foam::vector& Foam::sixDoFRigidBodyMotion::tau()
179     return motionState_.tau();
183 // ************************************************************************* //