In this tutorial we will create a simple system consisting of two compartments. After creating the basic objects we will vectorize the model.
Consider a tank of a fixed volume that contains contaminated water. A “healthy” fish is placed in the tank, and is thus also contaminated. The mass balance for the contaminating substance will then be:
dMwater/dt = -kuptake * Mwater + kexcretion * Mfish
dMfish/dt = -kexcretion * Mfish + kuptake * Mwater where
|kexcretion||excretion rate constant||Parameter|
|kuptake||uptake rate constant||Parameter|