How can I model a variable diamter (converging or diverging) pipe for air flow in Simscape?

I am trying to model a system in which I need to know the pressure loss of air flowing through a converging pipe. In MATLAB R2017b, there is no block in the Simscape Gas library that represents converging, diverging, or variable diameter pipe, so how should I model this behavior?

 Accepted Answer

You are correct that there is no existing block that models a variable diameter (converging or diverging) pipe in the Gas library. To model this behavior, I would probably recommend using the Flow Resistance block to model the pressure drop equivalent to what you would see from the variable diameter pipe. For more information about this block, you can refer to the following documentation link:
Alternatively, you could write your own Simscape block by viewing the source code of the existing Pipe block and modifying it to suit your needs. This method will allow you to model the exact behavior that you want, but it can be quite a bit more involved.
Also, while I would typically recommend using Gas library blocks to model air flow as the Hydraulics library blocks are not intended for modeling air flow, if you do not mind modeling the flow as incompressible and isothermal, you could model your system using a "Custom Hydraulic Fluid" with properties set to those corresponding to air flow. The benefit of doing this would be that you can use the "Hydaulics (Isothermal)" library (located in Simscape/Fluids/Hydaulics (Isothermal)", which has the Gradual Area Change block, which would work well for what you are hoping to model.

More Answers (0)

Products

Release

R2017b

Community Treasure Hunt

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

Start Hunting!