# Compressor (MA)

**Libraries:**

Simscape /
Fluids /
Moist Air /
Turbomachinery

## Description

The Compressor (MA) block represents a dynamic compressor,
such as a centrifugal or axial compressor, in a moist air network. You can use the
**Parameterization** parameter to parameterize the block
analytically based on the design point or by using a tabulated compressor map. A
positive rotation of port **R** relative to port **C**
causes fluid to flow from port **A** to port **B**.
Port **R** and port **C** are mechanical rotational
conserving ports associated with the compressor shaft and casing, respectively.

The surge margin is the ratio between the surge pressure ratio at a given mass flow
rate and the operating point pressure ratio minus `1`

. When you set
**Parameterization** to `Tabulated`

, the
block outputs the surge margin at port **SM**.

The design point is the design operational pressure ratio across and mass flow rate through the compressor during simulation. The compressor operating point and the point of maximum efficiency do not need to coincide.

### Compressor Map

The compressor map plots the isentropic efficiency of the compressor and the lines of
constant corrected shaft speed between the two extremes of choked flow and surge
flow. To visualize the block map, right-click the block and select **Fluids** > **Plot Compressor Map**. Each time you modify the block settings, click **Reload
Data** on the figure window.

Each corrected speed line shows how the pressure ratio varies with the corrected
mass flow rate when the shaft spins at the corresponding corrected speed. The
variable *β* indicates the relative position along the corrected
speed lines between the two extremes. Choked flow corresponds to *β* = 0 and surge flow corresponds to *β* = 1. The map also plots contours of isentropic efficiency as a
function of pressure ratio and corrected mass flow rate, which provides a relative
indication of how much power the compressor needs to operate at various combinations
of pressure ratio and corrected mass flow rate.

**Corrected Mass Flow Rate**

Due to the large changes in pressure and temperature inside a compressor, the compressor map plots performance in terms of the corrected mass flow rate. The map adjusts the corrected mass flow rate from the inlet mass flow rate by using the reference pressure and reference temperature,

$${\dot{m}}_{corr}={\dot{m}}_{A}\left(\sqrt{\frac{{T}_{ref}{R}_{A}}{{T}_{A}{R}_{ref}}}/\frac{{p}_{A}}{{p}_{ref}}\right),$$

where:

*ṁ*is the mass flow rate at port_{A}**A**.*T*is the temperature at port_{A}**A**.*T*is the value of the_{ref}**Reference temperature for corrected flow**parameter. When you set**Parameterization**to`Analytical`

, this value is the inlet temperature at the design operating condition.*R*is the mixture specific gas constant at port_{A}**A**.*R*is the mixture specific gas constant calculated at the values of the_{ref}**Reference pressure for corrected flow**,**Reference temperature for corrected flow**, and**Reference relative humidity**parameters.$$\dot{m}$$

is the corrected mass flow rate. When you set_{corr}**Parameterization**to`Analytical`

, the block uses the**Corrected mass flow rate at design point**parameter. When you set**Parameterization**to`Tabulated`

, the block uses the**Corrected mass flow rate table, mdot(N,beta)**parameter.*p*is the pressure at port_{A}**A**.*p*is the value of the_{ref}**Reference pressure for corrected flow**parameter. When using the analytical parameterization, this value is the inlet pressure at the design operating condition.

The block derives *T _{A}*
from the specific internal energy,

*u*, and specific pressure,

_{A}*p*.

_{A}**Corrected Speed**

The block also adjusts the shaft speed, *ω*, according to the
reference temperature, such that the corrected shaft speed is

$${\omega}_{corr}=\frac{\omega}{\sqrt{\frac{{T}_{ref}{R}_{A}}{{T}_{A}{R}_{ref}}}}.$$

### Shaft Torque

The block calculates the shaft torque, *τ*, as

$$\tau =\frac{{\dot{m}}_{A}\Delta {h}_{total}}{{\eta}_{m}\omega},$$

where:

*Δh*is the change in specific total enthalpy._{total}*η*is the value of the_{m}**Mechanical efficiency**parameter.*ω*is the relative shaft angular velocity,*ω*._{R}- ω_{C}

The block relates the efficiency in the compressor map as

$$\Delta {h}_{total}=\frac{\Delta {h}_{isen}}{{\eta}_{isen}},$$

where:

*Δh*is the isentropic change in specific total enthalpy._{isen}*η*is the isentropic efficiency._{isen}

A threshold region when flow approaches zero ensures that the compressor generates no torque when the flow rate is near zero or reversed.

### Analytical Parameterization

You can generate the compressor map analytically by setting
**Parameterization** to `Analytical`

.
The block fits a model of the compressor map based on [1] to the specified values
for the **Corrected speed at design point**,** Pressure
ratio at design point**, and **Corrected mass flow rate at
design point** parameters. This method does not use
*β* lines and the block does not report a surge margin.

**Pressure Ratio**

The block finds the pressure ratio at a given shaft speed and mass flow rate as

$$\pi =1+\left({\pi}_{D}-1\right)\left[{\tilde{N}}^{ab}+2\tilde{N}k\mathrm{ln}\left(1-\frac{\tilde{m}-{\tilde{N}}^{b}}{k}\right)\right],$$

where:

*π*is the value of the_{D}**Pressure ratio at design point**parameter.$$\tilde{N}$$ is the normalized corrected shaft speed,

