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();
virtual vector momentEff() const
Return the total moment.
word phaseName_
The name of the phase (optional)
virtual void writeFileHeader(const label i)
Output file header information.
List< Field< vector > > moment_
Pressure, viscous and porous moment per bin.
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
labelHashSet patchSet_
Patches to integrate forces over.
const word & name() const
Return the name of this functionObject.
word UName_
Name of velocity field.
virtual wordList fields() const
Return the list of fields required.
vector binDir_
Direction used to determine bin orientation.
A list of keyword definitions, which are a keyword followed by any number of values (e...
forces(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
coordinateSystem coordSys_
Coordinate system used when evaluating forces/moments.
virtual vector forceEff() const
Return the total force.
bool localSystem_
Flag to indicate whether we are using a local co-ordinate sys.
word pName_
Name of pressure field.
TypeName("forces")
Runtime type information.
void operator=(const forces &)=delete
Disallow default bitwise assignment.
static const List< T > & null()
Return a null List.
word rhoName_
Name of density field (optional)
virtual bool read(const dictionary &)
Read the forces data.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
void writeBins()
Helper function to write bin data.
bool binCumulative_
Should bin data be cumulative?
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys.
virtual bool execute()
Execute, currently does nothing.
A class for handling words, derived from string.
tmp< volScalarField > mu() const
Dynamic viscosity field.
scalar rhoRef_
Reference density needed for incompressible calculations.
bool initialised_
Initialised flag.
List< point > binPoints_
Bin positions along binDir.
virtual void calcForcesMoment()
Calculate the forces and moments.
tmp< volScalarField > rho() const
Return rho if specified otherwise rhoRef.
void applyBins(const vectorField &Md, const vectorField &fN, const vectorField &fT, const vectorField &fP, const vectorField &d)
Accumulate bin data.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
void initialise()
Initialise the fields.
bool porosity_
Flag to include porosity effects.
scalar binMin_
Minimum bin bounds.
void writeForces()
Helper function to write force data.
scalar pRef_
Reference pressure.
tmp< volSymmTensorField > devTau() const
Return the effective viscous stress (laminar + turbulent).
List< Field< vector > > force_
Pressure, viscous and porous force per bin.
tmp< volScalarField > alpha() const
Get the volume fraction field.
scalar binDx_
Distance between bin divisions.
Switch directForceDensity_
Is the force density being supplied directly?
OFstream & file()
Return access to the file (if only 1)
Calculates the forces and moments by integrating the pressure and skin-friction forces over a given l...
word fDName_
The name of the force density (fD) field.
A class for managing temporary objects.
Registry of regIOobjects.
virtual ~forces()
Destructor.
fileID
Enumeration for ensuring the right file is accessed.
label nBin_
Number of bins.
virtual bool write()
Write the forces.
wordList createFileNames(const dictionary &dict) const
Create file names for forces and bins.