Self-consistent DPD algorithm & DPD for two-phase flows