Reduced-order modeling for oil-water and compositional systems, with application to data assimilation and production optimization