T-MATS: Compressor, Cantera Library Block
This block simulates the performance of a compressor using basic thermodynamic equations, properties, Cantera functions, and table lookups. To utilize this block a Cantera object must exist in the workspace as a global variable named fs, which may be created with the Cantera importPhase command. The fs variable must include all Species defined in the file canteraload.m.

Compressor Inputs:
Compressor InputDescription
Flow InFlow Data Input, 25x1 vector consisting of:
-1- W - gas path flow [pps]
-2- s - entropy [BTU/(lbm*degR)]
-3- Tt - total temperature [degR]
-4- Pt - total pressure [psia]
-5- ht - total enthlapy [BTU/lbm]
-6- rhot - total density [lbm/ft3]
-7- gamt - total specific heat ratio
-8- Ts - static temperature [degR]
-9- Ps - static pressure [psia]
-10- hs - static enthalpy [BTU/lbm]
-11- rhos - static density [lbm/ft3]
-12- gams - static specific heat ratio
-13- Vflow - flow velocity [ft/sec]
-14- MN - Mach number
-15- A - flow area [in2]
-16to21- species array values, defined in canteraload.m
-22to25- future use
Speedshaft speed [rpm]
RlineR-line, position on compressor map
Determines pressure ratio, efficiency, and gas path flow.
The value for this variable will need be solved for by driving
flow error across the engine to zero.

Compressor Outputs:
Compressor OutputDescription
Flow OutFlow Data Output, 25x1 vector consisting of:
-1- W - gas path flow [pps]
-2- s - entropy [BTU/(lbm*degR)]
-3- Tt - total temperature [degR]
-4- Pt - total pressure [psia]
-5- ht - total enthlapy [BTU/lbm]
-6- rhot - total density [lbm/ft3]
-7- gamt - total specific heat ratio
-8- Ts - static temperature [degR]
-9- Ps - static pressure [psia]
-10- hs - static enthalpy [BTU/lbm]
-11- rhos - static density [lbm/ft3]
-12- gams - static specific heat ratio
-13- Vflow - flow velocity [ft/sec]
-14- MN - Mach number
-15- A - flow area [in2]
-16to21- species array values, defined in canteraload.m
-22to25- future use
Bleed 1Fractional Bleed 1, 25x1 vector defined as Flow Out above.
Bleed 2Fractional Bleed 2, 25x1 vector defined as Flow Out above.
Flow ErrorNormalized Error [frac], in a typical system this will
be driven to zero by an iterative solver
PowerCompressor power output [hp], negative value for a compressor.
C_DataCompressor internal calculation Data, 4x1 vector including:
- SMavail - Stall Margin Available [%]
- eff - Efficiency [frac]
- Wc - corrected flow [pps]
- PR - pressure ratio [frac]

Compressor Mask Variables:
Compressor Mask VariabletDescription
MapFile_Mcompressor map file name
s_C_Nc_in_Mcorrected speed scalar constant
s_C_Wc_in_Mcorrected flow scalar constant
s_C_PR_in_Mpressure ratio scalar constant
s_C_eff_in_Mcefficiency scalar constant
Wfrac1_MFractional Bleed 1 Demand[frac]
hfrac1_Mengine Bleed 1 Fractional enthalpy [frac]
Pfrac1_Mengine Bleed 1 Fractional Total Pressure [frac]
Wfrac2_MFractional Bleed 2 Demand[frac]
hfrac2_Mengine Bleed 2 Fractional enthalpy [frac]
Pfrac2_Mengine Bleed 2 Fractional Total Pressure [frac]
iDes_M Design fork (0, 1, 2)
0 - Calculate compressor map scalars based on design variables
When iDesign is set to 0, scalar constants from the General tab will not be used.
Scalars calculated will be saved to the workspace.
1 - Scalar variables will be overwritten with scalar values from the workspace.
When iDesign is set to 1, scalar constants from the General tab and the Design values
from the iDesign tab will not be used.
2 - Scalar variables from the general tab will be used as the map scalars.
When iDesign is set to 2, scalar constants from the General tab will be used; Design values
from the iDesign tab will not be used.
NcDes_Mmap Design Corrected Shaft Speed [rpm], design point speed used in map
effDes_MDesign Efficiency [frac], actual design point compressor efficiency
PRdes_MDesign Pressure Ratio [frac], actual design point compressor PR
RlineDes_Mmap Design Rline, design point Rline used in map