If the transition from a smaller to a larger pipe can be made less abrupt than the square-edged sudden enlargement, the energy loss is reduced. This is normally done by placing a conical section between the two pipes as shown in the figure below.
The energy loss calculated does not include the loss due to friction at the walls of the transition. For relatively steep cone angles, the length of the transition is short and therefore the wall friction loss is negligible.