An Improved Particle Number-Based Oil Spill Model Using Implicit Viscosity in Marine Simulator

Improving the physical realism of oil spill scenes in marine simulators can further enhance the emergency response capabilities of oﬃcials in charge and crew members and help reduce losses caused by oil spill disasters. In order to uniformly simulate the spreading, drift, breakup, and merging of oil spills at sea, we propose an improved divergence-free position-based ﬂuid (DFPBF) framework based on the particle number density model. In our DFPBF framework, the governing equations for oil spills and ocean are discretized by Lagrangian particles, and the incompressibility of oil spills and ocean is ensured by solving the divergence-free velocity constraint solver and constant density constraint solver. In order to stably simulate the fate and transport of oil spills with higher viscosity, we introduce an implicit viscosity solution scheme for our DFPBF framework. The implicit solver uses a splitting concept to decouple viscosity solve and adopts an implicit scheme to discretize the integration of viscous force. Moreover, our DFPBF framework can ensure a divergence-free velocity ﬁeld before applying the implicit viscosity scheme, which avoids the undesired bulk viscosity eﬀects. The simulation results show that our DFPBF framework can stably simulate oil spills of various viscosities, especially high-viscosity crude oils.


Introduction
Oil spills at sea are one of the most dangerous maritime disasters. Oil pollution has a serious hazard to the marine ecological environment and marine biological resources. Oil spill pollution accidents can cause vast stretches of ocean to become hypoxic, leading to the smothering of sedentary species, such as seaweeds and shellfish [1,2]. e fishing and mariculture industries will also be seriously affected by oil spills. If the spilled oil is not cleaned up in time, it may also cause explosions and fires, causing more serious economic losses and casualties. Oil spills include releases of crude oil from tankers, offshore platforms, and drilling rigs. In this paper, we mainly focus on the ship-source oil spills. When an oil spill occurs, if the competent authority and ship's officers can respond effectively and successfully, the damage caused by oil spill will be significantly reduced. However, effective and successful emergency response capability is usually obtained from a lot of practical experience or simulation training [3]. It is unrealistic to accumulate practical experience from actual oil spills because it will often bring huge losses and even dangers, and no mistakes are allowed. e advantage of marine simulator is that it can build virtual oil spill scenes and can simulate oil spill scenes under different weather and sea conditions according to user's requirements.
ere is no risk during the training process, and the emergency response capability of competent authority and officers can be trained through a large number of repeated simulation training. e main study purpose of this paper is to physically model the oil spill scenes at sea and improve the realism of the oil spill scene in the marine simulator so that the marine simulator can play a more important role in the oil spill emergency response training. e fate and transport of oil spills in marine environment include spreading, drift, evaporation, dispersion, emulsification, dissolution, photooxidation, sedimentation and sinking, shoreline interaction, and biodegradation. During the early stages of a spill, spreading, drift, evaporation, dispersion, emulsification, and dissolution are most important [4]. In this paper, we mainly focus on the physical movement process of oil spills in the early stage, that is, spreading and drift. e main theme of this paper is as follows: (1) In this paper, we introduce an improved DFPBF (divergence-free position-based fluid) framework to model oil spill scenarios. e DFPBF framework is the application of the concept of position-based dynamics in fluid simulation. e DFPBF framework is a meshless method that discretizes the problem domain into a series of fluid particles carrying physical quantities, which has great advantages in simulating the spreading and drift of oil spills. In order to simulate the coupled movement of the oil spills and the ocean surface, we propose an improved particle number density model. All particles in the support domain, including oil particles and ocean particles, have the same rest density, which can effectively handle the discontinuities of physical quantities at the interfaces. (2) e viscosity of the oil has a great effect on the spreading and drift. Usually, low-viscosity oils spread much faster than those with high viscosity. Moreover, high-viscosity oils are more resistant to deformation during spreading and drift. e viscosity of oil will be very high in low-temperature environment. Although the explicit viscosity solvers are usually more efficient, it requires a smaller time step to ensure stability when simulating higher viscosity oils, which will decrease the performance. In addition, when the viscosity of the oil exceeds a certain range, it is difficult to maintain stability even if the time step is small. erefore, in order to stably simulate oils with different viscosities, we introduced an implicit viscosity solution scheme for the DFPBF framework. Compared with the explicit solvers, the implicit viscosity solver can stably simulate oil spills with very high viscosity without being limited by the time step. Before applying the implicit viscosity solver, our DFPBF framework ensures a divergencefree velocity field through the velocity-based constraints, which avoids the undesired bulk viscosity effects. e implicit viscosity solver uses the matrixfree conjugate gradient method and the Jacobi preconditioner to accelerate convergence, which significantly improves the computation efficiency.

