We introduce a data-driven approach to the modelling and analysis of viscous fluid mechanics. Instead of including constitutive laws for the fluid’s viscosity in the mathematical model, we suggest directly using experimental data. Only a set of differential constraints, derived from first principles, and boundary conditions are kept of the classical PDE model and are combined with a data set. The mathematical framework builds on the recently introduced data-driven approach to solid-mechanics (Kirchdoerfer and Ortiz in Comput Methods Appl Mech Eng 304:81–101, 2016; Conti et al. in Arch Ration Mech Anal 229:79–123, 2018). We construct optimal data-driven solutions that are material model free in the sense that no assumptions on the rheological behaviour of the fluid are made or extrapolated from the data. The differential constraints of fluid mechanics are recast in the language of constant rank differential operators. Adapting abstract results on lower-semicontinuity and $${\mathscr {A}}$$
A
-quasiconvexity, we show a $$\Gamma $$
Γ
-convergence result for the functionals arising in the data-driven fluid mechanical problem. The theory is extended to compact nonlinear perturbations, whence our results apply not only to inertialess fluids but also to fluids with inertia. Data-driven solutions provide a new relaxed solution concept. We prove that the constructed data-driven solutions are consistent with solutions to the classical PDEs of fluid mechanics if the data sets have the form of a monotone constitutive relation.