📄 pressure-time.m
字号:
% function Presure -- time for rucket
% 本程序是应用matlab程序编写的计算火箭发动机压力对应时间变化程序,程序中的公式和参数可以根据计算时间情况进行修改。
% use matlab code to build a function to calculate the presure - time , the
% equation and paremeter in the code can be modified depended on your need
clear all
close all
a=0.1 ;
n=0.754;
roe_b=0.00177;
T_0=1760;
r=1.27;
D_t=5.0;
R_i=5.0;
R_f=10.0;
L=60;
m=6000; % the number of loops
dL=L/m
c_star=1055.341; % character velocity
A_t=pi/4*(D_t)^2
A_bi=2*pi*R_i*L
A_bf=2*pi*R_f*L
K_1=2*pi*L*a*(a*c_star*roe_b/A_t)^(n/(1-n))
K_2=K_1*((2*n-1)/(n-1))
t_f=(A_bf^((2*n-1)/(n-1))-A_bi^((2*n-1)/(n-1)))/K_2
dt=0.00001;
m=round(t_f/dt)
for i=1:m
t(i)=i*dt;
A_b(i)=(K_2*t(i)+A_bi^((2*n-1)/(n-1)))^((n-1)/(2*n-1));
P_0(i)=(c_star*A_b(i)*a*roe_b/A_t).^(1/(1-n));
end
plot(t,P_0)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -