FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

forceCoeffs.H

Go 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-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::forceCoeffs
00026 
00027 Description
00028     Derived from the forces function object, creates a specialisation to
00029     calculate lift and drag forces.
00030 
00031 SourceFiles
00032     forceCoeffs.C
00033     IOforceCoeffs.H
00034 
00035 \*---------------------------------------------------------------------------*/
00036 
00037 #ifndef forceCoeffs_H
00038 #define forceCoeffs_H
00039 
00040 #include <forces/forces.H>
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 
00047 /*---------------------------------------------------------------------------*\
00048                         Class forceCoeffs Declaration
00049 \*---------------------------------------------------------------------------*/
00050 
00051 class forceCoeffs
00052 :
00053     public forces
00054 {
00055     // Private data
00056 
00057         // Force coefficient geometry
00058 
00059             //- Lift
00060             vector liftDir_;
00061 
00062             //- Drag
00063             vector  dragDir_;
00064 
00065             //- Pitch
00066             vector pitchAxis_;
00067 
00068 
00069         // Free-stream conditions
00070 
00071             //- Velocity magnitude
00072             scalar magUInf_;
00073 
00074 
00075         // Reference scales
00076 
00077             //- Length
00078             scalar lRef_;
00079 
00080             //- Area
00081             scalar Aref_;
00082 
00083 
00084     // Private member functions
00085 
00086         //- Disallow default bitwise copy construct
00087         forceCoeffs(const forceCoeffs&);
00088 
00089         //- Disallow default bitwise assignment
00090         void operator=(const forceCoeffs&);
00091 
00092 
00093 protected:
00094 
00095     //- Output file header information
00096     virtual void writeFileHeader();
00097 
00098 
00099 public:
00100 
00101     //- Runtime type information
00102     TypeName("forceCoeffs");
00103 
00104 
00105     // Constructors
00106 
00107         //- Construct for given objectRegistry and dictionary.
00108         //  Allow the possibility to load fields from files
00109         forceCoeffs
00110         (
00111             const word& name,
00112             const objectRegistry&,
00113             const dictionary&,
00114             const bool loadFromFiles = false
00115         );
00116 
00117 
00118     //- Destructor
00119     virtual ~forceCoeffs();
00120 
00121 
00122     // Member Functions
00123 
00124         //- Read the forces data
00125         virtual void read(const dictionary&);
00126 
00127         //- Execute, currently does nothing
00128         virtual void execute();
00129 
00130         //- Execute at the final time-loop, currently does nothing
00131         virtual void end();
00132 
00133         //- Write the forces
00134         virtual void write();
00135 };
00136 
00137 
00138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00139 
00140 } // End namespace Foam
00141 
00142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00143 
00144 #endif
00145 
00146 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines