A numerical model of Taylor bubbles rising through stagnant liquids in vertical tubes