Have you tried building it from one of the MSL valves, such as Modelica.Fluid.Valves.ValveIncompressible, that take a control signal [0, 1] as input, and then calculate that signal from a pressure sensor on the upstream-side?
Modelica.Fluid.Valves.ValveIncompressible