| The rapid and realistic simulation of smoke has always been an important topic in the fields of computer graphics and virtual reality.With the development of fluid mechanics and computer technology,the physically-based smoke simulation method has become the mainstream method,and its application is also very extensive.In the simulation of fire scene in coal mine roadway,the realistic smoke simulation is an important component,which plays an essential role.As a result,this paper chooses the physically-based method to simulate the smoke and considers the realism and real-time of the smoke simulation generally to obtain the smoke motion simulation that meets the actual needs.This paper firstly introduces the background knowledge of physically-based smoke simulation,and then proposes an improved smoke physics model.For the gas-like fluids such as smoke,there is inevitably numerical dissipation in the calculation process,the incompressible inviscid Euler equations is used to model the smoke.While splitting up the simulation region,this paper constructs a virtually infinite index space by using a hierarchical data structure-OpenVDB in the case of the smoke particles falling outside the simulation region during the process of tracing backwards in time through the velocity field,which avoids the error problem generated by other data structure methods.In the spatial discretization step of the Euler equations,in order to use the central difference forms more effectively,avoid the null-space problem that occurs in the difference process and achieve a second-order differential accuracy,this paper sampling at the half-grid point instead of the integral grid point for velocity.And the differences between them has been talked with the details.For the numerical solution of Euler equations,we firstly introduce some different numerical solutions and then we employ the finite difference method to discrete the Euler equations.By adding the buoyancy and vorticity confinement force into the external force term to protect the detail information.OpenVDB is a sparse dynamic hierarchical data structure that can efficiently process 3D volume data and store 3D solid pixel grid with a compact manner to reduce the memory footprint and support the iterative algorithm with faster convergence in the smoke simulation;according to the above analysis,the preconditioned conjugate gradient algorithm(PCG)is used to solve the pressure term,which reduces the number of iterations in each time step,improves the simulation efficiency and reduces the accumulation of iteration errors.Besides,we use the Semi-Lagrangian method in the advection for its unconditional stability.In the last step,the ray casting algorithm generated by the OpenGL is used to render the smoke density field.And the simulation speed can reach 32.8 frames per second.Experimental results demonstrate that the satisfactory visual effect is obtained and the improved method can reduce the number of iterations in each time step greatly.And we have preliminarily realized the interactions of smoke with obstacles and wind direction in the coal mine scene. |