How does the Positive-Displacement Compressor (2P) compute the fluid power?

What is the energy balance equation of the Positive-Displacement Compressor (2P) block to calculate the fluid power? The documentation says the fluid power is equal to Wc_dot in the polytropic case, yet the Wc_dot does not equal to the energy flow or the enthalpy change of the refrigerant through the block. Wc_dot actually equals to mechanical power * mechanical efficiency based on my calculation using a test model. And the fluid power is equal to the enthapy change of the refrigerant in my test model, which corresponds to the isentropic thermodynamics model in the document. However, I am using the polytropic thermodynamics model in my test model.

4 Comments

Question for you: how are you measureing the "energy flow" right now? Are you using the energy flow from the Flow Rate Sensor, or you are using the product of mass flow & specific enthalpy?
Could you try both and see if you get the same results?
yes the values of the 2 methods you listed return the same result.
Hi @Yingxuan, this is a good sign :) Is it possible for you to share your test model and point to the quantities that you were looking at and found mismatched?
Hi @Yifeng Tang, thank you for your comment. I think the other response from @Will basically replies my question. I was using the electric vehicle thermal management model from the simscape example, and i was checking the quantities of the compressor in the refrigerant loop.

Sign in to comment.

 Accepted Answer

Hey,
In the Positive-Displacement Compressor (2P) block, the internal energy balance distinguishes between mechanical work transferred to the fluid and the resulting enthalpy rise. The shaft power is first reduced by mechanical efficiency, giving the compressor work rate W(c) = n(mech). W(shaft), which the documentation refers to as fluid power. In the polytropic thermodynamic model, W(c)​ represents the idealized compression work input to the fluid along a polytropic path and is not constrained to equal the refrigerant enthalpy change. The outlet enthalpy is then computed from real-fluid polytropic relations, which include entropy generation (and optional heat transfer), so m (hout -hin) >= W(c)​. Only in the isentropic model does the block enforce m (delta)h = W(c)​.
Hence, your observation that Wc​ matches mechanical power (after efficiency) while the enthalpy rise differs in the polytropic case is expected and consistent with the block’s energy formulation.

1 Comment

Thank you for your response. Just to confirm, when you said "The outlet enthalpy is then computed from real-fluid polytropic relations," does this means the the workflow for the outlet enthalpy estimation is this: first apply the polytropic relation to estimate the outlet conditions, such as temperature and pressure, based on the inlet conditions, then use the outlet conditions to find the outlet enthalpy based on the fluid property at the outlet condition? Thank you again for your time and reply.

Sign in to comment.

More Answers (0)

Products

Release

R2025a

Asked:

on 22 Jan 2026

Commented:

on 30 Jan 2026

Community Treasure Hunt

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

Start Hunting!