[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN104200015B - A kind of fluid simulation method and device - Google Patents

A kind of fluid simulation method and device Download PDF

Info

Publication number
CN104200015B
CN104200015B CN201410412599.XA CN201410412599A CN104200015B CN 104200015 B CN104200015 B CN 104200015B CN 201410412599 A CN201410412599 A CN 201410412599A CN 104200015 B CN104200015 B CN 104200015B
Authority
CN
China
Prior art keywords
sph
component
particles
fluid
formula
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.)
Active
Application number
CN201410412599.XA
Other languages
Chinese (zh)
Other versions
CN104200015A (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.)
Tsinghua University
Original Assignee
Tsinghua 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 Tsinghua University filed Critical Tsinghua University
Priority to CN201410412599.XA priority Critical patent/CN104200015B/en
Publication of CN104200015A publication Critical patent/CN104200015A/en
Application granted granted Critical
Publication of CN104200015B publication Critical patent/CN104200015B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Abstract

The invention provides a kind of fluid simulation method and device, the method includes:S1:Build mixed flow model;S2:Build smooth particle hydrodynamics SPH particles;S3:The relevant information of the fluid required for mixed flow model is processed by SPH methods in the mixed flow model;S4:Information required for the result output fluid simulation of the treatment in mixed flow model.A kind of fluid simulation method and device provided by the present invention, is capable of the motion process of extensively and accurate simulation multicomponent fluid.

Description

