CN115630586A - Space self-adaptive fluid simulation method based on smooth particle fluid dynamics - Google Patents

Space self-adaptive fluid simulation method based on smooth particle fluid dynamics Download PDF

Info

Publication number
CN115630586A
CN115630586A CN202211110058.2A CN202211110058A CN115630586A CN 115630586 A CN115630586 A CN 115630586A CN 202211110058 A CN202211110058 A CN 202211110058A CN 115630586 A CN115630586 A CN 115630586A
Authority
CN
China
Prior art keywords
particles
particle
fluid
simulation
solid
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
Application number
CN202211110058.2A
Other languages
Chinese (zh)
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.)
University of Science and Technology Beijing USTB
Original Assignee
University of Science and Technology Beijing USTB
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 University of Science and Technology Beijing USTB filed Critical University of Science and Technology Beijing USTB
Priority to CN202211110058.2A priority Critical patent/CN115630586A/en
Publication of CN115630586A publication Critical patent/CN115630586A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/28Design optimisation, verification or simulation using fluid dynamics, e.g. using Navier-Stokes equations or computational fluid dynamics [CFD]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/25Design optimisation, verification or simulation using particle-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2113/00Details relating to the application field
    • G06F2113/08Fluids
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2119/00Details relating to the type or aim of the analysis or the optimisation
    • G06F2119/14Force analysis or force optimisation, e.g. static or dynamic forces

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Geometry (AREA)
  • Evolutionary Computation (AREA)
  • Fluid Mechanics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Computing Systems (AREA)
  • Algebra (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a space self-adaptive fluid simulation method based on smooth particle fluid dynamics, which comprises the following steps: converting the three-dimensional model of the boundary solid object into an SDF model; introducing a fluid particle set, an SDF model and a gradient field thereof into a simulation scene; in a single simulation time step, calculating the scale function value of the particle, and simultaneously applying a wake flow protection mechanism to delay the attenuation of the fine particle scale function value near the boundary solid; calculating the optimal size of the particles, classifying the particles according to the optimal size of the particles, and adjusting the size of the particles according to the type of the particles; and performing dynamic calculation on the fluid particles, processing the coupling of the fluid particles and the boundary solid, stabilizing a numerical field by using a time mixing scheme, and updating the physical properties of the particles and the physical properties of the boundary solid. The scheme of the invention can improve the simulation efficiency, simultaneously can more effectively refine the coupling details of the fluid and the plurality of dynamic boundary solid objects, and effectively capture the complex dynamic behaviors below the surface of the fluid.

Description

Space self-adaptive fluid simulation method based on smooth particle fluid dynamics
Technical Field
The invention relates to the technical field of fluid simulation, in particular to a spatial adaptive fluid simulation method based on Smooth Particle Hydrodynamics (SPH).
Background
At present, in scientific research and engineering work in various fields, research and application of fluid simulation are very wide, but due to limitations of hardware level and simulation algorithm and expansion and complication of fluid simulation environment, requirements on aspects of improving precision, improving efficiency and the like still exist in fluid simulation. Traditional fluid simulation generally uses uniform resolution fluid cells, but this often results in computational resources being wasted in more stable fluid regions, rather than regions where fluid behavior is more rich and complex. How to detect important areas in fluid simulation and perform multi-resolution self-adaptive simulation to save computing resources, thereby improving simulation efficiency and local simulation fineness is an important problem in computer graphics research.
The fluid simulation can be generally realized by adopting a gridding method and a non-gridding method, and for a self-adaptive method with grids, more methods such as an octree method and a tetrahedral Mesh method are adopted. For the mesh-free SPH method, the earlier adaptive method can only perform a predefined particle refinement mode on a refinement region fixed in a scene by a user, namely, according to the refinement requirement of the region where a given spatial position is located, a specific size is selected for fluid particles in the region, if the resolution of the particles needs to be converted, the original particles can be immediately replaced by the particles with different resolutions, or a time mixing scheme is used, and the influence of the original particles is kept within a certain time; or a multi-level resolution scheme is used, a single-resolution particle set of a higher level is added in an area needing higher resolution, new fine particles are generated in a boundary area of resolution conversion, fine particle attributes in the boundary are obtained by coarse particle interpolation calculation until the fine particles penetrate into the high-resolution area, and particle coarsening can only depend on random deletion to keep a certain limit of balance. These methods often result in a loss of quality or allow only very limited flexibility.
For adaptively detecting the thinned region in the SPH method, the past methods generally adopt a thinning strategy based on surface detection, i.e., detect the free surface of the fluid more likely to generate a rich fluid phenomenon, determine the free surface of the fluid by a level set method, and perform thinning of the fluid particles only on the surface above a certain depth. However, the abundant behavior of the fluid is not only present at the surface of the fluid, but also the coupling of the boundary solid object to the fluid under the surface of the fluid affects the simulation quality of the whole. Surface-based refinement strategies therefore often suffer from inflexible intervention mechanisms, resulting in some cases computationally inefficient and inability to enhance the simulation accuracy for a particular dynamic region.
Disclosure of Invention
The invention provides a space self-adaptive fluid simulation method based on smooth particle fluid dynamics, which aims to solve the technical problems that the prior art is low in calculation efficiency and cannot enhance the simulation precision of a specific dynamic region.
In order to solve the technical problems, the invention provides the following technical scheme:
in one aspect, the invention provides a smooth particle fluid dynamics-based spatial adaptive fluid simulation method, which optimizes the detection of key regions in a simulation scene, can capture regions with richer fluid-solid interaction in space, and refines the resolution of fluid particles in the regions. The method comprises the following steps:
converting a three-dimensional model of a boundary solid object in a fluid simulation scene into an SDF (directed Distance Field) model, and obtaining a gradient Field of the SDF model;
adding fluid particle sets in a simulation scene, and introducing an SDF model and a gradient field thereof into the simulation scene;
in a single simulation time step, estimating the distance from the fluid particles to the surface of the solid by a level set method, calculating the scale function value of the particles by combining the SDF value of the particles, and delaying the attenuation of the fine particle scale function value near the boundary solid by applying a wake protection mechanism;
in a single simulation time step, calculating the optimal size of the particles according to the calculated size function value of the particles and a preset self-adaptive ratio, comparing the calculated optimal size of the particles with the size of the current particles, classifying the particles according to the comparison result, and adjusting the size of the particles according to the category of the particles;
in a single simulation time step, based on the fluid dynamics of the smooth particles, the dynamics calculation is carried out on the fluid particles, meanwhile, the coupling of the fluid particles and the boundary solid is processed, a time mixing scheme is used for stabilizing a numerical field, the physical properties of the particles and the physical properties of the boundary solid are updated, and the simulation in the current time step is completed.
Further, the SDF model evaluates the distance of a location in space to the surface of the solid and uses a symbol to represent whether each location is inside or outside the solid; when the sign is a positive value, the corresponding position is outside the solid, and when the sign is a negative value, the corresponding position is inside the solid.
Further, the fluid particles carry predetermined material properties, the predetermined physical properties including one or more of position, mass, density, velocity, and pressure in combination.
Further, the estimating the distance from the fluid particle to the solid surface by the level set method, and combining the SDF value at the particle to calculate the scale function value of the particle, and applying the wake protection mechanism to delay the attenuation of the fine particle scale function value near the boundary solid, includes:
calculating an initial level set estimation value for all particles by a level set method, taking the initial level set value as a particle, performing iterative propagation of the level set value from the particle close to the surface to other inner particles in the neighborhood until the level set value of all the particles is unchanged, and storing a level set value for the particle i
Figure BDA0003843664940000031
For a boundary solid b in a simulated scene * Extracting the SDF value of the position of the particle, and considering the preset optimal refining range
Figure BDA0003843664940000032
The solid scale function value of particle i was calculated by the following formula
Figure BDA0003843664940000033
Figure BDA0003843664940000034
Wherein,
Figure BDA00038436649400000311
an SDF value representing the position of the particle i;
applying a wake protection mechanism, iteratively performing the following processes: for a range of particles just entering the selected solid, a merging delay is set
Figure BDA0003843664940000035
For tau>0 particle, stopping attenuation of its solid scale function value, and propagating the currently stopped attenuation solid scale function value to the whole particle set to smooth the numerical field of the solid scale function; until the numerical field of the solid scale function does not change;
the value of the scale function phi of the particle i is calculated by i
Figure BDA0003843664940000036
Wherein,
Figure BDA0003843664940000037
expressed as a particular solid b * Maximum incorporation time delay of the surrounding fluid particle retention.
Further, the calculating the optimal particle size according to the calculated function value of the particle size and a preset adaptive ratio, comparing the calculated optimal particle size with the current particle size, classifying the particles according to the comparison result, and adjusting the particle size according to the type of the particles includes:
calculating the optimal particle mass by linear interpolation according to the calculated scale function value of the particle and a preset adaptive ratio by using the following formula
Figure BDA0003843664940000038
Figure BDA0003843664940000039
Wherein m is base Representing the mass of the lowest resolution particle and alpha representing a preset adaptation ratio, i.e. m for the highest resolution particle mass fine Satisfy m fine =αm base ,φ max Representing a maximum scale function value for defining a refinement range;
based on the calculated optimal particle mass, for mass m i Calculating the relative mass of the particles i
Figure BDA00038436649400000310
Classifying the particles according to their relative mass:
Figure BDA0003843664940000041
wherein, C i Representing the classification result of the particles, S, S, o, L and L respectively represent different particle types;
based on the classification of the particles, the splitting, merging, or quality sharing is applied to different particles to adjust their dimensions.
Further, the applying splitting, merging or quality sharing to different particles based on the classification of the particles adjusts their scale, including:
distributing all the mass of the S-type particles to surrounding S-type or S-type particles, then distributing the mass to the S-type particles of other particles, and deleting the S-type particles from the particle set, wherein the particles receiving the mass obtain the momentum corresponding to the receiving mass according to the momentum conservation condition; assigning a portion of the mass of the class i particles to the surrounding class S or class S particles, and similarly, the particles of received mass will acquire momentum corresponding to the received mass;
splitting the L-type particles into a plurality of particles with mass close to m opt The split L-type particles are deleted from the particle set, the mass conservation and momentum conservation conditions are followed, the split particles inherit the speed of the original particles and the properties of other parts used for solving the fluid dynamics equation, and the position distribution of the split particles is optimized, so that the instability caused by the change of the spatial distribution of the particles due to the addition of new particles into the simulation is reduced.
Further, the performing dynamics calculation on the fluid particles based on the smooth particle fluid dynamics, simultaneously processing the coupling of the fluid particles and the boundary solid, stabilizing the numerical field using a time-mixing scheme, and updating the physical properties of the particles and the physical properties of the boundary solid includes:
sampling other fluid particles around the fluid particles, deriving an approximate plane boundary at the particle position according to a directed distance field of a boundary solid, calculating the numerical contribution of the plane boundary, performing kinetic calculation on the fluid particles based on smooth particle dynamics, and calculating the density of the fluid particles;
based on the fluid dynamics of smooth particles, the compressible state of a fluid field under the action of gravity, viscous force and surface tension is calculated according to a Navier-Stokes equation, and the fluid is subjected to implicit iterative pressure solution based on density invariance and non-divergence conditions, so that the volume of the fluid is kept incompressibility;
the velocity and position of the fluid particles are updated using newton's second law and a time integration method.
Further, in the process of performing kinetic calculation on fluid particles based on smooth particle fluid dynamics, simultaneously processing coupling of the fluid particles and a boundary solid, stabilizing a numerical field by using a time mixing scheme, updating physical properties of the particles and the physical properties of the boundary solid, applying a time mixing mechanism, wherein the time mixing mechanism stores the positions of original particles deleted from the simulation within a period of time after the fluid particles are split and combined, estimates the density and the speed of the corresponding original particles according to the stored positions and the fluid particles receiving the mass of the corresponding original particles, and mixes the estimated density and speed into corresponding calculation results of child particles receiving the mass of the corresponding original particles, so that the child particles keep behaviors before splitting or combining to a certain extent, further stabilize the numerical field around the child particles and improve the stability of the simulation;
wherein the time-mixing process for density is described as:
Figure BDA0003843664940000051
wherein ρ o Representing the calculated density, p, of the primary particles i A calculated density of particles representing the mass of the received original particles,
Figure BDA0003843664940000052
representing the density of the particles i after time mixing, wherein beta represents a preset time mixing weight, and the value of beta is gradually reduced to 0 along with the increase of the simulation time step;
the time mixing process for particle velocity is described as:
Figure BDA0003843664940000053
wherein v is o Representing the calculated velocity, v, of the primary particle i A particle calculated velocity representing the mass of the received primary particles,
Figure BDA0003843664940000054
the velocity of the particle i after time mixing is shown.
In yet another aspect, the present invention also provides an electronic device comprising a processor and a memory; wherein the memory has stored therein at least one instruction that is loaded and executed by the processor to implement the above-described method.
In yet another aspect, the present invention also provides a computer-readable storage medium having at least one instruction stored therein, the instruction being loaded and executed by a processor to implement the above method.
The technical scheme provided by the invention has the beneficial effects that at least:
1. the existing fluid simulation technology based on smooth particle fluid dynamics mostly adopts uniform resolution and has low utilization rate of computing resources, but the particle fluid space self-adaptive simulation technology provided by the invention can self-adaptively detect important areas in a space, and adopts continuous-scale fine particles in a certain space range nearby the important areas so as to improve the fluid simulation quality in the areas, save a large amount of computing resources and keep higher simulation quality.
2. The method realizes the detection of the area near the solid based on the solid representation of the directed distance field, accurately captures the area where the fluid and a plurality of dynamic boundary solid objects are interacted, effectively improves the quality of fluid-solid coupling in the area through particle refinement, expands the area by using a wake flow protection mechanism, and realizes the maintenance of the simulation fineness of the area where the fluid-solid coupling action occurs in a longer period of time.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic flow chart illustrating an implementation of a method for spatially adaptive fluid simulation based on smooth particle fluid dynamics according to an embodiment of the present invention;
FIG. 2 is a graph comparing the simulation results of the present invention with the prior art in a scenario where a ship is driving over the water; wherein, (a) is a simulation effect graph with uniform high resolution, (b) is a simulation effect graph with uniform low resolution, (c) is a simulation effect graph of a space self-adaptive method adopting surface refinement, and (d) is a simulation effect graph of a space self-adaptive method adopting boundary refinement;
FIG. 3 is a comparison of the simulation effect of the present invention compared to the prior art in a propeller churning scenario; wherein, (a) is a uniform high-resolution simulation effect graph, (b) is a simulation effect graph combining the boundary thinning mechanism and the surface thinning mechanism of the invention, and (c) is a simulation graph only adopting the surface thinning mechanism.
Detailed Description
To make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
First embodiment
In order to improve the efficiency and quality of fluid simulation, the embodiment provides a space adaptive fluid simulation method based on smooth particle fluid dynamics, which optimizes the detection of key regions in a simulation scene, can capture regions with richer fluid-solid interaction behaviors in space, and refine the resolution of fluid particles in the regions, realizes higher-precision simulation under limited computational resources, has smaller computational load and storage capacity and higher flexibility than the existing model, and meets the requirements on efficiency and precision of fluid simulation under a complex physical environment. The execution flow of the method is shown in fig. 1, and comprises the following steps:
s1, converting a three-dimensional model of a boundary solid object in a fluid simulation scene into an SDF (directed Distance Field) model, and obtaining a gradient Field of the SDF model;
wherein the SDF model evaluates the distance of a location in space to the surface of the solid and uses a symbol to represent whether each location is inside or outside the solid; when the sign is a positive value, the corresponding position is outside the solid, and when the sign is a negative value, the corresponding position is inside, so that the whole solid is represented.
S2, adding a fluid particle set in the simulation scene, and introducing the SDF model and the gradient field thereof into the simulation scene;
the fluid particles carry physical properties such as position, mass, density, velocity, pressure, etc.
S3, estimating the distance from the fluid particles to the surface of the solid by a level set method, calculating the scale function value of the particles by combining the SDF value of the particles, and delaying the attenuation of the fine particle scale function value near the boundary solid by applying a wake flow protection mechanism so as to keep the resolution;
specifically, in this embodiment, the step S3 includes the following steps:
calculating an initial level set estimation value for all particles by a level set method, taking the initial level set value as a particle, performing iterative propagation of the level set value from the particle close to the surface to other inner particles in the neighborhood until the level set value of all the particles is unchanged, and storing a level set value for the particle i
Figure BDA0003843664940000071
For boundary solid b in simulated scene * Extracting the SDF value of the position of the particle, and considering the preset optimal refining range
Figure BDA0003843664940000072
The solid scale function value of particle i was calculated by the following formula
Figure BDA0003843664940000073
Figure BDA0003843664940000074
Wherein,
Figure BDA00038436649400000712
an SDF value representing the position of the particle i;
applying wake flow protection mechanism to set a merging delay for particles just entering a certain range around a specific solid
Figure BDA0003843664940000075
For tau>0, stopping the attenuation of the solid scale function value to avoid the loss of wake effect caused by rapid merging of particles after leaving the solid periphery, and smoothing the numerical field of the solid scale function by propagating the value to the whole set of particles, iterating the process until the numerical field is unchanged;
the solid scale function may be combined with a level set method, and if combined with a level set function for detecting a surface, the maximum of the two is selected to ensure finer refinement, from which the value of the scale function phi for the particle i may be determined i Comprises the following steps:
Figure BDA0003843664940000076
wherein,
Figure BDA0003843664940000077
expressed as a particular solid b * Maximum incorporation time delay of the surrounding fluid particle retention.
By the above-mentioned level set value
Figure BDA0003843664940000078
And solid scale function value
Figure BDA0003843664940000079
Taking the maximum value as the true scale function value phi of the particle i To guarantee the refinement of the highest resolution.
S4, calculating the optimal size of the particles according to the calculated size function value of the particles and a preset self-adaptive ratio, comparing the calculated optimal size of the particles with the size of the current particles, classifying the particles according to the comparison result, and respectively applying splitting, merging or quality sharing to the particles of different classes according to the classes of the particles so as to adjust the size of the particles;
specifically, in this embodiment, the step S4 includes the following steps:
based on the calculated scale function value of the particles and a preset adaptive ratio, the optimal particle mass is calculated in a linear interpolation mode by using the following formula
Figure BDA00038436649400000710
Figure BDA00038436649400000711
Wherein m is base Representing the mass of the lowest resolution particle and alpha representing a preset adaptation ratio, i.e. m for the highest resolution particle mass fine Satisfy m fine =αm base ,φ max Representing a maximum scale function value for defining a refinement range;
based on the calculated optimal particle mass, for mass m i Calculating the relative mass of the particles i
Figure BDA0003843664940000081
Classifying the particles according to their relative mass:
Figure BDA0003843664940000082
wherein, C i Representing the classification result of the particles, S, S, o, L and L respectively represent different particle types;
based on the classification of the particles, all the mass of the S-type particles is distributed to the surrounding S-type or S-type particles, then the original particles are deleted from the simulated particle set, and the particles receiving the mass obtain the momentum corresponding to the receiving mass according to the momentum conservation condition; assigning a portion of the mass of the class i particles to the surrounding class S or S particles, and likewise, the particles of received mass will acquire momentum corresponding to the received mass; splitting the L-type particles into a plurality of particles with mass close to m opt The original particles are deleted from the simulated particle set, the mass conservation and momentum conservation conditions are followed, the split refined particles inherit the speed of the original particles and the properties of other parts used for solving a fluid dynamics equation, and the pre-calculated split template is applied to optimize the position distribution of the refined particles, so that the instability caused by the change of the spatial distribution of the particles due to the addition of new particles into the simulation is reduced.
S5, based on the fluid dynamics of the smooth particles, performing dynamic calculation on the fluid particles, processing the coupling of the fluid particles and the boundary solid, stabilizing a numerical field by using a time mixing scheme, updating the physical properties of the particles and the physical properties of the boundary solid, and completing the simulation in the current time step;
specifically, in this embodiment, the step S5 includes the steps of:
sampling other fluid particles around the fluid particles, deriving an approximate plane boundary at the particle position according to a directed distance field of a boundary solid, calculating the numerical contribution of the plane boundary, and calculating the density of the fluid particles by combining the fluid particles and the smooth particle dynamics based on the smooth particle dynamics;
based on smooth particle fluid dynamics, calculating the compressible state of a fluid field under the action of gravity, viscous force, surface tension and the like according to a Navier-Stokes equation, and performing implicit iterative pressure solution on the fluid based on density invariance and non-divergence conditions to keep the volume of the fluid incompressibility;
the velocity and position of the fluid particles are updated using newton's second law and a time integration method.
In the above process, a time mixing mechanism is applied, which stores the position of the original particle deleted from the simulation within a period of time after the fluid particle is split and combined, estimates the density and speed of the original particle according to the position and the fluid particle receiving the mass of the original particle, and mixes the density and speed into the corresponding calculation result of the child particles receiving the mass of the original particle, so that the child particles keep the behavior before splitting or combining to a certain extent, further stabilize the value field around the child particles, and improve the stability of the simulation;
the time mixing process for density can be described as:
Figure BDA0003843664940000091
where ρ is o Calculated density, p, for the original particle i The calculated density for the particles receiving the original particle mass,
Figure BDA0003843664940000092
the density of the particles i after time mixing is used for calculating other physical properties, and beta is a preset time mixing weight, and the value is gradually reduced to 0 along with the increase of the simulation time step;
similarly, the temporal mixing process for particle velocity can be described as:
Figure BDA0003843664940000093
wherein v is o Representing the calculated velocity, v, of the primary particle i A particle calculated velocity representing the mass of the received primary particles,
Figure BDA0003843664940000094
the velocity of the particle i after time mixing is shown.
And (5) iteratively executing S3-S5 until a preset simulation ending condition is reached, and finishing the whole simulation process.
The simulation effect of the scheme of the invention and the prior art is evaluated in the scene that a boat runs over the water surface. In the scene, a small ship is coupled with a water body, and a large amount of splashed water and wake flow generated behind the ship are important fluid phenomena in the simulation scene.
FIG. 2 shows the simulation effect of the prior art method using uniform resolution, and it can be seen from (b) in FIG. 2 that the uniform low resolution simulation cannot observe the formed water bloom and wake flow, and the simulation quality is low; as can be seen from (a) in fig. 2, although the simulation with uniform high resolution can realize high-quality simulation of the scene, since the number of particles increases with the particle size power, a large amount of computing resources are wasted in the region below the water surface. The simulation effect of the spatial adaptive method using surface refinement and boundary refinement is shown in fig. 2 (c) and (d), respectively, both schemes use the same base particle size as the uniform low-resolution simulation and the same finest particle size as the uniform high-resolution simulation, and a wake-preserving mechanism is applied to the boundary refinement scheme to improve the quality. Both simulation schemes produce simulation quality similar to a uniform high resolution simulation scheme at far fewer particles than the high resolution simulation. Fig. 2 (c) shows that the present invention implements refinement around the boat boundary object by the boundary refinement mechanism, and does not affect other surface areas; in contrast, (d) in fig. 2 shows that surface refinement results in some waste of resources by simulating a high resolution fluid plateau surface, nor are particles below the fluid surface and in contact with boundary objects sufficiently refined. The comparison of the two shows that the boundary refining mechanism of the invention can further reduce the computing resources required by the space adaptive simulation and improve the simulation quality of fluid-solid coupling occurring under the surface of the fluid.
From the above, the space adaptive simulation method of the present invention can better improve the simulation efficiency, and meanwhile, compared with the surface refining mechanism, the boundary refining mechanism of the present invention can more accurately capture the region with stronger fluid phenomenon, thereby reducing the calculation resources consumed on the stable surface.
Further, the simulation effect of the scheme of the invention and the prior art is evaluated in a scene that a propeller stirs a water body. Figure 3 shows a cross-sectional view of the scene under which the turbulence of the water surface due to propeller agitation is a key phenomenon in the simulation.
Fig. 3 (a) shows a uniform high-resolution simulation effect, which produces good quality but consumes a large amount of computing resources. Fig. 3 (b) is a simulation effect combining the boundary refinement mechanism of the present invention with the surface refinement mechanism, and the simulation scheme combining the boundary refinement and the surface refinement produces a turbulent effect more similar to the high-resolution simulation, compared to the simulation using only the surface refinement mechanism shown in fig. 3 (c).
From the above, the boundary refinement mechanism of the present invention can significantly improve the simulation quality of fluid-solid coupling occurring under the surface of the fluid, and well combine with the surface refinement mechanism, so as to further embody the flexibility provided by the boundary refinement mechanism of the present invention for formulating the refined region detection strategy.
In summary, this embodiment provides a new spatial adaptive simulation method with boundary refinement function for SPH fluid simulation, which applies a directed distance field model to represent solid boundary objects in a simulation scene, so as to adaptively detect a fluid-solid interaction region in the simulation; introducing a particle set representation fluid with physical properties into a simulation scene; computing a computational scale function based on the directed distance field, computing a distance of the fluid particle from the boundary object through the directed distance field to evaluate an optimal resolution of the particle, the optimal resolution of the particle reaching a highest value within a specified distance to the boundary object and decreasing smoothly as the distance increases until a base resolution is reached; subsequently, the actual resolution of the particles is adjusted to the optimal resolution through particle splitting, merging and mass redistribution; meanwhile, a wake flow protection mechanism is applied to lock the resolution of the particles within a period of time after the particles move near the solid boundary object so as to prevent loss of flow details; and then, calculating various physical attributes of the fluid particles by using a smooth particle fluid dynamics method, and simulating the motion of the particles. Thus, larger and continuous self-adaptability is realized, time consumption is further reduced through more flexible and efficient refined region self-adaptive detection, and a more refined simulation effect can be generated.
Second embodiment
The present embodiment provides an electronic device, which includes a processor and a memory; wherein the memory has stored therein at least one instruction that is loaded and executed by the processor to implement the method of the first embodiment.
The electronic device may have a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) and one or more memories, where at least one instruction is stored in the memory, and the instruction is loaded by the processor and executes the method.
Third embodiment
The present embodiment provides a computer-readable storage medium, which stores at least one instruction, and the instruction is loaded and executed by a processor to implement the method of the first embodiment. The computer readable storage medium may be, among others, ROM, random access memory, CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like. The instructions stored therein may be loaded by a processor in the terminal and perform the above-described method.
Furthermore, it should be noted that the present invention may be provided as a method, apparatus or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied in the media.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks. These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should also be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal apparatus. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or terminal device that comprises the element.
Finally, it should be noted that while the above describes a preferred embodiment of the invention, it will be appreciated by those skilled in the art that, once the basic inventive concepts have been learned, numerous changes and modifications may be made without departing from the principles of the invention, which shall be deemed to be within the scope of the invention. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all changes and modifications that fall within the true scope of the embodiments of the present invention.

