Controlled Pressure Source Implementation in Simscape

3 views (last 30 days)
I would like to add a controlled pressure source in the simulation attached below, I am new to simscape but unfortunately cannot find documentation for the two phase fluid components I actually need, the sections are labelled in the simulation file. I have completed the controlled mass and temperature but unable to implement the pressure. Any ideas are appreciated.

Answers (1)

Vasco Lenzi
Vasco Lenzi on 24 Aug 2020
There is a controlled source pressure for 2p since 2015b:
are you having problem using this block?
Cheers
Vasco
  3 Comments
Vasco Lenzi
Vasco Lenzi on 24 Aug 2020
You are trying to have both controlled pressure and controlled mass flow on the same input line? That is goign to generate some problems. In fact the Controlled Mass Flow rate will ignore the pressure differential over it and just ensure that the mass flow is applied. So the Controlled Pressure block before it doesn't do anything.
If you need a changing pressure in the input line and still want a certain mass flow, you have to use the controlled pressure block but then create a subsystem and regulate mass flow using a variable local restriction, such as in this example of the rankine cycle:
There is a block upper left called throttle alve that regulates mass flow. But you do need to implement a closed loop control to keep a desired mass flow going through it. An example is in the Controller Subsystem in the same Rankine Simscape Example. Under the subsystem you can see a PI controller regulating throttle opening (in this case to regulate total power)
TheSel
TheSel on 25 Aug 2020
Thanks for the suggestion, that was a great idea. I was able to implement the subsystem to control the mass, but I was unable to implement an approach that allows me to control pressure, I think it is due to degrees of freedom but, I currently am unable to evaluate this because of the way the code is written for simscape. So far I have tried a few things; replacing the reservoir with other sources, tried using volume and heat to analyze if the effects of heat was large enough for the range of pressure of interest, the order of elements i.e., controlled mass then controlled pressure and controlled pressure then controlled mass etc.. Anyway, although I have tried a few ideas including yours, I am still unable to achieve the desired results.

Sign in to comment.

Products


Release

R2017b

Community Treasure Hunt

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

Start Hunting!