  In this paper we present a complete framework for the energy-stable
simulation of stratified incompressible flow in channels, using the
one-dimensional two-fluid model. Building on earlier energy-conserving work on
the basic two-fluid model, our new framework includes diffusion, friction, and
surface tension. We show that surface tension can be added in an
energy-conserving manner, and that diffusion and friction have a strictly
dissipative effect on the energy.
  We then propose spatial discretizations for these terms such that a
semi-discrete model is obtained that has the same conservation properties as
the continuous model. Additionally, we propose a new energy-stable advective
flux scheme that is energy-conserving in smooth regions of the flow and
strictly dissipative where sharp gradients appear. This is obtained by
combining, using flux limiters, a previously developed energy-conserving
advective flux with a novel first-order upwind scheme that is shown to be
strictly dissipative.
  The complete framework, with diffusion, surface tension, and a bounded
energy, is linearly stable to short wavelength perturbations, and exhibits
nonlinear damping near shocks. The model yields smoothly converging numerical
solutions, even under conditions for which the basic two-fluid model is
ill-posed. With our explicit expressions for the dissipation rates, we are able
to attribute the nonlinear damping to the different dissipation mechanisms, and
compare their effects.

Fluid Dynamics;Numerical Analysis;Numerical Analysis