Claims (8)

1. A spatially adaptive fluid simulation method based on smooth particle fluid dynamics is characterized by comprising the following steps:
converting a three-dimensional model of a boundary solid object in a fluid simulation scene into an SDF (directed Distance Field) model, and obtaining a gradient Field of the SDF model;
adding fluid particle sets in a simulation scene, and introducing an SDF model and a gradient field thereof into the simulation scene;
in a single simulation time step, estimating the distance from the fluid particles to the surface of the solid by a level set method, calculating the scale function value of the particles by combining the SDF value of the particles, and delaying the attenuation of the fine particle scale function value near the boundary solid by applying a wake protection mechanism;
in a single simulation time step, calculating the optimal size of the particles according to the calculated size function value of the particles and a preset self-adaptive ratio, comparing the calculated optimal size of the particles with the size of the current particles, classifying the particles according to the comparison result, and adjusting the size of the particles according to the category of the particles;
in a single simulation time step, based on the fluid dynamics of the smooth particles, the dynamics calculation is carried out on the fluid particles, meanwhile, the coupling of the fluid particles and the boundary solid is processed, a time mixing scheme is used for stabilizing a numerical field, the physical properties of the particles and the physical properties of the boundary solid are updated, and the simulation in the current time step is completed.
2. The smooth particle hydrodynamics-based spatially adaptive fluid simulation method of claim 1, wherein the SDF model evaluates a distance from a location in space to a solid surface and uses a symbol to represent whether each location is inside or outside the solid; when the sign is a positive value, the corresponding position is outside the solid, and when the sign is a negative value, the corresponding position is inside the solid.
3. The smooth particle hydrodynamics-based spatially adaptive fluid simulation method of claim 1, wherein the fluid particles carry predetermined material properties including a combination of one or more of position, mass, density, velocity, and pressure.
4. The smooth particle hydrodynamics-based spatially adaptive fluid simulation method of claim 1, wherein estimating the distance of a fluid particle to the surface of a solid by a level set method and calculating the scale function values of the particle in conjunction with the SDF value at the particle while applying a wake protection mechanism to delay the decay of fine particle scale function values near a boundary solid, comprises:
calculating an initial level set estimation value for all particles by a level set method, performing iterative propagation of the level set values from the particles close to the surface to other inner particles in the neighborhood as the initial level set value of the particle until the level set values of all the particles are unchanged, and storing a level set value for the particle i
Figure FDA0003843664930000011
For a boundary solid b in a simulated scene * Extracting the SDF value of the position of the particle, and considering the preset optimal refining range
Figure FDA0003843664930000021
The solid scale function value of particle i was calculated by the following formula
Figure FDA0003843664930000022
Figure FDA0003843664930000023
Wherein,
Figure FDA0003843664930000024
an SDF value representing the position of the particle i;
applying a wake protection mechanism, iteratively performing the following processes: for particles that have just entered a certain range around the selected solid, a merging delay is set
Figure FDA0003843664930000025
For tau>0 particle, stopping attenuation of its solid scale function value, and propagating the currently stopped attenuation solid scale function value to the whole particle set to smooth the numerical field of the solid scale function; until the numerical field of the solid scale function does not change;
calculating the value of the scale function phi of the particle i by i
Figure FDA0003843664930000026
Wherein,
Figure FDA0003843664930000027
expressed as a particular solid b * Maximum combined time delay for the surrounding fluid particles to remain.
5. The method of claim 4, wherein the calculating an optimal particle size according to the calculated function value of the particle size and a preset adaptive ratio, comparing the calculated optimal particle size with a current particle size, classifying the particles according to the comparison result, and adjusting the particle size according to the particle type comprises:
calculating the optimal particle mass by linear interpolation according to the calculated scale function value of the particle and a preset adaptive ratio by using the following formula
Figure FDA0003843664930000028
Figure FDA0003843664930000029
Wherein m is base Representing the mass of the lowest resolution particle, and alpha represents a preset adaptation ratio, i.e. m for the mass of the highest resolution particle fine Satisfy m fine =αm base ,φ max Representing a maximum scale function value for defining a refinement range;
based on the calculated optimal particle mass, for mass m i Calculating the relative mass of the particles i
Figure FDA00038436649300000210
Classifying the particles according to their relative mass:
Figure FDA00038436649300000211
wherein, C i Representing the classification result of the particles, S, S, o, L and L respectively represent different particle types;
based on the classification of the particles, the splitting, merging or quality sharing is applied to different particles to adjust their scale.
6. The method of claim 5, wherein the applying splitting, merging, or mass sharing to different particles to adjust their dimensions based on the classification of the particles comprises:
distributing all the mass of the S-type particles to surrounding S-type or S-type particles, then distributing the mass to the S-type particles of other particles, and deleting the S-type particles from the particle set, wherein the particles receiving the mass obtain the momentum corresponding to the receiving mass according to the momentum conservation condition; assigning a portion of the mass of the class i particles to the surrounding class S or class S particles, and likewise, the particles of received mass will acquire momentum corresponding to the received mass;
splitting the L-type particles into several particles with mass close to m opt The split L-type particles are deleted from the particle set, the mass conservation and momentum conservation conditions are followed, the split particles inherit the speed of the original particles and the properties of other parts used for solving the fluid dynamics equation, and the position distribution of the split particles is optimized, so that the instability caused by the change of the spatial distribution of the particles due to the addition of new particles into the simulation is reduced.
7. The method according to claim 1, wherein the smooth particle fluid dynamics-based spatial adaptive fluid simulation method comprises performing a dynamics calculation on fluid particles while processing coupling between the fluid particles and boundary solids, stabilizing a numerical field using a time-blending scheme, and updating physical properties of the particles and the boundary solids, and comprises:
sampling other fluid particles around the fluid particles, deriving an approximate plane boundary at the particle position according to a directed distance field of a boundary solid, calculating the numerical contribution of the plane boundary, performing kinetic calculation on the fluid particles based on smooth particle dynamics, and calculating the density of the fluid particles;
based on smooth particle fluid dynamics, calculating the compressible state of a fluid field under the action of gravity, viscous force and surface tension according to a Navier-Stokes equation, and performing implicit iterative pressure solution on the fluid based on density invariance and non-divergence conditions to keep the volume of the fluid incompressible;
the velocity and position of the fluid particles are updated using newton's second law and a time integration method.
8. The method for spatially adaptive fluid simulation based on smooth particle hydrodynamics according to claim 7, wherein in the process of performing kinetic calculation of fluid particles based on smooth particle hydrodynamics while processing coupling of the fluid particles with a boundary solid, stabilizing a value field using a time-blending scheme, updating physical properties of the particles and physical properties of the boundary solid, a time-blending mechanism is applied, which preserves positions of original particles deleted from the simulation for a period of time after the fluid particles are split and combined, estimates densities and velocities of corresponding original particles based on the preserved positions and the fluid particles receiving the masses thereof, and blends the estimated densities and velocities into corresponding calculation results of child particles receiving the masses thereof, thereby maintaining behaviors of the child particles before splitting or combining occurs to some extent, further stabilizing the value field around them, and improving stability of the simulation;
wherein the time-mixing process for density is described as:
Figure FDA0003843664930000041
where ρ is o Representing the calculated density, p, of the original particle i A calculated density of particles representing the mass of the received original particles,
Figure FDA0003843664930000042
representing the density of the particles i after time mixing, wherein beta represents a preset time mixing weight, and the value of beta is gradually reduced to 0 along with the increase of the simulation time step;
the time mixing process for particle velocity is described as:
Figure FDA0003843664930000043
wherein v is o Representing the calculated velocity, v, of the primary particle i Particles representing the mass of received original particlesThe velocity obtained by the sub-calculation,
Figure FDA0003843664930000044
the velocity of the particle i after time mixing is shown.
CN202211110058.2A 2022-09-13 2022-09-13 Space self-adaptive fluid simulation method based on smooth particle fluid dynamics Pending CN115630586A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211110058.2A CN115630586A (en) 2022-09-13 2022-09-13 Space self-adaptive fluid simulation method based on smooth particle fluid dynamics

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211110058.2A CN115630586A (en) 2022-09-13 2022-09-13 Space self-adaptive fluid simulation method based on smooth particle fluid dynamics