Spreading Models of Oil Spills.
Once an oil spill occurs, the oil will start to spread. e spreading speed of the spilled oil is related to the viscosity. Refined products or light crudes with lower viscosity spread faster, and their thickness will gradually reduce as it spreads. In contrast, heavy crudes with high viscosity spread slowly and fragment into patches easily [4]. Oil spill spreading models mainly include regression models and numerical models. Early oil spill spreading models are mainly regression models, which usually need to fit the experimental or observed data. Fay [5,6] proposed a three-regime model for the spreading of oil spills. e oil spill spreads under the action of gravity, viscosity, and surface tension. On the basis of Fay's work, Mackay et al. [7] considered the effect of oil thickness. However, both Fay and Mackay thought that the oil spills were circular in shape, which is not consistent with the actual observation. Lehr et al. [8,9] considered the effect of wind and Langmuir circulation on oil spreading and thought that the oil did not spread uniformly. e modified model proposed by Lehr alters the shape of oil from circle to ellipse with major axis in the direction of wind. Many researchers have improved the spreading of oil spills based on the Fay model, such as providing a surface area correction for the spreading formulas [10]. ese regression models have been used to simulate oil spill scenarios in the marine simulator [11]. However, the regression models are difficult to simulate complex fluid-solid interaction scenes, such as the interaction scene between oil and booms.
Numerical models mainly refer to modeling oil spreading based on physical models, such as hydrodynamic methods [12,13] and advection-diffusion equation [14,15]. According to the different ways of model discretization, numerical methods can be divided into the Eulerian method [16,17] and the Lagrangian method [14,15].
e Eulerian method discretizes the problem domain into meshes, and the physical quantities at the vertices of the meshes change over time.
e Eulerian method using volume fraction can easily trace the surface of the oil spill, but mesh generation for the problem domain is a prerequisite for the Eulerian method, and the accuracy is usually affected by the mesh resolution. e Lagrangian method is also called the meshless method, which discretizes the problem into a series of particles that carry physical quantities. e oil particles move according to the governing equations, and there is no need to generate meshes in the problem domain. e Lagrangian methods commonly used in oil spill simulation include the SPH (smoothed particle hydrodynamics) method [18][19][20] and the MPS (moving particle semi-implicit) method [21,22]. e meshless method is suitable for simulating the spreading and dispersion of the oil, but it is difficult to track the free surface. Compared with regression models, numerical models have more advantages in simulating the effect of wind and waves on oil spreading and the interaction between oil and boom. On this basis, some researchers have proposed some hybrid methods that include both mesh and particles, such as the NBFLIP (narrow-band fluid implicit particle) method [23]. And, the NBFLIP method has been introduced into the marine simulator for oil spill simulation [24]. In recent years, with the development of artificial intelligence, some neural network models have gradually been used in prediction of oil transport, such as ANN (artificial neural network) [22]. Although these neural network models rely on the data generated by traditional models, the trained models have great application value in the oil spill scenarios of marine simulators.

2
Mathematical Problems in Engineering

Drift Models of Oil Spills.
e drift of oil refers to the horizontal transport of oil spilled at sea under the action of ocean currents, waves, and winds. Hoult [25] derived the oil film drift equation, considering the effect of wind, waves, and tidal currents, which can be used to compute the drift velocity of any point on oil edge at different times and in different directions. Coppini et al. [26] adopted the Medsilk [27] drifting model for oil, and the spill is subdivided into a large number of Lagrangian particles. Coppini et al. considered the effect of wind field and turbulence on oil drift, and the information about oil slick features from remotesensing observations was used to validate the oil drift model. e MIKE 21 SA model was used by De Padova et al. [28] to simulate the spatial evolution of floating oil. e Fokker-Planck equation for suspended oil particles is solved by the Lagrangian discrete parcel method. Dagestad et al. [29] developed an open-source Python-based framework for Lagrangian particle modeling. e framework is designed to be used for drift calculations in the ocean or atmosphere. OpenOil is a subclass of OpenDrift, and it is an oil drift model library including specific descriptions of processes relevant for oil spills. Based on the OpenOil, Röhrs et al. [30] simulated the advection of oil particles under the effect of currents, wind, and waves. It can be seen from the literatures that the Lagrangian particle method is one of the most widely used methods in oil spill drift modeling. With the development of technology and theory, some frameworks for simulating oil spill drift have been developed. However, most of the frameworks or models are used in oil spill forecasting, and there are relatively few applications in virtual reality oil spill simulation.