A kind of fluid simulation method and device
Technical field
The present invention relates to computer graphics fluid simulation and Rendering field, more particularly to a kind of fluid simulation method And device.
Background technology
Field is rendered in computer picture, the simulation of multicomponent fluid increasingly attracts attention, it is many compared to single component fluids Component flow can show more abundant motion change, obtain more preferably visual effect.In multicomponent fluid motion, compare Mutual immiscible fluid motion phenomenon, blendable fluid can more neatly represent various graduated colors feature, Such as suspension or solvent soln, this with rich in surface, have interface can not fluid-mixing have in visual effect significantly It is different.But, can fluid-mixing simulation than can not fluid-mixing simulation it is more complicated on physical model.
In the prior art, based on the treatment of Brownian movement diffusion phenomena can the analogy method of fluid-mixing can obtain certain Mixed effect, but during it substantially thinks multigroup componental movement, each component at arbitrary time point is transported with same speed It is dynamic, therefore cannot completely simulate real physical state.
The content of the invention
The invention provides a kind of fluid simulation method and device, being capable of the fortune of accurate simulation multicomponent fluid extensively Dynamic process.
On the one hand, the invention provides a kind of fluid simulation method, including:
S1:Build mixed flow model;
S2:Build smooth particle hydrodynamics SPH particles;
S3:The relevant information of the fluid required for mixed flow model is entered by SPH methods in the mixed flow model Row treatment;
S4:Information required for the result output fluid simulation of the treatment in mixed flow model.
Further, the S2, including:
S21:SPH particles are built, component parameter is stored in corresponding SPH particles, initialize the component parameter;
The component parameter includes:The percent by volume of each component of fluid, the density of each component, the viscous system of each component Number, the position of SPH particles, the speed of SPH particles, the quality of SPH particles, the averag density of fluid, the average viscous system of fluid Number.
Further, the S3, including:
S31:According to the component parameter stored in the SPH particles, using the mixed flow model, by SPH side Method calculates relative velocity of each component relative to the average speed at SPH particle positions;
S32:According to the component parameter and the relative velocity of each component that are stored in the SPH particles, using mixed Merging model, the percent by volume variable quantity of fluid each component is calculated by SPH methods;
S33:According to the component parameter, the percent by volume variable quantity of each component that are stored in the SPH particles With the relative velocity of each component, using mixed flow model, the body of each component that future time is walked is calculated by SPH methods The average coefficient of viscosity of fluid and adding for fluid that product percentage, the averag density of the fluid of future time step, future time are walked Speed;
S34:According to the component parameter stored in SPH particles, the percent by volume variable quantity of each component, described The relative velocity of each component and the acceleration, using mixed flow model, the SPH that future time is walked are calculated by SPH methods The position of particle and speed;
S35:The fluid that the percent by volume of each component that is walked according to the future time, the future time are walked it is average Density, the average coefficient of viscosity of the fluid of future time step, the position of the SPH particles of future time step and speed are more Percent by volume, the averag density of fluid, the average coefficient of viscosity of fluid, the SPH of each component stored in the new SPH particles The position of particle, the speed of SPH particles, return to S31, and perform S4.
Further, the S1, including:
The equation of motion of mass equation and fluid according to fluid builds mixed flow model,
The mass equation is:
The equation of motion is:
Wherein, the k is the numbering of component, the umIt is the average speed of each component, the umkIt is the speed relatively of component k Degree, the αkIt is the percent by volume of component k, pmIt is the overall pressure of fluid, ρmIt is the averag density of fluid, TmIt is viscosity Amount, TDmIt is relative motion tensor, g is acceleration of gravity;
The S3, including:
Pressure formula, formula one, formula two, formula at interpolation density formula, SPH particle positions according to SPH particles 3rd, formula four, formula five are processed the relevant information of the fluid required for mixed flow model by SPH methods;
The interpolation density formula of the SPH particles is:
Or
Pressure formula at the SPH particle positions is:
Or
The formula one is:
The formula two is:
The formula three is:
The formula four is:
The formula five is:
Wherein, i, j are the numbering of SPH particles,It is the interpolation at SPH particle i positions obtained using SPH methods Density,It is the interpolation density at SPH particle j positions obtained using SPH methods, miIt is the quality of SPH particles i, mjFor The quality of SPH particles j, WijIt is SPH kernel functions, ▽ WijIt is value of the SPH kernel functions gradient at i, j particles, pmiIt is SPH Pressure at sub- i positions, pmjIt is the pressure at SPH particle j positions, ρmiIt is the averag density at SPH particles i, κ sets for outside Fixed intensive parameter, γ is the constant in normalized form, αkIt is the percent by volume of component k, αkiIt is the component k in SPH particles i Percent by volume, αkjIt is the percent by volume of the component k in SPH particles j, umjIt is the average speed at SPH particle j positions, umiIt is the average speed at SPH particle i positions, umkIt is the relative velocity of component k, umkjIt is component k at SPH particle j positions Relative velocity, umkiIt is the relative velocity of component k at SPH particle i positions, pmIt is the overall pressure of fluid, TmIt is viscosity tensor, TDm is relative motion tensor, ρkIt is the density of component k, μiIt is the average coefficient of viscosity of SPH particles i, μjIt is putting down for SPH particles j The equal coefficient of viscosity, rjIt is the position vector of SPH particles j, riIt is the position vector of SPH particles i.
Further, the S33 also includes:
S331:The percent by volume of each component to calculating is modified makes the percent by volume in interval In [0,1], and the percent by volume sum of each component is set to be 1;
S332:Pressure is compared according to formula six and revised volume basis to be modified, the formula six is:
Wherein, the Δ pmiIt is the correction of the pressure at SPH particle i positions, Δ αkiIt is the k components of SPH particles i The correction of percent by volume.
On the other hand, the invention provides a kind of fluid simulation device, described device includes:
First builds module, for building mixed flow model;
Second builds module, for building smooth particle hydrodynamics SPH particles;
Mixed flow model processing module, for passing through SPH methods in the mixed flow model to needed for mixed flow model The relevant information of the fluid wanted is processed;
Output module, for required for the result output fluid simulation of the treatment according to the mixed flow model processing module Information.
Further, described second module is built, specifically for:
SPH particles are built, component parameter is stored in corresponding SPH particles, initialize the component parameter;
The component parameter includes:The percent by volume of each component of fluid, the density of each component, the viscous system of each component Number, the position of SPH particles, the speed of SPH particles, the quality of SPH particles, the averag density of fluid, the average viscous system of fluid Number.
Further, the mixed flow model processing module, including:
Relative velocity calculating sub module, for according to the component parameter stored in the SPH particles, using described mixed Merging model, relative velocity of each component relative to the average speed at SPH particle positions is calculated by SPH methods;
Percent by volume variable quantity calculating sub module, for according in the SPH particles store the component parameter and The relative velocity of each component, using mixed flow model, the percent by volume for calculating fluid each component by SPH methods becomes Change amount;
Parameter computation module, for according to the component parameter, the body of each component stored in the SPH particles The relative velocity of product percentage variable quantity and each component, using mixed flow model, future time is calculated by SPH methods The percent by volume of each component of step, the averag density of the fluid of future time step, the fluid of future time step it is average viscous The acceleration of coefficient and fluid;
The position calculating sub module of SPH particles, for according to the component parameter, each group stored in SPH particles Percent by volume variable quantity, the relative velocity of each component and the acceleration for dividing, using mixed flow model, by SPH Method calculates position and the speed of the SPH particles of future time step;
Update submodule, the percent by volume of each component for being walked according to the future time, future time step Fluid averag density, the average coefficient of viscosity of the fluid of future time step, the SPH particles of future time step Position and speed update the percent by volume of each component stored in the SPH particles, the averag density of fluid, fluid it is average The coefficient of viscosity, the position of SPH particles, the speed of SPH particles, notify relative velocity calculating sub module, and notify output module.
Further, described first module is built, specifically for mass equation and the equation of motion of fluid according to fluid Build mixed flow model,
The mass equation is:
The equation of motion is:
Wherein, the k is the numbering of component, the umIt is the average speed of each component, the umkIt is the speed relatively of component k Degree, the αkIt is the percent by volume of component k, pmIt is the overall pressure of fluid, ρmIt is the averag density of fluid, TmIt is viscosity Amount, TDmIt is relative motion tensor, g is acceleration of gravity;
The mixed flow model processing module, specifically for:
Pressure formula, formula one, formula two, formula at interpolation density formula, SPH particle positions according to SPH particles 3rd, formula four, formula five are processed the relevant information of the fluid required for mixed flow model by SPH methods;
The interpolation density formula of the SPH particles is:
Or
Pressure formula at the SPH particle positions is:
Or
The formula one is:
The formula two is:
The formula three is:
The formula four is:
The formula five is:
Wherein, i, j are the numbering of SPH particles,It is close using the interpolation at SPH particle i positions of SPH methods acquisition Degree,It is the interpolation density at SPH particle j positions obtained using SPH methods, miIt is the quality of SPH particles i, mjIt is SPH The quality of particle j, WijIt is SPH kernel functions, ▽ WijIt is value of the SPH kernel functions gradient at i, j particles, pmiIt is SPH particles i Pressure at position, pmjIt is the pressure at SPH particle j positions, ρmiIt is the averag density at SPH particles i, κ is external setting-up Intensive parameter, γ is the constant in normalized form, αkIt is the percent by volume of component k, αkiIt is the body of the component k in SPH particles i Product percentage, αkjIt is the percent by volume of the component k in SPH particles j, umjIt is the average speed at SPH particle j positions, umiFor Average speed at SPH particle i positions, umkIt is the relative velocity of component k, umkjIt is the speed relatively of component k at SPH particle j positions Degree, umkiIt is the relative velocity of component k at SPH particle i positions, pmIt is the overall pressure of fluid, TmIt is viscosity tensor, TDmIt is phase To kinematic tensor, ρkIt is the density of component k, μiIt is the average coefficient of viscosity of SPH particles i, μjIt is the average viscous system of SPH particles j Number, rjIt is the position vector of SPH particles j, riIt is the position vector of SPH particles i.
Further, the parameter current calculating sub module, including:
Percent by volume amendment submodule, the percent by volume for each component to calculating is modified and makes institute Percent by volume is stated in interval [0,1], and makes the percent by volume sum of each component be 1;
Pressure amendment submodule, is modified for comparing pressure according to formula six and revised volume basis, described Formula six is:
Wherein, the Δ pmiIt is the correction of the pressure at SPH particle i positions, Δ αkiIt is the k components of SPH particles i The correction of percent by volume.
A kind of fluid simulation method and device that the present invention is provided, develops according to real physics law, Ke Yiguang The general and motion process of accurate various multicomponent fluids of simulation, the method has good numerical stability, can be quite big Parameter variation range in keep stable operation.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing The accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are the present invention Some embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis These accompanying drawings obtain other accompanying drawings.
Fig. 1 is a kind of flow chart of fluid simulation method that one embodiment of the invention is provided;
Fig. 2 is a kind of structural representation of fluid simulation device that one embodiment of the invention is provided.
Specific embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is A part of embodiment of the present invention, rather than whole embodiments, based on the embodiment in the present invention, those of ordinary skill in the art The every other embodiment obtained on the premise of creative work is not made, belongs to the scope of protection of the invention.
A kind of fluid simulation method is the embodiment of the invention provides, referring to Fig. 1, the method includes:
S1:Build mixed flow model;
S2:Build smooth particle hydrodynamics SPH particles;
S3:The relevant information of the fluid required for mixed flow model is entered by SPH methods in the mixed flow model Row treatment;
S4:Information required for the result output fluid simulation of the treatment in mixed flow model.
The present embodiment provide a kind of fluid simulation method, according to real physics law develop, can extensively and The motion process of the various multicomponent fluids of accurate simulation, the method has good numerical stability, can be in sizable ginseng Stable operation is kept in number excursion.Additionally, the method for the present embodiment can be considered the extension to existing one-component fluid simulation, Excessive overhead will not be brought.
Information required for the fluid simulation exported in step S4 can be according to being exported the need for user.Can in one kind In the implementation method of energy, the information required for the fluid simulation includes:At the position of SPH particles and speed, SPH particle positions The percent by volume of each component.
SPH particles during the relevant information of the fluid required for the mixed flow model can be stored partly in step s3 In, it is also possible to it is stored entirely in SPH particles.When SPH particles are built, it is necessary to some relevant informations of fluid are stored in institute In the SPH particles of structure, in order to process these information by SPH methods.The S2, including:
S21:SPH particles are built, component parameter is stored in corresponding SPH particles, initialize the component parameter, its In, the component parameter includes:The percent by volume of each component of fluid, the density of each component, the coefficient of viscosity of each component, The position of SPH particles, the speed of SPH particles, the quality of SPH particles, the averag density of fluid, the average coefficient of viscosity of fluid. Wherein, the initial value of the speed of SPH particles can be set to 0.
Wherein, when the component parameter is initialized, can be preset to realize by outside, these are set in advance Numerical value can be empirical value.In first time step, mixed flow model is used as input ginseng by these numerical value set in advance Number, relevant treatment is carried out by SPH methods.
After SPH particles are constructed, computing is carried out by SPH methods in mixed flow model.Specifically, the S3, Including:
S31:According to the component parameter stored in the SPH particles, using the mixed flow model, by SPH side Method calculates relative velocity of each component relative to the average speed at SPH particle positions;
S32:According to the component parameter and the relative velocity of each component that are stored in the SPH particles, using mixed Merging model, the percent by volume variable quantity of fluid each component is calculated by SPH methods;
S33:According to the component parameter, the percent by volume variable quantity of each component that are stored in the SPH particles With the relative velocity of each component, using mixed flow model, the body of each component that future time is walked is calculated by SPH methods The average coefficient of viscosity of fluid and adding for fluid that product percentage, the averag density of the fluid of future time step, future time are walked Speed;
Wherein, due to each component of fluid be constantly motion, each component during motion, change over time Change, the relevant information of each component will change, in order that the result of simulation is more accurate, will be again in each time step The new relevant information for determining each component, the percent by volume of above-mentioned each component, the averag density of fluid, fluid it is average viscous Coefficient, each time step will be redefined.
S34:According to the component parameter stored in SPH particles, the percent by volume variable quantity of each component, described The relative velocity of each component and the acceleration, using mixed flow model, the SPH that future time is walked are calculated by SPH methods The position of particle and speed;
S35:The fluid that the percent by volume of each component that is walked according to the future time, the future time are walked it is average Density, the average coefficient of viscosity of the fluid of future time step, the position of the SPH particles of future time step and speed are more Percent by volume, the averag density of fluid, the average coefficient of viscosity of fluid, the SPH of each component stored in the new SPH particles The position of particle, the speed of SPH particles, return to S31, and perform S4.
Wherein, after the relevant information for determining newest each component, relevant information is updated in SPH particles, is kept Relevant information in SPH particles it is accurate, make simulation effect truer.After the information in have updated SPH particles, return to S31, carries out the computing of next time step, and exports the information in this time step required for fluid simulation, for subsequently locating Information output simulation effect in reason according to required for above-mentioned fluid simulation.
In a kind of possible implementation method, when mixed flow model is built, using mass equation, motion side after simplification Journey, and multicomponent fluid is expressed using volume constituents mode.The S1 includes:
The equation of motion of mass equation and fluid according to fluid builds mixed flow model,
The mass equation is:
The equation of motion is:
Wherein, the k is the numbering of component, the umIt is the average speed of each component, the umkIt is the speed relatively of component k Degree, the αkIt is the percent by volume of component k, pmIt is the overall pressure of fluid, ρmIt is the averag density of fluid, TmIt is viscosity Amount, TDmIt is relative motion tensor, g is acceleration of gravity.
Wherein, compared to the equation of motion of single component fluids, the above-mentioned equation of motion is moreOne, if can solve in advance Analysis ground determines relative velocity, then the fluid each component of each time step can be easily computed in SPH particle simulation methods Percent by volume situation of change and fluid motion conditions, reach the purpose simulated completely to multicomponent fluid.And adopt It is that this relative velocity can be solved analytically with the benefit of mixed flow model, its formula is:
Wherein, k, k' are the numbering of component, umkIt is the relative velocity of component k, τ, σ are parameter set in advance, and a is acceleration Degree, ck'It is the mass percent of component k', pkIt is the overall pressure of component k, pk'It is the overall pressure of component k', ρkIt is component k Density, αkIt is the percent by volume of component k, αk'It is the percent by volume of component k'.Obtain each component relative velocity it Afterwards, the present invention solves the percent by volume variable quantity of each component using above-mentioned mass equation formula.
After constructing mixed flow model, it is necessary to the equation group in mixed flow model is converted into SPH forms.The S3, Including:
Pressure formula, formula one, formula two, formula at interpolation density formula, SPH particle positions according to SPH particles 3rd, formula four, formula five are processed the relevant information of the fluid required for mixed flow model by SPH methods;
The interpolation density formula of the SPH particles is:
Or
Wherein, formulaThe component big compared with the density variation for being applied to two or more is mutual The simulation of effect.
Pressure formula at the SPH particle positions is:
Or
Wherein, in most cases from formulaSimulating effect because of it has preferably not Compressibility.FormulaThe degree of compression for simulating effect is relatively higher.
The formula one is:
The formula two is:
Wherein, the SPH forms of the mass equation are built according to formula one, formula two;
The formula three is:
The formula four is:
The formula five is:
Wherein, the SPH forms of the equation of motion are built according to formula three, formula four, formula five;
Wherein, i, j are the numbering of SPH particles,It is close using the interpolation at SPH particle i positions of SPH methods acquisition Degree,It is the interpolation density at SPH particle j positions obtained using SPH methods, miIt is the quality of SPH particles i, mjIt is SPH The quality of particle j, WijIt is SPH kernel functions, ▽ WijIt is value of the SPH kernel functions gradient at i, j particles, pmiIt is SPH particles i Pressure at position, pmjIt is the pressure at SPH particle j positions, ρmiIt is the averag density at SPH particles i, κ is external setting-up Intensive parameter, γ is the constant in normalized form, αkIt is the percent by volume of component k, αkiIt is the body of the component k in SPH particles i Product percentage, αkjIt is the percent by volume of the component k in SPH particles j, umjIt is the average speed at SPH particle j positions, umiFor Average speed at SPH particle i positions, umkIt is the relative velocity of component k, umkjIt is the speed relatively of component k at SPH particle j positions Degree, umkiIt is the relative velocity of component k at SPH particle i positions, pmIt is the overall pressure of fluid, TmIt is viscosity tensor, TDmIt is phase To kinematic tensor, ρkIt is the density of component k, μiIt is the average coefficient of viscosity of SPH particles i, μjIt is the average viscous system of SPH particles j Number, rjIt is the position vector of SPH particles j, riIt is the position vector of SPH particles i.
Due to during calculating, it is possible that result of calculation does not meet the situation of actual physical, it is therefore desirable to right Result of calculation is modified.For example:Percent by volume, mass percent to each component are modified, make percent by volume and Mass percent makes the percent by volume sum of each component be 1 in interval [0,1], make each component mass percent it Be 1.
Specifically, the S33 also includes:
S331:The percent by volume of each component to calculating is modified makes the percent by volume in interval In [0,1], and the percent by volume sum of each component is set to be 1.
Specifically, to the part beyond interval [0,1], first by the percent value zero setting of negative, then to each SPH All of component percentages carry out consistent scaling in son, its percentage for meeting each component is added up to 1 condition, it is ensured that most Result has physical significance afterwards.
After being modified to percent by volume, the volume basis according to amendment compare pressure and are modified.Specifically, institute Stating S33 also includes:
S332:Pressure is compared according to formula six and revised volume basis to be modified, the formula six is:
Wherein, the Δ pmiIt is the correction of the pressure at SPH particle i positions, Δ αkiIt is the k components of SPH particles i The correction of percent by volume.
In addition, it may happen that chemical reaction, the change between each component occurred for possibility between each component of fluid Reaction is learned, the present embodiment can be specified in the optional chemical reaction handling step of offer one of each time step according to outside The reaction equation chemical reaction that carries out between each component.In the process, each SPH inside particles participates in the reaction of reaction The Mass lost amount of thing component is equal to the quality incrementss of product, and its ratio meets given reaction equation.In reaction The mass change of process is calculated after terminating, and the volume of each component of SPH particles carrying is recalculated and updated to each SPH particle Percentage.Specifically, in step s 35, percent by volume according to the fluid each component, the density of each component, each component The coefficient of viscosity, the percent by volume variable quantity of each component, the relative velocity of each component, the acceleration and described The quality of SPH particles, using mixed flow model, position and the speed of SPH particles is calculated by SPH methods, is referred to according to outside Fixed reaction equation carries out the chemical reaction between each component, update percent by volume in the SPH particles, fluid it is flat Equal density, the average coefficient of viscosity of fluid, the position of SPH particles and speed, return to S31, and perform S4.
The embodiment of the present invention additionally provides a kind of fluid simulation device, and referring to Fig. 2, described device includes:
First builds module 201, for building mixed flow model;
Second builds module 202, for building smooth particle hydrodynamics SPH particles;
Mixed flow model processing module 203, for passing through SPH methods in the mixed flow model to mixed flow model institute The relevant information of the fluid of needs is processed;
Output module 204, for the result output fluid simulation institute of the treatment according to the mixed flow model processing module The information of needs.
Wherein, in a kind of possible implementation, the information required for the fluid simulation includes:The position of SPH particles Put the percent by volume with each component at speed, SPH particle positions.
In a kind of possible implementation, described second builds module 202, specifically for:
SPH particles are built, component parameter is stored in corresponding SPH particles, initialize the component parameter;Wherein, The component parameter includes:The percent by volume of each component of fluid, the density of each component, the coefficient of viscosity of each component, SPH Position, the speed of SPH particles, the quality of SPH particles, the averag density of fluid, the average coefficient of viscosity of fluid of son.
The mixed flow model processing module 203, including be not shown:
Relative velocity calculating sub module 2031, for according to the component parameter stored in the SPH particles, using institute Mixed flow model is stated, relative velocity of each component relative to the average speed at SPH particle positions is calculated by SPH methods;
Percent by volume variable quantity calculating sub module 2032, for according to the component ginseng stored in the SPH particles The relative velocity of number and each component, using mixed flow model, the volume basis of fluid each component is calculated by SPH methods Compare variable quantity;
Parameter computation module 2033, for according to the component parameter, each component stored in the SPH particles Percent by volume variable quantity and each component relative velocity, using mixed flow model, calculated by SPH methods next The percent by volume of each component of time step, the averag density of the fluid of future time step, the fluid of future time step it is average The acceleration of the coefficient of viscosity and fluid;
The position calculating sub module 2035 of SPH particles, for according to the component parameter, described stored in SPH particles The percent by volume variable quantity of each component, the relative velocity of each component and the acceleration, using mixed flow model, pass through SPH methods calculate position and the speed of the SPH particles of future time step;
Update submodule 2036, the percent by volume of each component for being walked according to the future time, described lower a period of time The averag density of the fluid of spacer step, the future time step fluid the average coefficient of viscosity, the future time step SPH The position of son and speed update the percent by volume of each component stored in the SPH particles, the averag density of fluid, fluid The average coefficient of viscosity, the position of SPH particles, the speed of SPH particles, notify relative velocity calculating sub module, and notify to export mould Block.
Described first builds module 201, and the equation of motion structure specifically for the mass equation according to fluid and fluid is mixed Merging model,
The mass equation is:
The equation of motion is:
Wherein, the k is the numbering of component, the umIt is the average speed of each component, the umkIt is the speed relatively of component k Degree, the αkIt is the percent by volume of component k, pmIt is the overall pressure of fluid, ρmIt is the averag density of fluid, TmIt is viscosity Amount, TDmIt is relative motion tensor, g is acceleration of gravity.
The mixed flow model processing module 203, specifically for:
Pressure formula, formula one, formula two, formula at interpolation density formula, SPH particle positions according to SPH particles 3rd, formula four, formula five are processed the relevant information of the fluid required for mixed flow model by SPH methods;
The interpolation density formula of the SPH particles is:
Or
Pressure formula at the SPH particle positions is:
Or
The formula one is:
The formula two is:
The formula three is:
The formula four is:
The formula five is:
Wherein, i, j are the numbering of SPH particles,It is close using the interpolation at SPH particle i positions of SPH methods acquisition Degree,It is the interpolation density at SPH particle j positions obtained using SPH methods, miIt is the quality of SPH particles i, mjIt is SPH The quality of particle j, WijIt is SPH kernel functions, ▽ WijIt is value of the SPH kernel functions gradient at i, j particles, pmiIt is SPH particles i Pressure at position, pmjIt is the pressure at SPH particle j positions, ρmiIt is the averag density at SPH particles i, κ is external setting-up Intensive parameter, γ is the constant in normalized form, αkIt is the percent by volume of component k, αkiIt is the body of the component k in SPH particles i Product percentage, αkjIt is the percent by volume of the component k in SPH particles j, umjIt is the average speed at SPH particle j positions, umiFor Average speed at SPH particle i positions, umkIt is the relative velocity of component k, umkjIt is the speed relatively of component k at SPH particle j positions Degree, umkiIt is the relative velocity of component k at SPH particle i positions, pmIt is the overall pressure of fluid, TmIt is viscosity tensor, TDmIt is phase To kinematic tensor, ρkIt is the density of component k, μiIt is the average coefficient of viscosity of SPH particles i, μjIt is the average viscous system of SPH particles j Number, rjIt is the position vector of SPH particles j, riIt is the position vector of SPH particles i.
In a kind of possible implementation, the parameter current calculating sub module 2033, including the body not shown in figure Product percent correction submodule 20331, pressure amendment submodule 20332:Percent by volume amendment submodule 20331, for right The percent by volume of each component for calculating is modified makes the percent by volume in interval [0,1], and makes each group The percent by volume sum divided is 1.
Pressure amendment submodule 20332, is modified for comparing pressure according to formula six and revised volume basis, The formula six is:
Wherein, the Δ pmiIt is the correction of the pressure at SPH particle i positions, Δ αkiIt is the k components of SPH particles i The correction of percent by volume.
The contents such as information exchange, implementation procedure between each module, submodule in the said equipment, due to side of the present invention Method embodiment is based on same design, and particular content can be found in the narration in the inventive method embodiment, and here is omitted.
It should be noted that herein, such as first and second etc relational terms are used merely to an entity Or operation makes a distinction with another entity or operation, and not necessarily require or imply these entities or exist between operating Any this actual relation or order.And, term " including ", "comprising" or its any other variant be intended to it is non- It is exclusive to include, so that process, method, article or equipment including a series of key elements not only include those key elements, But also other key elements including being not expressly set out, or also include by this process, method, article or equipment are solid Some key elements.In the absence of more restrictions, the key element limited by sentence " including ", does not arrange Except also there is other identical factor in the process including the key element, method, article or equipment.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above method embodiment can pass through Programmed instruction related hardware is completed, and foregoing program can be stored in the storage medium of embodied on computer readable, the program Upon execution, the step of including above method embodiment is performed;And foregoing storage medium includes:ROM, RAM, magnetic disc or light Disk etc. is various can be with the medium of store program codes.
It is last it should be noted that:Presently preferred embodiments of the present invention is the foregoing is only, skill of the invention is merely to illustrate Art scheme, is not intended to limit the scope of the present invention.All any modifications made within the spirit and principles in the present invention, Equivalent, improvement etc., are all contained in protection scope of the present invention.

