% Delivered to the Government in Accordance with Contract FA8650-10-C-7080
% 
%  (c) 2011 United Technologies Corp.
% Developed with the sponsorship of the Defense Advanced Research Projects Agency (DARPA).
%  
% Permission is hereby granted, free of charge, to any person obtaining a copy of this data, including any software or models in source or binary form, as well as any drawings, specifications, and documentation (collectively "the Data"), to deal in the Data without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Data, and to permit persons to whom the Data is furnished to do so, subject to the following conditions:
%  
% The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Data.
%  
% THE DATA IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS, SPONSORS, DEVELOPERS, CONTRIBUTORS, OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE DATA OR THE USE OR OTHER DEALINGS IN THE DATA.
% 

% This script sizes turbines based on the design of the cold section
% The assumption is that design point performance occurs at beta = 0.5
% A more accurate description of this will be provided using Dr. Joachim
% Kurzke's Smooth T8.2 and Smooth C8.2 map scaling softwares.

% Design Pressure, Temperature and Mach number
P_amb = 22729;                   % Cruise Ambient Pressure at 36000ft (Pascals)
T_amb = 216.5;                   % Cruise Ambient Temperature at 36000ft (Kelvin)
Mach  = 0.8;                     % Cruise Mach Number
global G_fuel_design

% Gas Properties
global cp_cold cp_hot R gam_cold gam_hot
cp_cold = 1045;
cp_hot = 1244;
R = 287;
gam_cold= 1.4;
gam_hot = 1.3;



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Cold Section

% Design Data for Fan
global Speed_design_Fan;         % Design Speed
global Mass_design_Fan;          % Design Mass Flow
global PR_design_Fan;            % Design Pressure Ratio
global Efficiency_design_Fan;    % Design Efficiency

Speed_design_Fan = 1500;         % Design Speed
Mass_design_Fan = 220;           % Design Mass Flow
PR_design_Fan = 1.2;             % Design Pressure Ratio
Efficiency_design_Fan = 0.9;     % Design Efficiency
Beta_design_Fan = 0.5;           % Design Beta Value


% Design Data for Low Pressure Compressor 1
global Speed_design_LPC_1;         % Design Speed
global Mass_design_LPC_1;          % Design Mass Flow
global PR_design_LPC_1;            % Design Pressure Ratio
global Efficiency_design_LPC_1;    % Design Efficiency

Speed_design_LPC_1 = 2000;         % Design Speed
Mass_design_LPC_1 = 15.134;        % Design Mass Flow
PR_design_LPC_1 = 1.4;             % Design Pressure Ratio
Efficiency_design_LPC_1 = 0.9;     % Design Efficiency
Beta_design_LPC_1 = 0.5;           % Design Beta Value

% Design Data for Low Pressure Compressor 2
global Speed_design_LPC_2;         % Design Speed
global Mass_design_LPC_2;          % Design Mass Flow
global PR_design_LPC_2;            % Design Pressure Ratio
global Efficiency_design_LPC_2;    % Design Efficiency

Speed_design_LPC_2 = 2250;        % Design Speed
Mass_design_LPC_2 = 15.134;        % Design Mass Flow
PR_design_LPC_2 = 1.4;             % Design Pressure Ratio
Efficiency_design_LPC_2 = 0.9;     % Design Efficiency
Beta_design_LPC_2 = 0.5;           % Design Beta Value

% Design Data for Low Pressure Compressor 3
global Speed_design_LPC_3;         % Design Speed
global Mass_design_LPC_3;          % Design Mass Flow
global PR_design_LPC_3;            % Design Pressure Ratio
global Efficiency_design_LPC_3;    % Design Efficiency

Speed_design_LPC_3 = 2500;         % Design Speed
Mass_design_LPC_3 = 15.134;        % Design Mass Flow
PR_design_LPC_3 = 1.4;             % Design Pressure Ratio
Efficiency_design_LPC_3 = 0.9;     % Design Efficiency
Beta_design_LPC_3 = 0.5;           % Design Beta Value

