Computing: Free Pascal Programming

Programming Home   Home   Contact

Simple simulation of Fick's Law of diffusion (Diffusion).

Description: Simple chemistry simulation concerning compartmental modeling: Graphical display of the concentration variation versus time of a solute diffusing between two compartments, separated by a membrane. The user has to enter the compartment volumes, an initial amount of solute, being dumped into compartment 1, the area and thickness of the membrane and the diffusion constant D. The application displays the solute (as circular shapes) in the two compartments as a function of time, the speed of the simulation (correspondance between simulation time and real time) depending on the user selection.

Possible extension: Option to use the permeability constant K instead of the diffusion constant D.

Free Pascal features: Creating drawings using canvas. "Moving" shapes by modifying their "Left" property. Usage of timers.


Chemistry simulation: Fick's Law of diffusion