Chemostat PDE example: trait-structured population model
Add a chemostat PDE example that demonstrates op_engine on a real reaction-diffusion system. This is the first PDE testbed for the package and serves as validation for the structured-observables manuscript.
Model
Trait-structured chemostat with resource coupling:
∂n/∂t = n·g(θ,S) − D·n + d·∂²n/∂θ² (population density)
dS/dt = D·(S_in − S) − ∫ n·g(θ,S) w(θ) dθ (resource)
where g(θ,S) is the growth function, D is dilution rate, d is trait diffusion, w(θ) is uptake weight.
IMEX splitting
Implementation
Source code reference
Thoery_1_Code.ipynb: simulate_model1_crank_nicolson — CN FV on non-uniform grid
Chemostat_Simulator.ipynb: simulate_model2_semi_implicit — CN with positivity projection
Depends on
Chemostat PDE example: trait-structured population model
Add a chemostat PDE example that demonstrates op_engine on a real reaction-diffusion system. This is the first PDE testbed for the package and serves as validation for the structured-observables manuscript.
Model
Trait-structured chemostat with resource coupling:
where g(θ,S) is the growth function, D is dilution rate, d is trait diffusion, w(θ) is uptake weight.
IMEX splitting
d·∂²n/∂θ²— handled by op_engine's implicit solver with the non-uniform Laplacian (Non-uniform grid Laplacian operator in matrix_ops #45)n·g(θ,S), dilution−D·n, resource dynamicsImplementation
examples/chemostat_pde.py— complete working exampleSource code reference
Thoery_1_Code.ipynb:simulate_model1_crank_nicolson— CN FV on non-uniform gridChemostat_Simulator.ipynb:simulate_model2_semi_implicit— CN with positivity projectionDepends on