# Positive-Displacement Compressor (2P)

Two-phase fluid positive-displacement compressor in a thermodynamic cycle

*Since R2022a*

**Libraries:**

Simscape /
Fluids /
Two-Phase Fluid /
Fluid Machines

## Description

The Positive-Displacement Compressor (2P) block represents a
positive-displacement compressor, such as reciprocating piston, rotary screw, rotary
vane, and scroll, in a two-phase fluid network. You can control how the block
parameterizes a positive displacement compressor by setting
**Parameterization** to `Analytical`

or
`Tabulated`

. Port **R** and port
**C** are mechanical rotational conserving ports associated with
the compressor shaft and casing, respectively. When there is positive rotation at port
**R** with respect to port **C**, two-phase fluid
flows from port **A** to port **B**. The block may not
be accurate for reversed flow.

The block treats the positive displacement process as polytropic such that *p**v ^{n}* is constant, where

*p*is pressure,

*v*is specific volume, and

*n*is the

**Polytropic exponent**parameter. You can use the block to model isentropic processes by setting

*n*equal to the isentropic exponent,

*k*. The figure shows the steps of a positive-displacement compressor on a P-V diagram, which has these states:

*a*— The compressor cylinder is full at inlet pressure.*b*— The pressure inside the compressor exceeds that of the outlet, which results in fluid discharge.*c*— The compressor reaches the top of the piston stroke, and only the clearance volume remains in the cylinder.*d*— The pressure inside the cylinder drops below the inlet pressure, which results in fluid intake.

### Efficiency

When you set **Volumetric efficiency parameterization** to
`Analytical`

, the block calculates the volumetric
efficiency as

$${\eta}_{V}=1+C-C{\left(\frac{{p}_{out}}{{p}_{in}}\right)}^{\raisebox{1ex}{$1$}\!\left/ \!\raisebox{-1ex}{$n$}\right.},$$

where the block implements the polytropic pressure-volume
relationship. The block calculates the clearance volume fraction,
*C*, as

$$C=\frac{1-{\eta}_{{V}_{nominal}}}{{p}_{ratio}{}^{1/n}-1},$$

where
*η _{Vnominal}*
is the

**Nominal volumetric efficiency**parameter, and

*p*is the ratio of saturation pressures that correspond to

_{ratio}**Nominal condensing temperature**and

**Nominal evaporating temperature**.

When you set **Volumetric efficiency parameterization** to

`Tabulated`

, the block interpolates the values of the
**Volumetric efficiency table, eta(pr,w)** parameter as a
function of the shaft speed and the pressure ratio.

### Continuity Equations

The block calculates the mass flow rate as

$$\dot{m}={\eta}_{V}\omega \frac{{V}_{disp}}{{v}_{s}},$$

where

*ṁ*is the mass flow rate.*ω*is the angular velocity of port**R**relative to port**C**.*v*is the specific volume at the inlet._{s}*V*is the displacement volume that the block uses._{disp}

When you set **Displacement specification** to
`Volumetric displacement`

, the block uses the
**Displacement volume** parameter. When you set
**Displacement specification** to ```
Nominal mass
flow rate and shaft speed
```

, the block calculates the displacement
volume as

$${V}_{disp}=\frac{{\dot{m}}_{nominal}{v}_{s,nominal}}{{\omega}_{nominal}{\eta}_{{V}_{nominal}}},$$

where

*ṁ*is the_{nominal}**Nominal mass flow rate**parameter.*ω*is the_{nominal}**Nominal shaft speed**parameter.*η*is the_{Vnominal}**Nominal volumetric efficiency**parameter.

The block calculates the nominal inlet specific volume,
*v _{s}*, based upon the

**Nominal conditions specification**parameter. When you select

`Nominal pressure ratio`

, the block uses the
**Nominal inlet pressure**and

**Nominal inlet temperature**parameters. When you select

```
Nominal
evaporating and condensing temperatures
```

, the block uses the
**Nominal evaporating temperature**and

**Nominal evaporator superheat**parameters.

The block conserves mass such that

$${\dot{m}}_{A}+{\dot{m}}_{B}=0,$$

where *ṁ _{A}* and

*ṁ*are the mass flow rates of ports

_{B}**A**and

**B**, respectively. The block conserves energy such that

$${\varphi}_{A}+{\varphi}_{B}+{\dot{m}}_{A}\Delta {h}_{t}=0,$$

where *Δh _{t}* is the change
in specific total enthalpy, and

*ṁ*is the fluid power.

_{A}Δh_{t}The block equates the fluid power to the polytropic power such that

$${\eta}_{M}\tau =\frac{n}{n-1}{\eta}_{V}{p}_{in}{V}_{disp}\left[{\left(\frac{{p}_{out}}{{p}_{in}}\right)}^{{\scriptscriptstyle \frac{n-1}{n}}}-1\right],$$

where *η _{M}* is the

**Mechanical efficiency**parameter, and

*τ*is the shaft torque.

### Visualizing the Volumetric Efficiency

To visualize the block volumetric efficiency, right-click the block and select **Fluids** > **Plot Volumetric Efficiency**.

Each time you modify the block settings, click **Reload Data** on the
figure window.

When you set **Volumetric efficiency parameterization** to
`Analytical`

, the block plots compressor volumetric
efficiency vs. pressure ratio.

**Analytical Parameterization Default Volumetric Efficiency**

When you set **Volumetric efficiency parameterization** to
`Tabulated`

, the block plots compressor volumetric
efficiency vs. pressure ratio for each entry in the **Shaft speed vector,
w**.

**Tabulated Parameterization Default Volumetric Efficiency**

### Assumptions and Limitations

The block may not be accurate for flow from port

**B**to port**A**.The block assumes that the flow is quasi-steady: the compressor does not accumulate mass.

The block is designed to operate in superheated vapor. The block may not be accurate in two-phase mixture or subcooled liquid.

## Ports

### Conserving

## Parameters

## References

[1] Mitchell and Braun, Principles of Heating, Ventilation, and Air Conditioning in Buildings, chap. SM6, 2012.

## Extended Capabilities

## Version History

**Introduced in R2022a**