add function to calculate Scalar Product flow vn{SP}