Numerical methods for simulating droplet dynamics in microfluidic devices