124#ifndef functionObjects_momentum_H
125#define functionObjects_momentum_H
141namespace functionObjects
150 public fvMeshFunctionObject,
163 template<
class GeoField>
164 autoPtr<GeoField> newField
166 const word& baseName,
167 const dimensionSet& dims,
168 bool registerObject=
true
199 coordSystem::cylindrical
csys_;
242 const dictionary&
dict,
243 const bool readFields =
true
275 virtual bool write();
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.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A cylindrical coordinate system (r-theta-z). The coordinate system angle theta is always in radians.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
const word & name() const noexcept
Return the name of this functionObject.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
Computes linear/angular momentum, reporting integral values and optionally writing the fields.
word pName_
The pressure field name (optional)
scalar rhoRef_
Reference density (for incompressible)
void initialise()
Initialise the fields.
void operator=(const momentum &)=delete
No copy assignment.
word UName_
The velocity field name (optional)
bool hasCsys_
Are we using the cylindrical coordinate system?
momentum(const momentum &)=delete
No copy construct.
bool writePosition_
Write fields flag.
bool writeMomentum_
Write fields flag.
bool initialised_
Initialised flag.
void writeValues(Ostream &os)
Write momentum data.
momentum(const word &name, const Time &runTime, const dictionary &dict, const bool readFields=true)
Construct from Time and dictionary.
vector sumMomentum_
Integral (linear) momentum.
virtual ~momentum()=default
Destructor.
TypeName("momentum")
Runtime type information.
word rhoName_
The density field name (optional)
virtual void movePoints(const polyMesh &)
Update for mesh point-motion.
vector sumAngularMom_
Integral angular momentum.
virtual void writeFileHeader(Ostream &os)
Output file header information.
virtual void updateMesh(const mapPolyMesh &)
Update for changes of mesh.
virtual bool execute()
Calculate and report the integral momentum.
virtual bool write()
Write the momentum, possibly angular momentum and velocity.
coordSystem::cylindrical csys_
Coordinate system for evaluating angular momentum.
bool writeVelocity_
Write fields flag.
virtual bool read(const dictionary &)
Read the momentum data.
Reads fields from the time directories and adds them to the mesh database for further post-processing...
virtual const objectRegistry & obr() const
The region or sub-region registry being used.
Volume (cell) region selection class.
Base class for writing single files from the function objects.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Registry of regIOobjects.
Mesh consisting of general polyhedral cells.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.