Alan et al.
As suspected I did indeed run into trouble. As you can see I am confident that that the solve block is now working as it should see output graphs. So what I have done is simply duplicated the previous solve block and used your method so that I can find a new function for height which I thought I could then use to find Y i.e. the height of water at a particular outflow i.e. Qscout. Note that Qscout is a piecewise function and is defined by way of a program block. I don't know if this is the problem as to why I am getting "the value must be a scalar" error. I note however that if you change the inital conditions to certain values one can under some circumstances achieve an answer, so I don't know what the problem is or if the way dependant equations have been structured is the problem. Werner helped me with setting up this problem so I assume the mathematics are sound but in saying a solution seems to be more luck that science, for example if you change the length of the tank to a smaller value no solution is found.
Kind regards, Mark