Viscosity Solvers for Meshless Frameworks.
Viscosity is one of the important properties that affect the fate and transport of oil spills [31]. Considering the wide application of the meshless method in oil spill spreading and drift, we introduced a meshless DFPBF framework for unified modeling of oil spill spreading and drift. erefore, in this section, we mainly investigate the viscosity solvers that can be used in meshless frameworks. Common viscosity solvers mainly include explicit viscosity solvers and implicit viscosity solvers. It is an intuitively explicit method to discretize the viscosity term by the Laplacian operator of the kernel function, but the second derivative changes the sign inside the kernel domain so that the normalization conditions are very poorly satisfied [32]. Müller et al. [33] designed a viscosity kernel function, which does not change the sign within the range of support. Brookshaw [34] derived the approximate form of the viscosity term based on the finite difference method and the gradient operator of the kernel function, which was later developed into a classic artificial viscosity by Monaghan [35,36]. e artificial viscosity is Galilean invariant, vanishes for rigid body rotation, and conserves total linear and angular momenta. At the same time, Monaghan [36] proposed a concept of XSPH ("X" denotes the unknown factor). e velocity of the current particle is corrected by interpolating the velocity of the neighboring particles, which is a kind of visual viscosity. e XSPH method has also been used for viscosity calculations in some works [37,38]. e explicit viscosity solvers have fast calculating speed and are only suitable for simulating fluids with low viscosity.
In order to simulate high-viscosity fluids, some implicit solvers have been proposed. Takahashi et al. [39] derived the first derivative of strain rate tensor to model the implicit viscosity. However, the complex neighborhood search of this implicit scheme decreases the performance. Peer et al. [40] proposed a decomposition form of velocity gradient. ey simulated the viscous behavior by modifying the traceless shear rate tensor obtained by decomposition. Bender and Koschier [41] defined a velocity constraint function on the basis of the strain rate tensor. is method adjusts the target strain rate tensor by changing the viscosity parameter to simulate fluids with different viscosities. Although the above implicit viscosity solvers can stably simulate fluids with high viscosity, they are computationally expensive. erefore, these solvers cannot be directly introduced into the oil spill simulation in the marine simulator for the time being. On the basis of artificial viscosity in [35,36], Weiler et al. [42] proposed an implicit scheme that does not depend on the strain rate tensor, which is currently the fastest implicit viscosity solver.

DFPBF Framework
In the DFPBF framework, the following Navier-Stokes equations are usually used as the governing equations of the ocean waves and oil spills: where ρ is the density, v is the velocity, f is the external body forces, and τ is the stress tensor. Equation (1) is the continuity equation, and equation (2) is the momentum equation of viscous flow. For incompressible and isotropic Newtonian fluid, the stress tensor can be defined as where p is the pressure, I is the identity tensor, μ is the dynamic viscosity, and E is the strain rate tensor which is determined as where ∇v denotes the velocity gradient. Inserting equations (3) and (4) into equation (2), we can obtain According to the product rules of ∇, ∇ · (∇v) � ∇ 2 v and ∇ · (∇v) T � ∇(∇ · v). For incompressible fluids, the velocity divergence should be zero, that is, ∇ · v � 0. erefore, the momentum equation can finally be expressed as Mathematical Problems in Engineering where v � μ/ρ denotes the kinematic viscosity,(1/ρ)∇p is the pressure term, and v∇ 2 v is the viscosity term.
3.1. Divergence-free Velocity Constraint. e divergence-free velocity field is one of the important conditions to ensure incompressibility and also an important prerequisite of momentum equation (6). e divergence-free velocity constraint solver is a velocity-based solver for continuity equation (1). e DFPBF framework enforces divergencefree velocity field by the following velocity divergence constraint: where C v i is the velocity divergence constraint, V j denotes the volume of neighboring particle j, v ij � v i − v j , k is the index of the phase, and N k is the number of neighboring particles in phase k.
e velocity divergence constraint aims to find a velocity correction Δv i that can map the velocity field to the divergence-free field, that is, By applying Taylor expansion, we can obtain where where λ v i is the Lagrange multiplier. Based on the concept of the gradient descent (GD) method, we enforce the velocity correction Δv i along the direction of the gradient of the constraint. According to equation (7), the gradient of the velocity constraint C v i (v) can be solved as Similarly, according to Newton's third law, the gradient of the velocity constraint ∇C v j←i (v) at the neighborhood particle x j can be defined as Substituting equations (9)-(11) into equation (8), we can solve where ∇C v i←j (v) and ∇C v j←i (v) are equal in size and opposite in direction, and where ε is a term introduced to avoid singularities of the denominator.
e velocity correction of the particle i under the divergence-free velocity constraints can be derived as where ρ i,0 and ρ j,0 are the rest densities of the fluid phase containing particle i and j. Algorithm 1 is the calculation flow of the divergence-free velocity constraint solver (Algorithm 1). η v is the threshold of the density change rate, and iteriteriter is the number of iterations. In each iteration, firstly, the current velocity di- is computed according to equation (7). e Lagrange multiplier λ v i for each particle is then computed according to equation (12). We can obtain the velocity correction Δv i according to equation (14), and then update the particle velocity v * i using Δv i until the average density change rate Dρ/Dt is less than the threshold η v , that is, the constraint of divergence-free velocity field is satisfied. e DFPBF framework adopts a more controllable way to solve the pressure term, that is, the concept of position-based dynamics (PBD) is introduced into the meshless framework.