Claims (8)

1. a kind of fluid simulation method, it is characterised in that including:
S1:Build mixed flow model;
S2:Build smooth particle hydrodynamics SPH particles;
S3:At relevant information in the mixed flow model by SPH methods to the fluid required for mixed flow model Reason;
S4:Information required for the result output fluid simulation of the treatment in mixed flow model;
The S1, including:
The equation of motion of mass equation and fluid according to fluid builds mixed flow model,
The mass equation is:
∂ α k ∂ t + ( u m · ▿ ) α k = - α k ▿ · u m - ▿ · ( α k u m k ) ;
The equation of motion is:
∂ ∂ t u m + ( u m · ▿ ) u m = - ▿ p m ρ m + g + ▿ · T m ρ m + ▿ · T D m ρ m ;
Wherein, the k is the numbering of component, the umIt is the average speed of each component, the umkIt is the relative velocity of component k, The αkIt is the percent by volume of component k, pmIt is the overall pressure of fluid, ρmIt is the averag density of fluid, TmIt is viscosity tensor, TDmIt is relative motion tensor, g is acceleration of gravity;
The S3, including:
The pressure formula at interpolation density formula, SPH particle positions, formula one, formula two, formula three, public affairs according to SPH particles Formula four, formula five are processed the relevant information of the fluid required for mixed flow model by SPH methods;
The interpolation density formula of the SPH particles is:
Or
Pressure formula at the SPH particle positions is:
Or
The formula one is:
The formula two is:
The formula three is:
The formula four is:
The formula five is:
Wherein, i, j are the numbering of SPH particles,It is the interpolation density at SPH particle i positions obtained using SPH methods,It is the interpolation density at SPH particle j positions obtained using SPH methods, miIt is the quality of SPH particles i, mjIt is SPH The quality of sub- j, WijIt is SPH kernel functions, ▽ WijIt is value of the SPH kernel functions gradient at i, j particles, pmiFor i, SPH particles Put the pressure at place, pmjIt is the pressure at SPH particle j positions, ρmiIt is the averag density at SPH particles i, κ is strong for external setting-up Degree parameter, γ is the constant in normalized form, αkIt is the percent by volume of component k, αkiIt is the volume of the component k in SPH particles i Percentage, αkjIt is the percent by volume of the component k in SPH particles j, umjIt is the average speed at SPH particle j positions, umiFor Average speed at SPH particle i positions, umkIt is the relative velocity of component k, umkjIt is the speed relatively of component k at SPH particle j positions Degree, umkiIt is the relative velocity of component k at SPH particle i positions, pmIt is the overall pressure of fluid, TmIt is viscosity tensor, TDmIt is phase To kinematic tensor, ρkIt is the density of component k, μiIt is the average coefficient of viscosity of SPH particles i, μjIt is the average viscous system of SPH particles j Number, rjIt is the position vector of SPH particles j, riIt is the position vector of SPH particles i.
2. method according to claim 1, it is characterised in that the S2, including:
S21:SPH particles are built, component parameter is stored in corresponding SPH particles, initialize the component parameter;
The component parameter includes:The percent by volume of each component of fluid, the density of each component, the coefficient of viscosity of each component, The position of SPH particles, the speed of SPH particles, the quality of SPH particles, the averag density of fluid, the average coefficient of viscosity of fluid.
3. method according to claim 2, it is characterised in that the S3, including:
S31:According to the component parameter stored in the SPH particles, using the mixed flow model, by SPH method meters Calculate relative velocity of each component relative to the average speed at SPH particle positions;
S32:According to the component parameter and the relative velocity of each component that are stored in the SPH particles, using mixed flow Model, the percent by volume variable quantity of fluid each component is calculated by SPH methods;
S33:According to the component parameter, the percent by volume variable quantity of each component that are stored in the SPH particles and institute The relative velocity of each component is stated, using mixed flow model, the volume hundred of each component that future time is walked is calculated by SPH methods Point ratio, future time step fluid averag density, future time step fluid the average coefficient of viscosity and the acceleration of fluid;
S34:According to the component parameter, the percent by volume variable quantity of each component, each group that are stored in SPH particles The relative velocity and the acceleration for dividing, using mixed flow model, the SPH particles that future time is walked are calculated by SPH methods Position and speed;
S35:The fluid that the percent by volume of each component that is walked according to the future time, the future time are walked it is average close Degree, the average coefficient of viscosity of the fluid of future time step, the position of the SPH particles of future time step and speed update The percent by volume of each component that is stored in the SPH particles, the averag density of fluid, the average coefficient of viscosity of fluid, SPH Position, the speed of SPH particles of son, return to S31, and perform S4.
4. according to any described method in claim 1-3, it is characterised in that the S33 also includes:
S331:The percent by volume of each component to calculating is modified makes the percent by volume in interval [0,1] It is interior, and make each component percent by volume sum be 1;
S332:Pressure is compared according to formula six and revised volume basis to be modified, the formula six is:
Wherein, the Δ pmiIt is the correction of the pressure at SPH particle i positions, Δ αkiIt is the volume hundred of the k components of SPH particles i Divide the correction of ratio.
5. a kind of fluid simulation device, it is characterised in that described device includes:
First builds module, for building mixed flow model;
Second builds module, for building smooth particle hydrodynamics SPH particles;
Mixed flow model processing module, for passing through SPH methods in the mixed flow model to required for mixed flow model The relevant information of fluid is processed;
Output module, for the letter required for the result output fluid simulation of the treatment according to the mixed flow model processing module Breath;
Described first builds module, and the equation of motion specifically for the mass equation according to fluid and fluid builds mixed flow mould Type,
The mass equation is:
∂ α k ∂ t + ( u m · ▿ ) α k = - α k ▿ · u m - ▿ · ( α k u m k ) ;
The equation of motion is:
∂ ∂ t u m + ( u m · ▿ ) u m = - ▿ p m ρ m + g + ▿ · T m ρ m + ▿ · T D m ρ m ;
Wherein, the k is the numbering of component, the umIt is the average speed of each component, the umkIt is the relative velocity of component k, The αkIt is the percent by volume of component k, pmIt is the overall pressure of fluid, ρmIt is the averag density of fluid, TmIt is viscosity tensor, TDmIt is relative motion tensor, g is acceleration of gravity;
The mixed flow model processing module, specifically for:
The pressure formula at interpolation density formula, SPH particle positions, formula one, formula two, formula three, public affairs according to SPH particles Formula four, formula five are processed the relevant information of the fluid required for mixed flow model by SPH methods;
The interpolation density formula of the SPH particles is:
Or
Pressure formula at the SPH particle positions is:
Or
The formula one is:
The formula two is:
The formula three is:
The formula four is:
The formula five is:
Wherein, i, j are the numbering of SPH particles,It is the interpolation density at SPH particle i positions obtained using SPH methods,It is the interpolation density at SPH particle j positions obtained using SPH methods, miIt is the quality of SPH particles i, mjIt is SPH The quality of sub- j, WijIt is SPH kernel functions, ▽ WijIt is value of the SPH kernel functions gradient at i, j particles, pmiFor i, SPH particles Put the pressure at place, pmjIt is the pressure at SPH particle j positions, ρmiIt is the averag density at SPH particles i, κ is strong for external setting-up Degree parameter, γ is the constant in normalized form, αkIt is the percent by volume of component k, αkiIt is the volume of the component k in SPH particles i Percentage, αkjIt is the percent by volume of the component k in SPH particles j, umjIt is the average speed at SPH particle j positions, umiFor Average speed at SPH particle i positions, umkIt is the relative velocity of component k, umkjIt is the speed relatively of component k at SPH particle j positions Degree, umkiIt is the relative velocity of component k at SPH particle i positions, pmIt is the overall pressure of fluid, TmIt is viscosity tensor, TDmIt is phase To kinematic tensor, ρkIt is the density of component k, μiIt is the average coefficient of viscosity of SPH particles i, μjIt is the average viscous system of SPH particles j Number, rjIt is the position vector of SPH particles j, riIt is the position vector of SPH particles i.
6. device according to claim 5, it is characterised in that described second builds module, specifically for:
SPH particles are built, component parameter is stored in corresponding SPH particles, initialize the component parameter;
The component parameter includes:The percent by volume of each component of fluid, the density of each component, the coefficient of viscosity of each component, The position of SPH particles, the speed of SPH particles, the quality of SPH particles, the averag density of fluid, the average coefficient of viscosity of fluid.
7. device according to claim 6, it is characterised in that the mixed flow model processing module, including:
Relative velocity calculating sub module, for according to the component parameter stored in the SPH particles, using the mixed flow Model, relative velocity of each component relative to the average speed at SPH particle positions is calculated by SPH methods;
Percent by volume variable quantity calculating sub module, for according to the component parameter and described stored in the SPH particles The relative velocity of each component, using mixed flow model, the percent by volume for calculating fluid each component by SPH methods changes Amount;
Parameter computation module, for according to the component parameter, the volume hundred of each component stored in the SPH particles Divide than variable quantity and the relative velocity of each component, using mixed flow model, calculate what future time was walked by SPH methods The percent by volume of each component, the averag density of the fluid of future time step, the average coefficient of viscosity of the fluid of future time step With the acceleration of fluid;
The position calculating sub module of SPH particles, for according to the component parameter, each component stored in SPH particles Percent by volume variable quantity, the relative velocity of each component and the acceleration, using mixed flow model, by SPH methods Calculate position and the speed of the SPH particles of future time step;
Update submodule, the percent by volume of each component for being walked according to the future time, the stream of future time step The averag density of body, the average coefficient of viscosity of the fluid of future time step, the position of the SPH particles of future time step With speed update the percent by volume of each component stored in the SPH particles, the averag density of fluid, fluid it is average viscous Coefficient, the position of SPH particles, the speed of SPH particles, notify relative velocity calculating sub module, and notify output module.
8. device according to claim 7, it is characterised in that
The parameter computation module, including:
Percent by volume amendment submodule, the percent by volume for each component to calculating is modified and makes the body Product percentage makes the percent by volume sum of each component be 1 in interval [0,1];
Pressure amendment submodule, is modified, the formula for comparing pressure according to formula six and revised volume basis Six are:
Wherein, the Δ pmiIt is the correction of the pressure at SPH particle i positions, Δ αkiIt is the volume hundred of the k components of SPH particles i Divide the correction of ratio.
CN201410412599.XA 2014-08-20 2014-08-20 A kind of fluid simulation method and device Active CN104200015B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410412599.XA CN104200015B (en) 2014-08-20 2014-08-20 A kind of fluid simulation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410412599.XA CN104200015B (en) 2014-08-20 2014-08-20 A kind of fluid simulation method and device

