T-MATS: Turbine_PSI Library Block
This block simulates the performance of a turbine using basic thermodynamic equations, properties, and table lookups. Turbine_PSI look up tables for this block are based on PSI instead Pressure Ratio as in the Turbine block.

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]
PSImapInMap turbine PSI, 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_PRpVec_MTurbine Map Pressure Ratio Vector for PSI array (X-axis)(nx1)
Y_T_NcpVec_MTurbine Map Corrected Speed Vector for PSI array (Y-axis)(mx1)
T_T_Map_PSIArray_MTurbine Map PSI Array (PSIMAPI = f(Nc,PR))(mxn)
X_T_PRwVec_MTurbine Map Pressure Ratio Vector for WoW array (X-axis)(rx1)
Y_T_NcwVec_MTurbine Map Corrected Speed Vector for WoW array (Y-axis)(qx1)
T_T_Map_WoWArray_MTurbine Map Flow calculation Array (WoW=f(Nc,PR))(qxr)
s_T_hi_MCorrected Entalpy Constant (T_hi), note, this variable is not calculated with iDesign
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
gamma_MTurbine Design Gamma
Rt_MTurbine Design Rt
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_MDesign Corrected Shaft Speed [rpm]
EffDes_MDesign Efficiency [frac]
PRDes_MDesign Pressure Ratio [frac]
NDes_MDesign Shaft Speed [rpm]
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.