From: Jose Noguera on
Hello,

I've been trying to build a model using simscape-simhydraulics. I'd like to make a comparisson with the PQ model in http://www.mathworks.com/matlabcentral/fileexchange/1371-fluid-pipeline-simulink-models

The problem is that I can't control the input flow to a segmented pipeline with an ideal hydraulic pressure source and at the same time, to conect an ideal hydraulic flow rate to the end. The simulation diagnostics, show a block error with the solver configuration. It says: "Dynamic states at start of simulation are not consistent. Setting all dynamic state initial conditions to zero may fix this problem.". The question is, How I can do this?

Any information would be greatly appreciated!
From: Arnaud Miege on
"Jose Noguera" <jose840602(a)gmail.com> wrote in message <hn9b3k$2ic$1(a)fred.mathworks.com>...
> Hello,
>
> I've been trying to build a model using simscape-simhydraulics. I'd like to make a comparisson with the PQ model in http://www.mathworks.com/matlabcentral/fileexchange/1371-fluid-pipeline-simulink-models
>
> The problem is that I can't control the input flow to a segmented pipeline with an ideal hydraulic pressure source and at the same time, to conect an ideal hydraulic flow rate to the end. The simulation diagnostics, show a block error with the solver configuration. It says: "Dynamic states at start of simulation are not consistent. Setting all dynamic state initial conditions to zero may fix this problem.". The question is, How I can do this?
>
> Any information would be greatly appreciated!

I am not sure I understand what you mean, but here is my interpretation. At any point in a hydraulic diagram, you can specify either pressure or flow rate using the corresponding source block, but not both at the same time, since the two variables are related. Given this, here's what I have done:

Inject a pressure at one end of the segmented pipeline block, and measure flow rate at the end other end (you can also measure it at the end where you inject pressure if you want to). It works just fine. Let me know if that's not what you want to do.

You can also do the opposite, i.e. inject flow rate at one end and measure pressure at the other end (or at both ends).

Flow rate is a through variable and therefore must be applied/measured in series, whereas pressure is an across variable and therefore must be applied/measured in parallel. I suspect you have made a mistake in your model.

HTH,

Arnaud