Analysis of free-surface flows through energy considerations: Single-phase versus two-phase modeling