Finding values of a variable as parameters change
显示 更早的评论
I was given an excel file for coordinates of axis and radius in a combustion chamber, throat and nozzle. I am trying to find the mach number,M, while relating E and EM. It is given that E=EM, or E-EM=0. I have all of the variables except M and cannot rearrange EM nicely to find M. Since M changes at each different radius along the axis, I need to output M at each point on the axis. I've tried solve(...), fzero(...) and a few other functions. How can I do this?
%Constants
coordinates='nc.xlsx';
z=xlsread(coordinates,'A:A'); %[cm] axis
y=xlsread(coordinates,'B:B'); %[cm] radius
At=pi*(0.1)^2;%[m] throat area
Ae=pi*(.2240085)^2;%[m] exit area
Pc=7000000; %[Pa] chamber pressure
Pa=101325; %[Pa] Atmosperic Pressure
Tc=3300; %[K] chamber temp
MW=15; %[kg/mol] molecular weight
Y=1.2; %gamma
R=8314/MW; %[J/kg*K]
Ex=Ae/At; %Ae/At
cstar=((Y*R*Tc)^.5)/(Y*(((2/(Y+1))^((Y+1)/(Y-1)))^.5)); %[m/s] c*
mdot=(Pc*At)/cstar; %[kg/s] mass flow rate
%Equations
E=(y.^2)/(At^2); %A/At
i=size(y);
EM=(1/M)*((2+(Y-1)*M^2)/(Y+1))^((Y+1)/(2*(Y-1))); %E in terms of Y and M
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Get Started with MATLAB 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!