% Design Data for Low Pressure Compressor 4
global Speed_design_LPC_4;         % Design Speed
global Mass_design_LPC_4;          % Design Mass Flow
global PR_design_LPC_4;            % Design Pressure Ratio
global Efficiency_design_LPC_4;    % Design Efficiency

Speed_design_LPC_4 = 2750;         % Design Speed
Mass_design_LPC_4 = 15.134;        % Design Mass Flow
PR_design_LPC_4 = 1.4;             % Design Pressure Ratio
Efficiency_design_LPC_4 = 0.9;     % Design Efficiency
Beta_design_LPC_4 = 0.5;           % Design Beta Value

% Design Data for Low Pressure Compressor 5
global Speed_design_LPC_5;         % Design Speed
global Mass_design_LPC_5;          % Design Mass Flow
global PR_design_LPC_5;            % Design Pressure Ratio
global Efficiency_design_LPC_5;    % Design Efficiency

Speed_design_LPC_5 = 3000;         % Design Speed
Mass_design_LPC_5 = 15.134;        % Design Mass Flow
PR_design_LPC_5 = 1.4;             % Design Pressure Ratio
Efficiency_design_LPC_5 = 0.9;     % Design Efficiency
Beta_design_LPC_5 = 0.5;           % Design Beta Value

% Design Data for Low Pressure Compressor 6
global Speed_design_LPC_6;         % Design Speed
global Mass_design_LPC_6;          % Design Mass Flow
global PR_design_LPC_6;            % Design Pressure Ratio
global Efficiency_design_LPC_6;    % Design Efficiency

Speed_design_LPC_6 = 3250;         % Design Speed
Mass_design_LPC_6 = 15.134;        % Design Mass Flow
PR_design_LPC_6 = 1.4;             % Design Pressure Ratio
Efficiency_design_LPC_6 = 0.9;     % Design Efficiency
Beta_design_LPC_6 = 0.5;           % Design Beta Value

% Design Data for Low Pressure Compressor 7
global Speed_design_LPC_7;         % Design Speed
global Mass_design_LPC_7;          % Design Mass Flow
global PR_design_LPC_7;            % Design Pressure Ratio
global Efficiency_design_LPC_7;    % Design Efficiency

Speed_design_LPC_7 = 3500;         % Design Speed
Mass_design_LPC_7 = 15.134;        % Design Mass Flow
PR_design_LPC_7 = 1.4;             % Design Pressure Ratio
Efficiency_design_LPC_7 = 0.9;     % Design Efficiency
Beta_design_LPC_7 = 0.5;           % Design Beta Value

% Design Data for Low Pressure Compressor 8
global Speed_design_LPC_8;         % Design Speed
global Mass_design_LPC_8;          % Design Mass Flow
global PR_design_LPC_8;            % Design Pressure Ratio
global Efficiency_design_LPC_8;    % Design Efficiency

Speed_design_LPC_8 = 3750;         % Design Speed
Mass_design_LPC_8 = 15.134;        % Design Mass Flow
PR_design_LPC_8 = 1.4;             % Design Pressure Ratio
Efficiency_design_LPC_8 = 0.9;     % Design Efficiency
Beta_design_LPC_8 = 0.5;           % Design Beta Value

% Design Data for Low Pressure Compressor 9
global Speed_design_LPC_9;         % Design Speed
global Mass_design_LPC_9;          % Design Mass Flow
global PR_design_LPC_9;            % Design Pressure Ratio
global Efficiency_design_LPC_9;    % Design Efficiency

Speed_design_LPC_9 = 4000;         % Design Speed
Mass_design_LPC_9 = 15.134;        % Design Mass Flow
PR_design_LPC_9 = 1.4;             % Design Pressure Ratio
Efficiency_design_LPC_9 = 0.9;     % Design Efficiency
Beta_design_LPC_9 = 0.5;           % Design Beta Value

% Design Data for Low Pressure Compressor 10
global Speed_design_LPC_10;         % Design Speed
global Mass_design_LPC_10;          % Design Mass Flow
global PR_design_LPC_10;            % Design Pressure Ratio
global Efficiency_design_LPC_10;    % Design Efficiency

