Optimizing the application of grinding fluid in machining processes