Note 1:
The rate vectors used for the pressure equation now contains derivatives wrt to the upwind segment for fractions.
To make sure derivatives wrt. to different segmens gets mixed we disregard the derivatives for the properties (density, viscosity) evaluated at the upwind segment.
Note 2:
A factor 2 is added to the velocity head term similar as in the friction term
Note 3:
A sign change is added to the acceleration term for massrates > 0. Is this correct. It seems like the reference simulator does this.