Skip to content

Commit

Permalink
more accurate initial values for flowrates
Browse files Browse the repository at this point in the history
  • Loading branch information
joyxyz1994 committed Feb 9, 2025
1 parent 1967f5f commit f4919c5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion qsdsan/sanunits/_suspended_growth_bioreactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,14 @@ def _init_state(self):
y[:,:-1] = self._concs
else:
y[:,:-1] = out.conc
y[:,-1] = out.F_vol*24
# y[:,-1] = self._Qs[:] = out.F_vol*24
f_in = self.influent_fractions
rcy = self.internal_recycles
Q_internal = np.zeros(self.N_tanks_in_series)
for i_from, i_to, qr in rcy:
Q_internal[i_to: i_from+1] += qr
self._Qs[:] = np.dot([ws.F_vol*24 for ws in self.ins], f_in).cumsum() + Q_internal

self._state = y.flatten()
self._dstate = self._state * 0.

Expand Down

0 comments on commit f4919c5

Please sign in to comment.