Multiphase and multicomponent flows simulation using mesoscale method