Speed_design_LPC_10 = 4250;         % Design Speed
Mass_design_LPC_10 = 15.134;        % Design Mass Flow
PR_design_LPC_10 = 1.4;             % Design Pressure Ratio
Efficiency_design_LPC_10 = 0.9;     % Design Efficiency
Beta_design_LPC_10 = 0.5;           % Design Beta Value


% Design Data for High Pressure Compressor
global Speed_design_HPC;         % Design Speed
global Mass_design_HPC;          % Design Mass Flow
global PR_design_HPC;            % Design Pressure Ratio
global Efficiency_design_HPC;    % Design Efficiency

Speed_design_HPC = 4500;         % Design Speed
Mass_design_HPC = 15.134;        % Design Mass Flow
PR_design_HPC = 1.4;             % Design Pressure Ratio
Efficiency_design_HPC = 0.9;     % Design Efficiency
Beta_design_HPC = 0.5;           % Design Beta Value


% Burner Maximum Temperature
global PR_Burner

T13 = 1600;                       % Kelvin 
PR_Burner= 0.9;                  % Burner Pressure Ratio

% Hot Section

%Design Data for High Pressure Turbine
global Speed_design_HPT;         % Design Speed
global PR_design_HPT;            % Design PR
global Mass_design_HPT;          % Design Mass Flow
global Efficiency_design_HPT;    % Design Efficiency

Speed_design_HPT = 4500;         % Design Speed
Mass_design_HPT = 15.134;        % Design Mass Flow
Efficiency_design_HPT = 0.9;     % Design Efficiency
Beta_design_HPT = 0.5;           % Design Beta Value

% Design Data for Intermediate Pressure Turbine 1
global Speed_design_IPT_10;       % Design Speed
global PR_design_IPT_10;          % Design PR 
global Mass_design_IPT_10;        % Design Mass Flow
global Efficiency_design_IPT_10;  % Design Efficiency

Speed_design_IPT_10 = 4250;       % Design Speed
Mass_design_IPT_10 = 15.134;      % Design Mass Flow
Efficiency_design_IPT_10 = 0.9;   % Design Efficiency
Beta_design_IPT_10 = 0.5;         % Design Beta Value

% Design Data for Intermediate Pressure Turbine 2
global Speed_design_IPT_9;         % Design Speed
global PR_design_IPT_9;            % Design PR
global Mass_design_IPT_9;          % Design Mass Flow
global Efficiency_design_IPT_9;    % Design Efficiency

Speed_design_IPT_9 = 4000;         % Design Speed
Mass_design_IPT_9 = 15.134;        % Design Mass Flow
Efficiency_design_IPT_9 = 0.9;     % Design Efficiency
Beta_design_IPT_9 = 0.5;           % Design Beta Value

% Design Data for Intermediate Pressure Turbine 3
global Speed_design_IPT_8;         % Design Speed
global PR_design_IPT_8;            % Design PR
global Mass_design_IPT_8;          % Design Mass Flow
global Efficiency_design_IPT_8;    % Design Efficiency

Speed_design_IPT_8 = 3750;         % Design Speed
Mass_design_IPT_8 = 15.134;        % Design Mass Flow
Efficiency_design_IPT_8 = 0.9;     % Design Efficiency
Beta_design_IPT_8 = 0.5;           % Design Beta Value

% Design Data for Intermediate Pressure Turbine 4
global Speed_design_IPT_7;         % Design Speed
global PR_design_IPT_7;            % Design PR
global Mass_design_IPT_7;          % Design Mass Flow
global Efficiency_design_IPT_7;    % Design Efficiency

Speed_design_IPT_7 = 3500;         % Design Speed
Mass_design_IPT_7 = 15.134;        % Design Mass Flow
Efficiency_design_IPT_7 = 0.9;     % Design Efficiency
Beta_design_IPT_7 = 0.5;           % Design Beta Value

% Design Data for Intermediate Pressure Turbine 5
global Speed_design_IPT_6;         % Design Speed
global PR_design_IPT_6;            % Design PR
global Mass_design_IPT_6;          % Design Mass Flow
global Efficiency_design_IPT_6;    % Design Efficiency

