在这个MATLAB代码中,我打算显示一个图表,但它显示了一个空图。
% Proposed Model For Two-Phase Flow Analytical Design Equation for gas
% pipelines
clc
d = 26.75; % diameter in inches
pie = 3.142; %normal pie
A = (pie *d^2)/4; % Compute for the area
qm = 150; %volume flow rate of mixture
pm = 8; %Density of the mixture
Wm = qm* pm; % mass flow rate of mixture i.e oil and gas
Ho = 0.01; %Liquid Hold up
z = 0.85; % compressibility factor
R = 10.73; % Gas constant
f = 0.0254; %friction factor
p0 = 150; % Density of oil
T = 580; % Temperature in R degrees
P0 =1700; % 1700psi
L = 63.068; % Length
P1 = 602.7; % 602.7 psia
%Assume
Mg = 9.8;
formule1 = d*A^2*Mg*(1-Ho);
formule2 = f*Wm^2*z*R*T;
formule = formule1/formule2;
exprs1 = (p0*Ho*z*R*T)/Mg*(1-Ho);
express2 = P2^2-P1^2
drop_p =P1-P2
express3 = 2*p0*Ho*z*R*T*drop_p
better_express = express2 + express3
func1 = d/f
solve( (formule*better_express)- func1*log(P2+ exprs1/P1 + exprs1)^2 + L == 0, P2)
figure
plot(drop_p,L,'r:+')
拜托,有人可以帮帮我吗?感谢。