Simscape 2P: How can I realize both varying local restriction and blocking the flow path.
1 view (last 30 days)
I'm designing a cooling system model using simscape two phase fluid.
The model has a "valve", whose open area is changed by a controller smoothly. On the other hand, sometimes, the controller orders to block the flow path.
I have modeled the valve using variable local restriction.
Here is a problem below. When the open area becomes very small to block the path, occurs an error saying " The pressure must be bigger than the minimum pressure."
As the error message says, the output pressure becomes very small at the time.
It is assumed that it is a wrong way to use variable local restriction to block the path.
Is there any alternatives?
Yifeng Tang on 10 Aug 2022
Besides from my comment earlier, I've found that using a custom block of a "variable flow resistance" seems to make thing easier. It adds a percentage opening to the original Flow Resistance block. Compared to the Flow Restriction block, the Flow Resistance block solves a simpler set of equations, and is much less likely to run into minimum pressure or minimum temperature error. Such error tends to happen when calculating local velocity and enthalpy.
Attached is an example of such variable resistance block.
To use a custom Simscape block:
Directly as Simscape Component: https://www.mathworks.com/help/physmod/simscape/ref/simscapecomponent.html