A two-dimensional model of oxygen-deficit layer of superconducting material YBa2Cu3O7 has been simulated by the molecular-dynamics technique in order to study the influence of the impurities in the site of copper on the low-temperature microstructure. The microstructure pattern arises as a result of quenching the system from a high-temperature tetragonal phase to the low-temperature orthorhombic one and subsequent annealing. The potential of the impurity is modified in such a way that it promotes occupation of opposite nearest-neighbor sites around impurity by an oxygen and vacancy simultaneously. The simulations of the annealing processes showed that the domain pattern becomes very tiny with increased concentration of randomly distributed impurities. Domains of larger sizes would appear if the impurities were able to diffuse to the domain walls. This is confirmed by annealing the sample containing linear chains of impurities. The tweed microstructure depends on the magnitude of the force constants of the elastic subsystem, and at too large coupling the randomly distributed impurities are not able to pin the stiff domain walls. The results resemble the electron-microscope photographs made for cobalt in YBa2(Cul-xCox)3O7-δ.