Python reimplementation of IndPenSim V2, an industrial penicillin fermentation process model. This repository holds a working Jupyter prototype that mirrors the MATLAB Parameter_list layout and uses SciPy for integration and signal processing.
- Python 3.10+ recommended (uses
Path | strunion syntax in the notebook) - Dependencies are listed in
requirements.txt: NumPy, PyYAML, SciPy
To run the notebook you also need a Jupyter environment (for example JupyterLab or the VS Code / Cursor notebook UI).
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
pip install jupyterOn Linux or macOS, activate the venv with source .venv/bin/activate instead of .venv\Scripts\activate.
-
Open
prototype.ipynband run cells from the top. The notebook loads defaults fromparameters.yamland builds the 105-value parameter vector in MATLABParameter_listorder (five quantities are supplied at runtime:mu_p,mux_max,alpha_kla,N_conc_paa,PAA_c; the rest come from the YAMLfixedblock). -
Edit
parameters.yamlto change fixed model constants. Theordersection defines the exact key sequence used when assembling the parameter array.
| Path | Purpose |
|---|---|
prototype.ipynb |
Main simulation code: parameters, ODE integration (scipy.integrate.solve_ivp), channels, and analysis |
parameters.yaml |
Fixed parameters plus ordered list of all 105 parameter names |
reference_Specra.txt |
Reference Raman spectrum (≥2200 rows, two columns: wavenumber and intensity); loaded by simulated Raman code aligned with MATLAB Raman_Sim.m |
requirements.txt |
Python package dependencies |
Work in progress: functionality currently lives in the notebook; a packaged module layout may follow as the port matures.