Theoretical models for hydraulic network analysis often assume idealized pi
pe networks. Practical network packages, however, allow for a variety of ne
cessary controlling elements. Sometimes these are introduced as generalized
pipe elements, thus hiding the inherent discontinuous operation of nonretu
rn valves and pressure reduction valves. It is well known that the inclusio
n of such elements may cause numerical difficulties because of singularitie
s. This paper presents an algorithm based on loop equations. It features a
dynamic loop structure that is updated automatically according to the state
of the controlling elements, It is shown that this provides a logical solu
tion to the discontinuous operation of the controlling elements and also re
sults in a highly efficient network simulation algorithm.