DRUG_DOSAGE, a Python program which simulates the variation in the blood levels of a medicinal drug being administered at specific dosages and times over a course of treatment. The level should rise about a given medicinal level for some time, but stay below the toxic level.
The drug level can be modeled by a pair of first-order linear differential equations. If we define:
A = medicine_in_intestines, B = plasma_level.then the governing differential equations are:
dA/dt = - absorption_rate * A + intake dB/dt = - excretion_rate * B + absorption_rate * A
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
DRUG_DOSAGE is available in a MATLAB version and a Python version.
FD_PREDATOR_PREY, a Python program which applies the finite difference method (FDM) to a predator-prey system with time dependence and no spatial variation.
FD1D_HEAT_EXPLICIT, a Python program which uses the finite difference method and explicit time stepping to solve the time dependent heat equation in 1D.
LORENZ_ODE, a Python program which approximates solutions to the Lorenz system, creating graphics output using matplotlib.
You can go up one level to the Python source codes.