Arguments to IMPORT must either end with ".*" or else specify a fully qualified class name
14 views (last 30 days)
Show older comments
Error: File: dens_times_SpeedOfSound_critical.m Line: 2 Column: 8
Arguments to IMPORT must either end with ".*" or else specify a fully qualified class name: "py.CoolProp.CoolProp.PropsSI" fails this test.
Why do I get the above error when I run the below script? (matlab2017b)
import py.CoolProp.CoolProp.PropsSI;
P0 = 10:10:300;
T0 = 110:10:400;
c1 = [];
dens1 = [];
gamma = 1.304;
T1 = 2*T0/(gamma+1);
P1 = P0/((gamma+1)/2)^(gamma/(gamma-1));
for i = 1:1:length(P1)
for j = 1:1:length(T1)
c1 = [c1,PropsSI('A','T',T1(j),'P',P1(i)*100000,'methane')];
dens1 = [dens1,PropsSI('D','T',T1(j),'P',P1(i)*100000,'methane')];
end
end
c1 = reshape(c1, [30,30]);
c1 = c1';
dens1 = reshape(dens1, [30,30]);
dens1 = dens1';
R1 = c1.*dens1;
[C,h] = contour(T0,P0,R1, [10000:10000:700000]);
clabel(C,h)commen
xlabel('T stagnation @ injector / k')
ylabel('P stagnation @ injector / bar')
title('Evolution of c1*dens1 as a function of T and P stagnation [kg/m2/s]')
mass_flow = (103.2/2000)/0.03;
Area1 = mass_flow./R1; %m2
diameter1 = 1000*sqrt(Area1.*4/pi()); %mm
figure
[D,t] = contour(T0,P0,diameter1, [0.5:0.5:15]);
clabel(D,t)
title('Injector diameter as a function of T and P stagnation [mm]')
xlabel('T stagnation @ injector / k')
ylabel('P stagnation @ injector / bar')
0 Comments
Answers (0)
See Also
Categories
Find more on Instrument Connection and Communication in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!