A fundamental study of two-dimensional room ventilation flows under isothermal and non-isothermal conditions