Numerical study of droplet formation in the ordinary and modified T-junctions