118#ifndef Foam_functionObjects_momentum_H
119#define Foam_functionObjects_momentum_H
157 template<
class GeoField>
158 autoPtr<GeoField> newField
160 const word& baseName,
161 const dimensionSet& dims,
162 bool registerObject=
true
193 coordSystem::cylindrical
csys_;
269 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...
fvMeshFunctionObject(const fvMeshFunctionObject &)=delete
No copy construct.
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 name, Time and dictionary.
virtual bool read(const dictionary &dict)
Read the function-object 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()
Execute the function-object operations.
virtual bool write()
Write the function-object results.
coordSystem::cylindrical csys_
Coordinate system for evaluating angular momentum.
bool writeVelocity_
Write fields flag.
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.
volRegion(const fvMesh &mesh, const dictionary &dict)
Construct from fvMesh and dictionary.
Base class for writing single files from the function objects.
writeFile(const objectRegistry &obr, const fileName &prefix, const word &name="undefined", const bool writeToFile=true, const string &ext=".dat")
Construct from objectRegistry, prefix, fileName.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Registry of regIOobjects.
Mesh consisting of general polyhedral cells.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
Function objects are OpenFOAM utilities to ease workflow configurations and enhance workflows.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Forwards and collection of common volume field types.