Dimethyl ether,an important solvent,shows promising potential in the technology of co-injection of sol-vent and steam to enhance heavy oil recovery.In order to address the issue of unclear diffusion behavior and distri-bution characteristics of dimethyl ether in heavy oil,a system model is established for C6-C30 oil phase and dimethyl ether with varying carbon num-bers.Molecular dynamics simulation is used to calculate the coordination number,diffusion co-efficient,density distribution,and interaction energy of dimethyl ether in the oil phase.The study aims to investigate the diffusion law of dimethyl ether in crude oil components.The results indicate that as the carbon number increases,the density distribution of alkanes and dimethyl ether molecules becomes uneven,resulting in a decrease in the number of alkanes surrounding dimethyl ether molecules.At 120 ℃ and 5 MPa,the diffusion coeffi-cients of dimethyl ether in dimethyl ether-C6 and dimethyl ether-C30 systems are 2.19×10-8 m2/s and 1.10×10-8 m2/s,respectively.The diffusion coefficients of alkanes and dimethyl ether gradually decreased with an increase in carbon number,which can be attributed to the increase in molecular size and complexity of shape of alkanes.Under the influence of Van der Waals force,the interaction energy between alkanes and dimethyl ether initially increases and then decreases.As the carbon number decreases,the mass transfer rate at the oil-dimethyl ether contact increa-ses,resulting in greater dissolution of dimethyl ether in the oil.This leads to an expansion in the volume of crude oil and a decrease in viscosity,resulting in a significant improvement in oilfield development.This study provides theo-retical support for optimizing the application of dimethyl ether in the oilfield,and has important implications for fu-ture research in this area.