Speed_design_IPT_6 = 3250;         % Design Speed
Mass_design_IPT_6 = 15.134;        % Design Mass Flow
Efficiency_design_IPT_6 = 0.9;     % Design Efficiency
Beta_design_IPT_6 = 0.5;           % Design Beta Value

% Design Data for Intermediate Pressure Turbine 6
global Speed_design_IPT_5;         % Design Speed
global PR_design_IPT_5;            % Design PR
global Mass_design_IPT_5;          % Design Mass Flow
global Efficiency_design_IPT_5;    % Design Efficiency

Speed_design_IPT_5 = 3000;         % Design Speed
Mass_design_IPT_5 = 15.134;        % Design Mass Flow
Efficiency_design_IPT_5 = 0.9;     % Design Efficiency
Beta_design_IPT_5 = 0.5;           % Design Beta Value

% Design Data for Intermediate Pressure Turbine 7
global Speed_design_IPT_4;         % Design Speed
global PR_design_IPT_4;            % Design PR
global Mass_design_IPT_4;          % Design Mass Flow
global Efficiency_design_IPT_4;    % Design Efficiency

Speed_design_IPT_4 = 2750;         % Design Speed
Mass_design_IPT_4 = 15.134;        % Design Mass Flow
Efficiency_design_IPT_4 = 0.9;     % Design Efficiency
Beta_design_IPT_4 = 0.5;           % Design Beta Value

% Design Data for Intermediate Pressure Turbine 8
global Speed_design_IPT_3;         % Design Speed
global PR_design_IPT_3;            % Design PR
global Mass_design_IPT_3;          % Design Mass Flow
global Efficiency_design_IPT_3;    % Design Efficiency

Speed_design_IPT_3 = 2500;         % Design Speed
Mass_design_IPT_3 = 15.134;        % Design Mass Flow
Efficiency_design_IPT_3 = 0.9;     % Design Efficiency
Beta_design_IPT_3 = 0.5;           % Design Beta Value

% Design Data for Intermediate Pressure Turbine 9
global Speed_design_IPT_2;         % Design Speed
global PR_design_IPT_2;            % Design PR
global Mass_design_IPT_2;          % Design Mass Flow
global Efficiency_design_IPT_2;    % Design Efficiency

Speed_design_IPT_2 = 2250;         % Design Speed
Mass_design_IPT_2 = 15.134;        % Design Mass Flow
Efficiency_design_IPT_2 = 0.9;     % Design Efficiency
Beta_design_IPT_2 = 0.5;           % Design Beta Value

% Design Data for Intermediate Pressure Turbine 10
global Speed_design_IPT_1;         % Design Speed
global PR_design_IPT_1;            % Design PR
global Mass_design_IPT_1;          % Design Mass Flow
global Efficiency_design_IPT_1;    % Design Efficiency

Speed_design_IPT_1 = 2000;         % Design Speed
Mass_design_IPT_1 = 15.134;        % Design Mass Flow
Efficiency_design_IPT_1 = 0.9;     % Design Efficiency
Beta_design_IPT_1 = 0.5;           % Design Beta Value

% Design Data for Low Pressure Turbine
global Speed_design_LPT;           % Design Speed
global PR_design_LPT;              % Design PR
global Mass_design_LPT;            % Design Mass Flow
global Efficiency_design_LPT;      % Design Efficiency

Speed_design_LPT = 1500;           % Design Speed
Mass_design_LPT = 15.134;          % Design Mass Flow
Efficiency_design_LPT = 0.9;       % Design Efficiency
Beta_design_HPT = 0.5;             % Design Beta Value

% Nozzle
global A_Core

% Bypass Nozzle
global A_Bypass
% Area will be calculated Automatically

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Size Hot Section to Match Cold Section

% Diffuser
[T0, P0] = Design_Diffuser(T_amb,P_amb, Mach);

% Fan
[T1, P1, G1, Power_1] = Design_Fan(T0, P0);

% LPC 1
[T2, P2, G2, Power_2] = Design_LPC_1(T1, P1);

% LPC 2
[T3, P3, G3, Power_3] = Design_LPC_2(T2, P2);

