97#ifndef Foam_functionObjects_fluxSummary_H
98#define Foam_functionObjects_fluxSummary_H
195 const word& fieldName
201 const word& surfName,
210 const word& surfName,
220 const word& faceZoneName,
231 const word& faceZoneName,
243 const word& cellZoneName,
307 virtual bool write();
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
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 a number of values (eg,...
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
Computes the volumetric- or mass-flux information across selections of face zones.
scalar scaleFactor_
Factor to scale results.
void initialiseFaceZoneAndDirection(const word &faceZoneName, const vector &refDir, DynamicList< word > &names, DynamicList< vector > &dir, DynamicList< labelList > &faceID, DynamicList< labelList > &facePatchID, DynamicList< boolList > &faceFlip) const
Initialise face set from face zone and direction.
fluxSummary(const fluxSummary &)=delete
No copy construct.
List< labelList > facePatchID_
Face patch IDs.
List< vector > zoneDirections_
Region (zone/surface) directions.
PtrList< OFstream > filePtrs_
Output file per face zone.
void initialiseCellZoneAndDirection(const word &cellZoneName, const vector &refDir, DynamicList< word > &names, DynamicList< vector > &dir, DynamicList< labelList > &faceID, DynamicList< labelList > &facePatchID, DynamicList< boolList > &faceFlip) const
Initialise face set from cell zone and direction.
scalar tolerance_
Tolerance applied when matching face normals.
modeType mode_
Mode for face determination/to generate faces to test.
static const Enum< modeType > modeTypeNames_
Face mode names.
scalar totalArea(const label idx) const
Calculate the total area for the surface or derived faceZone.
virtual void writeFileHeader(const word &zoneName, const scalar area, const vector &refDir, Ostream &os) const
Output file header information.
void initialiseSurfaceAndDirection(const word &surfName, const vector &refDir, DynamicList< word > &names, DynamicList< vector > &dir, DynamicList< boolList > &faceFlip) const
Initialise for given surface name and direction.
virtual bool read(const dictionary &dict)
Read the function-object dictionary.
virtual ~fluxSummary()=default
Destructor.
void initialiseSurface(const word &surfName, DynamicList< word > &names, DynamicList< vector > &dir, DynamicList< boolList > &faceFlip) const
Initialise for given surface name.
List< labelList > faceID_
Face IDs.
word checkFlowType(const dimensionSet &fieldDims, const word &fieldName) const
Check flowType (mass or volume).
word phiName_
Name of flux field.
bool isSurfaceMode() const
Check if surface mode instead of zone mode.
void operator=(const fluxSummary &)=delete
No copy assignment.
@ mdCellZoneAndDirection
Cell zone with prescribed direction.
@ mdSurface
A functionObject surface.
@ mdFaceZoneAndDirection
Face zone with prescribed direction.
@ mdSurfaceAndDirection
A surface with prescribed direction.
bool update()
Initialise - after read(), before write().
List< word > zoneNames_
Region (zone/surface) names.
TypeName("fluxSummary")
Runtime type information.
List< boolList > faceFlip_
Face flip map signs.
fluxSummary(const word &name, const Time &runTime, const dictionary &dict)
Construct from name, Time and dictionary.
bool needsUpdate_
Track if the surface needs an update.
virtual bool execute()
Execute the function-object operations.
virtual bool write()
Write the function-object results.
bool surfaceModeWrite()
Specialized write for surfaces.
void initialiseFaceZone(const word &faceZoneName, DynamicList< word > &names, DynamicList< vector > &dir, DynamicList< labelList > &faceID, DynamicList< labelList > &facePatchID, DynamicList< boolList > &faceFlip) const
Initialise face set from face zone.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
fvMeshFunctionObject(const fvMeshFunctionObject &)=delete
No copy construct.
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.
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.