% 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 reads compressor and turbine maps from the Smooth C8.2
% and Smooth T8.2 map scaling softwares by Dr. Joachim Kurzke of MTU

% Map Names
name_Fan = 'LPC.xlsx';
name_LPC = 'IPC.xlsx';
name_HPC = 'HPC.xlsx';
name_HPT = 'HPT.xlsx';
name_IPT = 'IPT.xlsx';
name_LPT = 'LPT.xlsx';

Res = 30;   % Set the resolution of output tables

name = [name_Fan; name_LPC; name_HPC; name_HPT;name_IPT; name_LPT];

% Declare global map data
global Beta_Fan Beta_LPC Beta_HPC Beta_HPT Beta_LPT
global Speed_Fan Speed_LPC Speed_HPC Speed_HPT Speed_LPT
global PR_Fan PR_LPC PR_HPC PR_HPT PR_LPT
global Mass_Fan Mass_LPC Mass_HPC Mass_HPT Mass_LPT
global Efficiency_Fan Efficiency_LPC Efficiency_HPC Efficiency_HPT Efficiency_LPT

% Read Map Data
for loop =1:size(name);
    
A = xlsread(name(loop,:));
n_speed = round(A(1,1))-1;                 % Speed values
n_beta = round((A(1,1)-n_speed-1)*1000-1); % Number of beta values
Beta = linspace(0,1,n_beta);               % Beta values

rb = floor(((n_beta-4)/5)+2);              % Number of rows of group
cb = round(n_beta-(4+(rb-2)*5));           % Number of columns in final row

mem_rb(loop) = rb;
mem_cb(loop) = cb;
% Mass Flow Data
for count1 = 1:n_speed

offset = round((count1)*rb+1);              % Offset due to beta values    
k = 5;
Mass(count1,1:4) = A(offset,2:5);           % First line of data
Mass(count1,n_beta-cb+1:n_beta)= ...
    A((count1+1)*rb,1:cb);                  % Final line of data

Speed(count1) = A(offset,1);                % Speed Vector

for count2 = 2:rb-1
    Mass(count1,k:k+4) = A(count2+offset-1,1:5);    % Intermediate Values
    k = k+5;     
end

end

% Efficiency Data
for count1 = 1:n_speed

offset = count1*rb+1;                                       % Offset due to beta values
e_offset = rb*(n_speed+1)+2;                                % Efficiency offset
k = 5;  
Efficiency(count1,1:4) = A(offset+e_offset,2:5);            % First Line
Efficiency(count1,n_beta-cb+1:n_beta)= ...
    A(round((count1+1)*rb+e_offset),round(1:cb));           % Final Line 

for count2 = 2:rb-1
    Efficiency(count1,k:k+4) = ...                          % Intermediate
        A(count2+offset+e_offset-1,1:5);
    k = k+5;        
end

end

% Pressure Ratio Data
for count1 = 1:n_speed

offset = count1*rb+1;                                       % Offset due to beta values
p_offset = 2*(rb*(n_speed+1)+2);                            % PR offset
k = 5;
PR(count1,1:4) = A(offset+p_offset,2:5);                    % First Line 
PR(count1,n_beta-cb+1:n_beta)= ...
    A(round((count1+1)*rb+p_offset),round(1:cb));           % Final Line

for count2 = 2:rb-1
    PR(count1,k:k+4) =...                                   % Intermediate
        A(count2+offset+p_offset-1,1:5); 
    k = k+5;    
end

end

% Specific Work Data
for count1 = 1:n_speed

offset = count1*rb+1;                                       % Offset due to beta values
w_offset = 3*(rb*(n_speed+1)+2);                            % Specific work offset
k = 5;
SPW(count1,1:4) = A(offset+w_offset,2:5);                   % First Line 
SPW(count1,n_beta-cb+1:n_beta)= ...
    A(round((count1+1)*rb+w_offset),round(1:cb));           % Final Line