Publications (2)

Publication Number Publication Date
CN104200015A CN104200015A (en) 2014-12-10
CN104200015B true CN104200015B (en) 2017-06-16

Family

ID=52085308

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410412599.XA Active CN104200015B (en) 2014-08-20 2014-08-20 A kind of fluid simulation method and device

Country Status (1)

Country Link
CN (1) CN104200015B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109063375A (en) * 2018-09-07 2018-12-21 中山大学 The analogy method and system of incompressible fluid based on secrecy and without divergence

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104715499B (en) * 2015-03-25 2018-02-23 华东师范大学 A kind of anisotropic material non-plastic fracture analogy method of level geometry subdivision
JP2017068817A (en) * 2015-10-01 2017-04-06 三星電子株式会社Samsung Electronics Co.,Ltd. Method and apparatus for modeling object
CN105956262B (en) * 2016-04-28 2019-08-09 清华大学 Multicomponent solid and fluid simulation method and system based on SPH method
CN107665264B (en) * 2016-07-27 2020-08-25 宝钢新日铁汽车板有限公司 Monitoring method for dynamic accumulation of zinc pot bottom slag
CN107273617B (en) * 2017-06-20 2019-07-26 南开大学 A kind of real time simulation method and system obtaining surface stream fluid motion using shallow water equation
CN107563030A (en) * 2017-08-22 2018-01-09 哈尔滨工程大学 A kind of mesh free analogy method for being directed to two kinds of fluid heat transferrings and handing over mixed broken phase transition process
CN109102893A (en) * 2018-07-04 2018-12-28 中山大学 A kind of modified thrombus analogy method of multiparticle mixing based on Cross model
CN109344450B (en) * 2018-09-07 2019-07-23 中山大学 Fluid sets analogy method and system based on PBF
CN109142169B (en) * 2018-10-09 2020-12-29 中国地质大学(北京) Oscillation determination method and system for simulating vertical grain sequence of glutenite
CN109726431B (en) * 2018-11-23 2022-11-01 广东工业大学 Self-adaptive SPH fluid simulation method based on average kernel function and iterative density change rate
CN109858605B (en) * 2019-01-22 2021-01-05 交通运输部天津水运工程科学研究所 Method for calculating fluid outflow by using SPH (shortest Path first) based on GPU (graphics processing Unit) calculation technology
CN111915510B (en) * 2020-07-03 2022-04-19 天津大学 Image interpolation method based on scatter distribution
CN113158531B (en) * 2021-02-07 2022-06-21 南开大学 Single-component and multi-component incompressible fluid simulation method utilizing deformation gradient

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101540060A (en) * 2009-04-09 2009-09-23 清华大学 Air flow simulating method based on physical simulation and system thereof
CN102509332A (en) * 2011-10-19 2012-06-20 清华大学 Fluid simulation rendering method and device
CN102768698A (en) * 2011-05-05 2012-11-07 西门子公司 Simplified smoothed particle hydrodynamics
CN103236073A (en) * 2013-04-24 2013-08-07 清华大学 Fluid control simulation method and device based on flow field decomposition and modulation

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101540060A (en) * 2009-04-09 2009-09-23 清华大学 Air flow simulating method based on physical simulation and system thereof
CN102768698A (en) * 2011-05-05 2012-11-07 西门子公司 Simplified smoothed particle hydrodynamics
CN102509332A (en) * 2011-10-19 2012-06-20 清华大学 Fluid simulation rendering method and device
CN103236073A (en) * 2013-04-24 2013-08-07 清华大学 Fluid control simulation method and device based on flow field decomposition and modulation

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Realistic simulation of mixing fluids;Shiguang Liu等;《The Visual Computer》;20111231;第27卷(第3期);正文第1、3-5节,表1-2,图1-5 *
基于SPH的三维流体模拟;谭小辉等;《计算机应用与软件》;20091231;第26卷(第12期);第222-224页 *
基于物理的浑浊水体的光照模拟;刘世光等;《计算机辅助设计与图形学学报》;20110131;第23卷(第1期);第40-45页 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109063375A (en) * 2018-09-07 2018-12-21 中山大学 The analogy method and system of incompressible fluid based on secrecy and without divergence
CN109063375B (en) * 2018-09-07 2019-05-31 中山大学 The analogy method and system of incompressible fluid based on secrecy and without divergence

