mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
147 lines
3.5 KiB
C++
147 lines
3.5 KiB
C++
/*---------------------------------------------------------------------------*\
|
|
========= |
|
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
\\ / O peration |
|
|
\\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
|
|
\\/ M anipulation |
|
|
-------------------------------------------------------------------------------
|
|
License
|
|
This file is part of OpenFOAM.
|
|
|
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
Class
|
|
Foam::forceCoeffs
|
|
|
|
Description
|
|
Derived from the forces function object, creates a specialisation to
|
|
calculate lift and drag forces.
|
|
|
|
SourceFiles
|
|
forceCoeffs.C
|
|
IOforceCoeffs.H
|
|
|
|
\*---------------------------------------------------------------------------*/
|
|
|
|
#ifndef forceCoeffs_H
|
|
#define forceCoeffs_H
|
|
|
|
#include "forces.H"
|
|
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
namespace Foam
|
|
{
|
|
|
|
/*---------------------------------------------------------------------------*\
|
|
Class forceCoeffs Declaration
|
|
\*---------------------------------------------------------------------------*/
|
|
|
|
class forceCoeffs
|
|
:
|
|
public forces
|
|
{
|
|
// Private data
|
|
|
|
// Force coefficient geometry
|
|
|
|
//- Lift
|
|
vector liftDir_;
|
|
|
|
//- Drag
|
|
vector dragDir_;
|
|
|
|
//- Pitch
|
|
vector pitchAxis_;
|
|
|
|
|
|
// Free-stream conditions
|
|
|
|
//- Velocity magnitude
|
|
scalar magUInf_;
|
|
|
|
|
|
// Reference scales
|
|
|
|
//- Length
|
|
scalar lRef_;
|
|
|
|
//- Area
|
|
scalar Aref_;
|
|
|
|
|
|
// Private Member Functions
|
|
|
|
//- Disallow default bitwise copy construct
|
|
forceCoeffs(const forceCoeffs&);
|
|
|
|
//- Disallow default bitwise assignment
|
|
void operator=(const forceCoeffs&);
|
|
|
|
|
|
protected:
|
|
|
|
//- Output file header information
|
|
virtual void writeFileHeader();
|
|
|
|
|
|
public:
|
|
|
|
//- Runtime type information
|
|
TypeName("forceCoeffs");
|
|
|
|
|
|
// Constructors
|
|
|
|
//- Construct for given objectRegistry and dictionary.
|
|
// Allow the possibility to load fields from files
|
|
forceCoeffs
|
|
(
|
|
const word& name,
|
|
const objectRegistry&,
|
|
const dictionary&,
|
|
const bool loadFromFiles = false
|
|
);
|
|
|
|
|
|
//- Destructor
|
|
virtual ~forceCoeffs();
|
|
|
|
|
|
// Member Functions
|
|
|
|
//- Read the forces data
|
|
virtual void read(const dictionary&);
|
|
|
|
//- Execute, currently does nothing
|
|
virtual void execute();
|
|
|
|
//- Execute at the final time-loop, currently does nothing
|
|
virtual void end();
|
|
|
|
//- Write the forces
|
|
virtual void write();
|
|
};
|
|
|
|
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
} // End namespace Foam
|
|
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
#endif
|
|
|
|
// ************************************************************************* //
|