% LPC 3
[T4, P4, G4, Power_4] = Design_LPC_3(T3, P3);

% LPC 4
[T5, P5, G5, Power_5] = Design_LPC_4(T4, P4);

% LPC 5
[T6, P6, G6, Power_6] = Design_LPC_5(T5, P5);

% LPC 6
[T7, P7, G7, Power_7] = Design_LPC_6(T6, P6);

% LPC 7
[T8, P8, G8, Power_8] = Design_LPC_7(T7, P7);

% LPC 8
[T9, P9, G9, Power_9] = Design_LPC_8(T8, P8);

% LPC 9
[T10, P10, G10, Power_10] = Design_LPC_9(T9, P9);

% LPC 10
[T11, P11, G11, Power_11] = Design_LPC_10(T10, P10);

% HPC
[T12, P12, G12, Power_12] = Design_HPC(T11, P11);

Power_spool_1 = Power_1;                % Low Spool Power
Power_spool_2 = Power_2;                % Intermediate Spool Power 1
Power_spool_3 = Power_3;                % Intermediate Spool Power 2
Power_spool_4 = Power_4;                % Intermediate Spool Power 3
Power_spool_5 = Power_5;                % Intermediate Spool Power 4
Power_spool_6 = Power_6;                % Intermediate Spool Power 5
Power_spool_7 = Power_7;                % Intermediate Spool Power 6
Power_spool_8 = Power_8;                % Intermediate Spool Power 7
Power_spool_9 = Power_9;                % Intermediate Spool Power 8
Power_spool_10 = Power_10;              % Intermediate Spool Power 9
Power_spool_11 = Power_11;              % Intermediate Spool Power_10
Power_spool_12 = Power_12;              % High Spool Power

% Burner
[G_fuel_design, P13] = Design_Burner(T12, T13, P12, G2, PR_Burner);

% HPT
[T14, P14, PR_design_HPT] = Design_HPT(T13, P13, G2, Power_spool_12);

%IPT 1
[T15, P15, PR_design_IPT_10] = Design_IPT_10(T14, P14, G2, Power_spool_11);

%IPT 2
[T16, P16, PR_design_IPT_9] = Design_IPT_9(T15, P15, G2, Power_spool_10);

%IPT 3
[T17, P17, PR_design_IPT_8] = Design_IPT_8(T16, P16, G2, Power_spool_9);

%IPT 4
[T18, P18, PR_design_IPT_7] = Design_IPT_7(T17, P17, G2, Power_spool_8);

%IPT 5
[T19, P19, PR_design_IPT_6] = Design_IPT_6(T18, P18, G2, Power_spool_7);

%IPT 6
[T20, P20, PR_design_IPT_5] = Design_IPT_5(T19, P19, G2, Power_spool_6);

%IPT 7
[T21, P21, PR_design_IPT_4] = Design_IPT_4(T20, P20, G2, Power_spool_5);

%IPT 8
[T22, P22, PR_design_IPT_3] = Design_IPT_3(T21, P21, G2, Power_spool_4);

%IPT 9
[T23, P23, PR_design_IPT_2] = Design_IPT_2(T22, P22, G2, Power_spool_3);

%IPT 10
[T24, P24, PR_design_IPT_1] = Design_IPT_1(T23, P23, G2, Power_spool_2);

% LPT
[T25, P25, PR_design_LPT] = Design_LPT(T24, P24, G2, Power_spool_1);

% Nozzle          
[T_Core,P_Core A_Core] = Design_Nozzle(T25, P25,P_amb, G2);

% Bypass Nozzle
[T_Bypass, P_Bypass, A_Bypass] = Design_Nozzle(T1,P1,P_amb, G1);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Design Output

% Fan
global T_design_Fan
global P_design_Fan
T_design_Fan = T0;
P_design_Fan = P0;

% LPC 1
global T_design_LPC_1
global P_design_LPC_1
T_design_LPC_1 = T1;
P_design_LPC_1 = P1;

% LPC 2
global T_design_LPC_2
global P_design_LPC_2
T_design_LPC_2 = T2;
P_design_LPC_2 = P2;