Constant Density
e PBD solver we proposed works at the position layer and directly solves a position correction according to the nonlinear density constraint so that the density remains constant. It has better incompressibility than the commonly used PPE solvers, and after our optimization, its calculation speed has been significantly improved.
In our optimized PBD solver, we use EOS-like nonlinear density constraint: where C i is the constraint function of the position of particle x i and its neighbors and ρ i denotes the density of particle x i , and it is defined as Equation (16) is an improved form of the particle number density model proposed by Solenthaler and Pajarola in [43]. Since we use a nonuniform sampling model in boundary handling, the volume of boundary particles will be adaptively adjusted with the shape of the rigid body, so we cannot directly compute the density of oil particles and ocean particles based on the particle number density [44]. erefore, we modified the particle number density model and assumed that all particles in the neighborhood of i have only the rest density of particle i, as shown in Figure 1.
Density constraint solver aims to find a position correction Δx for each particle, which is used to adjust the position distribution of fluid particles so that the density constraint C i (x + Δx) � 0. Applying Taylor expansion, we can obtain where the position correction Δx i for particle i can be defined as where λ i is the Lagrange multiplier for the density constraint solver. e particle position correction Δx i is also enforced along the direction of the constraint gradient ∇C i (x). It can ensure momentum conservation of the system. e constraint gradient at x i is e constraint gradient at x i is computed analogously to (11): Substituting equations (18)- (20) into equation (14), we can obtain where α i is defined in equation (13). In principle, the parameter α i depends on the position distribution of the particles. When the position of the particle updates, the value of α i also needs to be updated according to the latest particle position. However, repeated experiments show that when simulating oil spill scenarios, the value of α i does not need to be updated in each iteration, which does not have a significant impact on the stability and convergence of the solver, but can significantly speed up the solution speed. e position correction of the particle i under the constant density constraints can be derived as In fact, in the process of implementation, the density constraint usually uses inequality constraint, i.e., C i (x) ≤ 0.
is is because we have not considered the influence of air particles. erefore, ocean particles, especially oil particles, at the free surface, usually have a lower density estimate due to the lack of neighboring particles. If the equality constraint in equation (15) is strictly implemented, it will cause particle clustering or clumping. e inequality constraint only adjusts the region where the particle density estimation is larger than rest density, which also improves the efficiency of the solver.
Algorithm 2 is the calculation flow of the constant density constraint solver (Algorithm 2). η ρ is the threshold of density change and iteriteriter is the number of iterations. Since we adopted a pressure projection scheme to decouple the relationship between pressure term and velocity in momentum equation (2), at the beginning of each iteration, we need to first compute the intermediate density ρ * i based on the current particle position distribution. en, we can compute the density constraint C i and Lagrangian multiplier (1) while: ((Dρ/Dt) avg > η v )∨(iter < 1): (2) for i in particles: (3) compute velocity constraint: C v i (v) (4) for i in particles: (5) compute Lagrange multipliers: λ v i and λ v j (6) compute velocity correction: Δv i (7) for i in particles: (8)  λ i according to equations (15) and (21), respectively. Finally, we can compute a position correction Δx i for each particle according to equation (22) and update the position of the particle using Δx i . Continue iterating until the average density change ρ avg − ρ 0 is less than the threshold η ρ . When iteratively correct the particle position in Step 7, we introduce a relaxation scheme where ω is a user-defined relaxation factor and ω � 0.1. e value of ω can be adjusted within a reasonable range, but should not exceed 1.0. In principle, the larger the value of ω, the faster the algorithm will converge, but it will also lead to incompressibility and stability issues. Since the parameter α i is reused in this paper, a relatively smaller ω value should be selected to keep the algorithm stable. When the velocity is updated in the 8th step of the divergence-free velocity constraint solver shown in Algorithm 1, the relaxation factor ω can also be introduced to improve the convergence.
However, experiments show that the velocity divergence solver only needs a few iterations to project the velocity field to a divergence-free field. erefore, we only apply the relaxation scheme in the constant density constraint solver.

