Inconsistent pressure, enthalpy and entropy from thermodynamic properties sensor and pressure sensor compared with CoolProp

I'm looking at the reversible heat pump example found here:
I run the example as-is, and then look at results in Simscape results explorer, focusing on three values calculated within S1: pressure from the Saturation Properties Sensor and enthalpy and entropy from the Thermodynamic Properties Sensor. I then move those plots to a figure and highlight three values at a single time:
The simulink model results give P=0.845676 MPa, H=423.098kJ/kg and S=1.87762kJ/kgK
However, when I use CoolProp within matlab to calculate entropy at the pressure and enthalpy combination I get a different value than given by the saturation properties sensor:
py.CoolProp.CoolProp.PropsSI('S', 'P', 0.845676e6, 'H', 423.098*1e3, 'R410A')/1000
ans =
1.8113
Why is CoolProp giving 1.8113kJ/kgK but the thermodynamic properties sensor is giving 1.87762kJ/kgK?

Answers (1)

Hi Matthew,
I did a parameter sweep to compare the properties from the built-in Two-Phase Fluids Properties for R410A and those from CoolProp. The results seems to suggest consistency, except an offset in the specific entropy.
I varied the pressure between 0.05 to 5 MPa, and specific internal energy from 100 to 500 kJ/kg. I queried entropy, temperature and density from CoolProp and used a simple Simscape model to get the same properties using a sensor.
The temperature are identical:
The density are nearly identical, except 2 points, which I suspect are in the mixture area and can be sensitive to interpolation error.
The entropy seems to have a constant offset, but otherwise looks OK.
Such offset is likely due to a difference in the reference point, i.e. where S is defined as zero. It should *not* affect any calculation though, as long as consistent property table is used.
See attached script and model for more details.

Products

Release

R2025b

Asked:

on 1 Apr 2026 at 3:08

Edited:

on 4 Apr 2026 at 23:20

Community Treasure Hunt

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

Start Hunting!