How to plot pump and system curve based on the hydraulic model in Simscape / Simulink?

I have modeled a centrifugal pump system with frictionous pipes and a control valve. I want to plot the system curve to see where the intersection with the pump curve lies for the centrifugal pump. An example of this is in the paper "Static head control in pumping system using PID controller" by Hadeel Mzahem Mjbel, 2022:

7 Comments

If you plan to use the Centrifugal Pump block for the Isothermal Liquid domain or the Thermal Liquid domain, from Simscape Fluids, both allowing you to plot the pump curve, including head vs flow figure as you showed.
See the "Visualizing the Pump Curve" section of each documentation page.
Then you can get a handle for the axis you'd like to plot on, and add your own curve to it.
Thank you for your response. However, I knew how to plot the pump curve, but I want to plot a system curve based on the system after the pump. I could add some pressure sensors and calculate the dp over some manually changed flowrates, but I don't think that gives me the total head of the system.
If I understand you correctly, you want to plot the line that goes from bottom-left to upper-right?
You may replace the pump with an source block (pressure source OR flowrate source) to drive fluids from a reservoir through the downstream system, into another reservoir. Vary the source block input as a function of time and measure the resulting flow through OR the pressure drop over the system. This way, you will get a delta-p vs flowrate curve.
Does this make sense?
This makes sense! However, this would only give an indication of the pressure difference dp in Pascal, whereas I want the total system head in meters watercolon. I have found different sources in literature on how to calculate it, but this gives me unrealistic values that are not close to the modelled system. Therefore, I would like to find some way of retrieving it from the modeled system in Simulink. As system head is an essential part of pump sizing, I figured there should be an option for it in Simscape Fluids.
head (H) is just dp/(rho*g), as in the hydraulic pressure formula dp=rho*g*H. You can measure the density from your model if you like, or set as a constant if you know its value. Just pay attention to the unit and you should get reasonable numbers. If you use PS constants/gains/divide/product blocks, you can set the units to what you prefer and Simscape can handle the conversion and arithmetic for you.
This trick seems to give good values, thanks! However, is there a way for me to export the interpolated pump curve from the simscape block to Matlab in order overlap the two plots?
Here are the pump plots. I want to export the head curve, efficiency curve and power curve to workspace and overlap it with the gained system head curve.
If you have the curve plotted into a figure, or subfigure, you should be able to click on the figure and use MATLAB script to get a handle of the axes. The Children of the axes should include the curves plotted and its data content. Something like this:
plot([0:0.1:2],sin(pi*[0:0.1:2]));
ax1 = gca;
xData = ax1.Children.XData
yData = ax1.Children.YData

Sign in to comment.

Answers (1)

To summarize the discussion from the comments section:
The pump curves can be generated from the pump blocks in Simscape Fluids. Examples: https://www.mathworks.com/help/hydro/ref/centrifugalpumpil.html, https://www.mathworks.com/help/hydro/ref/centrifugalpumptl.html. See the "Visualizing the Pump Curve" section of each documentation page.
The load curve can be generated by using an ideal source (flow or pressure) to drive fluids through the load and record the flow and pressure values. Head and pressure drop can be converted to each other using H=dp/(rho*g).
To overlap the pump characteristics, get a figure handle of the pump curve figure, and then plot the load onto the same figure. If desired, one can also grab the data from an existing figure using code similar to this:
plot([0:0.1:2],sin(pi*[0:0.1:2]));
ax1 = gca;
xData = ax1.Children.XData
yData = ax1.Children.YData

Communities

More Answers in the  Power Electronics Control

Products

Release

R2022b

Asked:

DB
on 22 May 2023

Answered:

on 8 Aug 2023

Community Treasure Hunt

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

Start Hunting!