To describe the defective structure of semiconductor silicon, a triad is created: physical plus mathematical models — computational algorithm — program. This solution can be used both in studying the properties of crystals and in industrial production. Such a solution is the basic principle in the study of structural imperfections in any solid. A structural diagram of the diffusion model for the formation of structural imperfections in a crystal and a computational algorithm is presented.