Skip to content

Commit

Permalink
fix error with reacting multistreams
Browse files Browse the repository at this point in the history
  • Loading branch information
yoelcortes committed Mar 27, 2024
1 parent 6043b8f commit 29c9748
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions thermosteam/reaction/_reaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,14 +456,14 @@ def __call__(self, material):
if tmo.reaction.CHECK_FEASIBILITY:
has_negatives = values.has_negatives()
if has_negatives:
negative_index, = values.negative_index()
negative_index = values.negative_index()
negative_values = values[negative_index]
if negative_values.sum() < -1e-12:
X_net = self.X_net()
for ID, X in X_net.items():
if X > 1.: RuntimeError(f"conversion of '{ID}' is over 100%")
if values.ndim == 2:
negative_index = values.negative_columns()
negative_index = values.negative_keys()
chemicals = self.chemicals.tuple
IDs = [chemicals[i].ID for i in negative_index]
if len(IDs) == 1: IDs = repr(IDs[0])
Expand Down

0 comments on commit 29c9748

Please sign in to comment.