Go to the documentation of this file.
151 class objectRegistry;
162 public functionObjectState,
163 public functionObjectFile
170 const objectRegistry&
obr_;
341 const string& descriptor,
383 const bool loadFromFiles =
false,
428 virtual void write();
autoPtr< OFstream > localMomentFilePtr_
Local moment.
void createFiles()
Create the output files.
List< point > binPoints_
Bin positions along binDir.
Forward declarations of the specialisations of Field<T> for scalar, vector and tensor.
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
autoPtr< OFstream > localForceBinFilePtr_
Local force bins.
void writeBinnedForceMoment(const List< Field< vector > > &fm, autoPtr< OFstream > &osPtr) const
Helper function to write binned forces and moments.
A class for handling words, derived from string.
virtual ~forces()
Destructor.
Base class for function objects, adding functionality to read/write state information (data required ...
A class for managing temporary objects.
virtual void movePoints(const polyMesh &)
Update for changes of mesh.
void applyBins(const vectorField &Md, const vectorField &fN, const vectorField &fT, const vectorField &fP, const vectorField &d)
Accumulate bin data.
label nBin_
Number of bins.
void writeIntegratedHeader(const word &header, Ostream &os) const
Write header for integrated data.
word fieldName(const word &name) const
Create a field name.
labelHashSet patchSet_
Patches to integrate forces over.
scalar pRef_
Reference pressure.
TypeName("forces")
Runtime type information.
const objectRegistry & obr_
Reference to the database.
autoPtr< OFstream > forceFilePtr_
Forces.
void operator=(const forces &)
Disallow default bitwise assignment.
scalar rhoRef_
Reference density needed for incompressible calculations.
virtual void write()
Write the forces.
virtual vector forceEff() const
Return the total force.
This function object reads fields from the time directories and adds them to the mesh database for fu...
word rhoName_
Name of density field (optional)
autoPtr< OFstream > momentFilePtr_
Moments.
word pName_
Name of pressure field.
virtual void end()
Execute at the final time-loop, currently does nothing.
Mesh consisting of general polyhedral cells.
List< Field< vector > > force_
Pressure, viscous and porous force per bin.
Registry of regIOobjects.
autoPtr< OFstream > forceBinFilePtr_
Force bins.
void resetFields()
Reset the fields prior to accumulation of force/moments.
void writeBins()
Write binned data.
void initialiseBins()
Initialise the collection bins.
virtual void updateMesh(const mapPolyMesh &)
Update for changes of mesh.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
virtual void execute()
Execute, currently does nothing.
void writeForces()
Write force data.
bool localSystem_
Flag to indicate whether we are using a local co-ordinate sys.
word fDName_
The name of the force density (fD) field.
scalar binDx_
Distance between bin divisions.
virtual const word & name() const
Return name of the set of forces.
A list of keyword definitions, which are a keyword followed by any number of values (e....
bool initialised_
Initialised flag.
bool writeFields_
Write fields flag.
virtual void calcForcesMoment()
Calculate the forces and moments.
autoPtr< OFstream > localForceFilePtr_
Local force.
vector binDir_
Direction used to determine bin orientation.
virtual void timeSet()
Called when time was set at the end of the Time::operator++.
void writeIntegratedForceMoment(const string &descriptor, const vectorField &fm0, const vectorField &fm1, const vectorField &fm2, autoPtr< OFstream > &osPtr) const
Helper function to write integrated forces and moments.
scalar binMin_
Minimum bin bounds.
autoPtr< OFstream > localMomentBinFilePtr_
Local moment bins.
coordinateSystem coordSys_
Coordinate system used when evaluting forces/moments.
This function object calculates the forces and moments by integrating the pressure and skin-friction ...
Switch log_
Switch to send output to Info as well as to file.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
void addToFields(const label patchI, const vectorField &Md, const vectorField &fN, const vectorField &fT, const vectorField &fP)
Add patch contributions to force and moment fields.
bool porosity_
Flag to include porosity effects.
tmp< volScalarField > mu() const
Dynamic viscosity field.
virtual vector momentEff() const
Return the total moment.
const word name_
Name of model.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
List< Field< vector > > moment_
Pressure, viscous and porous moment per bin.
Base class for output file data handling.
virtual void read(const dictionary &)
Read the forces data.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
void writeBinHeader(const word &header, Ostream &os) const
Write header for binned data.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
void initialise()
Initialise the fields.
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys.
word UName_
Name of velocity field.
Generic GeometricField class.
tmp< volSymmTensorField > devRhoReff() const
Return the effective viscous stress (laminar + turbulent).
Switch directForceDensity_
Is the force density being supplied directly?
tmp< volScalarField > rho() const
Return rho if rhoName is specified otherwise rhoRef.
autoPtr< OFstream > momentBinFilePtr_
Moment bins.
forces(const forces &)
Disallow default bitwise copy construct.
Base class for other coordinate system specifications.
bool binCumulative_
Should bin data be cumulative?