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

Turbine Inputs:
Turbine InputDescription
CoolingFlwCharInCooling flow Gas Characteristics Input,
5x1 vector (for each cooling flow) 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]
This feature must be enabled, see Cooling Flow tab variable (CFlwEn_M) definition
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]
PRmapInMap turbine Pressure Ratio, position on turbine map
Determines Pressure ratio, efficiency, and gas path flow.
The value for this variable will need to be solved for by driving
the flow error accross the engine to zero.
Nmechshaft speed [rpm]

Turbine Outputs:
Turbine OutputDescription
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
TrqOutturbine Torque Output (lbf*ft), positive value for a turbine.
T_DataTurbine internal calculation Data

Turbine Mask Variables:
Turbine Mask VariableDescription
X_T_PRVec_MTurbine Map Pressure Ratio Vector (X-axis)(nx1)
Y_T_NcVec_MTurbine Map Corrected Speed Vector (Y-axis)(mx1)
T_T_Map_WcArray_MTurbine Map Flow Array (Wc=f(Nc,PR))(mxn)
T_T_Map_EffArray_MTurbine Map Efficiency Array (Eff = f(Nc,PR))(mxn)
s_T_Nc_MCorrected Speed Scalar Constant (T_Nc)
s_T_PR_MPressure Ratio Scalar Constant (T_PR)
s_T_Wc_MFlow Scalar Constant (T_Wc)
s_T_Eff_MEfficiency Scalar Constant (T_Eff)
CFlwEn_MCooling Flow Enable [check - enabled]
T_CoolFlwPos_MCooling Flow position [0 at inlet, 1 at exit](cx1)
With Cooling Flow Enabled, the turbine will expect cooling flow input
vector lenght of c *5. See CoolingFlwCharIn definition
iDesign_M Design fork (0, 1, 2)
0 - iDes Enabled, Calculate turbine 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 corrected speed used in map
EffDes_MDesign Efficiency [frac], actual design point tubine efficiency
PRDes_Mmap Design Pressure Ratio [frac], design point PR used in map
NDes_MDesign Shaft Speed [rpm], actual design point speed
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

Note: Vectors are the x and/or y axis to a table made of an array.
    Scalars are used to "scale" the turbine map for off design turbines.