Control the pressure AND the mass flow rate of a pipeflow in Simscape

20 views (last 30 days)
Hello everyone,
I'm new in the forum and I hope you can help me with my problem in Simulink.
In order to calculate the pressure loss for a pipe at a specific pressure and mass flow rate I'm trying to build a system that provide the desired pressure and mass flow rate in the pipe. In the attachement you can find a simulation model that seems to be a solution. Between two reservoirs I placed a constant mass flow rate source and adjust the pressure by changing the KV-value of the orifice. After trying a few values I get the desired pressure.
My Question: Are there other/better ways to build a system that fulfill the requirements?
I did a lot of research on the internet, but couldn't really find a satisfying answer to my problem.
I hope you can help me.
David
  1 Comment
Yifeng Tang
Yifeng Tang on 27 Apr 2021
Looks like your intuition has done a good job help you achieve what you want! Just a simple adjustment would make it a test harness easier to work with. I'll put the details in the answer section.

Sign in to comment.

Accepted Answer

Yifeng Tang
Yifeng Tang on 27 Apr 2021
Looks like you were trying to set the outlet pressure of the pipe by adjusting the orifice parameters. It's definitely reasonable, but as you noted, it can take some trial and error to get the right parameters.
A simpler way would be use the reservoir to set the pressure boundary condition directly. Remove the orifice, then in the outlet reservoir, change the specification to "specified pressure" and set the pressure to what you want the outlet pressure to be. And you are done!
The outlet pressure of the pipe will now be set at the reservoir pressure. The inlet pressure will be provided by the flow rate source, which will provide whatever pressure at its outlet to overcome the pressure drop from the pipe. The pressure of the upstream reservoir also doesn't really matter here, because the source will provide the pressure rise (or drop) needed to push the flow.
This two-reservoir-one-source configuration is very common as a test harness to parametrize components (pipes, pump, valves, etc.)
Hope this makes sense.

More Answers (0)

Categories

Find more on Gas Models in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!