The Diode module describes flow \(q\) from a proximal to a distal node. The flow \(q\) is a state variable, and its derivative is given by
Diode
(Source code, png, hires.png, pdf)