Clear Filters
Clear Filters

how can I plot a P-v and T-S diagrams in simulink

57 views (last 30 days)
tomer on 9 Apr 2024
Commented: tomer on 1 May 2024 at 14:10
I want to make a Thermo plots like P-v and T-S based on the thermodynamic process I am modeling in simulink.
till now I have been working with the P-H diagram block but I need more details for the process.
are there any blocks for making a plot based on chosen properties? I know I can plot each parameter as time dependet by using SCOP, but that does not help me...
if the plot can be made by adding a code diractly to the main program or by using the MATLAB function block please add a manuall or a wide explanation becausse I have never done that before.
Thank YOU!!

Answers (1)

Umang Pandey
Umang Pandey on 16 Apr 2024
Hi Tomer,
There are no existing blocks to fetch Pv and Ts diagrams directly, however, you can make use of the MATLAB Function Block to obtain these plots.
Within the MATLAB function block, you can essentially write your function that takes in the input parameters which are obtainable from your model and create corresponding plots. The block automatically creates input ports corresponding to each specified input parameter, which can be connected via right signal lines from the model.
You can refer to the following MATLAB documentation on MATLAB Function blocks for more information and examples:
Hope this helps!
tomer on 1 May 2024 at 14:04
Sorry for the late respons.
here for example I am adding liqued phase water into accumulator and pumping out vapor.
I have a P-h diagram for the thermodinamic process that happens between the fluid and vapor. I also want to have P-v and T-S diagrams.
tomer on 1 May 2024 at 14:10
I am sorry I am not uploading the acctual file... for some unknown reason the website is not letting me to do so:(
but the idea is very simple...
I am mainly cant understand what is the syntax I need to use in the matlab function block?
how do connect the variable I am using in the function block to the pressure and temperture (etc.) parameters I get from the procees itself.

Sign in to comment.


Find more on General Applications in Help Center and File Exchange


Community Treasure Hunt

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

Start Hunting!