for count2 = 2:rb-1
    SPW(count1,k:k+4) =...                                  % Intermediate
        A(count2+offset+w_offset-1,1:5); 
    k = k+5;    
end

end

Speed = Speed';
Beta = Beta';

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Save Fan Maps to Workspace
if loop == 1
Speed_Fan = Speed; 
Beta_Fan = Beta;
Mass_Fan = Mass;
PR_Fan = PR;
Efficiency_Fan = Efficiency;
end

% Save LPC Maps to Workspace
if loop == 2
Speed_LPC = Speed;
Beta_LPC = Beta;
Mass_LPC = Mass;
PR_LPC = PR;
Efficiency_LPC = Efficiency;
end

% Save HPC Maps to Workspace
if loop == 3
Speed_HPC = Speed;
Beta_HPC = Beta;
Mass_HPC = Mass;
PR_HPC = PR;
Efficiency_HPC = Efficiency;
end

% Save HPT Maps to Workspace
if loop == 4
Speed_HPT = Speed;
Beta_HPT = Beta;
Mass_HPT = Mass;
PR_HPT = PR;
Efficiency_HPT = Efficiency;
end

% Save LPT Maps to Workspace
if loop == 5
Speed_IPT = Speed;
Beta_IPT = Beta;
Mass_IPT = Mass;
PR_IPT = PR;
Efficiency_IPT = Efficiency;
end

if loop == 6
Speed_LPT = Speed;
Beta_LPT = Beta;
Mass_LPT = Mass;
PR_LPT = PR;
Efficiency_LPT = Efficiency;
end

clear('Beta','Efficiency', 'Mass', 'PR', 'Speed','Speed_t', 'cb', 'count1', 'count2',...
    'e_offset', 'k', 'local_mean', 'n_beta', 'n_speed', 'offset', 'p_offset', 'rb',...
    'A', 'SPW', 'count3', 'loop', 'w_offset');
end

% Construct Uniform Grid
Uniform_Beta_Fan = linspace(min(Beta_Fan), max(Beta_Fan), Res);
Uniform_Speed_Fan = linspace(min(Speed_Fan), max(Speed_Fan), Res);

% Construct Uniform Grid
Uniform_Beta_LPC = linspace(min(Beta_LPC), max(Beta_LPC), Res);
Uniform_Speed_LPC = linspace(min(Speed_LPC), max(Speed_LPC), Res);

% Construct Uniform Grid
Uniform_Beta_HPC = linspace(min(Beta_HPC), max(Beta_HPC), Res);
Uniform_Speed_HPC = linspace(min(Speed_HPC), max(Speed_HPC), Res);

% Construct Uniform Grid
Uniform_Beta_HPT = linspace(min(Beta_HPT), max(Beta_HPT), Res);
Uniform_Speed_HPT = linspace(min(Speed_HPT), max(Speed_HPT), Res);

% Construct Uniform Grid
Uniform_Beta_IPT = linspace(min(Beta_IPT), max(Beta_IPT), Res);
Uniform_Speed_IPT = linspace(min(Speed_IPT), max(Speed_IPT), Res);

% Construct Uniform Grid
Uniform_Beta_LPT = linspace(min(Beta_LPT), max(Beta_LPT), Res);
Uniform_Speed_LPT = linspace(min(Speed_LPT), max(Speed_LPT), Res);

