  Regulating the available gas mass inside galaxies proceeds through a delicate
balance between inflows and outflows, but also through the internal depletion
of gas due to star formation. At the same time, stellar feedback is the
internal engine that powers the strong outflows. Since star formation and
stellar feedback are both small scale phenomena, we need a realistic and
predictive subgrid model for both. We describe the implementation of supernova
momentum feedback and star formation based on the turbulence of the gas in the
RAMSES code. For star formation, we adopt the so-called multi-freefall model.
The resulting star formation efficiencies can be significantly smaller or
bigger than the traditionally chosen value of $1\%$. We apply these new
numerical models to a prototype cosmological simulation of a massive halo that
features a major merger which results in the formation of an early-type galaxy
without using AGN feedback. We find that the feedback model provides the first
order mechanism for regulating the stellar and baryonic content in our
simulated galaxy. At high redshift, the merger event pushes gas to large
densities and large turbulent velocity dispersions, such that efficiencies come
close to $10\%$, resulting in large SFR. We find small molecular gas depletion
time during the starburst, in perfect agreement with observations. Furthermore,
at late times, the galaxy becomes quiescent with efficiencies significantly
smaller than $1\%$, resulting in small SFR and long molecular gas depletion
time.