Also Published As

Publication number Publication date
CN104200015A (en) 2014-12-10

Similar Documents

Publication Publication Date Title
CN104200015B (en) A kind of fluid simulation method and device
Wen et al. Galilean invariant fluid–solid interfacial dynamics in lattice Boltzmann simulations
Xi et al. Lattice Boltzmann simulations of three-dimensional single droplet deformation and breakup under simple shear flow
Rycroft Multiscale modeling in granular flow
Bondarev et al. Parametric optimizing analysis of unsteady structures and visualization of multidimensional data
Thömmes et al. A lattice Boltzmann method for immiscible multiphase flow simulations using the level set method
CN105956262A (en) Multi-component solid and fluid simulation method and system based on SPH (Smoothed Particle Hydrodynamics) method
Kessler et al. Elastic capsules in shear flow: Analytical solutions for constant and time-dependent shear rates
Perrin An overview on congestion phenomena in fluid equations
Zotos et al. Orbit classification and networks of periodic orbits in the planar circular restricted five-body problem
Šukys Robust multi-level Monte Carlo Finite Volume methods for systems of hyperbolic conservation laws with random input data
Kostic et al. The development of assembly constraints within a virtual laboratory for collaborative learning in industrial design
Bogner Direct numerical simulation of liquid-gas-solid flows based on the lattice Boltzmann method
Byrd Parallels between engineering graphics and data visualization: a first step toward visualization capacity building in engineering graphics design
Kudela et al. Viscous flow modeling using the vortex particles method
Huang et al. Phase-field-based simulation of axisymmetric binary fluids by using vorticity-streamfunction formulation
Wang et al. Bifurcations and single peak solitary wave solutions of an integrable nonlinear wave equation
CN110232222A (en) Deposited tube flow field analysis method and system
Garcia et al. Adaptive mesh refinement in the dam-break problems
Yang The role of elasticity in particle-fluid interactions and its effect on suspension rheology
Sun FINITE ELEMENT METHODS AND MACHINE LEARNING FOR SOME MULTI-PHASE PROBLEMS
Kellnberger et al. Novel lattice Boltzmann method for simulation of strongly shear thinning viscoelastic fluids
Gokaltun et al. Three Dimensional Simulations of Multiphase Flows Using a Lattice Boltzmann Method Suitable for High Density Ratios–12126
Rossainz-López et al. Parallel Simulation of Digital Logic Circuits Using Message Passing via CSP as an Educational Tool
Prugger Stability, Bifurcations and Explicit Solutions in Geophysical Fluid Models with Simplified Backscatter

Legal Events

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