% Contruct Interpolated values
for row = 1:Res
    for column = 1:Res
        
        Uniform_Mass_Fan(row,column) = interp2(Beta_Fan, Speed_Fan, Mass_Fan, Uniform_Beta_Fan(column), Uniform_Speed_Fan(row));
        Uniform_PR_Fan(row, column) = interp2(Beta_Fan, Speed_Fan, PR_Fan, Uniform_Beta_Fan(column), Uniform_Speed_Fan(row));
        Uniform_Efficiency_Fan(row, column) = interp2(Beta_Fan, Speed_Fan, Efficiency_Fan, Uniform_Beta_Fan(column), Uniform_Speed_Fan(row));
        
        Uniform_Mass_LPC(row,column) = interp2(Beta_LPC, Speed_LPC, Mass_LPC, Uniform_Beta_LPC(column), Uniform_Speed_LPC(row));
        Uniform_PR_LPC(row, column) = interp2(Beta_LPC, Speed_LPC, PR_LPC, Uniform_Beta_LPC(column), Uniform_Speed_LPC(row));
        Uniform_Efficiency_LPC(row, column) = interp2(Beta_LPC, Speed_LPC, Efficiency_LPC, Uniform_Beta_LPC(column), Uniform_Speed_LPC(row));
        
        Uniform_Mass_HPC(row,column) = interp2(Beta_HPC, Speed_HPC, Mass_HPC, Uniform_Beta_HPC(column), Uniform_Speed_HPC(row));
        Uniform_PR_HPC(row, column) = interp2(Beta_HPC, Speed_HPC, PR_HPC, Uniform_Beta_HPC(column), Uniform_Speed_HPC(row));
        Uniform_Efficiency_HPC(row, column) = interp2(Beta_HPC, Speed_HPC, Efficiency_HPC, Uniform_Beta_HPC(column), Uniform_Speed_HPC(row));
        
        Uniform_Mass_HPT(row,column) = interp2(Beta_HPT, Speed_HPT, Mass_HPT, Uniform_Beta_HPT(column), Uniform_Speed_HPT(row));
        Uniform_PR_HPT(row, column) = interp2(Beta_HPT, Speed_HPT, PR_HPT, Uniform_Beta_HPT(column), Uniform_Speed_HPT(row));
        Uniform_Efficiency_HPT(row, column) = interp2(Beta_HPT, Speed_HPT, Efficiency_HPT, Uniform_Beta_HPT(column), Uniform_Speed_HPT(row));
        
        Uniform_Mass_IPT(row,column) = interp2(Beta_IPT, Speed_IPT, Mass_IPT, Uniform_Beta_IPT(column), Uniform_Speed_IPT(row));
        Uniform_PR_IPT(row, column) = interp2(Beta_IPT, Speed_IPT, PR_IPT, Uniform_Beta_IPT(column), Uniform_Speed_IPT(row));
        Uniform_Efficiency_IPT(row, column) = interp2(Beta_IPT, Speed_IPT, Efficiency_IPT, Uniform_Beta_IPT(column), Uniform_Speed_IPT(row));

        Uniform_Mass_LPT(row,column) = interp2(Beta_LPT, Speed_LPT, Mass_LPT, Uniform_Beta_LPT(column), Uniform_Speed_LPT(row));
        Uniform_PR_LPT(row, column) = interp2(Beta_LPT, Speed_LPT, PR_LPT, Uniform_Beta_LPT(column), Uniform_Speed_LPT(row));
        Uniform_Efficiency_LPT(row, column) = interp2(Beta_LPT, Speed_LPT, Efficiency_LPT, Uniform_Beta_LPT(column), Uniform_Speed_LPT(row));
    
    end
end

% Reset to Uniform Coordinate System
Beta_Fan = Uniform_Beta_Fan;
Speed_Fan = Uniform_Speed_Fan;
Mass_Fan = Uniform_Mass_Fan;
PR_Fan = Uniform_PR_Fan;
Efficiency_Fan = Uniform_Efficiency_Fan;

% Reset to Uniform Coordinate System
Beta_LPC = Uniform_Beta_LPC;
Speed_LPC = Uniform_Speed_LPC;
Mass_LPC = Uniform_Mass_LPC;
PR_LPC = Uniform_PR_LPC;
Efficiency_LPC = Uniform_Efficiency_LPC;

% Reset to Uniform Coordinate System
Beta_HPC = Uniform_Beta_HPC;
Speed_HPC = Uniform_Speed_HPC;
Mass_HPC = Uniform_Mass_HPC;
PR_HPC = Uniform_PR_HPC;
Efficiency_HPC = Uniform_Efficiency_HPC;

