Skip to content

Commit 29d2dea

Browse files
committed
improve code and api
1 parent bf753dc commit 29d2dea

5 files changed

Lines changed: 369 additions & 209 deletions

File tree

‎biosteam/_system.py‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,6 @@ def __enter__(self):
317317
for i in ins:
318318
i._sink = u
319319
sinks[i.imol] = u
320-
if getattr(u, 'decoupled', False):
321-
breakpoint()
322-
u = None
323320
for i in outs:
324321
i._source = u
325322
sources[i.imol] = u

‎biosteam/plots/plots.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
'default_colors_and_hatches',
5959
'modify_stacked_bars',
6060
'title_color',
61+
'contour_subplots',
6162
)
6263

6364
# %% Utilities

‎biosteam/units/distillation.py‎

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2351,14 +2351,14 @@ def _init(self,
23512351
vle_decomposition=None,
23522352
maxiter=None,
23532353
max_attempts=None,
2354-
method=None,
2354+
methods=None,
23552355
):
23562356
super()._init(N_stages=N_stages, feed_stages=feed_stages,
23572357
top_side_draws=vapor_side_draws,
23582358
bottom_side_draws=liquid_side_draws,
23592359
partition_data=partition_data,
23602360
phases=("g", "l"), collapsed_init=collapsed_init,
2361-
P=P, T=T, use_cache=use_cache, method=method,
2361+
P=P, T=T, use_cache=use_cache, methods=methods,
23622362
vle_decomposition=vle_decomposition,
23632363
maxiter=maxiter,
23642364
max_attempts=max_attempts)
@@ -2638,17 +2638,14 @@ class MESHDistillation(MultiStageEquilibrium, new_graphics=False):
26382638
-----
26392639
The convergence algorithm decouples the equilibrium relationships,
26402640
mass balances, and energy balances using a custom version of the Wang-Henke
2641-
bubble point method. This algorithm is authored by Yoel Cortes-Pena, but is
2642-
not yet peer reviewed. The main difference is that the tridiagonal matrix of
2643-
mass balances across stages is used to solve for flow rates instead of mass
2644-
fractions.
2645-
2646-
The initialization algorithm first converges a "collapsed" column without
2647-
adiabatic stages which have no feeds or side draws. This collapsed column
2648-
is initialized by solving for liquid and vapor flow rates assuming no phase
2641+
bubble point method.
2642+
2643+
The initialization algorithm first flashes the feed to collect partition
2644+
coefficients, bubble and dew point temperatures, and the feed quality.
2645+
Then, we solve for liquid and vapor flow rates assuming no phase
26492646
change across adiabatic stages and unity partition coefficients at
26502647
reboilers/condensers (in which case the stripping factor is equal to the
2651-
boil-up ratio). Then, top and bottom stage temperatures are assumed to be
2648+
boil-up ratio). Top and bottom stage temperatures are assumed to be
26522649
the bubble point and dew point of the fed mixture and the temperature
26532650
across stages are linearly interpolated. The partition coefficients in
26542651
all stages are assumed to be equal to the feed bubble point.
@@ -2709,8 +2706,8 @@ def _init(self,
27092706
full_condenser=None,
27102707
collapsed_init=None,
27112708
use_cache=None,
2712-
algorithm=None,
2713-
method=None,
2709+
algorithms=None,
2710+
methods=None,
27142711
inside_out=None,
27152712
maxiter=None,
27162713
max_attempts=None,
@@ -2740,8 +2737,8 @@ def _init(self,
27402737
stage_reactions=stage_reactions,
27412738
collapsed_init=collapsed_init,
27422739
inside_out=inside_out,
2743-
algorithm=algorithm,
2744-
method=method,
2740+
algorithms=algorithms,
2741+
methods=methods,
27452742
max_attempts=max_attempts,
27462743
maxiter=maxiter)
27472744

0 commit comments

Comments
 (0)