1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| %% Importation of values
A=xlsread('C:\Users\Thomas\Documents\yop.xlsx','B2:Y6');
% Defining of columns and raws
sizem=size(A);
rowsA=sizem(1);
columnsA=sizem(2);
% Assigning values to their names
for i=1:1:columnsA
freq(i)=A(1,i); %Frequency of the motor (Hz)
Tempin(i)=A(2,i); %Temperature gas compressor in (°C)
Presout(i)=A(3,i); %Pressure gas HP(out) (bara)
Presin(i)=A(4,i); %Pressure gas LP (in) (bara)
Power(i)=A(5,i); %Power (kW)
end
Power = @(freq,Tempin,Presout,Presin)Presout.*exp(-freq.^2 - Tempin.^2 - Presin.^2);
[freq,Tempin,Presout,Presin] = ndgrid(25:1:60,40:0.05:42,9:0.2:12,2:0.2:6);
v = Power(freq,Tempin,Presout,Presin);
[freqi,Tempini,Presouti,Presini] = ndgrid(25:0.5:60,-40:0,025:42,9:0.1:1,0:0.5:10);
vi = interpn(feq,Tempin,Presout,Presin,v,freqi,Tempini,Presouti,Presini,'spline') |
Partager