% Reset to Uniform Coordinate System
Beta_HPT = Uniform_Beta_HPT;
Speed_HPT = Uniform_Speed_HPT;
Mass_HPT = Uniform_Mass_HPT;
PR_HPT = Uniform_PR_HPT;
Efficiency_HPT = Uniform_Efficiency_HPT;

% Reset to Uniform Coordinate System
Beta_IPT = Uniform_Beta_IPT;
Speed_IPT = Uniform_Speed_IPT;
Mass_IPT = Uniform_Mass_IPT;
PR_IPT = Uniform_PR_IPT;
Efficiency_IPT = Uniform_Efficiency_IPT;

% Reset to Uniform Coordinate System
Beta_LPT = Uniform_Beta_LPT;
Speed_LPT = Uniform_Speed_LPT;
Mass_LPT = Uniform_Mass_LPT;
PR_LPT = Uniform_PR_LPT;
Efficiency_LPT = Uniform_Efficiency_LPT;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Fan

% Normalize at the Beta = 0.5 Speed =1
Mass_Fan = Mass_Fan/interp2(Beta_Fan, Speed_Fan, Mass_Fan, 0.5, 1);
PR_Fan = PR_Fan/interp2(Beta_Fan, Speed_Fan, PR_Fan, 0.5, 1);
Efficiency_Fan = Efficiency_Fan/interp2(Beta_Fan, Speed_Fan, Efficiency_Fan, 0.5, 1);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% LPC

% Normalize at the Beta = 0.5 Speed =1
Mass_LPC = Mass_LPC/interp2(Beta_LPC, Speed_LPC, Mass_LPC, 0.5, 1);
PR_LPC = PR_LPC/interp2(Beta_LPC, Speed_LPC, PR_LPC, 0.5, 1);
Efficiency_LPC = Efficiency_LPC/interp2(Beta_LPC, Speed_LPC, Efficiency_LPC, 0.5, 1);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% HPC

% Normalize at the Beta = 0.5 Speed =1
Mass_HPC = Mass_HPC/interp2(Beta_HPC, Speed_HPC, Mass_HPC, 0.5, 1);
PR_HPC = PR_HPC/interp2(Beta_HPC, Speed_HPC, PR_HPC, 0.5, 1);
Efficiency_HPC = Efficiency_HPC/interp2(Beta_HPC, Speed_HPC, Efficiency_HPC, 0.5, 1);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% HPT

% Normalize at the Beta = 0.5 Speed =1
Mass_HPT = Mass_HPT/interp2(Beta_HPT, Speed_HPT, Mass_HPT, 0.5, 1);
PR_HPT = PR_HPT/interp2(Beta_HPT, Speed_HPT, PR_HPT, 0.5, 1);
Efficiency_HPT = Efficiency_HPT/interp2(Beta_HPT, Speed_HPT, Efficiency_HPT, 0.5, 1);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% IPT

% Normalize at the Beta = 0.5 Speed =1
Mass_IPT = Mass_IPT/interp2(Beta_IPT, Speed_IPT, Mass_IPT, 0.5, 1);
PR_IPT = PR_IPT/interp2(Beta_IPT, Speed_IPT, PR_IPT, 0.5, 1);
Efficiency_IPT = Efficiency_IPT/interp2(Beta_IPT, Speed_IPT, Efficiency_IPT, 0.5, 1);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% LPT

% Normalize at the Beta = 0.5 Speed =1
Mass_LPT = Mass_LPT/interp2(Beta_LPT, Speed_LPT, Mass_LPT, 0.5, 1);
PR_LPT = PR_LPT/interp2(Beta_LPT, Speed_LPT, PR_LPT, 0.5, 1);
Efficiency_LPT = Efficiency_LPT/interp2(Beta_LPT, Speed_LPT, Efficiency_LPT, 0.5, 1);



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Generate "TriScatteredInterp" Interpolants