$$\frac{N}{{N}_{D}},$$

where

*N*is the value of the_{D}**Corrected speed at design point**parameter.$$\tilde{m}$$ is the normalized corrected mass flow rate,

$$\frac{{\dot{m}}_{corr}}{{\dot{m}}_{D}},$$

where $$\dot{m}$$

is the value of the_{D}**Corrected mass flow rate at design point**parameter.*a*is the value of the**Spine shape, a**parameter.*b*is the value of the**Speed line spread, b**parameter.*k*is the value of the**Speed line roundness, k**parameter.

The *spine* refers to the black line where the
isentropic efficiency contours start to bend. The map *speed
lines* are the shaft constant-speed lines that intersect the spine
perpendicularly.

**Isentropic Efficiency Parameterization**

When you set **Efficiency specification** to
`Analytical`

, the block models variable compressor
efficiency as

$$\eta ={\eta}_{0}\left(1-C{\left|\frac{\tilde{p}}{{\tilde{m}}^{a+\Delta a-1}}-\tilde{m}\right|}^{c}-D{\left|\frac{\tilde{m}}{{\tilde{m}}_{0}}-1\right|}^{d}\right),$$

where:

*η*is the value of the_{0}**Maximum isentropic efficiency**parameter.*C*is the value of the**Efficiency contour gradient orthogonal to spine, C**parameter.*D*is the value of the**Efficiency contour gradient along spine, D**parameter.*c*is the value of the**Efficiency peak flatness orthogonal to spine, c**parameter.*d*is the value of the**Efficiency peak flatness along spine, d**parameter.$$\tilde{p}$$ is the normalized corrected pressure ratio,

$$\frac{\pi -1}{{\pi}_{D}-1},$$

where

*π*is the value of the_{D}**Corrected pressure ratio at design point**parameter.$$\tilde{m}$$

is the normalized corrected mass flow rate at which the compressor reaches the value of the_{0}**Maximum isentropic efficiency**parameter.

You can adjust the efficiency variables for different performance
characteristics. Alternatively, you can choose a constant efficiency value by
using the **Constant isentropic efficiency** parameter.

### Tabulated Data Parameterization

When you set **Parameterization** to
`Tabulated`

, the isentropic efficiency, pressure ratio,
and corrected mass flow rate of the compressor are functions of the corrected speed,
*N*, and the map index, *β*. The block uses
linear interpolation between data points for the efficiency, pressure ratio, and
corrected mass flow rate.

If *β* exceeds 1, compressor surge occurs and the block assumes the
pressure ratio remains at *β* = 1, while the mass flow rate continues to change. If the simulation
conditions fall below *β* = 0, the block models the effects of choked flow, where the mass flow
rate remains at its value at *β* = 0 while the pressure ratio continues to change. To constrain the
compressor performance in the map boundaries, the block extrapolates isentropic
efficiency to the nearest point.

You can choose to be notified when the operating point pressure ratio exceeds the
surge pressure ratio. Set **Report when surge margin is negative**
to `Warning`

to receive a warning or to
`Error`

to stop the simulation when this occurs.

### Continuity Equations

The block conserves mass such that

$$\begin{array}{l}{\dot{m}}_{A}+{\dot{m}}_{B}=0\\ {\dot{m}}_{wA}+{\dot{m}}_{wB}=0\\ {\dot{m}}_{gA}+{\dot{m}}_{gB}=0\end{array}$$

where:

$$\dot{m}$$

is the mixture mass flow rate at port_{B}**B**.$$\dot{m}$$

and $$\dot{m}$$_{wA}are the water vapor mass flow rates at ports_{wB}**A**and**B**, respectively.$$\dot{m}$$

and $$\dot{m}$$_{gA}are the trace gas mass flow rates at ports_{gB}**A**and**B**, respectively.

The block computes the energy balance equation as

$${\Phi}_{A}+{\Phi}_{B}+{P}_{fluid}=0,$$

where:

*Φ*is the energy flow rate at port_{A}**A**.*Φ*is the energy flow rate at port_{B}**B**.*P*is the hydraulic power delivered to the fluid, which the block determines from the change in specific enthalpy $${P}_{fluid}={\dot{m}}_{A}\Delta {h}_{total}.$$_{fluid}

### Assumptions and Limitations

The block assumes that superheated fluid enters at

**A**.The block only defines compressor map flow from port

**A**to port**B**. Reverse flow results may not be accurate.The block only represents dynamic compressors.

## Ports

### Conserving

### Output

## Parameters

## References

[1] Greitzer, E. M. et al. “N+3
Aircraft Concept Designs and Trade Studies. Volume 2: Appendices – Design Methodologies
for Aerodynamics, Structures, Weight, and Thermodynamic Cycles.” *NASA
Technical Report*, 2010.

[2] Kurzke, Joachim. "How to Get
Component Maps for Aircraft Gas Turbine Performance Calculations." *Volume 5:
Manufacturing Materials and Metallurgy; Ceramics; Structures and Dynamics; Controls,
Diagnostics and Instrumentation; Education; General*, American Society of
Mechanical Engineers, 1996, p. V005T16A001.

[3] Plencner, Robert M. “Plotting
component maps in the Navy/NASA Engine Program (NNEP): A method and its usage.”
*NASA Technical Memorandum*, 1989.

## Extended Capabilities

## Version History

**Introduced in R2024a**