Implicit Viscosity Solver.
Viscosity is one of the important properties that impact oil spreading and dispersion. Usually, low-viscosity oils flow more easily than those of higher viscosity. e viscosity of oils changes with their temperature and density. Generally, the viscosity of petroleum products is close to that of seawater, but the viscosity of crude oils is relatively high, and the viscosity will increase with the decrease of temperature. erefore, the treatment of the viscosity term in the momentum equation (6) is very critical to the simulation of oil spill scenarios. At present, the most popular viscosity term solution schemes mainly include explicit schemes and implicit schemes.

Explicit Scheme.
In the meshless method, we can directly discretize the viscosity term using particles: where ∇ 2 W ij denotes the Laplacian of kernel function. When computing the viscosity term, we only consider the contribution of the neighboring particles in the same phase. However, in the common Gaussian kernel functions, the Laplacian operator ∇ 2 W ij will change the sign in the support domain, and the value is generally large, which will cause some nonphysical phenomena. In order to solve the above problem, the first-order derivative of the kernel function can be combined with the finite difference method to discretize the viscosity term: where d is the spatial dimension, x ij � x i − x j |x ij |is the length of x ij , and 0.01h 2 is introduced to avoid singularities. Equation (25) has the advantages of conservation of linear and angular momentum and is Galilean invariant. Since it is an explicit scheme, its calculation speed is faster. However, the stability of the explicit scheme is relatively poor and limited by the time step, and it is more suitable for simulating seawater with lower viscosity.

Implicit Scheme.
In order to simulate higher viscosity oil spills, we introduced a stable implicit scheme. e second-order derivative of velocity ∇ 2 v i can be obtained by computing the first-order derivative of the strain rate tensor E in equation (4) [39]. en, the first-order derivative ∇E can be discretized by gradient operator ∇W ij according the concept of DFPBF framework. is method can stably simulate high-viscosity oil spills and is not limited by the time step size. However, the calculation of two first-order derivatives will lead to a sharp increase in the workload of neighborhood search, which greatly affects the performance. In order to ensure stable simulation and calculation efficiency at the same time, we introduce an implicit scheme based directly on equation (25) instead of using the strain rate. In our DFPBF framework, the viscosity term is solved after enforcing the divergence-free velocity field constraint: where v df denotes the divergence-free velocity field. Equation (26) is an implicit integration scheme and can be expressed as the following linear system: where I is the identity matrix and the matrix A consists of 3×3 blocks: (1) while: (ρ avg − ρ 0 > η ρ )∨(iter < 2) (2) for i in particles: compute Lagrange multipliers: λ i and λ j (6) compute position correction: Δx i (7) for i in particles: (8) update position: x cd � x * i + Δx i ALGORITHM 2: Constant density Constraint(α, v * i ) (calculation flow of the constant density constraint solver).

