Go to the documentation of this file.
124 #ifndef functionObjects_momentum_H
125 #define functionObjects_momentum_H
141 namespace 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,
275 virtual bool write();
virtual void updateMesh(const mapPolyMesh &)
Update for changes of mesh.
virtual bool read(const dictionary &)
Read the momentum data.
word pName_
The pressure field name (optional)
bool hasCsys_
Are we using the cylindrical coordinate system?
virtual bool write()
Write the momentum, possibly angular momentum and velocity.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from Foam::string.
Volume (cell) region selection class.
bool writeVelocity_
Write fields flag.
bool initialised_
Initialised flag.
momentum(const word &name, const Time &runTime, const dictionary &dict, const bool readFields=true)
Construct from Time and dictionary.
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
vector sumMomentum_
Integral (linear) momentum.
coordSystem::cylindrical csys_
Coordinate system for evaluating angular momentum.
Mesh consisting of general polyhedral cells.
void operator=(const momentum &)=delete
No copy assignment.
Registry of regIOobjects.
virtual bool execute()
Calculate and report the integral momentum.
scalar rhoRef_
Reference density (for incompressible)
bool writePosition_
Write fields flag.
virtual ~momentum()=default
Destructor.
A cylindrical coordinate system (r-theta-z). The coordinate system angle theta is always in radians.
TypeName("momentum")
Runtime type information.
Computes linear/angular momentum, reporting integral values and optionally writing the fields.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
OBJstream os(runTime.globalPath()/outputName)
word rhoName_
The density field name (optional)
virtual void writeFileHeader(Ostream &os)
Output file header information.
Vector< scalar > vector
A scalar version of the templated Vector.
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const wordHashSet &selectedFields, LIFOStack< regIOobject * > &storedObjects)
Read the selected GeometricFields of the templated type.
virtual void movePoints(const polyMesh &)
Update for mesh point-motion.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
word UName_
The velocity field name (optional)
const word & name() const noexcept
Return the name of this functionObject.
void initialise()
Initialise the fields.
vector sumAngularMom_
Integral angular momentum.
void writeValues(Ostream &os)
Write momentum data.
virtual const objectRegistry & obr() const
The region or sub-region registry being used.
bool writeMomentum_
Write fields flag.
Reads fields from the time directories and adds them to the mesh database for further post-processing...
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Base class for writing single files from the function objects.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...