View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003828 | OpenFOAM | Bug | public | 2022-04-21 13:26 | 2022-04-21 15:20 |
Reporter | kimmo | Assigned To | will | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | GNU/Linux | OS | Other | OS Version | (please specify) |
Summary | 0003828: volFieldValue-function object with 'min' operation doesn't work for scalar fields as expected | ||||
Description | In OF version 9 the fieldMinMax- function object was replaced by volFieldValue -function object. If the volFieldValue -function object is used for scalar fields (e.g. 'p') the 'min' operation doesn't output any negative values. The behavior is different from version 8 where volFieldValue -function object with 'min'-operation gives the correct negative value if there are negative values present in the scalar field. | ||||
Steps To Reproduce | Add the following function objects to the motorBike-tutorial and run it: min_pressure { type volFieldValue; libs ("libfieldFunctionObjects.so"); log true; writeFields false; regionType all; operation min; fields (p); } average_pressure { type volFieldValue; libs ("libfieldFunctionObjects.so"); log true; writeFields false; regionType all; operation volAverage; fields (p); } The min_pressure doesn't output negative values but the average_pressure is negative. There is obviously negative values in the 'p'-field. If you run the tutorial with OF version 8 with the same function objects the output is correct. | ||||
Additional Information | This behavior was observed at least in Ubuntu 20.04 and 18.04. | ||||
Tags | No tags attached. | ||||
|
Thanks for the report. Fixed in both version 9 and in dev. https://github.com/OpenFOAM/OpenFOAM-9/commit/d71c4d2a3b0b3401f165d88e098a85a7a1686e6e https://github.com/OpenFOAM/OpenFOAM-dev/commit/18cd22fe5d5a9f4a7238842da0ad064f9ca54844 |