Mathematical Problems in Engineering
where m ij � (m i + m j )/2 is the average mass to ensure a symmetric and positive definite matrix of coefficients. In order to improve efficiency and save memory consumption, the matrix-free conjugate gradient method is used to solve the linear system. In order to reduce the condition number of the coefficient matrix and improve the convergence, we adopt a preconditioning method. e block version of Jacobi preconditioner consists of the 3 × 3 blocks I + ΔtA.
When we couple the implicit viscosity solver into our DFPBF framework, we find that although implicit viscosity solver performs well in the simulation of high-viscosity fluid, it becomes unstable when the fluid particle velocity is high. In fact, under the same initial conditions, the velocity of lowviscosity fluid particles is higher than that of high-viscosity fluid particles. Moreover, the viscosity coefficient μ in the implicit viscosity solver is not consistent with the actual viscosity of fluid. In meshless frameworks, one of the purposes of introducing artificial viscosity is for the convergence and stability of numerical computation, and there is no strict correspondence with the actual physical meaning. For example, in the implicit viscosity solver, the motion of a fluid with a viscosity coefficient of μ � 10.0 is almost the same as a fluid with an actual viscosity of 1.0 × 10 −3 Pa s. In order to uniformly simulate fluids of different viscosities, we introduce a viscosity correction coefficient: where c is a user-defined correction coefficient, and c � 1.0 × 10 4 in this paper.

Adaptive Time
Step Size. In the simulation process, in order to speed up the physical calculation, it is usually preferred to choose a larger time step, but considering the stability, the time step size must also be small enough. Based on the above requirements, in meshless methods, the time step size can be estimated adaptively based on the CFL (Courant-Friedrichs-Lewy) condition. e adaptive scheme can maximize the time step while maintaining the stable convergence of the algorithm. Specifically, the time step should satisfy the following condition: where d is the diameter of particle, v max is the maximum velocity of particle, and λ is a scaling factor, λ � 0.4. When λ � 1.0, the time step constraint in equation (29) means that the displacement of all particles in each time step should not exceed the particle diameter. On this basis, in order to prevent some particularly high-speed particles from affecting the performance of the algorithm, we specify the maximum and minimum time steps globally: where t min and t max denote the minimum and maximum thresholds of the time step, respectively. Algorithm 3 shows the calculation flow of the DFPBF framework (Algorithm 3). We adopt a splitting scheme to decouple the solution of pressure, viscosity, and external forces. In each time step, we first compute the external forces and predict an intermediate velocity v * i and intermediate position x * i according to the external forces. After that, the adaptive time step Δt is computed to keep the simulation stable. Since the particle position has been updated, it is necessary to perform the neighborhood search again in Step 11. Since we have optimized the simulation loop, the parameter α * i is computed only before running the constraint solver. Adjust the particle distribution according to the constant density constraint solver in Algorithm 2. After applying the density constraint, a new position x cd is obtained, and then, the intermediate velocity v * i can be updated according to x cd . We can get a divergence-free velocity field v df after applying the divergence-free velocity constraint solver in Algorithm 1. After obtaining the divergence-free velocity field, the viscosity solver is used to solve the viscosity term in the momentum equation (6).

Results and Discussion
In this section, we simulated some oil spill scenarios based on the oil spill model proposed in this paper. We use C++ to implement the physical calculation part of the oil spill model in Visual Studio 2019 and use OpenGL to visualize the oil spill scenarios. Our project runs on a workstation with an AMD Ryzen 7 3700X CPU (8-Core) and 32 GB RAM. e operating system is windows 10(x64). We adopt the adaptive single layer nonuniform boundary handling method, in which the velocity of static rigid boundary particles is 0. Figure 2 is the schematic diagram of oil spill test scenario. In the experiment, the volume of ocean particles and oil particles are equal, and the particle radius is 0.015 L. e size of the bounding box is 4.0 L×4.0 L×2.0 L and the number of boundary particle is 175.1k. e size of ocean block is 4.0 L×0.3 L×2.0 L and the number of ocean particle is 78.5k. e size of oil block is 0.5 L×1.0 L×0.5 L and the number of oil particle is 8.2k. e oil block is located above the ocean block and gradually interacts with the ocean under the action of gravity.
We conducted the first set of experiments on calm ocean. Figure 3 shows the simulation results. We simulated the movement of three oil spills with different viscosities under the same initial conditions (2.6 × 10 −3 Pa s, 9.0 × 10 −3 Pa s, and 1.0 × 10 −1 Pa s). e density of oil (dark particles) is 840 kg/m 3 , and the density of ocean (blue particles) is 1027 kg/m 3 . It can be seen from the simulation results that the low viscosity oil has a larger spreading area and is easily broken into smaller oil films. e simulation results are basically consistent with Fay's assumption [6] that the oil film spreads in a circular shape on calm ocean. Compared with traditional methods, our DFPBF framework can simulate the natural breakup of the oil film.

