| Mine water inrush is an important aspect of geological disaster in coal mine.It seriously affects the safety production of coal mines,and poses a threat to the life and safety of workers.With the development of computer hardware and software and the rise of GPU technology,computer graphics has been developing rapidly.With the wide application of 3D simulation,natural scenery simulation has also become one of the research hotspots in the field of graphics.For example,simulation of smoke,river,cloud and other fluid has become a challenging research topic.This paper is based on the fluid simulation of the SPH method.The simulation is regionalized into a series of particles carrying a specific material property and the motion pattern of the whole is determined by the motion of each particle.The motion of all particles can be weighted by the motion properties of all particles in the supporting domain,and in each time step,we need to search each particle’s neighboring particles,so as to determine the motion properties of particles in the current time and next time step.This paper optimizes the neighboring particle search algorithm from the perspective of reducing the neighborhood search scope,so as to achieve faster and more accurate search for neighboring particles.First,the principles of direct neighborhood search algorithm,linked list search algorithm and tree search algorithm are introduced,then the neighborhood search algorithm is improved.The improved search algorithm narrowed the search area by determining the area around the particles.Because the motion of the particle is only affected by the neighborhood particles,we store the information of the last step,and determine the search range of the time step according to the information of the last step,so as to obtain the neighborhood particles.Then,based on the N-S equation,the SPH method is used to establish the mine water inrush model and settle the model data.Finally,the simulation experiment is carried out by using the Unity3D virtual engine.In the external TXT file,we set the initial information of particles,including the initial location,quantity,color,material and so on.The external data read interface of Unity3D is used to read particle information,create droplet particles and initialize it.The Obi Emmiter script is set up and the encapsulation interface Fluid Phase of the neighborhood particle search algorithm is provided.The Fluid Phase is assigned and the different neighborhood particle search algorithm is selected for simulation experiment.Using the SPH method,the results are stored,and the particle attributes are assigned.Finally,the time step integral is used to update the state of each moment of the particle,so as to achieve the overall effect of water bursting.Finally,the simulation data of different neighborhood search algorithms are analyzed,and it is concluded that the improved search algorithm can improve the operation efficiency of the system. |