Bioprocess modelling with Python

The following examples use the PyScript framework.
Environment: NumPy, Matplotlib

Beispiel 2: Monod-Kinetik

packages = ["numpy", "matplotlib"] # Monod.py # Python-Script zum plotten erweiterter Monod-Kinetiken # Einbinden von Bibliotheken import matplotlib import matplotlib.pyplot as plt import numpy as np import locale locale.setlocale(locale.LC_ALL, "german") matplotlib.rcParams['axes.formatter.use_locale'] = True # Parameter mu_max = 1 # max. specific growth rate in 1/h k_s = 0.05 # saturation constant in g substrate/L q_sm = 0.4 # maintenance coefficient in g substrate / (g biomass * L) y_xs = 0.5 # apparent yield coefficent in g biomass/g substrate k_I = 0.45 # inhibition constant in g substrate/L n = 2 # inhibition exponent substrate = np.linspace(0,1,1000) # create list with substrate values mu = [mu_max * s / (k_s + s) for s in substrate] mu_inhibit = [mu_max * s / (k_s + s + s**n/k_I) for s in substrate] mu_maintenance = [mu_max * s / (k_s + s) - q_sm * y_xs for s in substrate] params = {'left':0.18, 'top':0.9, 'right':0.9, 'bottom':0.16, 'hspace':0.10, 'wspace':0.45} fig, ax1 = plt.subplots( figsize=(5,5)) fig.subplots_adjust(**params) ax1.plot(substrate,mu, color="grey", linewidth=2, label="A") ax1.plot(substrate,mu_inhibit, "--", color="black", linewidth=1.5, label="B") ax1.set_xlabel(r"$c_\mathrm{S}$ (g L$^{-1}$)", loc='right') ax1.set_ylabel(r"$\mu$ (h$^{-1}$)", loc='top') ax1.set_xlim(0,1) ax1.set_ylim(0,1) ax1.legend() plt
Output
Errors and Warnings