Calculation of the volume of a general hexahedron for flow predictions