Calculator Filter returns wrong result for OpenFOAM (with units) and division operation (pv 5.1.2)
Description:
-
The application of the Calculator filter on an OpenFOAM result will yield different results when:
-- The Formula field contains a division following a field (with units that contain themselves a slash).
-- "Add dimensional units to array names" has been enabled.
-
As it can be seen from the two attached screenshots, a division by 100, returns one time the expected result, and another no division is performed.
-
The division operation is essentially ignored in this case.
-
The fact that it happens only when units are added to the names (and only for certain units) leads me to believe that this is a problem in the formula parser within the filter calculator itself.
-
Surrounding the variable with parentheses results in a valid result (again, looks like the parser is getting confused due to the units).
-
No error or warning is thrown.
Tested Versions:
- 5.0.0
- 5.1.2
Observations/requests:
- In the case of this kind of formula parsing failure a warning would be helpful.
- Ideally units and field names could be kept completely separate and mixed in the same string, since this requires writing the units themselves in the formula field for each variable.
Screenshots: