Numerical experiments are performed to understand different regimes of hydrogen non-premixed combustion in an enclosure with passive ventilation through one horizontal or vertical vent located at the top of a wall. The Reynolds averaged Navier-Stokes (RANS) computational fluid dynamics (CFD) model with a reduced chemical reaction mechanism is described in detail. The model is based on the renormalization group (RNG) k-ε turbulence model, the eddy dissipation concept (EDC) model for simulation of combustion coupled with the 18-step reduced chemical mechanism (8 species), and the in-situ adaptive tabulation (ISAT) algorithm that accelerates the reacting flow calculations by two to three orders of magnitude. The analysis of temperature and species (hydroxyl, hydrogen, oxygen, water) concentrations in time, as well as the velocity through the vent, shed a light on regimes and dynamics of indoor hydrogen fires. A well-ventilated fire is simulated in the enclosure at a lower release flow rate and complete combustion of hydrogen within the enclosure. Fire becomes under-ventilated at higher release flow rates with two different modes observed. The first mode is the external flame stabilised at the enclosure vent at moderate release rates, and the second mode is the self-extinction of combustion inside and outside the enclosure at higher hydrogen release rates. The simulations demonstrated a complex reacting flow dynamics in the enclosure that leads to formation of the external flame or the self-extinction. The air intake into the enclosure at later stages of the process through the whole vent area is a characteristic feature of the self-extinction regime. This air intake is due to faster cooling of hot combustion products by sustained colder hydrogen leak compared to the generation of hot products by the ceasing chemical reactions inside the enclosure and hydrogen supply. In general, an increase of hydrogen sustained release flow rate will change fire regime from the well-ventilated combustion within the enclosure, through the external flame stabilised at the vent, and finally to the self-extinction of combustion throughout the domain.