Skip to content

Commit 67d01fc

Browse files
committed
Create bubble_point_example.m
1 parent 84a5759 commit 67d01fc

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

Examples/bubble_point_example.m

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
% System: methanol (CH4O) + water (H2O) at experimental conditions.
2+
% Reference: Ochi et al. (1986) data used in methanol_water_vle example.
3+
%
4+
% At 322.91 K, 26131 Pa, the equimolar mixture is two-phase.
5+
% Bubble pressure for x1=0.35 (methanol): should be ~26131 Pa +/- 20%.
6+
% Bubble temperature at 26131 Pa for z=[0.5 0.5]: should be near 322.91 K.
7+
8+
[component, ~] = addComponents({'CH4O', 'H2O'});
9+
T0 = 322.91;
10+
p0 = 26131;
11+
thermo1 = addThermo();
12+
opts = FlashOptions();
13+
14+
% ---- bubblePressure: z=[0.35, 0.65] at T=322.91 K ----
15+
mix_bp = Mixture(component, T0, p0);
16+
mix_bp.mole_fraction = [0.35 0.65];
17+
mix_bp.bip.EOScons = [0 -0.07; -0.07 0];
18+
19+
[P_bub, y_bub, flag_bp] = bubblePressure(mix_bp, thermo1, opts);
20+
disp(P_bub)
21+
disp(y_bub)
22+
disp(flag_bp)

0 commit comments

Comments
 (0)