Computer program for equilibrium calculation and diffusion simulation