Skip to content

Commit

Permalink
try different doctest format
Browse files Browse the repository at this point in the history
  • Loading branch information
joyxyz1994 committed Oct 23, 2024
1 parent 69140a4 commit d23de50
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions qsdsan/sanunits/_suspended_growth_bioreactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,22 +454,20 @@ class BatchExperiment(SanUnit):
>>> BE = su.BatchExperiment('BE', model=asm1)
>>> BE.set_init_conc(S_S=20, X_BH=500, S_O=8, S_ND=3, S_ALK=84)
>>> BE.simulate(t_span=(0,10), method='BDF')
>>> BE.state
{'S_I': 0.0,
'S_S': 0.9259111676784925,
'X_I': 0.0,
'X_S': 446.163046741642,
'X_BH': 25.664835161702214,
'X_BA': 0.0,
'X_P': 39.246207146417575,
'S_O': -1.7987340043125508e-08,
'S_NO': -4.085240753452882e-20,
'S_NH': 2.1230597299994245,
'S_ND': 1.6652546123923254e-06,
'X_ND': 36.46897947131222,
'S_ALK': 85.82051689686057,
'S_N2': 1.4901155163519723e-13,
'H2O': 0.0}
>>> for k,v in BE.state.items():
... if v != 0:
... print(f'{k}{" "*(7-len(k))}{v:.2f}')
S_S 0.93
X_S 446.16
X_BH 25.66
X_P 39.25
S_O -0.00
S_NO -0.00
S_NH 2.12
S_ND 0.00
X_ND 36.47
S_ALK 85.82
S_N2 0.00
'''
_N_ins = 0
Expand Down

0 comments on commit d23de50

Please sign in to comment.