42 #ifndef functionObjects_forcesBase_H
43 #define functionObjects_forcesBase_H
54 namespace functionObjects
269 virtual bool write();
Generic GeometricField class.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
static const List< word > & null()
Return a null List.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A list of keyword definitions, which are a keyword followed by any number of values (e....
const word & name() const
Return the name of this functionObject.
Calculates the forces and moments by integrating the pressure and skin-friction forces over a given l...
Switch directForceDensity_
Is the force density being supplied directly?
virtual void calcForcesMoments()
Calculate the forces and moments.
List< Field< vector > > moment_
Pressure, viscous and porous moment per bin.
word pName_
Name of pressure field.
scalar rhoRef_
Reference density needed for incompressible calculations.
bool porosity_
Flag to include porosity effects.
tmp< volScalarField > alpha() const
Get the volume fraction field.
List< point > binPoints_
Bin positions along binDir.
void initialise()
Initialise the fields.
word UName_
Name of velocity field.
virtual wordList fields() const
Return the list of fields required.
virtual void writeCoRHeader(Ostream &file)
Write the time varying centre of rotation column header.
word phaseName_
The name of the phase (optional)
scalar binMin_
Minimum bin bounds.
label nBin_
Number of bins.
bool initialised_
Initialised flag.
tmp< volSymmTensorField > devTau() const
Return the effective viscous stress (laminar + turbulent).
void applyBins(const vectorField &Md, const vectorField &fN, const vectorField &fT, const vectorField &fP, const vectorField &d)
Accumulate bin data.
tmp< volScalarField > mu() const
Dynamic viscosity field.
virtual vector CofR() const =0
Return the current centre of the rigid body.
void operator=(const forcesBase &)=delete
Disallow default bitwise assignment.
virtual vector forceEff() const
Return the total force.
forcesBase(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
TypeName("forcesBase")
Runtime type information.
virtual vector momentEff() const
Return the total moment.
virtual void writeCoRValueHeader(Ostream &file)
Write the constant centre of rotation value in the header.
void writeBins()
Helper function to write bin data.
virtual ~forcesBase()
Destructor.
virtual void writeFileHeader(const label i)
Output file header information.
word rhoName_
Name of density field (optional)
OFstream & file()
Return access to the file (if only 1)
labelHashSet patchSet_
Patches to integrate forces over.
bool binCumulative_
Should bin data be cumulative?
List< Field< vector > > force_
Pressure, viscous and porous force per bin.
void writeForces()
Helper function to write force data.
tmp< volScalarField > rho() const
Return rho if specified otherwise rhoRef.
fileID
Enumeration for ensuring the right file is accessed.
vector binDir_
Direction used to determine bin orientation.
virtual bool execute()
Execute, currently does nothing.
scalar binDx_
Distance between bin divisions.
virtual bool write()
Write the forces.
scalar pRef_
Reference pressure.
virtual void writeCofR(Ostream &file)
Write the time varying centre of rotation.
word fDName_
The name of the force density (fD) field.
virtual bool read(const dictionary &)
Read the forces data.
wordList createFileNames(const dictionary &dict) const
Create file names for forces and bins.
Specialisation of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
functionObject base class for creating, maintaining and writing log files e.g. integrated of averaged...
OFstream & file()
Return access to the file (if only 1)
Registry of regIOobjects.
A class for managing temporary objects.
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.