added Cpp diffusion function to substance class