112 #ifndef functionObjects_fluxSummary_H 113 #define functionObjects_fluxSummary_H 128 namespace functionObjects
137 public fvMeshFunctionObject,
210 const word& fieldName
216 const word& surfName,
225 const word& surfName,
235 const word& faceZoneName,
246 const word& faceZoneName,
258 const word& cellZoneName,
322 virtual bool write();
modeType mode_
Mode for face determination/to generate faces to test.
virtual bool write()
Write the fluxSummary.
List< word > names(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
List of names generated by calling name() for each list item and filtered for matches.
List< labelList > faceID_
Face IDs.
scalar totalArea(const label idx) const
Calculate the total area for the surface or derived faceZone.
virtual bool read(const dictionary &dict)
Read the field fluxSummary data.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Computes the volumetric- or mass-flux information across selections of face zones.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
fluxSummary(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
List< labelList > facePatchID_
Face patch IDs.
bool update()
Initialise - after read(), before write()
List< boolList > faceFlip_
Face flip map signs.
word phiName_
Name of flux field.
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.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
virtual ~fluxSummary()=default
Destructor.
const word & name() const noexcept
Return the name of this functionObject.
List< word > zoneNames_
Region (zone/surface) names.
A surface with prescribed direction.
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
bool surfaceModeWrite()
Specialized write for surfaces.
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.
bool isSurfaceMode() const
Check if surface mode instead of zone mode.
PtrList< OFstream > filePtrs_
Output file per face zone.
const wordList area
Standard area field types (scalar, vector, tensor, etc)
A class for handling words, derived from Foam::string.
void operator=(const fluxSummary &)=delete
No copy assignment.
virtual bool execute()
Execute, currently does nothing.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
static const Enum< modeType > modeTypeNames_
Face mode names.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
OBJstream os(runTime.globalPath()/outputName)
Face zone with prescribed direction.
Cell zone with prescribed direction.
scalar scaleFactor_
Factor to scale results.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
virtual void writeFileHeader(const word &zoneName, const scalar area, const vector &refDir, Ostream &os) const
Output file header information.
void initialiseSurface(const word &surfName, DynamicList< word > &names, DynamicList< vector > &dir, DynamicList< boolList > &faceFlip) const
Initialise for given surface name.
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.
List< vector > zoneDirections_
Region (zone/surface) directions.
word checkFlowType(const dimensionSet &fieldDims, const word &fieldName) const
Check flowType (mass or volume)
scalar tolerance_
Tolerance applied when matching face normals.
bool needsUpdate_
Track if the surface needs an update.
A functionObject surface.
TypeName("fluxSummary")
Runtime type 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.