CN109215100A - A kind of fluid-mixing phase transformation animation producing method and device - Google Patents
A kind of fluid-mixing phase transformation animation producing method and device Download PDFInfo
- Publication number
- CN109215100A CN109215100A CN201810897133.1A CN201810897133A CN109215100A CN 109215100 A CN109215100 A CN 109215100A CN 201810897133 A CN201810897133 A CN 201810897133A CN 109215100 A CN109215100 A CN 109215100A
- Authority
- CN
- China
- Prior art keywords
- fluid
- particle
- mixing
- volume fraction
- temperature
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 56
- 230000009466 transformation Effects 0.000 title claims abstract description 28
- 239000002245 particle Substances 0.000 claims abstract description 178
- 239000012530 fluid Substances 0.000 claims abstract description 163
- 238000004088 simulation Methods 0.000 claims abstract description 59
- 238000009792 diffusion process Methods 0.000 claims abstract description 52
- 239000007787 solid Substances 0.000 claims abstract description 49
- 230000008018 melting Effects 0.000 claims abstract description 29
- 238000002844 melting Methods 0.000 claims abstract description 29
- 230000007704 transition Effects 0.000 claims abstract description 24
- 238000009877 rendering Methods 0.000 claims abstract description 13
- 230000008859 change Effects 0.000 claims description 16
- 238000009499 grossing Methods 0.000 claims description 8
- 238000004422 calculation algorithm Methods 0.000 claims description 5
- 239000007788 liquid Substances 0.000 description 28
- 230000008569 process Effects 0.000 description 13
- 239000000203 mixture Substances 0.000 description 9
- 230000001133 acceleration Effects 0.000 description 7
- 238000004364 calculation method Methods 0.000 description 7
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 230000008023 solidification Effects 0.000 description 4
- 238000007711 solidification Methods 0.000 description 4
- 239000000243 solution Substances 0.000 description 4
- 239000000126 substance Substances 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 238000010257 thawing Methods 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 239000003086 colorant Substances 0.000 description 2
- 238000010276 construction Methods 0.000 description 2
- 230000008014 freezing Effects 0.000 description 2
- 238000007710 freezing Methods 0.000 description 2
- 230000005484 gravity Effects 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 238000013456 study Methods 0.000 description 2
- LFQSCWFLJHTTHZ-UHFFFAOYSA-N Ethanol Chemical compound CCO LFQSCWFLJHTTHZ-UHFFFAOYSA-N 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000000630 rising effect Effects 0.000 description 1
- 150000003839 salts Chemical class 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 239000006104 solid solution Substances 0.000 description 1
- 239000013589 supplement Substances 0.000 description 1
- 239000000725 suspension Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T13/00—Animation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
Abstract
The invention discloses a kind of fluid-mixing phase transformation animation producing method and devices, include: to be defined to mixed flow model and simulated to fluid-mixing fluid structurecoupling, calculates new position, volume fraction, mixing thermal-diffusion constant and the mixed melting point of particle;According to the new position of calculated particle, mixing thermal-diffusion constant, mixed melting point, temperature diffusion is carried out to calculate and particle state update, by the temperature difference between particle, particle temperature variation is calculated using thermic vibrating screen, Phase transition simulation is then carried out according to mixed melting point;Mixed flow is calculated by new position and consolidates surface, and new volume fraction calculates the volume fraction that mixed flow is consolidated on surface, and according to particle updated state area shunting body surface and the surface of solids;The Mesh of flow surface and the surface of solids is exported in the form of a file, the offline rendering for animation frame.Device includes: that fluid structurecoupling analog module, temperature diffusion and phase transformation module, mixed flow consolidate surface computing module and flow solid surface output module.
Description
Technical field
The present invention relates to the physical simulation in computer graphics, including based on physics fluid simulation, Phase transition simulation and
Fluid structurecoupling simulation field, SPH (Smoothed Particle Hydrodynamics) method being related in Lagrangian fluid modeling scheme, using being based on
The fluid-mixing analogy method of SPH and the combination of fluid phase change carry out the research of high-precision fluid-mixing Phase transition simulation.
Background technique
Fluid simulation field in computer graphics, the hybrid analog-digital simulation of multiple fluid more and more attention has been paid to.It is a variety of
Fluid hybrid analog-digital simulation be broadly divided into can miscible fluid and insoluble fluid simulation.Insoluble fluid simulation is concentrated mainly on difference
The separation of fluid level, different fluid is immiscible, and fluid level is high-visible.And in solvable fluid simulation, each fluid
Between without specific liquid level, fluid mutually mixes.In fluid simulation field, the SPH fluid simulation method based on Lagrange
With good fluid details expression effect, it is especially suitable for the fluid animation of the high details performance of simulation, is based on SPH recent years
The mixed flow model of method is suggested, and this method carries out fluid-mixing model using volume fraction (Volume Fraction)
Building.
Phase transition simulation method is equally a field by extensive concern, is mainly used for the thawing and solidification of simulation substance
Phenomena such as.Phase transformation, such as water solidification and ice cube thawing, be a very common physical phenomenon.In nature, every kind of object
All there is a fusing point in matter, when the temperature increases, substance can melt, and when temperature reduces, substance can solidify, and Phase transition simulation is root
Fusing and the simulation of solidification phenomenon are carried out according to the equation of heat conduction.In nature, the mixtures such as solution do not have definite melting point, such as wine
The fusing point of smart solution is similar between water and alcohol, and salt is added in water will lead to the freezing point reduction of water.
So the freezing point of solution can change after different fluid mixing, the present invention carries out related side according to this phenomenon
The improvement of journey proposes a kind of accurate fluid-mixing phase transformation animation producing method and device.
Summary of the invention
The present invention provides a kind of fluid-mixing phase transformation animation producing method and devices, and the present invention is by calculating different fluid
The parameters such as fusing point, thermal-diffusion constant after dissolving each other can accurately simulate the temperature of the fluid under different melting points and thermal-diffusion constant
Degree diffusion and phase transition process, described below:
A kind of fluid-mixing phase transformation animation producing method, which comprises
Mixed flow model is defined and fluid-mixing fluid structurecoupling is simulated, and then calculates the new of particle
Position, volume fraction, mixing thermal-diffusion constant and mixed melting point;
According to the new position of calculated particle, mixing thermal-diffusion constant, mixed melting point, temperature diffusion calculating and grain are carried out
The update of sub- state calculates the temperature change of particle using thermic vibrating screen by the temperature difference between particle, then according to mixed
It closes fusing point and carries out Phase transition simulation;
Mixed flow is calculated by new position and consolidates surface, and the body that mixed flow is consolidated on surface is calculated by new volume fraction
Fraction, and according to particle updated state area shunting body surface and the surface of solids;
The Mesh of flow surface and the surface of solids is exported in the form of a file, the offline rendering for animation frame.
The mixing thermal-diffusion constant specifically:
Wherein, subscript i represents the number of particle, αkFor the volume fraction of fluid k, cmiAnd ckRespectively mixing thermal diffusion is normal
Several and fluid k thermal-diffusion constant.
The mixed melting point specifically:
Wherein, TmiAnd TmkThe respectively fusing point of mixed melting point and fluid k.
The thermic vibrating screen specifically:
Wherein, TiFor the temperature of particle i, TjFor the temperature of particle j, t is time, ciIt is normal for the mixing thermal diffusion of particle i
Number, mjFor the quality of particle j, pjFor the density of particle j, W is smoothing kernel function, ▽2Represent the La Pula for solving smoothing kernel function
This form, xiFor the position of particle i, xjFor the position of particle j, h is smooth nuclear radius.
It is described mixed flow is calculated by new position to consolidate surface, mixed flow is calculated by new volume fraction and is consolidated on surface
Volume fraction specifically:
For each position x, all there is volume fraction αkx, the value of the volume fraction determined by the volume fraction of neighbouring particle
Fixed, when particle is nearby not present, which is zero, and accounting equation is as follows:
Wherein, αkjFor the volume fraction of fluid k in adjacent particles j;
After the completion of implicit surfaces calculate, according to MarchingCubes algorithm, the volume fraction at contour surface is calculated:
Wherein, V is the position of contour surface, and P1 and P2 are two vertex positions of grid cell, αkP1And αkP2It is pushed up for two
The corresponding volume fraction values of point.
A kind of fluid-mixing phase transformation animation producing device, described device include:
Fluid structurecoupling analog module, for calculating multi-fluid hybrid analog-digital simulation and fluid structurecoupling;
Temperature diffusion and phase transformation module calculate particle using thermic vibrating screen for calculating the temperature difference between particle
Then temperature change carries out Phase transition simulation according to mixed melting point;
Mixed flow consolidates surface computing module, for calculating the implicit surfaces of fluid and solid, and generates surface Mesh, will give birth to
At surface volume score information, rendering for different fluid;
Solid surface output module is flowed, which can carry out the surface Mesh of fluid and solid defeated in the form of a file
Out, for the offline rendering of animation frame.
The beneficial effect of the technical scheme provided by the present invention is that:
1, the parameters such as fusing point, thermal-diffusion constant after the present invention is dissolved each other by calculating different fluid, so that fluid-mixing mould
The quasi- temperature diffusion that can accurately simulate the fluid under different melting points and thermal-diffusion constant and phase transition process, realize mixed flow
The phase change operation of body simulation;
2, the parameters such as its fusing point, thermal-diffusion constant can change after different fluid is dissolved each other, and this method can accurately be caught
This variation is caught, and is showed in simulation process;
3, the invention also provides a kind of reconstructing method for generating fluid-mixing Free Surface, which can be calculated
The volume fraction information that fluid free surface carries, realizes and the liquid level of the different fluid mixed is reconstructed;
4, finally, can be used for mixed flow phase transformation animation the present invention provides a fluid-mixing phase transformation animation producing device
Generation, meet a variety of needs in practical application.
Detailed description of the invention
Fig. 1 is a kind of flow chart of fluid-mixing phase transformation animation producing method;
Fig. 2 is the schematic diagram of fluid animation frame;
Fig. 3 is a kind of structural schematic diagram of fluid-mixing phase transformation animation producing device.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, embodiment of the present invention is made below further
Ground detailed description.
In the method, by constructing fluid-mixing model, indicate that the mixing between different fluid is dissolved each other using volume fraction.
In simulation process, attribute of each fluid particles in addition to carrying fluid, such as pressure, position, density, also carrying temperature are believed
Breath, interparticle temperature diffuses through equation and is calculated, and in addition to fluid particles, the solids such as boundary equally carry out temperature diffusion
It calculates.In embodiments of the present invention, density is divided into the calculating density p of particle, the standard density of single fluid (RestDensity)
ρkWith the hybrid standard density p of particlem, standard density ρkIt is the build-in attribute of fluid, as the standard density of water can be set as
1000.0kg/m3.Hereinafter, the calculating density of particle is referred to as density, and the standard density of single fluid is referred to as fluid mark
The hybrid standard density of quasi- density, particle is referred to as hybrid standard density.
In the method, every kind of fluid is owned by a fixed fusing point, and each fluid particles store a fusing point letter
Breath, during carrying out fluid hybrid analog-digital simulation, if fluid is miscible, the number of the attributes such as fusing point of fluid-mixing particle
Value can recalculate.In simulation process, the state of fluid can be indicated by temperature, when the temperature of fluid particles is greater than particle fusing point
When, it is expressed as liquid particle, otherwise is solids.It further include that stream is solid in simulation process in flow field if including solid
The calculating of coupling.Hereinafter, the fusing point of particle is referred to as mixed melting point Tm, the fusing point of fluid be referred to as fluid fusing point
Tmk, thermal-diffusion constant is same, respectively mixing thermal-diffusion constant cmWith fluid thermal-diffusion constant ck。
This method can construct the liquid free surface and the surface of solids of fluid-mixing, the liquid of construction after simulation
Free Surface and the surface of solids contain volume fraction information, which can be used for distinguishing different fluids, different
Fluid different parameters can be used rendered.Finally, the fluid level and the surface of solids of reconstruct will be with Mesh's (grid)
Form output.
Embodiment 1
To achieve the above object, the embodiment of the present invention proposes a kind of fluid-mixing phase transformation animation producing side based on SPH
Method (including analog portion and reconstruct part), realizes fluid-mixing Phase transition simulation and flow surface construction with this, referring to Fig. 1,
The generation method the following steps are included:
101: mixed flow model being defined and fluid-mixing fluid structurecoupling is simulated, wherein simulation process packet
Include: mixing flow field simulation and rigid body simulate two parts, so calculate the new position of particle, volume fraction, mixing thermal-diffusion constant,
And the parameters such as mixed melting point;
When specific implementation, when there are solid, the interaction force between fluid and solid is calculated, and then update the number of solid
According to;In the absence of solid, the calculating section of rigid body can be ignored.
102: according to the new position of the calculated particle of step 101, the parameters such as thermal-diffusion constant, mixed melting point are mixed, into
Trip temperature diffusion calculates and the update of particle state, by the temperature difference between particle, calculates particle using thermic vibrating screen
Then temperature change carries out Phase transition simulation according to mixed melting point;
103: mixed flow consolidates surface and calculates and generate Mesh, wherein mixed flow consolidate surface and calculate include: to location information and
The calculating of volume fraction information;
That is, the new position and new volume fraction that are provided by step 101 calculate mixed flow and consolidate surface, and according to step
The rapid 102 particle updated state area shunting body surfaces calculated and the surface of solids.
104: surface Mesh output, the Mesh of flow surface and the surface of solids is exported in the form of a file, is used for
The offline rendering of animation frame.
Wherein, step 101 carries out the quasi- calculating of stream solid model of mixed flow, comprising: fluid-mixing simulation and rigid body simulation, specifically
Steps are as follows:
Mixed flow analog portion, it is necessary first to carry out the definition of fluid parameter, comprising: the size and location of bulk fluid, stream
Volume density, acceleration, quality etc. further include the volume fraction etc. for mixing stream calculation, for phase transformation calculate fluid temperature (F.T.),
Fluid fusing point etc. additionally needs to define the boundary in flow field.
After the completion of fluid parameter definition, start to carry out fluid simulation iteration.In common SPH simulation process, every time repeatedly
In generation, needs to calculate the parameters such as fluid particles density, speed, pressure, it is necessary first to calculate density entrained by particle, then calculate
External force and viscous force suffered by fluid finally calculate the pressure and pressure of particle, and the velocity variations of SPH particle are calculated according to resultant force
Rate updates particle coordinate.In mixed flow model, it is also necessary to calculate mixed melting point and mixing thermal-diffusion constant of each particle etc.
Parameter, and volume fraction is calculated before calculating pressure and pressure, then scaling updates the volume fraction of each particle.
Rigid body analog portion calculates the active force for the rigid body particle that fluid particles are subject to, such as presses for each rigid body particle
Power and viscous force, the opposite force of active force are power suffered by rigid body particle, and rear, meter has been calculated into all rigid body particle institutes stress
The resultant force and torque for calculating all particles update rigid body state according to resultant force and torque.
Step 102 carries out calculating and the Phase transition simulation of temperature diffusion on the basis of step 101, wherein step 101 calculates
The new position of particle, hybrid parameter (standard density and thermal-diffusion constant etc.), volume fraction are gone out, step 102 is according to new position
It the parameters such as sets and calculates the temperature change of particle, and update particle state, the specific steps are as follows:
Firstly, the calculating of temperature diffusion is carried out, for each particle, comprising: fluid particles and rigid body particle are passed by heat
The temperature change that equation calculation goes out each particle is led, then the temperature of more new particle.After the completion of temperature updates, according to each particle
Mixed melting point more new particle state, state includes: liquid and two kinds of solid-state.
Step 103 carries out mixed flow on the basis of step 101 and step 102 and consolidates the calculating on surface and generate Mesh,
In, step 101 has calculated the new position of particle and volume fraction, and step 102 has calculated particle new state (solid or liquid
Body), step 103 generates Mesh according to new position and particle state, and calculates the top Mesh according to the volume fraction of particle
The volume fraction of point, the specific steps are as follows:
Since each particle of mixed flow may have different volume fractions, and volume fraction expresses the particle institute table
The type of the fluid shown constructs the flow surface of mixing so needing a kind of method.The building method of common flow surface,
The flow surface that single type fluid can only be constructed, the embodiment of the invention provides one kind can indicate different volumes score
Free Surface reconstructing method.
Firstly the need of the implicit surfaces for calculating fluid, in calculating process, difference equation calculation is used for each node
Then the volume fraction of egress using Marching Cubes (Marching Cubes) algorithm gauging surface Mesh, calculates Mesh
The volume fraction of vertex position is calculated while vertex.
Step 104 carries out the output of surface Mesh on the basis of step 103, the specific steps are as follows:
After completing Free Surface, surface data can be exported in the form of a file, the rendering for animation.Wherein,
Further include the attribute of different fluid other than exporting grid data, different fluid compositions can be distinguished with color, color passes through
Volume fraction is calculated.In conclusion to calculate different fluid mutual for 101- step 104 through the above steps for the embodiment of the present invention
The parameters such as mixed melting point, mixing thermal-diffusion constant after molten, can accurately simulate the stream under different melting points and thermal-diffusion constant
The temperature of body is spread and phase transition process, and can calculate the volume fraction information of fluid free surface carrying, realizes to mixing
The liquid level of different fluid together is reconstructed.
Embodiment 2
The scheme in embodiment 1 is further introduced below with reference to Fig. 1, specific calculation formula, it is as detailed below
Description:
201: the definition of fluid-mixing model and the simulation of fluid-mixing fluid structurecoupling;
When there are solid, the interaction force between fluid and solid is calculated, and then update the data of solid, solid is not deposited
When, rigid body calculating section can be ignored.
The mixed flow model based on SPH is defined, the simulation of mixed flow fluid structurecoupling is calculated.
Fluid-mixing model based on physics is defined as follows:
Wherein, k represents different attribute fluid, umFor the average speed of every kind of fluid k, umkFor the relative velocity of fluid k, αk
For the volume fraction of fluid k, pmixFor the mixing pressure of fluid, ρmFor the hybrid standard density of fluid, g is acceleration of gravity, Tm
For viscosity tensor, TDmFor relative motion tensor.
The simulation steps of fluid-mixing fluid structurecoupling are as follows:
The all properties of SPH particle are initialized, particle is divided into liquid particle and rigid body particle, the attribute phase that the two defines
Together, attribute is for mixing flow field simulation calculating and Phase transition simulation.The attribute of definition includes: to define particle for each fluid particles
Radius, density, quality, pressure, mixing cohesive coefficient, position, speed, acceleration, hybrid standard density, temperature, mixing thermal expansion
Constant and mixed melting point are dissipated, fluid standard density, kinematic viscosity coefficient, fluid fusing point, fluid thermal are defined for every kind of fluid
Diffusion constant defines volume fraction, relative velocity (DriftVelocity) for each particle of every kind of fluid.
The density p of fluid particles is calculated, and calculates the mixing pressure of particle according to pressure formula, the density of particle calculates
Formula and pressure formula can be defined as formula:
Wherein, mjFor the quality of particle j, ρiFor the density of particle i, κ and γ are constant, ρmiFor the hybrid standard of particle i
Density, W are smoothing kernel function, and Wij=W (xi-xj, h), xiFor the position of particle i, xjFor the position of the adjacent particles j of particle i
It sets, h is smooth nuclear radius.
After density and pressure has been calculated, the update of related mixed attributes is carried out, comprising: hybrid standard density pm, mixing fortune
Dynamic viscosity μm, mixed melting point Tm, mixing thermal-diffusion constant cm, calculation formula is as follows:
Wherein, subscript i represents the number of particle, αkFor the volume fraction of fluid k, ρmiAnd ρkRespectively hybrid standard density
With the standard density of fluid k, μmiAnd μkThe respectively viscosity of mixing cohesive coefficient and fluid k, TmiAnd TmkRespectively mix
The fusing point of fusing point and fluid k, cmiAnd ckRespectively mix the thermal-diffusion constant of thermal-diffusion constant and fluid k.Formula (5) formula
(6) variable and in formula (8) with subscript m is hybrid variable, represents the mixed attributes of particle, the change with subscript k or k '
Amount represents the build-in attribute of fluid.
Calculate the relative velocity u of fluid-mixingmk, formula is as follows:
Wherein, τ and σ is constant, and τ can be 10-8~10-6, σ can be 10-4~10-2, k and k ' are fluid number, and a is
Acceleration, qkRepresent the mass fraction of fluid k, ρkFor the standard density of fluid k, ρmFor the hybrid standard density of fluid k, pjFor
The density of particle j, pkFor the pressure of fluid k, it can be assumed that pk=pmix。
Calculate and update the volume fraction α of every kind of fluidk, for each particle, the volume fraction variable quantity of every kind of fluid k
Are as follows:
Wherein, mjFor the quality of particle j, ρjFor the density of particle j, αkjFor the volume fraction of fluid k in particle j, umkjFor
The relative velocity of fluid k, W in particle jijFor smoothing kernel function.
After the completion of new volume fraction calculates, the volume fraction to each particle is needed to zoom in and out processing, guarantees fluid k
Volume fraction and be 1, volume fraction update after, while need more new particle pressure pmix, the calculating of pressure change amount
Formula is as follows:
The mixed flow equation of motion is solved, the motion state of fluid particles, acceleration and stress side suffered by more new particle are calculated
Journey is as follows:
Wherein, mjFor the quality of particle j, g is acceleration of gravity,For the pressure of particle i, WijFor smoothing kernel function, ρj
For the density of particle j, μiFor the kinematic viscosity coefficient of i, umjFor the speed of particle j, xiFor the position of particle i, ρkFor fluid k's
Standard density, αkjFor the volume fraction of fluid k in particle j, umkjFor the relative velocity of fluid k in particle j.
Above step is only applied to fluid particles, but when calculating fluid particles institute stress, needs the anti-of fluid particles
Active force is applied to rigid body particle, it may be assumed that
Fr=-Ff (21)
FrFor rigid body particle, FfFor fluid particles.
After acceleration and the power of all particles has been calculated, the position of more new particle directly updates fluid particles each
The position of particle:
xi=xi+viΔt (22)
For rigid body particle, needs to calculate the suffered resultant force of rigid body and torque first, then updates rigid body particle position:
Wherein,For rigid body totality stress, FriFor the stress of rigid body particle i,For rigid body institute torque suspension, xiFor grain
The position of sub- i, xcmFor the position of rigid body mass center.
202: temperature diffusion calculates and Phase transition simulation, by the temperature difference between particle, calculates grain using thermic vibrating screen
Then the temperature change of son carries out Phase transition simulation (that is, realizing simulation by step 201- step 202 according to mixed melting point
Process);
Temperature spreads the temperature change for needing to calculate each particle, comprising: fluid particles and rigid body particle.Temperature diffused sheet
Journey is as follows:
Wherein, TiFor the temperature of particle i, t is time, ciFor the mixing thermal-diffusion constant of particle i, mjFor the matter of particle j
Amount, pjFor the density of particle j, WijFor W (xi-xj,h)。
After the temperature for updating each particle, need to handle the state of particle.When temperature below fusing point by rising
When more than to fusing point, particle state is become into liquid from solid, it, will when particle temperature drops below fusing point by being higher than fusing point
Particle state becomes solids.In addition it is also necessary to handle merging and division of ice cube etc., solids can be carried out by ice cube
Grouping merges ice cube when two groups of particle distances are less than threshold value;When same group of two parts particle distance becomes larger, ice cube is divided.
203: mixed flow consolidates surface and calculates and generate Mesh, the attributes such as volume fraction carried by particle, gauging surface
Data, and generate Mesh (that is, process that reconstruct is realized by step 203);
The step 203 is a reconstructing method, which is calculating on the basis of the analog result of step 202
The volume fraction information that gauging surface carries while fluid implicit surfaces.
Fluid-mixing liquid level reconstructing method provided in an embodiment of the present invention can mutually be tied with various implicit surfaces calculation methods
It closes, such as: it can be calculated using directed distance field method.
Wherein, the Implicitly function of particle collection Free Surface is as follows:
Wherein, φ (x) indicates the Implicitly function value at the x of position, riFor the radius of particle i, h is the neighbour for constructing implicit surfaces
Domain radius, k are the kernel function that a functional value smoothly drops to zero, k (s)=max (0, (1-s2)3)。
For each position x, all there is volume fraction αkx, the value of the volume fraction determined by the volume fraction of neighbouring particle
Fixed, when particle is nearby not present, which is zero, and accounting equation is as follows:
Wherein, αkjFor the volume fraction of fluid k in adjacent particles j, mjFor the quality of particle j, pjFor the density of particle j, W
For smoothing kernel function, xjFor the position of particle j, h is smooth nuclear radius.
After the completion of implicit surfaces calculate, Free Surface data are generated using Marching Cubes algorithm, and by following
Volume fraction at equation calculation contour surface:
Wherein, V is the position of contour surface, and P1 and P2 are two vertex positions of Marching Cubes grid cell, αkP1
And αkP2For volume fraction values corresponding to two vertex.
204: surface Mesh output, the surface Mesh of fluid and solid is exported in the form of a file, is used for animation
The offline rendering of frame.
The surface structure method provided through the embodiment of the present invention can calculate the volume fraction letter that each vertex carries
Volume fraction, when exporting Mesh, can be converted into the color value on vertex by breath.As Fig. 2 (b) show a fluid animation
Frame is constructed by Fig. 2 (a) and is generated.Specifically, liquid level restructing algorithm of the Fig. 2 (a) Jing Guo step 203 generates Mesh, in this step
In 204, the Mesh is exported, and rendered by offline renderer, generate a frame image as shown in Fig. 2 (b).Pass through
Continuous animation frame can be generated in aforesaid operations, these frames constitute a complete fluid animation.
In conclusion the embodiment of the present invention through the above steps 201- step 204 can accurately simulate different melting points and
The temperature of fluid under thermal-diffusion constant is spread and phase transition process, realizes the liquid level progress to the different fluid mixed
Reconstruct, and then generate animation.
Embodiment 3
Feasibility verifying is carried out to the scheme in Examples 1 and 2 below with reference to Fig. 2, described below:
The embodiment of the present invention carries out the Phase transition simulation of fluid-mixing based on SPH method.Although fluid-mixing mould recent years
It is quasi- to have many correlative studys, but few phase research about fluid-mixing, mixed flow provided in an embodiment of the present invention
The method of body phase transformation can be very good that flow field simulation will be mixed and Phase transition simulation combines, and then generating has the fluid of higher precision dynamic
It draws, supplements the missing of fluid-mixing Phase transition simulation technique study.Meanwhile the embodiment of the invention also includes the lifes of the surface of fluid-mixing
At method, high quality, smooth fluid-mixing surface is can be generated in this method.
As shown in Fig. 2, the embodiment of the present invention indicates that the miscible of different fluid, volume fraction indicate particle using volume fraction
The accounting of middle different fluid, different colours marked fluid is used in experiment, its color of the fluid mutually mixed can also be blended in one
It rises, color is calculated by volume fraction.Fig. 2 (a) show the fluid simulation under particle view, and each particle carries in figure
Different volume fractions represents different fluids and mixes, from the figure, it can be seen that particle is divided into liquid particle and solid
Particle has different colors, wherein fraction solids particle melted by heat, the solids of fusing mix simultaneously with liquid particle
It dissolves each other, shows the effect of diffusion, in addition, a small amount of liquid particle can solidify after being splashed to the surface of solids;Fig. 2 (b) is Fig. 2
(a) different color values is carried through each vertex of Mesh in liquid level reconstruct and the fluid view after rendering, figure, the value is by body
Fraction calculates, and the effect of liquid mixed gradient, in the method, Mesh can be showed by the Mesh that this method generates
It is finally output in data file.
(a) and (b) in Fig. 2 is the same animation frame under same scene, the fluid simulation scene indicated are as follows: solid and
Liquid mutually mixes, and solid and liquid are the different substance of two attribute, has different initial temperature and fusing point, liquid is overall
Temperature is higher than solid, so final solid can melt completely, and the solid solution melted can be mixed with liquid.Experimentation
In, solid can absorb the heat of liquid, and the thawing that heats up, and liquid can reduce temperature, and a small amount of liquid touches meeting after solid
Solidification.After both different liquids mix, some attributes can change, such as fusing point, thermal diffusion coefficient, density
Deng.The attribute of variation will affect that simulation calculates as a result, such as thermal-diffusion constant influences to melt speed, and the embodiment of the present invention can essence
This variation of true calculating is such as schemed shown in (b), and mixed liquid has different thermal-diffusion constants from primary liquid.
Embodiment 4
Be illustrated in figure 3 the structural schematic diagram of fluid-mixing phase transformation animation producing device provided by the invention, the device with
Mixed flow Phase transition simulation method in above embodiments 1 and 2 is corresponding, which includes:
Fluid structurecoupling analog module, including fluid-mixing analogue unit and fluid structurecoupling unit.
This fluid structurecoupling analogue unit is for calculating multi-fluid hybrid analog-digital simulation and fluid structurecoupling, comprising: building particle neighborhood
The data structure of search, all properties for initializing SPH particle calculate particle density and pressure, update hybrid parameter, calculate body
Fraction variation updates volume fraction and pressure, calculates the mixed flow equation of motion, calculate the new position of particle, calculate rigid body stress
And torque, and update position.
Temperature diffusion and phase transformation module, the module are calculated by calculating the temperature difference between particle using thermic vibrating screen
Then the temperature change of particle carries out Phase transition simulation according to mixed melting point.
Mixed flow consolidates surface computing module, which is used to calculate the implicit surfaces of fluid and solid, and generates surface
Mesh, in addition, the module will generate the volume fraction information on surface, the rendering for different fluid.
Solid surface output module is flowed, which can carry out the surface Mesh of fluid and solid defeated in the form of a file
Out, for the offline rendering of animation frame.
In conclusion the device of design of the embodiment of the present invention can be used for the generation of fluid animation, especially fluid-mixing
The generation of the phase transformation animation of animation and fluid-mixing.By setting fluid related parameter, device can export each frame of animation
The Mesh of Mesh, generation can be rendered offline, and then obtain the fluid animation of high quality.
When specific implementation, the executing subject of above-mentioned module and unit can have meter for single-chip microcontroller, computer, microcontroller etc.
The hardware of function is calculated, the embodiment of the present invention is without limitation.
The embodiment of the present invention to the model of each device in addition to doing specified otherwise, the model of other devices with no restrictions,
As long as the device of above-mentioned function can be completed.
It will be appreciated by those skilled in the art that attached drawing is the schematic diagram of a preferred embodiment, the embodiments of the present invention
Serial number is for illustration only, does not represent the advantages or disadvantages of the embodiments.
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all in spirit of the invention and
Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.
Claims (6)
1. a kind of fluid-mixing phase transformation animation producing method, which is characterized in that the described method includes:
Mixed flow model is defined and fluid-mixing fluid structurecoupling is simulated, so calculate particle new position,
Volume fraction, mixing thermal-diffusion constant and mixed melting point;
According to the new position of calculated particle, mixing thermal-diffusion constant, mixed melting point, temperature diffusion calculating and particle shape are carried out
The update of state calculates the temperature change of particle using thermic vibrating screen by the temperature difference between particle, then molten according to mixing
Point carries out Phase transition simulation;
Mixed flow is calculated by new position and consolidates surface, and the volume point that mixed flow is consolidated on surface is calculated by new volume fraction
Number, and according to particle updated state area shunting body surface and the surface of solids;
The Mesh of flow surface and the surface of solids is exported in the form of a file, the offline rendering for animation frame.
2. a kind of fluid-mixing phase transformation animation producing method according to claim 1, which is characterized in that the mixing thermal expansion
Dissipate constant specifically:
Wherein, subscript i represents the number of particle, αkFor the volume fraction of fluid k, cmiAnd ckRespectively mixing thermal-diffusion constant and
The thermal-diffusion constant of fluid k.
3. a kind of fluid-mixing phase transformation animation producing method according to claim 2, which is characterized in that the mixed melting point
Specifically:
Wherein, TmiAnd TmkThe respectively fusing point of mixed melting point and fluid k.
4. a kind of fluid-mixing phase transformation animation producing method according to claim 1, which is characterized in that the thermal diffusion side
Journey specifically:
Wherein, TiFor the temperature of particle i, TjFor the temperature of particle j, t is time, ciFor the mixing thermal-diffusion constant of particle i, mjFor
The quality of particle j, pjFor the density of particle j, W is smoothing kernel function, ▽2The Laplce's form for solving smoothing kernel function is represented,
xiFor the position of particle i, xjFor the position of particle j, h is smooth nuclear radius.
5. a kind of fluid-mixing phase transformation animation producing method according to claim 4, which is characterized in that described to pass through new position
It sets and calculates mixed flow and consolidate surface, the volume fraction that mixed flow is consolidated on surface is calculated by new volume fraction specifically:
For each position x, all there is volume fraction αkx, the value of the volume fraction determines by the volume fraction of neighbouring particle,
When particle is nearby not present, which is zero, and accounting equation is as follows:
Wherein, αkjFor the volume fraction of fluid k in adjacent particles j;
After the completion of implicit surfaces calculate, according to MarchingCubes algorithm, the volume fraction at contour surface is calculated:
Wherein, V is the position of contour surface, and P1 and P2 are two vertex positions of grid cell, αkP1And αkP2For two vertex institutes
Corresponding volume fraction values.
6. a kind of fluid-mixing phase transformation animation producing device, which is characterized in that described device is appointed in claim 1-5 for implementing
Fluid-mixing phase transformation animation producing method, described device described in one claim include:
Fluid structurecoupling analog module, for calculating multi-fluid hybrid analog-digital simulation and fluid structurecoupling;
Temperature diffusion and phase transformation module calculate the temperature of particle using thermic vibrating screen for calculating the temperature difference between particle
Then variation carries out Phase transition simulation according to mixed melting point;
Mixed flow consolidates surface computing module, for calculating the implicit surfaces of fluid and solid, and surface Mesh is generated, by generation
Surface volume score information, the rendering for different fluid;
Solid surface output module is flowed, which can export the surface Mesh of fluid and solid in the form of a file, use
In the offline rendering of animation frame.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810897133.1A CN109215100A (en) | 2018-08-08 | 2018-08-08 | A kind of fluid-mixing phase transformation animation producing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810897133.1A CN109215100A (en) | 2018-08-08 | 2018-08-08 | A kind of fluid-mixing phase transformation animation producing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109215100A true CN109215100A (en) | 2019-01-15 |
Family
ID=64988923
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810897133.1A Pending CN109215100A (en) | 2018-08-08 | 2018-08-08 | A kind of fluid-mixing phase transformation animation producing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109215100A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110059363A (en) * | 2019-03-25 | 2019-07-26 | 天津大学 | A method of fluid-mixing Phase transition simulation and liquid level reconstruct based on SPH |
CN112070796A (en) * | 2020-08-07 | 2020-12-11 | 中国科学院海洋研究所 | Method for calculating multi-year ice melting amount of north pole based on Lagrange thought |
CN115587523A (en) * | 2022-12-09 | 2023-01-10 | 北京大学 | High dynamic space self-adaptive fluid simulation method, equipment and storage medium |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102156817A (en) * | 2011-04-11 | 2011-08-17 | 国家海洋信息中心 | Rapid prediction method for drifting path and diffusion of marine spilled oil |
CN102819650A (en) * | 2012-08-16 | 2012-12-12 | 同济大学 | Computational simulation method of flow slide catastrophe of rock and soil material |
CN104318598A (en) * | 2014-10-17 | 2015-01-28 | 中国科学技术大学 | Implement method and system for three-dimensional fluid-solid one-way coupling |
CN105678102A (en) * | 2016-03-03 | 2016-06-15 | 上海大学 | Virtual angiography contrast-agent-diffusion-process simulating method based on SPH |
CN105825059A (en) * | 2016-03-17 | 2016-08-03 | 天津大学 | Method for researching SPH (Smoothed Particle Hydrodynamics) multi-phase flow haptic interaction |
CN106096215A (en) * | 2016-07-28 | 2016-11-09 | 华东师范大学 | A kind of sense of reality fluid simulation method relating to conduction of heat and Dynamic Viscosity |
CN106446425A (en) * | 2016-09-29 | 2017-02-22 | 华东师范大学 | Fluid-solid interaction simulation method based on video reconstruction and SPH model |
CN106650064A (en) * | 2016-12-09 | 2017-05-10 | 华东师范大学 | Coagulation phenomenon simulation method based on particle model |
CN107145699A (en) * | 2016-03-01 | 2017-09-08 | 中国辐射防护研究院 | Airborne radionuclide long-distance migration Lagrangian Particle Dispersion computational methods |
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 |
-
2018
- 2018-08-08 CN CN201810897133.1A patent/CN109215100A/en active Pending
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102156817A (en) * | 2011-04-11 | 2011-08-17 | 国家海洋信息中心 | Rapid prediction method for drifting path and diffusion of marine spilled oil |
CN102819650A (en) * | 2012-08-16 | 2012-12-12 | 同济大学 | Computational simulation method of flow slide catastrophe of rock and soil material |
CN104318598A (en) * | 2014-10-17 | 2015-01-28 | 中国科学技术大学 | Implement method and system for three-dimensional fluid-solid one-way coupling |
CN107145699A (en) * | 2016-03-01 | 2017-09-08 | 中国辐射防护研究院 | Airborne radionuclide long-distance migration Lagrangian Particle Dispersion computational methods |
CN105678102A (en) * | 2016-03-03 | 2016-06-15 | 上海大学 | Virtual angiography contrast-agent-diffusion-process simulating method based on SPH |
CN105825059A (en) * | 2016-03-17 | 2016-08-03 | 天津大学 | Method for researching SPH (Smoothed Particle Hydrodynamics) multi-phase flow haptic interaction |
CN106096215A (en) * | 2016-07-28 | 2016-11-09 | 华东师范大学 | A kind of sense of reality fluid simulation method relating to conduction of heat and Dynamic Viscosity |
CN106446425A (en) * | 2016-09-29 | 2017-02-22 | 华东师范大学 | Fluid-solid interaction simulation method based on video reconstruction and SPH model |
CN106650064A (en) * | 2016-12-09 | 2017-05-10 | 华东师范大学 | Coagulation phenomenon simulation method based on particle model |
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 |
Non-Patent Citations (3)
Title |
---|
BO REN等: "《Multiple-Fluid SPH Simulation Using a Mixture Model》", 《ACM TRANSACTIONS ON GRAPHICS》 * |
张漫遥: "《中尺度流体与固体耦合动画模拟研究》", 《中国优秀傅硕士学位论文全文数据库(硕士)信息科技》 * |
章恒: "《基于SPH方法的流体运动与固液耦合模拟研究》", 《中国优秀傅硕士学位论文全文数据库(硕士)信息科技》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110059363A (en) * | 2019-03-25 | 2019-07-26 | 天津大学 | A method of fluid-mixing Phase transition simulation and liquid level reconstruct based on SPH |
CN112070796A (en) * | 2020-08-07 | 2020-12-11 | 中国科学院海洋研究所 | Method for calculating multi-year ice melting amount of north pole based on Lagrange thought |
CN112070796B (en) * | 2020-08-07 | 2023-07-14 | 中国科学院海洋研究所 | North-pole multi-year ice melting amount calculation method based on Lagrangian thought |
CN115587523A (en) * | 2022-12-09 | 2023-01-10 | 北京大学 | High dynamic space self-adaptive fluid simulation method, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104143027B (en) | A kind of fluid thermal dynamic simulation system based on SPH algorithms | |
CN109215100A (en) | A kind of fluid-mixing phase transformation animation producing method and device | |
Génevaux et al. | Simulating Fluid-Solid Interaction. | |
Losasso et al. | Multiple interacting liquids | |
Müller et al. | Particle-based fluid-fluid interaction | |
Mihalef et al. | Physics based boiling simulation | |
US7647214B2 (en) | Method for simulating stable but non-dissipative water | |
Thürey et al. | Free Surface Lattice-Boltzmann fluid simulations with and without level sets. | |
Zhu et al. | Codimensional non-Newtonian fluids | |
Yang et al. | A unified particle system framework for multi-phase, multi-material visual simulations | |
CN106096215B (en) | It is a kind of to be related to the sense of reality fluid simulation method of heat transfer and Dynamic Viscosity | |
CN104268943A (en) | Fluid simulation method based on Eulerian-Lagrangian coupling method | |
CN110717269B (en) | Fluid surface detail protection method based on grid and particle coupling | |
CN106446425A (en) | Fluid-solid interaction simulation method based on video reconstruction and SPH model | |
Cleary et al. | High pressure die casting simulation using smoothed particle hydrodynamics | |
CN103389649B (en) | A kind of motor-driven motion simulation method of the aircraft based on sphere splicing operator | |
Patkar et al. | Wetting of porous solids | |
CN107798198A (en) | Physical-based melting phenomenon realistic simulation method | |
Wang et al. | Thin-film smoothed particle hydrodynamics fluid | |
Scukins et al. | Multiscale molecular dynamics/hydrodynamics implementation of two dimensional “Mercedes Benz” water model | |
CN110059363A (en) | A method of fluid-mixing Phase transition simulation and liquid level reconstruct based on SPH | |
Gao et al. | An efficient heat-based model for solid-liquid-gas phase transition and dynamic interaction | |
Miao et al. | Particle-based ice freezing simulation | |
Wei et al. | Melting and flowing of viscous volumes | |
Gao et al. | A novel fluid-solid coupling framework integrating FLIP and shape matching methods |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190115 |
|
RJ01 | Rejection of invention patent application after publication |