CN109726496A - A kind of implementation method improving incompressible water model efficiency based on IISPH - Google Patents

A kind of implementation method improving incompressible water model efficiency based on IISPH Download PDF

Info

Publication number
CN109726496A
CN109726496A CN201910011938.6A CN201910011938A CN109726496A CN 109726496 A CN109726496 A CN 109726496A CN 201910011938 A CN201910011938 A CN 201910011938A CN 109726496 A CN109726496 A CN 109726496A
Authority
CN
China
Prior art keywords
particle
speed
formula
pressure
density
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910011938.6A
Other languages
Chinese (zh)
Other versions
CN109726496B (en
Inventor
艾明晶
李锋
郑爱玉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beihang University
Original Assignee
Beihang University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beihang University filed Critical Beihang University
Priority to CN201910011938.6A priority Critical patent/CN109726496B/en
Publication of CN109726496A publication Critical patent/CN109726496A/en
Application granted granted Critical
Publication of CN109726496B publication Critical patent/CN109726496B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present invention is a kind of implementation method that incompressible water model efficiency is improved based on IISPH (Implicit Incompressibility Smooth particle hydrodynamics, implicit incompressible smoothed particle method) method.Speed is introduced into IISPH without dispersion models first, corrects the divergence error of velocity field in each time step of IISPH method;Secondly, by improved density constant model, so that density constant model and speed realize the efficient simulation of incompressible water body without the shared calculating factor of dispersion models.By introducing speed without divergence model, the amendment of divergence error is realized, solves the problems, such as that density error is continuously increased at any time;By improving density constant model, realizes speed and shared without the calculating factor of dispersion models and density constant model, solve the problems, such as redundant computation.The present invention can reach 30.10 frames/second real-time analog rate under 17k particle scale, with PCISPH (Predictive-Corrective Incompressible SPH, based on prediction-correction SPH) method compares, and simulation precision improves 24.17%;Compared with IISPH method, simulation precision improves 16.21%.

Description

A kind of implementation method improving incompressible water model efficiency based on IISPH
Technical field
The present invention relates to field of Computer Graphics, and in particular to one kind is based on IISPH (Implicit Incompressibility Smooth particle hydrodynamics, implicit incompressible smooth particle fluid dynamic Learn) improve the implementation method of incompressible water model efficiency.
Background technique
It is limited to the calculated performance and computational efficiency of computer, water model technology is chronically at theoretical research stage.Closely With the promotion of computer hardware performance and computational efficiency over year, water model is achieved, simultaneous computer graphics Development further promotes the development of the water model technology based on physics, make its be increasingly becoming the research direction that is concerned it One.Smoothed particle method (Smooth particle hydrodynamics, SPH) method is a kind of by solving matter Point group kinetics equation calculates the non-mesh method of fluid (including water body) mass motion state, is able to maintain quality because it exists Conservation is easy to capture many advantages, such as spray and bubble, is widely used in each neck such as film, game, advertisement and military affairs Domain.
The pressure that traditional SPH method is subject to using the Solving Equation of State water body particle of perfect gas, so that water body has Apparent compressibility, so as to cause when simulating extensive water body and Large Scale Motion, water surface occurs significantly not Naturally it shakes, causes apparent vision distortion, therefore realize the Incoercibility of water body for improving water model sense of reality tool It is significant.
The existing thinking for realizing water body Incoercibility is broadly divided into two kinds: explicit incompressible method and it is implicit not Compressible method.Explicit incompressible method passes through direct solution equation of state for liquids or pressure Poisson's equation (Pressure Poisson Equation, PPE) pressure is solved, and the mode that implicit incompressible equation mostly uses prediction to correct solves pressure.
1. explicit incompressible method
Explicit incompressible method mainly passes through direct solution equation of state for liquids or pressure Poisson's equation, obtains water body The pressure that particle is subject to, to realize the Incoercibility of water body.
2007, Becker et al. proposed micro- compressible SPH (Weakly Compressible SPH, WCSPH) method (reference paper 1:Monaghan, J.J.Simulating free surface flows with SPH [J] .Journal of Computational Physics, 1994,110 (2): 399-406), this method replaces perfect gas using equation of state for liquids State equation, and by using big stiffness coefficient make water body particle density wave momentum be no more than 1%, to realize The Incoercibility of water body.WCSPH ensure that the Incoercibility of water model, be obviously improved the true of water model Sense.But the rigidity of water body dominates CFL (Courant-Friedrichs-Levy) condition, big stiffness coefficient only allows to make It with small time step, calculates cost and increases with the reduction of compressibility, therefore WCSPH method can not efficient simulation complexity Water sports.
The same year, Adams et al. propose incompressible SPH (Incompressible SPH, ISPH) method (reference paper 2:X.Y.Hu, N.A.Adams.An incompressible multi-phase SPH method [J] .Journal of Computational Physics,2007,227(1):264–278.).This method is moored by conjugate gradient direct solution pressure Loose measure journey, to obtain the pressure that particle is subject to.ISPH method calculates other power other than pressure as resultant force first, secondly leads to The midrange speed that the resultant force calculates particle is crossed, it is then discrete to Poisson's equation progress, calculate the pressure that particle is subject to.It is different from WCSPH, ISPH allow using biggish time step, but this method need in each time step to complicated formulas and Equation group is solved, and computing cost is huge, cannot achieve the efficient simulation of incompressible water body.
2015, Kang et al. will introduce ISPH method (reference paper 3:Kang N, Sagong without divergence condition D.Incompressible SPH using the Divergence-Free Condition[J].Computer Graphics Forum, 2015,33 (7): 219-228), this method is implemented when solving the equation of momentum without divergence condition.Guarantee that volume can not A speed without divergence field is kept while compression, is performed simultaneously Incoercibility on location class and velocity stage.Compared to ISPH, this method can greatly accelerate the convergence rate of Pressure solution, reduce the number of iterations of solver, to improve water body Simulation precision.But this method is easy to appear particle density at water body Free Surface and is underestimated, to generate in simulation process Phenomena such as particle buildup.
2. implicit incompressible method
Implicit incompressible method mainly passes through solution pressure Poisson's equation indirectly, obtains the pressure that water body particle is subject to, To realize the Incoercibility of water body.
2009, Solenthaler et al. was proposed based on prediction-correction SPH (Predictive-Corrective Incompressible SPH, PCISPH) method (reference paper 4:Solenthaler B, Pajarola R.Predictive- corrective incompressible SPH[J].Acm Transactions on Graphics,2009,28(3):1- 6), this method is divided into two stages: forecast period and calibration phase.In forecast period, this method uses other power outside pressure The attributes, i.e. the prediction physics of particle such as speed, the position of future time step-length particle are calculated as resultant force, and according to the resultant force Attribute.Then iteration correction circulation is executed, when the error of particle density is greater than given error amount, is pressed by applying to particle Power adjusts the speed of particle, and correction circulation is exited if averag density error is in given error range.Finally utilize solution Pressure and other power out recalculates the particle property of future time step-length.This method avoid direct solution pressure Poissons The computing cost of equation, but solve pressure indirectly and need to undergo successive ignition, computing cost is still increased to a certain extent.
2012, He et al. proposed a kind of local Poisson SPH (Local Poisson for solving Incoercibility water body SPH, LPSPH) method (reference paper 5:X.He, N.Liu, S.Li, et al.Local poisson SPH for viscous incompressible fluids[J].Computer Graphics Forum,2012,31(6):1948–1958).This method Integrated form is converted by Poisson's equation first;Then using discretization method by continuous integral it is equations turned be discrete summation, Avoid the computing cost of direct solution overall situation pressure Poisson's equation.
2014, Ihmsen et al. proposed a kind of pressure projection formula, i.e., implicit incompressible SPH (Implicit Incompressibility SPH, IISPH) method (reference paper 6:Ihmsen M, Cornelis J, Solenthaler B, et al.Implicit Incompressible SPH[J].IEEE Transactions on Visualization and Computer Graphics, 2014,20 (3): 426-435.), this method by the symmetrical SPH pressure of continuity equation and SPH from Dephasing combines, and obtains the discrete form of pressure Poisson's equation, and solve pressure using relaxation Jacobi algorithm.With throwing before Shadow scheme is compared, and the method increase the convergence rates of solver, in addition, this method is based on speed rather than position is close to correct Deviation is spent, this improves the stability of time integral to a certain extent.But the velocity field that this method is calculated is in the presence of scattered Spending error reduces simulation precision to increase the mean iterative number of time of density correction.
2014, Ihmsen et al. proposed IISPH-LFIP (Implicit Incompressibility SPH-Fluid Implicit Particle, IISPH-FLIP) method (reference paper 7:Cornelis J, Ihmsen M, Peer A, et al.IISPH-FLIP for incompressible fluids[J].Computer Graphics Forum,2014,33 (2):255-262.).This method carries out pressure projection using implicit incompressible method, and uses the implicit particle (Fluid of fluid Implicit Particle, FLIP) solver progress BORDER PROCESSING, realize the simulation of incompressible water body.This new combination Solve the problems, such as two of existing SPH and FLIP solver, the i.e. efficiency in the conservation of mass and SPH in FLIP.The party The IISPH-FLIP solver that method proposes can simulate incompressible water body, can quantify, non density variation is less than 0.1%.
Explicit incompressible water model method direct solution equation of state for liquids or pressure Poisson's equation calculate complicated Degree is high;Implicit incompressible water model method by the way of being corrected such as the methods of PCISPH, IISPH using prediction, but is to solve for The number of iterations is excessive in the process, and iteration all needs to execute time-consuming huge proximate particle finding step every time, cause calculation amount with The increase of population sharply increase.To sum up, although existing incompressible water model method realizes the incompressible of water body Property, but when applying Incoercibility, expense is too big, reduces simulation precision.
Summary of the invention
The present invention proposes to improve the implementation method of incompressible water model efficiency based on IISPH, first by by speed No dispersion models introduce IISPH method, correct the divergence error of speed in IISPH method, avoid density error with the time Increase is continuously increased, to reduce the mean iterative number of time of effective density error;Then the density constant model of IISPH is carried out It improves, variable density amount is solved by rate of change of the density, so that improved density constant model is able to use speed without scattered The calculating factor that model solution goes out is spent, and then avoids redundant computation, improves incompressible water model efficiency.It specifically includes Following steps:
Step 1: speed is introduced without dispersion models, to correct the divergence error of IISPH method
Na Wei-Stokes (Navier-Stokes, N-S) equation is kept for describing viscous incompressible fluid momentum The permanent equation of motion.The equation is mainly used to describe the movement of liquids and gases, can also be with substantially according to Newton's second law Statement are as follows: the momentum change of infinitely small volume fluid is the effect summation of its gravity, viscous force, pressure and other active forces.N-S Equation describes the rule of the fluid motion in nature, and the essence based on physics makes it be highly suitable for description nature The natural fluids such as phenomenon, such as water body, smog, air-flow.
Shown in the three-dimensional representations of N-S equation such as formula (1) and formula (2).
Wherein u represents the speed of particle, and ρ represents the density of particle, and p indicates the pressure of particle, that is, is applied to unit area On pressure, f indicates the external force (such as gravity) that is subject to of fluid.Operator is the dot product of space vector,Representation space vector To the local derviation of Spatial Dimension, i.e.,Also known as gradient, operatorFor Laplace operator.
Formula (1) describes conservation of momentum when fluid motion, and right formula indicates all field of force amounts of fluid.On the right of equation First item represent pressure difference between particle, Section 2 indicates the viscous force between particle, and Section 3 is external force (such as gravity).Its physics Meaning are as follows: the movement of water body particle is codetermined by pressure, viscous force and external force.
Formula (2) is known as incompressibility, which indicates that the speed divergence of water body during the motion is 0, i.e., at some In time step, inflow and discharge in water body unit volume do not change, to guarantee water body during the motion Incoercibility.
The modified particle rapidity of IISPH is unsatisfactory for there are divergence errorThe present invention is by introducing speed without scattered Model is spent, and calculates pressure term using the model, the divergence error of particle rapidity is modified to realize, suffered by particle i The size of pressure is determined by formula (3).
WhereinIndicate pressure suffered by particle i,Indicate the volume of water body particle,Indicate barometric gradient.It introducesThe stiffness coefficient being modified to the speed v of particle i is indicated, shown in the calculating formula such as formula (4) that barometric gradient can be obtained.
Wherein mjIndicate the quality of proximate particle j,Indicate the gradient of kernel function,As meet speed without divergence item The stiffness coefficient of part.
Particle meets the conservation of momentum in the process of movement.Force analysis is carried out it is found that pressure suffered by particle i to particle i Power is the sum of the pressure of proximate particle j, and interparticle pressure is a pair of of interaction force.Due to interaction force size phase Deng contrary, therefore, pressure suffered by particle i and particle i meet the pressure of proximate particle j
WhereinIndicate particle i to the pressure of particle j, it means that pressure as a kind of interparticle active force, within The form of power exists, and the sum of pressure of all particles is 0.First and last from water body, which does not generate water body itself The change of kinetic energy meets kinetic energy conservation law.Size and interparticle distance dependent of the particle i to proximate particle pressure, are asked It solves shown in formula such as formula (5).
Wherein xjIndicate that the three-dimensional coordinate of particle j, solver must correct the speed of particle by changing pressure value, thus So that the speed of particle meets without divergence.Shown in change rate such as formula (6) of the density relative to the time.
Wherein WijIndicate smoothing kernel function, it is ensured that the Incoercibility of water body, i.e. density do not change, then formula (6) The density acquired should be 0 relative to the change rate of time.V in formula (6)i-vjIndicate interparticle relative speed difference, the speed difference Caused by pressure difference, there are difference for the pressure that different particles are subject to, therefore cause interparticle speed different.Caused by pressure Velocity variable such as formula (7) shown in.
Wherein Δ viIt indicates the velocity variable as caused by pressure, formula (7) is substituted into formula (6), obtain formula (8).
The size of particle pressure can be calculated by formula (3), convolution (6) rate of change of the density is 0, can be solved Stiffness coefficient;Using the stiffness coefficient correct particle rapidity, enable to speed divergence be 0 so that density relative to The change rate of time is 0.Formula (4) are substituted into formula (3), are obtainedFormula is substituted into again (8), formula (9) are obtained.
Stiffness coefficient is solved according to formula (9)As shown in formula (10).
WhereinAnd αiSize only it is related with particle position.
Formula (10) is speed without dispersion models, which goes out so that speed meets the stiffness coefficient without divergence The stiffness coefficient guarantees that rate of change of the density does not fluctuate water body in the process of movement, to realize water for calculating pressure The Incoercibility of body.
The resultant force that particle is subject to finally is calculated according to formula (11), and recalculates the speed of particle with joint efforts using this.
WhereinIndicate the suffered resultant force of particle i,Indicate the resultant force of other power in addition to pressure,Indicate particle i The pressure for the proximate particle j being subject to.
Step 2 improves density constant model, makes it with speed without the shared calculating factor of dispersion models, to correct IISPH Density error.
In speed without in dispersion models, particle rapidity is corrected without the stiffness coefficient of divergence using speed is met, to protect It demonstrate,proves rate of change of the density and is less than given divergence error amount ηdiv.Need to calculate the α factor, this hair when carrying out speed without divergence amendment The density constant Model Reuse α of bright proposition calculates the factor, is further corrected to the density of water body particle.
The present invention calculates variable density amount by rate of change of the density and time step, then the density value ρ of t+ time Δt ′i, as shown in formula (12).
Speed is substituted into formula (12) without the rate of change of the density solution formula (8) of dispersion models, and combines density constant condition ρi0, obtain the density error ρ ' in Δ t time stepi0, as shown in formula (13).
Wherein ρ0It indicates particle initial density, formula (3), (4) is substituted into formula (13).
Stiffness coefficient is obtained by formula (14)Solution formula such as formula (15) shown in.
WhereinFor the stiffness coefficient for meeting water body density constant, α is speed without the calculating factor in dispersion models, same In one time step, which is only calculated once, and reduction computes repeatedly caused time overhead.
Formula (15) is density constant model, which goes out the stiffness coefficient so that density constantThe stiffness coefficient The pressure being subject to for calculating particle guarantees that variable density amount does not fluctuate water body in the process of movement, to realize water The Incoercibility of body.
As formula (11) it is found that shown in such as formula of resultant force suffered by particle after density constant Modifying model (16).
It uses resultant force suffered by the particle after correction to be modified the speed of particle, can be obtained in conjunction with Newton's second law T+ time Δt particle rapidity v ' after amendmentiSolution formula, such as shown in (17).
It is calculated according to above-mentionedAnd formula (17) is to the speed v of particleiIt is modified, obtains revised particle Speed v 'i
The present invention combines speed without dispersion models formula (11) with improved density constant modular form (15), realizes pair The amendment of speed divergence error and density error, to reduce redundancy meter while reducing density revision the number of iterations It calculates, the simulation precision of incompressible water body can be effectively improved.Test result shows that method proposed by the present invention can not in simulation When compressing water body, simulation precision is better than IISPH and PCISPH method.
Detailed description of the invention
Fig. 1 is the implementation method flow chart that incompressible water model efficiency is improved based on IISPH.
Fig. 2 is improved density constant model algorithm figure.
Fig. 3 is speed without dispersion models algorithm pattern.
Fig. 4 is incompressible water body system module design figure.
Fig. 5 is PCISPH, IISPH and the method for the present invention simulation precision comparison diagram.
Fig. 6 is the method for the present invention multithreading efficiency comparative figure.
Fig. 7 is that three-dimensional scenic water droplet falls simulation and effect picture.
Specific embodiment
Technical solution of the present invention and result are described in further detail below in conjunction with drawings and examples.
The present invention proposes a kind of incompressible water model method of the speed without divergence, first by by speed without divergence mould Type introduces IISPH method, corrects the divergence error of speed in IISPH method, avoids density error continuous as time increases Increase, to reduce the mean iterative number of time of effective density error;Then the density constant model of IISPH is improved, is led to It crosses rate of change of the density and solves variable density amount, so that improved density constant model is able to use speed and asks without dispersion models The calculating factor solved, therefore redundant computation is avoided, incompressible water model efficiency can be significantly improved.
Step 1: speed is introduced into IISPH without dispersion models, IISPH density constant model is improved, constructs incompressible water Body phantom frame, as shown in Figure 1.
Step 1.1, proximate particle search is executed, proximate particle collection of each water body particle in current time step is obtained Close Ni(t)。
Step 1.2, according to the proximate particle set N of each particlei(t), the resultant force other than the pressure that particle is subject to is calculated, And predetermined speed and predicted density of particle are calculated according to the resultant force.
Step 1.3, in conjunction with density constant Modifying model particle rapidity, the shared calculating factor is calculated first, and according to the meter It calculates the factor and calculates stiffness coefficient, which enables to density error to be less than given density error value;Then using should Stiffness coefficient is corrected the speed of particle, so that the variable quantity of density | ρ 'i(t+Δt)-ρ0| less than given density error Value ηρ
Step 1.4, the particle rapidity obtained in conjunction with speed without dispersion models amendment step (1.3) is counted using step (1.3) The shared calculating factor calculated calculates stiffness coefficient, which enables to rate of change of the density error to be less than given divergence Error amount ηdiv, then using the speed of stiffness coefficient correction particle, so that rate of change of the density is less than given divergence error amount ηdiv
Step 1.5, all particles are traversed, particle rapidity is calculated according to above-mentioned, which is updated to lower a period of time Between step-length particle rapidity, and other attributes of more new particle.
Step 2: in conjunction with improved density constant model, effective density error, as shown in Figure 2.
Step 2.1, all particles are traversed, in conjunction with its proximate particle set Ni(t), averag density variable quantity is calculated.
Step 2.2, if averag density variable quantity is less than given density error value (ρavg0ρ) or the number of iterations Iter is not less than 2, then exits density constant model, no to then follow the steps 2.3.
Step 2.3, for each particle, its proximate particle set N is traversedi(t), corresponding stiffness coefficient is calculatedAnd According to the stiffness coefficient calculate the particle and proximate particle suffered by pressure.
Step 2.4, it is followed according to the pressure correction particle rapidity that step 2.3 is calculated using revised particle rapidity Ring executes step 2.1-2.4, until variable density amount is less than given density error (ρavg0ρ)。
Step 3: in conjunction with speed without dispersion models, divergence error is corrected, as shown in Figure 3.
Step 3.1, all particles are traversed, in conjunction with its proximate particle set Ni(t), the rate of change of the density of particle is calculated.
Step 3.2, if rate of change of the density is less than or equal to given divergence error amountOr the number of iterations is not small In 1, then rate of withdraw is no to then follow the steps 3.3 without dispersion models.
Step 3.3, for each particle, its proximate particle set N is traversedi(t), corresponding stiffness coefficient is calculatedAnd According to the stiffness coefficient calculate the particle and proximate particle suffered by pressure.
Step 3.4, it is followed according to the pressure correction particle rapidity that step 3.3 is calculated using revised particle rapidity Ring executes step 3.1-3.3, until speed divergence error is less than given divergence error amount
Step 4: utilizing Step 2: three physical models solved, construct incompressible water sports scene, output knot Fruit simultaneously shows.
Step 2: the incompressible water model solved in three, be only based on mathematical physics solve it is obtaining as a result, from It visually describes, is made of a series of particles, the water body scene in reality can not realistically be presented.Therefore it also needs to upper It states model and carries out corresponding Rendering operations, to obtain realistic water body, skill is rendered using screen space in the present invention Art realizes water body rendering, to show fluid effect true to nature.
All tests of the present invention are carried out on Dell's desktop computer, and CPU model is Intel Core i7-4790 3.6GHz, video card model AMD RadeonTMR5 240。
Fig. 4 is incompressible water body system module design figure, and whole system is divided into 4 modules: initialization module, prediction school Positive module, margin processing module and rendering module.It is initial to generate particle for initialization module primary recipient parameter set by user The attributes such as information, including particle position, pressure, density, speed.
Prediction correction module combines speed without dispersion models, density constant model, and the module is in each time step It executes once, generates the particle rapidity of future time step-length, be broadly divided into two parts: preprocessing part and speed calculation part Point.Wherein preprocessing part mainly calculates and stores only data relevant to particle position, this partial data is in the time step It is interior to change, it can be to avoid computing repeatedly by way of precomputation.Speed calculating section operating speed is without divergence mould Predetermined speed of type and density constant Modifying model particle, so that the speed after correction meets speed without divergence and density It is constant.
Margin processing module is used to correct the speed after predicted correction module correction, to avoid particle in movement Solid boundaries are penetrated in the process.Whether detection particle first can collide with boundary, by based on repulsion if colliding The collision response Modifying model particle rapidity of power, to guarantee the not penetrability of Vessel Boundary;It need not if not colliding Execute collision response model.
Rendering module mainly realizes water body rendering, including the building of anisotropy core surface, depth according to particle location information Smoothly, apply illumination and draw day sylphon, improve the smoothness of water surface and the sense of reality of water body rendering.
Speed is introduced IISPH without dispersion models by the present invention, and is improved the density constant model of IISPH, this Kind improves the implementation method of incompressible water model efficiency based on IISPH, can the more efficient incompressible water body of simulation Moving scene.
It is realized using PCISPH algorithm, IISPH algorithm and the method for the present invention and is fallen the simulation of model to water droplet respectively, it should Model is made of 17074 particles, and test includes 12 independent experiments, and the average frame per second that 12 results are obtained by calculation accelerates Than.Table 1 is that water droplet falls modeling frame per second contrast table, and Fig. 5 is corresponding line chart.It can be calculated by data in table 1, The average frame per second of PCISPH algorithm is 24.24fps, and the average frame per second of IISPH algorithm is 25.91fps, and incompressible water body accelerates The average frame per second of analogy method is 30.10fps.Compared to PCISPH algorithm, the computational efficiency of this paper method is improved 24.17%, compared to IISPH algorithm, the computational efficiency of this paper method improves 16.21%.
1 water droplet of table falls modeling frame per second contrast table
The present invention improves proximate particle search, kernel function and its gradient solution efficiency using multithreading.In order to verify this hair The validity and high efficiency that bright program multithreading is realized, are respectively started 1,4,8 thread and simulate to 7104 particles, obtain Simulation frame per second figure shown in fig. 6.It will be appreciated from fig. 6 that being unable to reach simulation in real time when 1 thread of starting and requiring;Start 4 threads When, simulation precision significantly improves, and meets requirement of real-time;When starting 8 threads, simulation precision is further increased, to test The validity and high efficiency of multi-threading of the present invention are demonstrate,proved.
Fig. 7, which depicts three-dimensional scenic water droplet and falls, simulates effect picture, and Fig. 7 (a) indicates water droplet original state, Fig. 7 (b), Fig. 7 (c) fall for water droplet and with the effect that repeatedly rebounds after collision on the ground, Fig. 7 (d) is that water body is gradually recovered stable effect, by scheming It is found that water body do not occur in the process of movement particle penetration boundary, particle adhesion boundary, particle boundary aggregation etc. it is disorderly Random phenomenon.

Claims (4)

1. one kind based on IISPH (Implicit Incompressibility Smooth particle hydrodynamics, Implicit incompressible smoothed particle method) improve the implementation method of incompressible water model efficiency, it is characterised in that Realize that steps are as follows:
Step 1: speed is introduced into IISPH without dispersion models, constructs incompressible water model frame
Firstly, building incompressible water model frame based on IISPH.IISPH is divided to for prediction and two stages of correction, prediction rank Section calculates particle density and speed using other power in addition to pressure, and calibration phase can not by apply that pressure realizes water body Compressibility.
Secondly, improving the density constant model of IISPH, it is made, without the shared calculating factor of dispersion models, to reduce redundancy meter with speed It calculates, improves water model efficiency.
Finally, speed is introduced into incompressible water model frame without dispersion models.Exist for the speed that IISPH is solved Speed is introduced into IISPH method without dispersion models, corrects the divergence error of particle by the problem of divergence error.
Step 2: speed is introduced without dispersion models, to correct the divergence error of IISPH method
The modified particle rapidity of IISPH is unsatisfactory for there are divergence errorThe present invention is by introducing speed without divergence mould Type, and pressure term is calculated using the model, the divergence error of particle rapidity is modified to realize, particle i pressure Size determined by formula (1).
WhereinIndicate pressure suffered by particle i,Indicate the volume of water body particle,Indicate barometric gradient.It introducesIt indicates To the stiffness coefficient that the speed v of particle i is modified, shown in the calculating formula such as formula (2) that barometric gradient can be obtained.
Wherein mjIndicate the quality of proximate particle j,Indicate the gradient of kernel function,As meet speed without divergence condition Stiffness coefficient.
Particle meets the conservation of momentum in the process of movement.Force analysis is carried out it is found that pressure suffered by particle i is to particle i The sum of the pressure of proximate particle j, and interparticle pressure is a pair of of interaction force.Since interaction force is equal in magnitude, Contrary, therefore, pressure suffered by particle i and particle i meet the pressure of proximate particle j
WhereinIndicate particle i to the pressure of particle j, it means that pressure is as a kind of interparticle active force, with internal force Form exists, and the sum of pressure of all particles is 0.First and last from water body, which does not generate water body kinetic energy itself Change, meet kinetic energy conservation law.Size and interparticle distance dependent of the particle i to proximate particle pressure, solve public Shown in formula such as formula (3).
Wherein xjIndicate that the three-dimensional coordinate of particle j, solver must correct the speed of particle by changing pressure value, so that The speed of particle meets without divergence.Shown in change rate such as formula (4) of the density relative to the time.
Wherein WijIndicate smoothing kernel function, it is ensured that the Incoercibility of water body, i.e. density do not change, then formula (4) acquires Density should be 0 relative to the change rate of time.V in formula (4)i-vjIndicate interparticle relative speed difference, the speed difference is by pressing Poor by force to cause, there are difference for the pressure that different particles are subject to, therefore cause interparticle speed different.The speed as caused by pressure It spends shown in variable quantity such as formula (5).
Wherein Δ viIt indicates the velocity variable as caused by pressure, formula (5) is substituted into formula (4), obtain formula (6).
The size of particle pressure can be calculated by formula (1), convolution (4) rate of change of the density is 0, can solve rigidity Coefficient;Particle rapidity is corrected using the stiffness coefficient, enabling to the divergence of speed is 0, so that density is relative to the time Change rate be 0.Formula (2) are substituted into formula (1), are obtainedFormula (6) are substituted into again, are obtained To formula (7).
Stiffness coefficient is solved according to formula (7)As shown in formula (8).
WhereinAnd αiSize only it is related with particle position.
Formula (8) is speed without dispersion models, and the model is by solving stiffness coefficientAnd pressure is calculated using the stiffness coefficient, To guarantee that rate of change of the density does not fluctuate water body in the process of movement, that is, guarantee the Incoercibility of water body.
The resultant force that particle is subject to finally is calculated according to formula (9), and recalculates the speed of particle with joint efforts using this.
WhereinIndicate the suffered resultant force of particle i,Indicate the resultant force of other power in addition to pressure,Indicate particle i by Proximate particle j pressure.
Step 3 improves density constant model, makes it with speed without the shared calculating factor of dispersion models, to correct the close of IISPH Spend error.
In speed without in dispersion models, particle rapidity is corrected without the stiffness coefficient of divergence using speed is met, to guarantee close It spends change rate and is less than given divergence error amount ηdiv.Need to calculate the α factor when carrying out speed without divergence amendment, the present invention mentions Density constant Model Reuse α out calculates the factor, is further corrected to the density of water body particle.
The present invention calculates variable density amount by rate of change of the density and time step, then the density value ρ ' of t+ time ΔtiSuch as formula (10) shown in.
Speed is substituted into formula (10) without the rate of change of the density solution formula (6) of dispersion models, and combines density constant condition (ρi= ρ0), obtain the density error ρ ' in Δ t time stepi0, as shown in formula (11).
Wherein ρ0It indicates particle initial density, formula (1), (2) is substituted into formula (11).
Stiffness coefficient is obtained by formula (12)As shown in formula (13).
WhereinFor the stiffness coefficient for meeting water body density constant, α is speed without the calculating factor in dispersion models, same In time step, which is only calculated once, therefore can reduce and compute repeatedly caused time overhead.
Formula (15) is density constant model, and the model is by solving stiffness coefficientAnd use the calculated pressure of the stiffness coefficient Power guarantees the Incoercibility of water body to guarantee that variable density amount does not fluctuate water body in the process of movement.
As formula (11) it is found that shown in such as formula of resultant force suffered by particle after density constant Modifying model (14).
It uses resultant force suffered by the particle after correction to be modified the speed of particle, can must be corrected in conjunction with Newton's second law T+ time Δt particle rapidity v ' afterwardsiSolution formula, such as shown in (15).
It is calculated according to above-mentionedAnd formula (15) is to the speed v of particleiIt is modified, obtains revised particle rapidity v′i
Step 4: utilizing Step 2: three physical models solved, construct incompressible water sports scene, output result is simultaneously Display.
Step 2: the incompressible water model solved in three, be only based on mathematical physics solve obtain as a result, from vision Upper description is made of a series of particles, and the water body scene in reality can not realistically be presented.Therefore it also needs to above-mentioned mould Type carries out corresponding Rendering operations, so that realistic water body is obtained, it is real using screen space Rendering in the present invention Existing water body rendering, to show fluid effect true to nature.
2. a kind of implementation method for improving incompressible water model efficiency based on IISPH according to claim 1, special Sign is, incompressible body phantom frame constructed by step 1, specifically: speed being introduced IISPH without dispersion models, and is changed Into the density constant model of IISPH, make it with speed without the shared calculating factor of dispersion models, to reduce redundant computation.Specifically It is: calculates other power in addition to pressure first, and calculate the predicted density and predetermined speed of particle;Then density constant mould is used Type effective density error;Last operating speed corrects divergence error without dispersion models.
3. a kind of implementation method for improving incompressible water model efficiency based on IISPH according to claim 1, special Sign is, solves the pressure that particle is subject to without dispersion models by speed described in step 2, and then correct particle rapidity, so that Particle rapidity meets without divergence, specifically: solving the divergence error of particle rapidity first;Secondly by speed without dispersion models Stiffness coefficient is solved, and further solves the pressure that particle is subject to;The pressure correction particle rapidity is finally used, to obtain nothing The velocity field of divergence.
4. a kind of implementation method for improving incompressible water model efficiency based on IISPH according to claim 1, special Sign is that improved density constant model and speed described in step 3 are without the shared calculating factor-alpha of dispersion models, by improved The pressure that density constant model solution particle is subject to, and then particle rapidity is corrected, so that particle meets density constant, specifically: By other predicted densities and predetermined speed for making every effort to solve particle in addition to pressure, density constant model solution particle is then used The pressure being subject to, and according to the pressure correction particle rapidity, realize density constant.
CN201910011938.6A 2019-01-07 2019-01-07 IISPH-based implementation method for improving simulation efficiency of incompressible water Active CN109726496B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910011938.6A CN109726496B (en) 2019-01-07 2019-01-07 IISPH-based implementation method for improving simulation efficiency of incompressible water

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910011938.6A CN109726496B (en) 2019-01-07 2019-01-07 IISPH-based implementation method for improving simulation efficiency of incompressible water

Publications (2)

Publication Number Publication Date
CN109726496A true CN109726496A (en) 2019-05-07
CN109726496B CN109726496B (en) 2020-12-11

Family

ID=66298146

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910011938.6A Active CN109726496B (en) 2019-01-07 2019-01-07 IISPH-based implementation method for improving simulation efficiency of incompressible water

Country Status (1)

Country Link
CN (1) CN109726496B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112560326A (en) * 2019-09-26 2021-03-26 腾讯科技(深圳)有限公司 Method and device for determining pressure field
CN115906596A (en) * 2022-11-18 2023-04-04 上海索辰信息科技股份有限公司 Wall surface oil film calculation method

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102867094A (en) * 2012-09-19 2013-01-09 西安交通大学 Establishment method for free surface flow model in moving particle semi-implicit algorithm
US20150242545A1 (en) * 2014-02-21 2015-08-27 Junghyun Cho Method of Simulation of Moving Interfaces using Geometry-Aware Volume of Fluid Method
CN105956262A (en) * 2016-04-28 2016-09-21 清华大学 Multi-component solid and fluid simulation method and system based on SPH (Smoothed Particle Hydrodynamics) method
JP2017059444A (en) * 2015-09-17 2017-03-23 トヨタ自動車株式会社 Electrode simulation method and device for all-solid battery, and method of manufacturing electrode for all-solid battery
CN106777662A (en) * 2016-12-12 2017-05-31 西安交通大学 Fuel tanker string oil characteristic optimizing method based on smoothed particle method
CN107908918A (en) * 2017-10-19 2018-04-13 新疆大学 The SPH method for numerical simulation of grains of sand surge start in a kind of flat sand bed
CN108269299A (en) * 2017-01-04 2018-07-10 北京航空航天大学 A kind of viscous fluid modeling method based on SPH method approximate solutions
US20180239848A1 (en) * 2017-02-21 2018-08-23 Livermore Software Technology Corporation Numerical Blast Simulation Methods and Systems Thereof

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102867094A (en) * 2012-09-19 2013-01-09 西安交通大学 Establishment method for free surface flow model in moving particle semi-implicit algorithm
US20150242545A1 (en) * 2014-02-21 2015-08-27 Junghyun Cho Method of Simulation of Moving Interfaces using Geometry-Aware Volume of Fluid Method
JP2017059444A (en) * 2015-09-17 2017-03-23 トヨタ自動車株式会社 Electrode simulation method and device for all-solid battery, and method of manufacturing electrode for all-solid battery
CN105956262A (en) * 2016-04-28 2016-09-21 清华大学 Multi-component solid and fluid simulation method and system based on SPH (Smoothed Particle Hydrodynamics) method
CN106777662A (en) * 2016-12-12 2017-05-31 西安交通大学 Fuel tanker string oil characteristic optimizing method based on smoothed particle method
CN108269299A (en) * 2017-01-04 2018-07-10 北京航空航天大学 A kind of viscous fluid modeling method based on SPH method approximate solutions
US20180239848A1 (en) * 2017-02-21 2018-08-23 Livermore Software Technology Corporation Numerical Blast Simulation Methods and Systems Thereof
CN107908918A (en) * 2017-10-19 2018-04-13 新疆大学 The SPH method for numerical simulation of grains of sand surge start in a kind of flat sand bed

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
A. ZAINALI ETC.: ""Numerical investigation of Newtonian and non-Newtonian multiphase flows using ISPH method"", 《COMPUTER METHODS IN APPLIED MECHANICS AND ENGINEERING》 *
X.Y. HU ETC.: ""An incompressible multi-phase SPH method"", 《JOURNAL OF COMPUTATIONAL PHYSICS》 *
周小平等: ""单轴压缩条件下岩石破坏的光滑粒子流体动力学数值模拟"", 《岩石力学与工程学报》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112560326A (en) * 2019-09-26 2021-03-26 腾讯科技(深圳)有限公司 Method and device for determining pressure field
CN115906596A (en) * 2022-11-18 2023-04-04 上海索辰信息科技股份有限公司 Wall surface oil film calculation method
CN115906596B (en) * 2022-11-18 2024-03-22 上海索辰信息科技股份有限公司 Wall oil film calculation method

Also Published As

Publication number Publication date
CN109726496B (en) 2020-12-11

Similar Documents

Publication Publication Date Title
Boyd et al. MultiFLIP for energetic two-phase fluid simulation
Thürey et al. A multiscale approach to mesh-based surface tension flows
Wojtan et al. Physics-inspired topology changes for thin fluid features
Yu et al. Reconstructing surfaces of particle-based fluids using anisotropic kernels
Yu et al. Explicit mesh surfaces for particle based fluids
Ando et al. A particle-based method for preserving fluid sheets
Diziol et al. Robust real-time deformation of incompressible surface meshes
Kim et al. Practical animation of turbulent splashing water
Zhang et al. Cloth simulation using multilevel meshes
CN104268943A (en) Fluid simulation method based on Eulerian-Lagrangian coupling method
US9984489B2 (en) Fluid dynamics framework for animated special effects
Oh et al. Hierarchical cloth simulation using deep neural networks
Thürey et al. Interactive free surface fluids with the lattice Boltzmann method
Ishida et al. A model for soap film dynamics with evolving thickness
CN109726496A (en) A kind of implementation method improving incompressible water model efficiency based on IISPH
CN107273617B (en) A kind of real time simulation method and system obtaining surface stream fluid motion using shallow water equation
Yang et al. Versatile interactions at interfaces for SPH-based simulations.
Liu et al. Turbulent details simulation for SPH fluids via vorticity refinement
Fan et al. Adapted unstructured LBM for flow simulation on curved surfaces
Gao et al. Accelerating liquid simulation with an improved data‐driven method
Shi et al. A mixed-depth visual rendering method for bleeding simulation
Wu et al. Improved divergence‐free smoothed particle hydrodynamics via priority of divergence‐free solver and SOR
Akinci Interface handling in smoothed particle hydrodynamics
Tao et al. A Lagrangian vortex method for smoke simulation with two-way fluid–solid coupling
Shao Fluids, threads and fibers: towards high performance physics-based modeling and simulation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant