00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. 00006 \\/ M anipulation | 00007 ------------------------------------------------------------------------------- 00008 License 00009 This file is part of OpenFOAM. 00010 00011 OpenFOAM is free software: you can redistribute it and/or modify it 00012 under the terms of the GNU General Public License as published by 00013 the Free Software Foundation, either version 3 of the License, or 00014 (at your option) any later version. 00015 00016 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT 00017 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00018 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00019 for more details. 00020 00021 You should have received a copy of the GNU General Public License 00022 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. 00023 00024 Class 00025 Foam::sixDoFRigidBodyMotionConstraints::fixedPoint 00026 00027 Description 00028 sixDoFRigidBodyMotionConstraint. Point fixed in space. 00029 00030 SourceFiles 00031 fixedPoint.C 00032 00033 \*---------------------------------------------------------------------------*/ 00034 00035 #ifndef fixedPoint_H 00036 #define fixedPoint_H 00037 00038 #include <forces/sixDoFRigidBodyMotionConstraint.H> 00039 #include <OpenFOAM/point.H> 00040 00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00042 00043 namespace Foam 00044 { 00045 00046 namespace sixDoFRigidBodyMotionConstraints 00047 { 00048 00049 /*---------------------------------------------------------------------------*\ 00050 Class fixedPoint Declaration 00051 \*---------------------------------------------------------------------------*/ 00052 00053 class fixedPoint 00054 : 00055 public sixDoFRigidBodyMotionConstraint 00056 { 00057 // Private data 00058 00059 //- Point which is rigidly attached to the body and constrains 00060 // it so that this point remains fixed. This serves as the 00061 // reference point for displacements as well as the target 00062 // position. 00063 point fixedPoint_; 00064 00065 00066 public: 00067 00068 //- Runtime type information 00069 TypeName("fixedPoint"); 00070 00071 00072 // Constructors 00073 00074 //- Construct from components 00075 fixedPoint 00076 ( 00077 const dictionary& sDoFRBMCDict 00078 ); 00079 00080 //- Construct and return a clone 00081 virtual autoPtr<sixDoFRigidBodyMotionConstraint> clone() const 00082 { 00083 return autoPtr<sixDoFRigidBodyMotionConstraint> 00084 ( 00085 new fixedPoint(*this) 00086 ); 00087 } 00088 00089 00090 // Destructor 00091 00092 virtual ~fixedPoint(); 00093 00094 00095 // Member Functions 00096 00097 //- Calculate the constraint position, force and moment. 00098 // Global reference frame vectors. Returns boolean stating 00099 // whether the constraint been converged to tolerance. 00100 virtual bool constrain 00101 ( 00102 const sixDoFRigidBodyMotion& motion, 00103 const vector& existingConstraintForce, 00104 const vector& existingConstraintMoment, 00105 scalar deltaT, 00106 vector& constraintPosition, 00107 vector& constraintForceIncrement, 00108 vector& constraintMomentIncrement 00109 ) const; 00110 00111 //- Update properties from given dictionary 00112 virtual bool read(const dictionary& sDoFRBMCCoeff); 00113 00114 //- Write 00115 virtual void write(Ostream&) const; 00116 }; 00117 00118 00119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00120 00121 } // End namespace solidBodyMotionFunctions 00122 } // End namespace Foam 00123 00124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00125 00126 #endif 00127 00128 // ************************ vim: set sw=4 sts=4 et: ************************ //