Here we aimed to investigate various droplet formation regimes in a two-dimensional T-junction microchannel geometry using the open source software OpenFOAM. Two incompressible fluids, continuous phase in the main channel and dispersed phase in the lateral channel, have been considered. The interFoam solver was used to simulate laminar flow with two incompressible and isothermal phases. We evaluated the capability of "Compressive Interface Capturing Scheme for Arbitrary Meshes (CICSAM)" volume of fluid (VOF) technique of the OpenFOAM for modeling of the droplet formation and movement in different regimes. The flow behavior in the T-junction microchannel over a wide range of capillary numbers (0.006 to 0.12), volume flow rate ratio (0.125, 0.25, 0.5), and contact angle (130 • to 180 • ) in the squeezing, dripping and jetting regimes were examined.The importance of parameters such as contact angle, capillary number, flow rate ratio, and Reynolds number at the time of separation, as well as the formation of droplets, was investigated in different regimes. We found that droplet detachment time increases by increasing the contact angle in the squeezing regime while increasing the contact angle in the dripping regime results in a decrease in the droplet detachment time. We compare the