Publications (1)

Publication Number Publication Date
CN115630586A true CN115630586A (en) 2023-01-20

Family

ID=84902514

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211110058.2A Pending CN115630586A (en) 2022-09-13 2022-09-13 Space self-adaptive fluid simulation method based on smooth particle fluid dynamics

Country Status (1)

Country Link
CN (1) CN115630586A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116416409A (en) * 2023-04-06 2023-07-11 山东大学 Fluid simulation particle self-adaptive resolution surface reconstruction method and system
CN117252131A (en) * 2023-11-20 2023-12-19 深圳十沣科技有限公司 Numerical simulation method and device suitable for thin-wall structure

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116416409A (en) * 2023-04-06 2023-07-11 山东大学 Fluid simulation particle self-adaptive resolution surface reconstruction method and system
CN116416409B (en) * 2023-04-06 2023-11-07 山东大学 Fluid simulation particle self-adaptive resolution surface reconstruction method and system
CN117252131A (en) * 2023-11-20 2023-12-19 深圳十沣科技有限公司 Numerical simulation method and device suitable for thin-wall structure
CN117252131B (en) * 2023-11-20 2024-03-01 深圳十沣科技有限公司 Numerical simulation method and device suitable for thin-wall structure

Similar Documents

Publication Publication Date Title
CN115630586A (en) Space self-adaptive fluid simulation method based on smooth particle fluid dynamics
US10929746B2 (en) Low-power hardware acceleration method and system for convolution neural network computation
Kim et al. FlowFixer: Using BFECC for Fluid Simulation.
Kim et al. Advections with significantly reduced dissipation and diffusion
Kyrkou et al. Embedded hardware-efficient real-time classification with cascade support vector machines
US7983884B2 (en) Water particle manipulation
KR101267627B1 (en) SPH Fluid simulation method and system for Multi-Level Vorticity, recording medium for the same
CN111159813B (en) Simulation-based method and system for analyzing fluid-solid coupling of upper wave slamming lower ship
Horvath et al. Mass preserving multi-scale SPH
CN112051959B (en) Method, device and equipment for generating image drawing process and storage medium
CN112862942B (en) Physical special effect simulation method, device, electronic equipment and storage medium
CN111680456A (en) Fluid mechanics simulation method, device and storage medium
TWI775210B (en) Data dividing method and processor for convolution operation
WO2020106871A1 (en) Image processing neural networks with dynamic filter activation
US11886832B2 (en) Operation device and operation method
Oh et al. Impulse‐based rigid body interaction in SPH
US9613449B2 (en) Method and apparatus for simulating stiff stacks
Weaver et al. Fluid Simulation by the Smoothed Particle Hydrodynamics Method: A Survey.
Liu et al. Accurate and efficient quantized reservoir computing system
Lim et al. Water simulation using a responsive surface tracking for flow-type changes
Sokolova et al. Maccelerator: Approximate arithmetic unit for computational acceleration
Degtyarev et al. Virtual testbed: ship motion simulation for personal workstations
CN116522740B (en) Method, device, equipment and medium for capturing oil-gas interface of engine nozzle
CN117787147B (en) Model building method for solving full-speed domain flow problem and related products
US20230316071A1 (en) Neural network generating device, neural network generating method, and neural network generating program

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