112#ifndef functionObjects_fluxSummary_H
113#define functionObjects_fluxSummary_H
128namespace functionObjects
137 public fvMeshFunctionObject,
210 const word& fieldName
216 const word& surfName,
225 const word& surfName,
246 const word& faceZoneName,
258 const word& cellZoneName,
276 const word& zoneName,
322 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...
const word & name() const noexcept
Return the name of this functionObject.
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 field fluxSummary data.
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.
bool needsUpdate_
Track if the surface needs an update.
virtual bool execute()
Execute, currently does nothing.
virtual bool write()
Write the fluxSummary.
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...
Base class for writing single files from the function objects.
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.