% Fan
n = 0;
for count1 = 1:Res
    for count2 = 1:Res
        n = n+1;

Mass_Fan_t(n,1) = Mass_Fan(count1,count2);   
PR_Fan_t(n,1) = PR_Fan(count1,count2);
Efficiency_Fan_t(n,1) = Efficiency_Fan(count1,count2);   
Speed_Fan_t(n,1) = Speed_Fan(count1);
Beta_Fan_t(n,1) = Beta_Fan(count2);
        
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% LPC

Mass_LPC_t(n,1) = Mass_LPC(count1,count2);   
PR_LPC_t(n,1) = PR_LPC(count1,count2);
Efficiency_LPC_t(n,1) = Efficiency_LPC(count1,count2);   
Speed_LPC_t(n,1) = Speed_LPC(count1);
Beta_LPC_t(n,1) = Beta_LPC(count2);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% HPC

Mass_HPC_t(n,1) = Mass_HPC(count1,count2);   
PR_HPC_t(n,1) = PR_HPC(count1,count2);
Efficiency_HPC_t(n,1) = Efficiency_HPC(count1,count2);   
Speed_HPC_t(n,1) = Speed_HPC(count1);
Beta_HPC_t(n,1) = Beta_HPC(count2);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% HPT

Mass_HPT_t(n,1) = Mass_HPT(count1,count2);   
PR_HPT_t(n,1) = PR_HPT(count1,count2);
Efficiency_HPT_t(n,1) = Efficiency_HPT(count1,count2);   
Speed_HPT_t(n,1) = Speed_HPT(count1);
Beta_HPT_t(n,1) = Beta_HPT(count2);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% IPT

Mass_IPT_t(n,1) = Mass_IPT(count1,count2);   
PR_IPT_t(n,1) = PR_IPT(count1,count2);
Efficiency_IPT_t(n,1) = Efficiency_IPT(count1,count2);   
Speed_IPT_t(n,1) = Speed_IPT(count1);
Beta_IPT_t(n,1) = Beta_IPT(count2);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% LPT

Mass_LPT_t(n,1) = Mass_LPT(count1,count2);   
PR_LPT_t(n,1) = PR_LPT(count1,count2);
Efficiency_LPT_t(n,1) = Efficiency_LPT(count1,count2);   
Speed_LPT_t(n,1) = Speed_LPT(count1);
Beta_LPT_t(n,1) = Beta_LPT(count2);

    end
end



% Create Interpolant

Mass_Fan_Tr = TriScatteredInterp(Beta_Fan_t, Speed_Fan_t, Mass_Fan_t);
PR_Fan_Tr = TriScatteredInterp(Beta_Fan_t, Speed_Fan_t, PR_Fan_t);
Efficiency_Fan_Tr = TriScatteredInterp(Beta_Fan_t, Speed_Fan_t, Efficiency_Fan_t);


Mass_LPC_Tr = TriScatteredInterp(Beta_LPC_t, Speed_LPC_t, Mass_LPC_t);
PR_LPC_Tr = TriScatteredInterp(Beta_LPC_t, Speed_LPC_t, PR_LPC_t);
Efficiency_LPC_Tr = TriScatteredInterp(Beta_LPC_t, Speed_LPC_t, Efficiency_LPC_t);


Mass_HPC_Tr = TriScatteredInterp(Beta_HPC_t, Speed_HPC_t, Mass_HPC_t);
PR_HPC_Tr = TriScatteredInterp(Beta_HPC_t, Speed_HPC_t, PR_HPC_t);
Efficiency_HPC_Tr = TriScatteredInterp(Beta_HPC_t, Speed_HPC_t, Efficiency_HPC_t);


Mass_HPT_Tr = TriScatteredInterp(Beta_HPT_t, Speed_HPT_t, Mass_HPT_t);
PR_HPT_Tr = TriScatteredInterp(Beta_HPT_t, Speed_HPT_t, PR_HPT_t);
Efficiency_HPT_Tr = TriScatteredInterp(Beta_HPT_t, Speed_HPT_t, Efficiency_HPT_t);


