Solving for 4 unknowns
显示 更早的评论
I am solving for L, V, x1, and y1, but I'm getting very large fractions that are incorrect. What should I change to have MATLAB output an actual answer for each? Thanks.
x1 and y1 are mole fractions, meaning they should be less than 1. V and L are vapor and liquid streams, which have units of mol/s. The values shouldn't be greater than 3 mol/s.
P1 = 124.13; %mmHg
P2 = 483.53; %mmHg
P = 300; %mmHg
N = 2.15; %mol/s
w = 0.5;
syms L V x1 y1
eq1 = N-L-V;
eq2 = (w*N)-(x1*L)-(y1*V);
eq3 = (x1*P1)-(y1*P);
eq4 = ((1-x1)*P1)-((1-y1)*P2);
sol = solve(eq1,eq2,eq3,eq4)
disp(sol.L)
disp(sol.V)
disp(sol.x1)
disp(sol.y1)
2 个评论
Walter Roberson
2019-7-21
Those equations with those constants do not produce values anywhere near what you indicate. Either the initial constants are wrong or else the equations are wrong
Walter Roberson
2019-7-21
Those values are consistent with
P1 = 143.9380911435941641229874221608
P2 = 89.673977282471909688865707721561
which is a relatively small change for P1 but a large change for P2.
If you try to make P2 fit then for consistency you need to make P = 1617.62647755732 and P1 = 776.12689120978818713663467868717, both of which are large changes.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Conversion Between Symbolic and Numeric 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!