Closed adilsal33m closed 1 year ago
@adilsal33m, yeah, bugs/cells don't care what time is it, but scipy's ode integrator does need the odes (the kinetic model) to accept t as a parameter. What you are running is the ODEs, calc_efficiency does the integration until time tau. When you simulate the Fermentation object with iskinetic=True, calc_efficiency is run.
Describe the bug Kinetic model does not consider time in its calculation even though it accepts it as a parameter. See the snippet below from the Fermentation class: def kinetic_model(z, t, *kinetic_constants): # pragma: no cover """ Return change of yeast, ethanol, and substrate concentration in kg/m3.
To Reproduce val = (532,0,4000)
print(f'For t=0 {F1.kinetic_model(val,0,F1.kinetic_constants)}') print(f'For t=10 {F1.kinetic_model(val,10,F1.kinetic_constants)}') print(f'For t=100 {F1.kinetic_model(val,100,*F1.kinetic_constants)}')
Expected behavior Rate of change of yeast, ethanol and substrate at a specific time.
Actual behavior Output: For t=0 (-608.4927738283994, 536.9427976846265, -1193.2062170769477) For t=10 (-608.4927738283994, 536.9427976846265, -1193.2062170769477) For t=100 (-608.4927738283994, 536.9427976846265, -1193.2062170769477)
Version biosteam-2.37.4 Python: 3.10.11
Additional context It is entirely possible I am using the function incorrectly and the 't' parameter is added for future use.