Mass_IPT_Tr = TriScatteredInterp(Beta_IPT_t, Speed_IPT_t, Mass_IPT_t);
PR_IPT_Tr = TriScatteredInterp(Beta_IPT_t, Speed_IPT_t, PR_IPT_t);
Efficiency_IPT_Tr = TriScatteredInterp(Beta_IPT_t, Speed_IPT_t, Efficiency_IPT_t);


Mass_LPT_Tr = TriScatteredInterp(Beta_LPT_t, Speed_LPT_t, Mass_LPT_t);
PR_LPT_Tr = TriScatteredInterp(Beta_LPT_t, Speed_LPT_t, PR_LPT_t);
Efficiency_LPT_Tr = TriScatteredInterp(Beta_LPT_t, Speed_LPT_t, Efficiency_LPT_t);


clear('Uniform_Mass_Fan', 'Uniform_PR_Fan', 'Uniform_Efficiency_Fan', 'Uniform_Beta_Fan', 'Uniform_Speed_Fan');
clear('Uniform_Mass_LPC', 'Uniform_PR_LPC', 'Uniform_Efficiency_LPC', 'Uniform_Beta_LPC', 'Uniform_Speed_LPC');
clear('Uniform_Mass_HPC', 'Uniform_PR_HPC', 'Uniform_Efficiency_HPC', 'Uniform_Beta_HPC', 'Uniform_Speed_HPC');
clear('Uniform_Mass_HPT', 'Uniform_PR_HPT', 'Uniform_Efficiency_HPT', 'Uniform_Beta_HPT', 'Uniform_Speed_HPT');
clear('Uniform_Mass_IPT', 'Uniform_PR_IPT', 'Uniform_Efficiency_IPT', 'Uniform_Beta_IPT', 'Uniform_Speed_IPT');
clear('Uniform_Mass_LPT', 'Uniform_PR_LPT', 'Uniform_Efficiency_LPT', 'Uniform_Beta_LPT', 'Uniform_Speed_LPT');


clear ('Beta_Fan_t', 'Beta_LPC_t', 'Beta_HPC_t', 'Beta_HPT_t', 'Beta_IPT_t', 'Beta_LPT_t');
clear ('Speed_Fan_t', 'Speed_LPC_t', 'Speed_HPC_t', 'Speed_HPT_t', 'Speed_IPT_t', 'Speed_LPT_t');
clear ('Mass_Fan_t', 'Mass_LPC_t', 'Mass_HPC_t', 'Mass_HPT_t', 'Mass_IPT_t', 'Mass_LPT_t');
clear('PR_Fan_t', 'PR_LPC_t', 'PR_HPC_t', 'PR_HPT_t', 'PR_IPT_t', 'PR_LPT_t');
clear('Efficiency_Fan_t', 'Efficiency_LPC_t', 'Efficiency_HPC_t', 'Efficiency_HPT_t', 'Efficiency_IPT_t', 'Efficiency_LPT_t');

clear('Efficiency_Fan','Efficiency_LPC','Efficiency_HPC', 'Efficiency_HPT', 'Efficiency_IPT', 'Efficiency_LPT');
clear('Mass_Fan','Mass_LPC','Mass_HPC', 'Mass_HPT', 'Mass_IPT', 'Mass_LPT');
clear('PR_Fan','PR_LPC','PR_HPC', 'PR_HPT', 'PR_IPT', 'PR_LPT');
clear('Beta_Fan', 'Beta_LPC', 'Beta_HPC', 'Beta_HPT', 'Beta_IPT', 'Beta_LPT');
clear('Speed_Fan', 'Speed_LPC', 'Speed_HPC', 'Speed_HPT', 'Speed_IPT', 'Speed_LPT');

clear('column', 'count1', 'count2', 'row');