Simulation of three-phase distillation towers