Mathematical Problems in Engineering
We added a stochastic fluctuating wind field to the scene, as shown in Figure 3. e direction of the wind field is the negative direction along the x-axis. It can be seen from Figure 4 that the oil film drifts with the waves. Under the same wind wave conditions, the low viscosity oil spills are more affected by the wind waves. e shape of low-viscosity oil spreading on the ocean is more like an ellipse, with the long axis along the wind direction, which is consistent with Lehr's conclusion [8,9]. In contrast, high-viscosity oil spills are more resistant to shear stress, so they are less affected by wind waves than low-viscosity oil spills. Figure 5 is the coupling scene between oil spill and rock. e spilled oil flows out of the pipeline and the number of oil particles is 20k. e dynamic viscosity of oil in Figure 5 is 9.0 × 10 −3 Pa s. Due to the viscosity, the spilled oil will stick to the rocks during the fall. When the oil spills drift to the nearshore zone, the animals, plants, and reefs may be coated by the dark crude oil with high viscosity. Our DFPBF framework with the implicit viscosity solver can realistically simulate these scenes, as shown in Figure 5.
We name the DFPBF framework which is using the relaxation scheme in Section 3.2 as rDFPBF (relaxed for i in particles: search neighborhoods N i (0) while t < t max : for i in particles: compute external forces:f ext for i in particles:    DFPBF). Figure 6 shows the running time statistics of the oil spill scenarios shown in Figure 2. e time step size in this experiment is 0.01 s. It can be seen from Figure 6 that the rDFPBF framework shows attractive acceleration performance in both test scenarios. In Figure 6(a), the average time cost per time step of the DFPBF framework is 5.18 s and that of the rDFPBF framework is 4.38 s. In Figure 6(b), the average time cost per time step of DFPBF framework is 5.39 s and that of the rDFPBF framework is 4.59 s. As the viscosity of oil spills increases, the time cost also increases.

Conclusions
In this article, we proposed a meshless DFPBF oil spill simulation framework. e problem domain is discrete by Lagrangian particles, which is very suitable for simulating the breaking and merging motion of the oil film. e particle number density model was used to calculate the physical quantities of Lagrangian particles, which can accurately estimate the physical quantities and handle density discontinuities at the interface between multiple fluids with varying rest   densities. We also introduced an implicit viscosity solver for our DFPBF framework, which can stably simulate oil spills with various viscosities. We conducted a series of simulation experiments based on our DFPBF framework, and the following conclusions can be drawn based on the experimental results: (1) On a calm ocean, the oil spills will spread approximately into a circular shape, and as the viscosity increases, the spreading area gradually decreases. In this respect, our conclusion is consistent with Fay's conclusion [5,6]. (2) Under wind wave conditions, the oil spill will drift with the wind waves, and the final position will deviate from the initial oil spill position. e spreading shape of the oil spill is more like an ellipse, and the long axis of the ellipse is in the direction of the wind waves, which is consistent with Lehr's conclusion [8,9].
(3) Our oil spill model can simulate the scene of oil spills covering reefs, which helps improve the trainees' emergency response capability to deal with such oil spills.
We have made efforts to improve the performance of the DFPBF framework, such as adaptive time step size, matrixfree conjugate gradient method, and Jacobi preconditioner. When applied to marine simulators, parallel computing and distributed computing can be used to further improve the performance. Since our DFPBF framework is only designed for virtual scenes in marine simulators and only used to train trainees' emergency response ability, we are more inclined to improve its performance than the accuracy of the algorithm. erefore, our DFPBF framework cannot be directly introduced to oil spill forecasting. If researchers try to extend our method in oil spill forecasting, it is necessary to compare the simulated results with the measured data. Moreover, some parts of our DFPBF framework need to adopt higherprecision scheme, such as changing Euler integration to higher-order Runge-Kutta and changing the kernel function from cubic spline to a more precise form.
In future work, we will try to introduce surface tension [45] and turbulence effects [46] to our DFPBF framework in order to simulate oil spill spreading and drift transport with Langmuir circulation. In terms of interactive simulation of boom and oil spill, we try to model the boom based on the PBD method to further enhance the realism.

Data Availability
e data used to support the findings of this study are included within the article.

Conflicts of Interest
e authors declare no conflicts of interest.