115 #ifndef functionObjects_forces_H
116 #define functionObjects_forces_H
128 namespace functionObjects
137 public fvMeshFunctionObject,
153 List<Field<vector>>
force_;
333 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,...
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?
bool localSystem_
Flag to indicate whether we are using a local co-ordinate sys.
List< Field< vector > > moment_
Pressure, viscous and porous moment per bin.
virtual ~forces()
Destructor.
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.
word phaseName_
The name of the phase (optional)
scalar binMin_
Minimum bin bounds.
label nBin_
Number of bins.
bool initialised_
Initialised flag.
forces(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
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 void calcForcesMoment()
Calculate the forces and moments.
virtual vector forceEff() const
Return the total force.
coordinateSystem coordSys_
Coordinate system used when evaluating forces/moments.
virtual vector momentEff() const
Return the total moment.
void writeBins()
Helper function to write bin data.
TypeName("forces")
Runtime type information.
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.
void operator=(const forces &)=delete
Disallow default bitwise assignment.
scalar binDx_
Distance between bin divisions.
virtual bool write()
Write the forces.
scalar pRef_
Reference pressure.
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.
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.
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys.