Skip to content

Commit 1e5409c

Browse files
committed
improvements to phenomena-based sim; minor improvements to plots/tables and documentation
1 parent b7b913c commit 1e5409c

File tree

12 files changed

+584
-226
lines changed

12 files changed

+584
-226
lines changed

biosteam/_system.py

Lines changed: 391 additions & 102 deletions
Large diffs are not rendered by default.

biosteam/_tea.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ def __init__(self, units, names=None):
391391

392392
def entry(self, index: str, cost: list|float, notes: str = ''):
393393
self.index.append(index)
394-
if getattr(cost, 'ndim') == 0: cost = float(cost)
394+
if getattr(cost, 'ndim', 0) == 0: cost = float(cost)
395395
if isinstance(cost, (float, int, str)):
396396
self.data.append([notes, cost])
397397
else:

biosteam/_unit.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ def __init_subclass__(cls,
148148
does_nothing=None,
149149
default_phenomena=None):
150150
super().__init_subclass__()
151+
if getattr(cls, 'decoupled', None): print(cls)
151152
if does_nothing: return
152153
dct = cls.__dict__
153154
if 'run' in dct:

biosteam/facilities/hxn/_heat_exchanger_network.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def _cost(self):
255255
self._cost()
256256
return
257257
else:
258-
np.testing.assert_allclose(s_util.imol[IDs], s_lc.imol[IDs])
258+
np.testing.assert_allclose(s_util.imol[IDs], s_lc.imol[IDs], rtol=1e-3, atol=0.1)
259259
np.testing.assert_allclose(P, s_lc.P, rtol=1e-3, atol=0.1)
260260
np.testing.assert_allclose(s_util.H, s_lc.H, rtol=1e-3, atol=1.)
261261
new_purchase_costs_HXp = []

0 commit comments

Comments
 (0)