T-MATS: Compressor Library Block
This block simulates the performance of a compressor using basic thermodynamic equations, properties, and table lookups.

Compressor Inputs:
Compressor InputDescription
GasPthCharInGas Path Characteristics Input, 5x1 vector consisting of:
- W - gas path flow [pps]
- ht - enthalpy [BTU/lbm]
- Tt - Total Temperature [degR]
- Pt - Total Pressure [psia]
- FARc - Combusted Fuel to Air Ratio [frac]
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.
Nmechshaft speed [rpm]

Compressor Outputs:
Compressor OutputDescription
CustBldsCharOutCustomer or flow based Bleeds Characteristics Output,
[5 x 1] vector for each customer bleed (total #cbleeds *5 x 1)
consisting of the following repeating format:
- W - gas path flow [pps]
- ht - enthalpy [BTU/lbm]
- Tt - Total Temperature [degR]
- Pt - Total Pressure [psia]
- FARc - Combusted Fuel to Air Ratio [frac]
This feature must be enabled, see Bleed tab variable (CBLDEN_M) definition
FBldsCharOutFractional Bleeds Characteristics Output,
[5 x 1] vector for each customer bleed (total #fbleeds *5 x 1)
consisting of the following repeating format:
- W - gas path flow [pps]
- ht - enthalpy [BTU/lbm]
- Tt - Total Temperature [degR]
- Pt - Total Pressure [psia]
- FARc - Combusted Fuel to Air Ratio [frac]
This feature must be enabled, see Bleed tab variable (FBLDEN_M) definition
GasPthCharOutGas Path Characteristics Output, 5x1 vector consisting of:
- W - gas path flow [pps]
- ht - enthalpy [BTU/lbm]
- Tt - Total Temperature [degR]
- Pt - Total Pressure [psia]
- FARc - Combusted Fuel to Air Ratio [frac]
NErrNormalized Error [frac], in a typical system this will
be driven to zero by an iterative solver
TrqOutcompressor Torque Output (lbf*ft), negative value for a compressor.
C_DataCompressor internal calculation Data, 2x1 vector including:
- SMavail - Stall Margin Available [%]
- Test - Compressor internal calculation Data

Compressor Mask Variables:
Compressor Mask VariabletDescription
X_C_RlineVec_Mcompressor map Rline vector(nx1)
Y_C_NcVec_Mcompressor map corrected speed vector(mx1)
T_C_Map_WcArray_Mcompressor map flow array (Wc = f(Nc, Rline))(mxn)
T_C_Map_PRArray_Mcompressor map pressure ratio array (PR = f(Nc, Rline))(mxn)
T_C_Map_EffArray_Mcompressor map efficiency array (Eff = f(Nc, Rline))(mxn)
s_C_Nc_Mcorrected speed scalar constant
s_C_Wc_Mcorrected flow scalar constant
s_C_PR_Mpressure ratio scalar constant
s_C_Eff_Mefficiency scalar constant
CBLDEN_MCustomer or flow based Bleed Enable [check - enabled]
C_CBD_MCustomer or flow based Bleed Demand[pps](cbx1)
C_CBFht_MCustomer or flow based Bleed Fractional enthalpy[frac](cbx1)
C_CBFPt_MCustomer or flow based Bleed Fractional Total Pressure[frac](cbx1)
FBLDEN_MFractional based Bleed Enable [check - enabled]
C_FBD_MFractional Bleed Demand[frac](bx1)
C_BFht_Mengine Bleed Fractional enthalpy (bx1)[frac](bx1)
C_BFPt_Mengine Bleed Fractional Total Pressure (bx1)[frac](bx1)
X_C_WcSurgeVec_MCompensated flow Surge Vector [pps](sx1)
T_C_PRSurgeVec_MSurge line Pressure Ratio Vector [frac](sx1)
iDesign_M Design fork (0, 1, 2)
0 - iDes Enabled, Calculate compressor map scalars based on design variables
When iDesign is set to 0, scalar constants from the Map tab will not be used.
Scalars calculated will be saved in the specified file (FVar_M).
1 - Scalar variables will be overwritten (mask Initialization) with
values from a specified file (FVar_M).
When iDesign is set to 1, scalar constants from the Map tab and the Design values
from the iDesign tab will not be used.
2 - Scalar variables from the map tab will be used as the map scalars.
When iDesign is set to 2, scalar constants from the Map tab will be used; Design values
and file definitions 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
FVar_MFile name for iDes Variables
SVar_MiDes Variable Surname
NcNm_MiDes Nc scalar variable name
WcNm_MiDes Wc scalar variable name
PRNm_MiDes PR scalar variable name
EffNm_MiDes Eff scalar variable name

Notes: Vectors are the x and/or y axis to a table made of an array. Scalars are used to "scale" the compressor map for off design compressors.
cb - number of customer bleeds
b - number of fractional bleeds