Info

此问题已关闭。 请重新打开它进行编辑或回答。

Using the Numel function on matlab. Generating Outputs for inputs.

1 次查看(过去 30 天)
Hi
I've a funtion that generates Vapour fraction (alphaV), fugacity coeffificents(fL,fV) and compositon in liquid(y) and vapour(x) phases.
The script i've below allows be to generate Vapour fractions and K-values with varying Pressure.
The problem is i also want the system to generate correspending x and y values.
The Script I would like improved, so it returns 5925 Xand Y values:
nComp = numel(z);
P = 29624530:-5000:409;
nP = numel(P);
alphaV = zeros(nP, 1);
k = zeros(nP, nComp);
for i = 1:numel(P)
ki=(Pc/P(i).*exp(5.37.*(1+Omega).*(1-Tc/T)));
[x,y,alphaV(i),fL,fV] = PTFLASH_VLE_PRVDW(Pc, Tc, Omega, kappa, eta, P(i), T, z, ki);
k(i, :) = y./x;
end
The input i use:
Basically a gas-mxiture consisting of 9 components.
T=320;
Pc=[4.599E6 4.872E6 4.248E6 3.796E6 3.37E6 3.025E6 2.49E6 1.817E6 1.401E6];
Tc=[190.6 305.3 369.8 425.1 469.7 507.6 568.7 658.1 722];
Omega=[0.012 0.1 0.152 0.2 0.252 0.301 0.346 0.577 0.721];
z= [0.7 0.08 0.07 0.03 0.01 0.02 0.04 0.02 0.03];
kappa=zeros(9);
eta=zeros(9);

回答(0 个)

此问题已关闭。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by