% LPC 3
global T_design_LPC_3
global P_design_LPC_3
T_design_LPC_3 = T3;
P_design_LPC_3 = P3;

% LPC 4
global T_design_LPC_4
global P_design_LPC_4
T_design_LPC_4 = T4;
P_design_LPC_4 = P4;

% LPC 5
global T_design_LPC_5
global P_design_LPC_5
T_design_LPC_5 = T5;
P_design_LPC_5 = P5;

% LPC 6
global T_design_LPC_6
global P_design_LPC_6
T_design_LPC_6 = T6;
P_design_LPC_6 = P6;

% LPC 7
global T_design_LPC_7
global P_design_LPC_7
T_design_LPC_7 = T7;
P_design_LPC_7 = P7;

% LPC 8
global T_design_LPC_8
global P_design_LPC_8
T_design_LPC_8 = T8;
P_design_LPC_8 = P8;

% LPC 9
global T_design_LPC_9
global P_design_LPC_9
T_design_LPC_9 = T9;
P_design_LPC_9 = P9;

% LPC 10
global T_design_LPC_10
global P_design_LPC_10
T_design_LPC_10 = T10;
P_design_LPC_10 = P10;

% HPC
global T_design_HPC
global P_design_HPC
T_design_HPC = T11;
P_design_HPC = P11;

% Burner

% HPT
global T_design_HPT
global P_design_HPT
T_design_HPT = T13;
P_design_HPT = P13;

% IPT 1
global T_design_IPT_10
global P_design_IPT_10
T_design_IPT_10 = T14;
P_design_IPT_10 = P14;

% IPT 2
global T_design_IPT_9
global P_design_IPT_9
T_design_IPT_9 = T15;
P_design_IPT_9 = P15;

% IPT 3
global T_design_IPT_8
global P_design_IPT_8
T_design_IPT_8 = T16;
P_design_IPT_8 = P16;

% IPT 4
global T_design_IPT_7
global P_design_IPT_7
T_design_IPT_7 = T17;
P_design_IPT_7 = P17;

% IPT 5
global T_design_IPT_6
global P_design_IPT_6
T_design_IPT_6 = T18;
P_design_IPT_6 = P18;

% IPT 6
global T_design_IPT_5
global P_design_IPT_5
T_design_IPT_5 = T19;
P_design_IPT_5 = P19;

% IPT 7
global T_design_IPT_4
global P_design_IPT_4
T_design_IPT_4 = T20;
P_design_IPT_4 = P20;

% IPT 8
global T_design_IPT_3
global P_design_IPT_3
T_design_IPT_3 = T21;
P_design_IPT_3 = P21;

% IPT 9
global T_design_IPT_2
global P_design_IPT_2
T_design_IPT_2 = T22;
P_design_IPT_2 = P22;

% IPT 10
global T_design_IPT_1
global P_design_IPT_1
T_design_IPT_1 = T23;
P_design_IPT_1 = P23;

% LPT
global T_design_LPT
global P_design_LPT
T_design_LPT = T24;
P_design_LPT = P24;

% Nozzle
clear('G1', 'G2', 'G3', 'G4', 'G5', 'R', 'gam_hot', 'gam_cold', 'cp_hot', 'cp_cold')
clear('Mach', 'T_amb', 'T_Bypass', 'T_Core')
clear('P_amb', 'P_Bypass', 'P_Core')
clear('Power_1', 'Power_2', 'Power_3', 'Power_4', 'Power_5', 'Power_6', 'Power_7', 'Power_8', 'Power_9', 'Power_10', 'Power_11', 'Power_12')
clear('T0', 'T1', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7', 'T8', 'T9', 'T10', 'T11','T12')
clear('T13', 'T14', 'T15', 'T16', 'T17', 'T18', 'T19', 'T20', 'T21', 'T22', 'T23', 'T24')
clear('P0', 'P1', 'P2', 'P3', 'P4', 'P5', 'P6', 'P7', 'P8', 'P9', 'P10', 'P11')
clear('P13', 'P14', 'P15', 'P16', 'P17', 'P18', 'P19', 'P20', 'P21', 'P22', 'P23', 'P24')
