|
|
|
forceCoeffs.HGo to the documentation of this file.00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2009 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 the 00013 Free Software Foundation; either version 2 of the License, or (at your 00014 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, write to the Free Software Foundation, 00023 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00024 00025 Class 00026 Foam::forceCoeffs 00027 00028 Description 00029 Derived from the forces function object, creates a specialisation to 00030 calculate lift and drag forces. 00031 00032 SourceFiles 00033 forceCoeffs.C 00034 IOforceCoeffs.H 00035 00036 \*---------------------------------------------------------------------------*/ 00037 00038 #ifndef forceCoeffs_H 00039 #define forceCoeffs_H 00040 00041 #include "forces.H" 00042 00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00044 00045 namespace Foam 00046 { 00047 00048 /*---------------------------------------------------------------------------*\ 00049 Class forceCoeffs Declaration 00050 \*---------------------------------------------------------------------------*/ 00051 00052 class forceCoeffs 00053 : 00054 public forces 00055 { 00056 // Private data 00057 00058 // Force coefficient geometry 00059 00060 //- Lift 00061 vector liftDir_; 00062 00063 //- Drag 00064 vector dragDir_; 00065 00066 //- Pitch 00067 vector pitchAxis_; 00068 00069 00070 // Free-stream conditions 00071 00072 //- Velocity magnitude 00073 scalar magUInf_; 00074 00075 00076 // Reference scales 00077 00078 //- Length 00079 scalar lRef_; 00080 00081 //- Area 00082 scalar Aref_; 00083 00084 00085 // Private member functions 00086 00087 //- Disallow default bitwise copy construct 00088 forceCoeffs(const forceCoeffs&); 00089 00090 //- Disallow default bitwise assignment 00091 void operator=(const forceCoeffs&); 00092 00093 00094 protected: 00095 00096 //- Output file header information 00097 virtual void writeFileHeader(); 00098 00099 00100 public: 00101 00102 //- Runtime type information 00103 TypeName("forceCoeffs"); 00104 00105 00106 // Constructors 00107 00108 //- Construct for given objectRegistry and dictionary. 00109 // Allow the possibility to load fields from files 00110 forceCoeffs 00111 ( 00112 const word& name, 00113 const objectRegistry&, 00114 const dictionary&, 00115 const bool loadFromFiles = false 00116 ); 00117 00118 00119 // Destructor 00120 00121 virtual ~forceCoeffs(); 00122 00123 00124 // Member Functions 00125 00126 //- Read the forces data 00127 virtual void read(const dictionary&); 00128 00129 //- Execute, currently does nothing 00130 virtual void execute(); 00131 00132 //- Execute at the final time-loop, currently does nothing 00133 virtual void end(); 00134 00135 //- Write the forces 00136 virtual void write(); 00137 }; 00138 00139 00140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00141 00142 } // End namespace Foam 00143 00144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00145 00146 #endif 00147 00148 // ************************************************************************* // |