functionObjects: surfaceFieldValue, volFieldValue: Various improvements
A number of changes have been made to the surfaceFieldValue and volFieldValue function objects to improve their usability and performance, and to extend them so that similar duplicate functionality elsewhere in OpenFOAM can be removed. Weighted operations have been removed. Weighting for averages and sums is now triggered simply by the existence of the "weightField" or "weightFields" entry. Multiple weight fields are now supported in both functions. The distinction between oriented and non-oriented fields has been removed from surfaceFieldValue. There is now just a single list of fields which are operated on. Instead of oriented fields, an "orientedSum" operation has been added, which should be used for flowRate calculations and other similar operations on fluxes. Operations minMag and maxMag have been added to both functions, to calculate the minimum and maximum field magnitudes respectively. The min and max operations are performed component-wise, as was the case previously. In volFieldValue, minMag and maxMag (and min and mag operations when applied to scalar fields) will report the location, cell and processor of the maximum or minimum value. There is also a "writeLocation" option which if set will write this location information into the output file. The fieldMinMax function has been made obsolete by this change, and has therefore been removed. surfaceFieldValue now operates in parallel without accumulating the entire surface on the master processor for calculation of the operation. Collecting the entire surface on the master processor is now only done if the surface itself is to be written out.
This commit is contained in:
@ -61,7 +61,7 @@ functions
|
||||
writeFields no;
|
||||
regionType patch;
|
||||
name outlet;
|
||||
operation weightedAverage;
|
||||
operation average;
|
||||
weightField phi;
|
||||
|
||||
fields
|
||||
|
||||
@ -56,7 +56,7 @@ functions
|
||||
writeFields no;
|
||||
regionType patch;
|
||||
name outlet;
|
||||
operation weightedAverage;
|
||||
operation average;
|
||||
weightField phi;
|
||||
fields
|
||||
(
|
||||
|
||||
@ -57,7 +57,7 @@ functions
|
||||
writeFields no;
|
||||
regionType patch;
|
||||
name outlet;
|
||||
operation weightedAverage;
|
||||
operation average;
|
||||
weightField phi;
|
||||
fields
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user