The derivation for compressible fluids is similar. Again, the derivation depends upon (1) conservation of mass, and (2) conservation of energy. Conservation of mass implies that in the above figure, in the interval of time Δ t, the amount of mass passing through the boundary defined by the area A 1 is equal to the amount of mass passing outwards through the boundary defined by the area A 2 : 0 = Δ Δ M 1 − − Δ Δ M 2 = ρ ρ 1 A 1 v 1 Δ Δ t − − ρ ρ 2 A 2 v 2 Δ Δ t . Conservation of energy is applied in a similar manner: It is assumed that the change in energy of the volume of the streamtube bounded by A 1 and A 2 is due entirely to energy entering or leaving through one or the other of these two boundaries. Clearly, in a more complicated situation such as a fluid flow coupled with radiation, such conditions are not met. Nevertheless, assuming this to be the case and assuming the flow is steady so that the net change in the energy is zero, Δ Δ E 1 − − Δ Δ E 2 = 0 where Δ E 1 and Δ E 2 are the energy entering through A 1 and leaving through A 2, respectively. The energy entering through A 1 is the sum of the kinetic energy entering, the energy entering in the form of potential gravitational energy of the fluid, the fluid thermodynamic internal energy per unit of mass (ε 1) entering, and the energy entering in the form of mechanical p d V work: Δ Δ E 1 = ( 1 2 ρ ρ 1 v 1 2 + Ψ Ψ 1 ρ ρ 1 + ε ε 1 ρ ρ 1 + p 1 ) A 1 v 1 Δ Δ t where Ψ = gz is a force potential due to the Earth's gravity, g is acceleration due to gravity, and z is elevation above a reference plane. A similar expression for Δ E 2 may easily be constructed. So now setting 0 = Δ E 1 − Δ E 2 : 0 = ( 1 2 ρ ρ 1 v 1 2 + Ψ Ψ 1 ρ ρ 1 + ε ε 1 ρ ρ 1 + p 1 ) A 1 v 1 Δ Δ t − − ( 1 2 ρ ρ 2 v 2 2 + Ψ Ψ 2 ρ ρ 2 + ε ε 2 ρ ρ 2 + p 2 ) A 2 v 2 Δ Δ t which can be rewritten as: 0 = ( 1 2 v 1 2 + Ψ Ψ 1 + ε ε 1 + p 1 ρ ρ 1 ) ρ ρ 1 A 1 v 1 Δ Δ t − − ( 1 2 v 2 2 + Ψ Ψ 2 + ε ε 2 + p 2 ρ ρ 2 ) ρ ρ 2 A 2 v 2 Δ Δ t Now, using the previously-obtained result from conservation of mass, this may be simplified to obtain 1 2 v 2 + Ψ Ψ + ε ε + p ρ ρ = constant ≡ ≡ b which is the Bernoulli equation for compressible flow.