Skip to content

Commit

Permalink
minor corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
yoelcortes committed Jan 27, 2024
1 parent d9c33e3 commit 157ebf8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion biosteam/units/phase_equilibrium.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ def _set_arrays(self, IDs, **kwargs):

def _get_activity_model(self):
chemicals = self.chemicals
index = chemicals.get_lle_indices(sum([i.mol for i in self.outs]).nonzero_keys())
index = chemicals.get_lle_indices(sum([i.mol for i in self.ins]).nonzero_keys())
chemicals = chemicals.tuple
lle_chemicals = [chemicals[i] for i in index]
return self.thermo.Gamma(lle_chemicals), [i.ID for i in lle_chemicals], index
Expand Down Expand Up @@ -544,6 +544,7 @@ def _run_decoupled_Kgamma(self, P=None): # Psuedo-equilibrium
index, = np.where(good)
IDs = [IDs[i] for i in index]
gamma_y = [gamma_y[i] for i in index]
K = [K[i] for i in index]
self._set_arrays(IDs, gamma_y=gamma_y, K=K)

def _run_decoupled_B(self, stacklevel=1): # Flash Rashford-Rice
Expand Down
7 changes: 6 additions & 1 deletion biosteam/units/stirred_tank_reactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ class StirredTankReactor(PressureVessel, Unit, isabstract=True):
#: Default cleaning and unloading time (hr).
tau_0_default: Optional[float] = 3

#: Whether to default operation in batch mode or continuous
batch_default = False

@property
def effluent(self):
return self.outs[-1]
Expand Down Expand Up @@ -263,7 +266,7 @@ def _init(
self.vessel_material = 'Stainless steel 316' if vessel_material is None else vessel_material
self.vessel_type = 'Vertical' if vessel_type is None else vessel_type
self.tau_0 = self.tau_0_default if tau_0 is None else tau_0
self.batch = batch
self.batch = self.batch_default if batch is None else batch
self.load_auxiliaries()

def load_auxiliaries(self):
Expand Down Expand Up @@ -422,6 +425,7 @@ class AeratedBioreactor(StirredTankReactor):
T_default = 273.15 + 32
P_default = 101325
kW_per_m3_default = 0.2955 # Reaction in homogeneous liquid; reference [1]
batch_default = True

def _init(
self, reactions, theta_O2=0.5, Q_O2_consumption=None,
Expand Down Expand Up @@ -702,6 +706,7 @@ class GasFedBioreactor(StirredTankReactor):
T_default = 273.15 + 32
P_default = 101325
kW_per_m3_default = 0.2955 # Reaction in homogeneous liquid
batch_default = True

def _init(self,
reactions, gas_substrates, titer, backward_reactions,
Expand Down
2 changes: 1 addition & 1 deletion thermosteam

0 comments on commit 157ebf8

Please sign in to comment.