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::solidBodyMotionFunctions::SKA 00026 00027 Description 00028 Sea Keeping Analysis (SKA) 6DoF motion function. 00029 00030 Obtained by interpolating tabulated data for surge (x-translation), 00031 sway (y-translation), heave (z-translation), roll (rotation about x), 00032 pitch (rotation about y) and yaw (rotation about z). 00033 00034 See Also 00035 SDA (Ship design analysis) for 3DoF motion. 00036 00037 SourceFiles 00038 SKA.C 00039 00040 \*---------------------------------------------------------------------------*/ 00041 00042 #ifndef SKA_H 00043 #define SKA_H 00044 00045 #include <dynamicFvMesh/solidBodyMotionFunction.H> 00046 #include <OpenFOAM/primitiveFields.H> 00047 #include <OpenFOAM/Vector2D_.H> 00048 00049 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00050 00051 namespace Foam 00052 { 00053 namespace solidBodyMotionFunctions 00054 { 00055 00056 /*---------------------------------------------------------------------------*\ 00057 Class SKA Declaration 00058 \*---------------------------------------------------------------------------*/ 00059 00060 class SKA 00061 : 00062 public solidBodyMotionFunction 00063 { 00064 // Private data 00065 00066 //- Time data file name read from dictionary 00067 fileName timeDataFileName_; 00068 00069 //- Center of gravity read from dictionary 00070 vector CofG_; 00071 00072 //- Type used to read in the translation and rotation "vectors" 00073 typedef Vector2D<vector> translationRotationVectors; 00074 00075 //- Field of times 00076 scalarField times_; 00077 00078 //- Field of translation and rotation "vectors" 00079 Field<translationRotationVectors> values_; 00080 00081 00082 // Private Member Functions 00083 00084 //- Disallow copy construct 00085 SKA(const SKA&); 00086 00087 //- Disallow default bitwise assignment 00088 void operator=(const SKA&); 00089 00090 00091 public: 00092 00093 //- Runtime type information 00094 TypeName("SKA"); 00095 00096 00097 // Constructors 00098 00099 //- Construct from components 00100 SKA 00101 ( 00102 const dictionary& SBMFCoeffs, 00103 const Time& runTime 00104 ); 00105 00106 00107 // Destructor 00108 00109 virtual ~SKA(); 00110 00111 00112 // Member Functions 00113 00114 //- Return the solid-body motion transformation septernion 00115 virtual septernion transformation() const; 00116 00117 //- Update properties from given dictionary 00118 virtual bool read(const dictionary& SBMFCoeffs); 00119 }; 00120 00121 00122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00123 00124 } // End namespace solidBodyMotionFunctions 00125 } // End namespace Foam 00126 00127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00128 00129 #endif 00130 00131 // ************************ vim: set sw=4 sts=4 et: ************************ //