FreeFOAM The Cross-Platform CFD Toolkit
fixedOrientation.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 | Copyright (C) 1991-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
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.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::sixDoFRigidBodyMotionConstraints::fixedOrientation
26 
27 Description
28  sixDoFRigidBodyMotionConstraint. Orientation of body fixed global
29  space. Only valid where the predicted deviation from alignment is
30  < 90 degrees.
31 
32 SourceFiles
33  fixedOrientation.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef fixedOrientation_H
38 #define fixedOrientation_H
39 
41 #include <OpenFOAM/point.H>
42 #include <OpenFOAM/tensor.H>
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 namespace sixDoFRigidBodyMotionConstraints
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class fixedOrientation Declaration
54 \*---------------------------------------------------------------------------*/
55 
57 :
59 {
60 
61 public:
62 
63  //- Runtime type information
64  TypeName("fixedOrientation");
65 
66 
67  // Constructors
68 
69  //- Construct from components
71  (
72  const dictionary& sDoFRBMCDict
73  );
74 
75  //- Construct and return a clone
77  {
79  (
80  new fixedOrientation(*this)
81  );
82  }
83 
84 
85  // Destructor
86 
87  virtual ~fixedOrientation();
88 
89 
90  // Member Functions
91 
92  //- Calculate the constraint position, force and moment.
93  // Global reference frame vectors. Returns boolean stating
94  // whether the constraint been converged to tolerance.
95  virtual bool constrain
96  (
97  const sixDoFRigidBodyMotion& motion,
98  const vector& existingConstraintForce,
99  const vector& existingConstraintMoment,
100  scalar deltaT,
101  vector& constraintPosition,
102  vector& constraintForceIncrement,
103  vector& constraintMomentIncrement
104  ) const;
105 
106  //- Update properties from given dictionary
107  virtual bool read(const dictionary& sDoFRBMCCoeff);
108 
109  //- Write
110  virtual void write(Ostream&) const;
111 };
112 
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 } // End namespace solidBodyMotionFunctions
117 } // End namespace Foam
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 #endif
122 
123 // ************************ vim: set sw=4 sts=4 et: ************************ //