Uncertainty quantification in numerical simulation and application to complex flows