CN117078876A - Three-dimensional flow field simulation method and system and electronic equipment - Google Patents

Three-dimensional flow field simulation method and system and electronic equipment Download PDF

Info

Publication number
CN117078876A
CN117078876A CN202311041915.2A CN202311041915A CN117078876A CN 117078876 A CN117078876 A CN 117078876A CN 202311041915 A CN202311041915 A CN 202311041915A CN 117078876 A CN117078876 A CN 117078876A
Authority
CN
China
Prior art keywords
particle
flow field
updating
euler
particles
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
CN202311041915.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.)
Chinese Academy of Surveying and Mapping
Original Assignee
Chinese Academy of Surveying and Mapping
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 Chinese Academy of Surveying and Mapping filed Critical Chinese Academy of Surveying and Mapping
Priority to CN202311041915.2A priority Critical patent/CN117078876A/en
Publication of CN117078876A publication Critical patent/CN117078876A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/05Geographic models
    • 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
    • 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
    • G06F2111/00Details relating to CAD techniques
    • G06F2111/10Numerical modelling
    • 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)
  • Geometry (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Remote Sensing (AREA)
  • Algebra (AREA)
  • Computer Graphics (AREA)
  • Fluid Mechanics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Physics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a three-dimensional flow field simulation method, a system and electronic equipment, which belong to the field of environment simulation, wherein the method comprises the following steps: initializing a three-dimensional Euler grid, the number of particles, the position and the quality of each particle based on the river basin range and the terrain of the lake to be simulated; acquiring an Euler grid flow field at an initial moment in an Euler flow field updating period to determine the speed of each sub-grid at the initial moment and the speed of each particle at the initial moment; dividing the Euler flow field updating period into a plurality of subintervals, and determining a plurality of microscopic updating moments; aiming at any microscopic updating moment, calculating the stress condition of each particle at the microscopic updating moment by adopting a smooth particle fluid dynamics method, and further updating the speed and the position of each particle; and acquiring the Euler grid flow field at the end time in the Euler flow field updating period so as to update the speed of each sub-grid and simulate the movement condition of particles in the water environment. The invention improves the simulation precision of the three-dimensional flow field of the lake.

Description

Three-dimensional flow field simulation method and system and electronic equipment
Technical Field
The invention relates to the field of environment simulation, in particular to a three-dimensional flow field simulation method, a system and electronic equipment based on coupling of a geographic environment and smooth particles.
Background
The visual analysis of the flow field is beneficial to scientific expression and sharing of the professional knowledge of the geographic environment, helps researchers to intuitively understand the current distribution of the geographic environment and the time-space change rule, and effectively improves the cognitive efficiency of people on the time-space rule. In recent years, particle systems are widely studied in the three-dimensional visualization process of complex flow fields, particles are utilized to discretely express the real world, and in the aspect of hydrodynamic force vector field visualization, a great deal of research is carried out by domestic and foreign scholars around the aspect of dynamic simulation and emulation of flow field data, and in particular, a great deal of research and application are carried out in the aspect of three-dimensional flow field visualization of marine water environment.
However, visual analysis of small-scale flow fields in lakes is lacking. On one hand, the lake flow field is extremely easy to be influenced by external hydrology, meteorological environment and other conditions, so that the stability of the atmospheric or water environment flow field is poor, the regular characteristics are not obvious, and three-dimensional visual analysis is difficult. On the other hand, under the small and medium scale, the visual analysis of the lake water environment flow field has higher precision requirement, and if only the macroscopic Euler grid speed field is considered, the analysis result and the actual situation can be deviated. Therefore, three-dimensional flow field physical process simulation and experimental verification are required from a microscopic perspective.
Disclosure of Invention
The invention aims to provide a three-dimensional flow field simulation method, a system and electronic equipment, which can improve simulation accuracy of a lake three-dimensional flow field.
In order to achieve the above object, the present invention provides the following solutions:
a three-dimensional flow field simulation method, comprising:
acquiring the river basin range and the terrain of a lake to be simulated;
initializing a three-dimensional Euler grid based on the river basin range and the terrain of the lake to be simulated, and initializing the number of particles, the positions and the quality of each particle in the three-dimensional Euler grid; the three-dimensional euler mesh comprises a plurality of sub-meshes;
aiming at any Euler flow field updating period, obtaining an Euler grid flow field at an initial moment in the Euler flow field updating period;
determining the speed of each sub-grid at the initial moment and the speed of each particle at the initial moment according to the Euler grid flow field at the initial moment in the Euler flow field updating period;
dividing the Euler flow field updating period into a plurality of sub-periods, and determining a plurality of microscopic updating moments;
calculating the stress condition of each particle at the micro-updating moment by adopting a smooth particle fluid dynamics method aiming at any micro-updating moment based on the three-dimensional Euler grid, the mass of each particle, the current position of each particle and the speed of each particle at the previous micro-updating moment;
updating the speed and the position of each particle according to the stress condition of each particle at the micro-updating moment and the speed of each particle at the previous micro-updating moment until the last micro-updating moment in the Euler flow field updating period is reached;
and acquiring the Euler grid flow field at the end time in the Euler flow field updating period, and updating the speed of each sub-grid according to the Euler grid flow field at the end time in the Euler flow field updating period so as to simulate the movement condition of particles in the water environment.
In order to achieve the above purpose, the present invention also provides the following solutions:
a three-dimensional flow field simulation system, comprising:
the lake data acquisition module is used for acquiring the river basin range and the topography of the lake to be simulated;
the grid particle initializing module is used for initializing a three-dimensional Euler grid based on the river basin range and the terrain of the lake to be simulated, and initializing the number of particles, the positions and the quality of each particle in the three-dimensional Euler grid; the three-dimensional euler mesh comprises a plurality of sub-meshes;
the flow field acquisition module is used for acquiring the Euler grid flow field at the initial moment in the Euler flow field updating period aiming at any Euler flow field updating period;
the speed initialization module is used for determining the speed of each sub-grid at the initial moment and the speed of each particle at the initial moment according to the Euler grid flow field at the initial moment in the Euler flow field updating period;
the period dividing module is used for dividing the Euler flow field updating period into a plurality of sub-periods and determining a plurality of microscopic updating moments;
the stress calculation module is used for calculating the stress condition of each particle at the micro-updating moment by adopting a smooth particle fluid dynamics method according to the three-dimensional Euler grid, the mass of each particle, the current position of each particle and the speed of each particle at the previous micro-updating moment;
the micro-updating module is used for updating the speed and the position of each particle according to the stress condition of each particle at the micro-updating moment and the speed of each particle at the previous micro-updating moment until the last micro-updating moment in the Euler flow field updating period is reached;
the macroscopic updating module is used for acquiring the Euler grid flow field at the end time in the Euler flow field updating period and updating the speed of each sub-grid according to the Euler grid flow field at the end time in the Euler flow field updating period so as to simulate the movement condition of particles in the water environment.
In order to achieve the above purpose, the present invention also provides the following solutions:
an electronic device comprising a memory for storing a computer program and a processor running the computer program to cause the electronic device to perform the three-dimensional flow field simulation method described above.
According to the specific embodiment provided by the invention, the invention discloses the following technical effects:
the invention combines Euler and Lagrange methods to simulate the flow field, macroscopically updates the speed of each sub-grid through the three-dimensional Euler flow field, determines the speed of each particle at the initial moment, microscopically calculates the stress condition of each particle by using a smooth particle fluid dynamics method in the Euler flow field updating period, further updates the speed and the position of each particle according to the stress condition of the particle, realizes the simulation of the water environment pollutant diffusion and sediment accumulation process, and improves the simulation precision of the lake three-dimensional flow field.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the drawings that are needed in the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a three-dimensional flow field simulation method provided by the invention;
FIG. 2 is a schematic diagram of a three-dimensional analysis process of a flow field with Euler mesh and smooth particle coupling;
fig. 3 is a schematic diagram of a three-dimensional flow field simulation system provided by the present invention.
Symbol description:
the system comprises a 1-lake data acquisition module, a 2-grid particle initialization module, a 3-flow field acquisition module, a 4-speed initialization module, a 5-time interval division module, a 6-stress calculation module, a 7-micro update module and an 8-macro update module.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The invention aims to provide a three-dimensional flow field simulation method, a system and electronic equipment, which are used for coupling a geographic environment and a particle system, creating a large-scale space-time particle system in a three-dimensional grid numerical simulation mode, combining a hydrodynamic model Delft3D to generate three-dimensional flow field data (comprising position, flow velocity, flow direction, depth and the like), initializing particles into the grid system, driving the particles to move through calculation stress, realizing real-time calculation and dynamic simulation of a hydrodynamic water quality model in the three-dimensional environment, and providing a visual analysis method for the development mechanism of pollutants in a lake water environment and a concentrated space.
In order that the above-recited objects, features and advantages of the present invention will become more readily apparent, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description.
Example 1
As shown in fig. 1 and 2, the present embodiment provides a three-dimensional flow field simulation method, including:
step 100: and obtaining the river basin range and the terrain of the lake to be simulated.
Step 200: initializing a three-dimensional Euler grid based on the river basin range and the terrain of the lake to be simulated, and initializing the number of particles, the positions and the quality of each particle in the three-dimensional Euler grid. The three-dimensional euler mesh includes a plurality of sub-meshes.
Specifically, step 200 includes Euler mesh initialization and particle initialization. Euler grid initialization mainly establishes grid space boundaries and internal flow fields, and adopts regular rectangular grids for initialization. Its advantages are high generation speed and high calculation efficiency. Particle initialization mainly sets the spatial position and speed of particles and realizes the coupled modeling of Euler grids and particles. The Euler grid is used as a carrier of particles, the density of the particles in the Euler grid is controlled, and the convergence and stability of the flow field in a simulation period are regulated and controlled.
The initialization process mainly carries out grid instantiation, flow field and terrain coupling initialization, grid particle initialization and related variable setting work, and sets grid and particle logic data models according to initialization conditions. Creating a grid data structure according to the Euler grid flow field, storing a logic container for moving particles, initializing the particles in each sub-grid, randomly distributing the particles around the grid center point at the initial position in the sub-grid, correlating the attribute information of the particles with the codes of the sub-grid, and recording the codes of the sub-grid where the particles are located.
Step 300: and aiming at any Euler flow field updating period, obtaining the Euler grid flow field at the initial moment in the Euler flow field updating period.
Step 400: and determining the speed of each sub-grid at the initial moment and the speed of each particle at the initial moment according to the Euler grid flow field at the initial moment in the Euler flow field updating period.
Step 500: dividing the Euler flow field updating period into a plurality of subintervals, and determining a plurality of microscopic updating moments.
Step 600: and calculating the stress condition of each particle at the micro-updating moment by adopting a smooth particle fluid dynamics method according to any micro-updating moment based on the three-dimensional Euler grid, the mass of each particle, the current position of each particle and the speed of each particle at the previous micro-updating moment.
After the three-dimensional euler mesh and particle initialization is completed, the further work that needs to be done to better simulate the movement of the particles in the three-dimensional euler mesh is to couple the particles by a smooth particle hydrodynamic method (Smoothed Particle Hydrodynamics, SPH). In flow fields, the force is typically present in the form of a field, but unlike when applied to SPH methods, SPH methods apply a novel form of local area approximation to the differential domain. The system is discretized into a series of particles that carry their respective physical properties and move following a control equation. Based on interpolation theory, the physical quantity carried by the fluid particles is allowed to be defined only at discrete rather than continuous positions, and the physical quantity of a particle can be interpolated from the physical quantities of the surrounding particles anywhere in space.
In particular, the stress conditions include the density of the particles, the viscous forces to which the particles are subjected, and the pressure to which the particles are subjected.
In the actual calculation process, the density of the particles needs to be solved first, and the density of the particles is not the concept of the number of particles in a unit volume, but the ratio of the mass to the volume, and in this embodiment, the density of the particles is calculated by using a poly6 function as a kernel function:
wherein ρ is i For the density of particle i, m i For the mass of particle i, h is the smooth radius,representing the distance vector between particle i and particle j, determined from the current positions of particle i and particle j. The volume of the calculation process is the supporting domain of the single particle, in which the process first determines whether the particle is located in the supporting domain, and then the product of the mass of the single particle and the kernel function is accumulated.
The viscous force to which the particle i is subjected is calculated using the following formula:
wherein F is i,v The viscous force applied to the particles i, mu is the dynamic viscosity, m j For the mass of particle j, v i,t-1 For the velocity of particle i at the previous microscopic update instant, v j,t-1 For the velocity of particle j at the previous microscopic update time, particle j is the neighborhood particle of particle i, ρ j For the density of particle i, W () is a velocity smoothing kernel function,the Nabla operator is a vector differential operator, and directly acts on scalar function representation to calculate the gradient of the vector differential operator.
The pressure to which the particle i is subjected is calculated using the following formula:
wherein F is i,p Is the pressure to which the particles i are subjected. The forces between two particles located in different pressure zones are not equal, so that the arithmetic mean of the pressures of the two particles is generally used in the calculation instead of the pressure of the single particle.
And after the stress condition of each particle at the microscopic updating moment is calculated, the particle acceleration and the particle velocity can be calculated. And calculating the acceleration of the particles under the current stress and the speed of the particles in the next time step, assigning the speed to the particles, calculating the speed of the particles again in the next time step, circularly repeating the process, finally obtaining a finer three-dimensional continuous flow field under the driving of the interaction force, and updating the motion state and the position attribute of the particles in real time.
Step 700: and updating the speed and the position of each particle according to the stress condition of each particle at the micro-updating moment and the speed of each particle at the previous micro-updating moment until the last micro-updating moment in the Euler flow field updating period is reached.
Specifically, a numerical method (such as the Euler method) is used to simulate the movement of the particles based on the stress conditions of the particles. According to the properties of the particles such as mass, acceleration, speed and the like, the position and speed change of the particles is calculated through numerical integration, and the real-time movement process of the particles in the water environment is simulated.
Further, step 700 includes:
(1) And calculating the acceleration of any particle according to the stress condition of the particle at the microscopic updating moment.
(2) And calculating the speed of the particles at the micro-updating moment according to the acceleration of the particles and the speed of the particles at the previous micro-updating moment.
Specifically, the velocity of particle i at time t is calculated using the following formula:
wherein v is i,t The velocity of the particle i at the time t, which is the microscopic update time, v i,t-1 For the velocity of particle i at time t-1, Δt is the time step, a i Acceleration g of particle i i For the external force of particle i ρ i For the density of particle i, F i,p For the pressure to which the particles i are subjected, F i,v Is the viscous force to which the particles i are subjected.
(3) And determining the preliminary position of the particle at the next microscopic updating moment according to the speed of the particle at the microscopic updating moment.
(4) Judging whether the preliminary position of the particle at the next microscopic updating moment is positioned in an Euler grid flow field or not; if the preliminary position of the particle at the next microscopic updating moment is not positioned in the Euler grid flow field, deleting the particle in the Euler grid flow field; otherwise, the positions of the particles are updated in the Euler mesh flow field according to the initial positions of the particles at the next microscopic updating moment.
(5) Judging whether the current position of the particle and the position of the previous microscopic updating moment are positioned in the same sub-grid or not; if yes, entering the next microscopic updating moment; otherwise, the speed of the particles is updated in the Euler grid flow field according to the speed of the subgrid corresponding to the current position of the particles and the current speed of the particles, and the next micro-updating time is entered until the last micro-updating time in the Euler flow field updating period is reached.
In the conventional simulation method, the interaction force between particles is not calculated, and the particles are simply moved according to the speed of the grid. The invention not only considers the grid flow velocity, but also simulates more particles in the grid, and considers the stress analysis among the particles, so that the flow state of the particles is more continuous.
Step 800: and acquiring the Euler grid flow field at the end time in the Euler flow field updating period, and updating the speed of each sub-grid according to the Euler grid flow field at the end time in the Euler flow field updating period so as to simulate the movement condition of particles in the water environment.
Compared with the traditional particle system which only performs uniform motion according to the current grid speed in a flow field gap, the invention fully combines the characteristics of Euler field macroscopic control and Lagrange method microcosmic precision, each particle performs stress calculation in a macroscopic Euler flow field change gap, and algorithm and numerical support are provided for particle motion simulation after particle density calculation, viscosity force calculation, pressure calculation, acceleration and speed solution.
The invention adopts a mixed Euler-Lagrange method to simulate a large-scale water environment, and combines a macroscopic Euler field and a microscopic particle updating mode.
Wherein, macroscopic Euler flow field update: the macroscopic Euler field updating process internally comprises a plurality of microscopic particle updating cycle periods, and is relatively complex. In reality, the time and flow field are continuous, but the time in three-dimensional simulation is discrete. The main idea is to perform overall control based on macroscopic Euler fields, and to drive the overall movement of particles by updating the grid flow fields. And in the Euler flow field updating period (T to T+1 are one Euler flow field updating period), grid flow field updating is carried out in the Euler flow field updating period, and updating circulation of a plurality of microscopic particles is carried out to approximate to an actual continuous flow field.
Updating microscopic particles: subdividing time steps, subdividing the Euler flow field update period into multiple aliquots, e.g., subdividing T to T+1 into 10 aliquots (T 1 ,t 2 ,t 3 ......t 10 ) The actual continuous flow field is approximated by numerical simulation. In the Euler flow field change gap, each particle carries out stress calculation, including density calculation, viscosity force calculation, pressure calculation, acceleration and speed solution. Through the calculation and the solution, the stress and the motion process of the particles are simulated, so that the microscopic particles are more approximate to the actual motion trail.
Particle velocity and location update: the speed and position of the particles are continuously updated during each rendering cycle while the life cycle and boundary overflow conditions of the particles are monitored. For fluid boundary treatment, special treatments are performed according to the position of the particles and boundary conditions, including destruction treatments in which the particles adhere to the boundary or exceed the boundary.
Smooth connection of the macroscopic flow field and the microscopic flow field: to ensure that the particle velocity does not experience abnormal abrupt changes during macroscopic flow field updates. According to the invention, the particle stress condition is calculated by adopting an SPH method simplified by the Lagrangian principle, and the direction and the speed of the particles are calculated according to the information of surrounding particles of the position inquiry of the particles, so that the movement track of the particles is processed smoothly.
The invention realizes large-scale water environment simulation by combining macroscopic and microscopic characteristics through a Euler-Lagrange algorithm. Through the calculation and the updating, the acceleration, the speed and the position of the particles can be obtained, so that the movement and the behavior of the particles in the water environment can be simulated.
In order to improve the intuitiveness of the simulation, the three-dimensional flow field simulation method further comprises the following steps:
step 900: and displaying the movement condition of the particles in the water environment in a three-dimensional visualization mode.
Specifically, based on the results of the force calculation and the motion simulation, the simulated particle motion condition is output in a three-dimensional visual mode. The motion trail of the particles in the water environment can be visualized in real time by utilizing the attribute information such as the position, the speed and the like of the particles and combining the flow field data formed by the hydrodynamic model. Through three-dimensional visual output, dynamic characteristics such as movement behaviors and interaction of particles can be intuitively observed and analyzed.
In addition, considering that the lake depth is too small relative to the plane scale value, if the particle system in the three-dimensional scene is required to meet the condition that the space formed by all particles is matched with the height of the actual water body area, the vertical distribution of the particle system can be provided with a plurality of layers of particles, and the vertical distance cannot meet the arrangement of the plurality of layers of particles. In view of the above problems, the present invention uses two kinds of particles of different colors to represent the surface layer and the bottom layer, respectively. Wherein white particles are used for representing the surface flow field, blue particles are used for representing the underwater particles, and although the two particles represent different flow field elements, the flow velocity, birth, update, extinction, boundary treatment and three-dimensional visualization modes are basically consistent. And the three-dimensional particle diffusion and sediment accumulation scene observation experience is formed by distinguishing different colors.
By adopting the method to simulate particle motion, the solving process of a fluid dynamic equation is simplified, the fluid surface flow effect can be simulated at the Web end, the overall stable control of the flow field is realized based on the global control of the grid flow field, and the vivid effect of the stress state in the fluid motion is enhanced.
The adoption of the geographic environment and smooth particle coupling technology remarkably improves the detailed expression and visual analysis capability of the lake space-time field model (comprising a scalar field and a vector field) and the overall process continuous simulation and decision analysis capability of the lake water dynamics. Carrying out algorithm optimization by adopting a hybrid Euler-Lagrangian method, and macroscopically controlling the movement direction and the initialization speed of particles through a three-dimensional Euler flow field; microcosmic, in the time gap between the front flow field and the back flow field, the SPH method is utilized to calculate the mutual stress effect between particles, and the particles are driven to locally move according to the viscous force and the pressure of the particles, so that the real-time calculation and the dynamic simulation of the particles are realized. And then the diffusion of water environment pollutants, the simulation of sediment accumulation process and three-dimensional visual analysis are realized, and visual calculation and analysis methods are provided for exploring the research of lake water pollution causes and emergency space development mechanisms.
The invention takes a hydrodynamic model of a certain lake as an example to develop a water environment hydrodynamic model research, realizes the simulation of the movement diffusion and aggregation process of particles in the water environment of the lake, provides support for researching the three-dimensional space development mechanism of large-scale lake water environment pollutants, and verifies the invention by comparing and analyzing test results with manual investigation data.
According to the invention, on the basis of three-dimensional visualization, the lake pollutant diffusion rule can be effectively explored while calculation and visual analysis are performed, which areas have better diffusion conditions and which areas are easier to collect pollutants are obtained by analysis, a visual calculation and analysis method is provided for researching the lake water pollution cause and the space development mechanism, and the lake water dynamics decision support capability is remarkably improved.
Example two
In order to execute a corresponding method of the above embodiment to achieve the corresponding functions and technical effects, a three-dimensional flow field simulation system is provided below.
As shown in fig. 3, the three-dimensional flow field simulation system provided in this embodiment includes: lake data acquisition module 1, grid particle initialization module 2, flow field acquisition module 3, speed initialization module 4, time interval division module 5, stress calculation module 6, micro update module 7 and macro update module 8.
The lake data acquisition module 1 is used for acquiring the river basin range and the terrain of the lake to be simulated.
The grid particle initializing module 2 is used for initializing a three-dimensional Euler grid based on the river basin range and the terrain of the lake to be simulated, and initializing the number of particles, the positions and the quality of each particle in the three-dimensional Euler grid; the three-dimensional euler mesh includes a plurality of sub-meshes.
The flow field acquisition module 3 is used for acquiring the Euler mesh flow field at the initial moment in the Euler flow field update period aiming at any Euler flow field update period.
The speed initialization module 4 is configured to determine, according to the euler grid flow field at an initial time in the euler flow field update period, a speed of each sub-grid at the initial time and a speed of each particle at the initial time.
The period dividing module 5 is configured to divide the euler flow field update period into a plurality of subintervals, and determine a plurality of microscopic update moments.
The stress calculation module 6 is configured to calculate, for any micro-update time, a stress condition of each particle at the micro-update time by using a smooth particle fluid dynamics method based on the three-dimensional euler mesh, the mass of each particle, the current position of each particle, and the speed of each particle at the previous micro-update time.
The micro-updating module 7 is configured to update the speed and the position of each particle according to the stress condition of each particle at the micro-updating time and the speed of each particle at the previous micro-updating time until the last micro-updating time in the euler flow field updating period is reached.
The macro updating module 8 is used for acquiring the Euler grid flow field at the end time in the Euler flow field updating period, and updating the speed of each sub-grid according to the Euler grid flow field at the end time in the Euler flow field updating period so as to simulate the movement condition of particles in the water environment.
Compared with the prior art, the three-dimensional flow field simulation system provided by the embodiment has the same beneficial effects as the three-dimensional flow field simulation method provided by the first embodiment, and is not described in detail herein.
Example III
The embodiment provides an electronic device, including a memory and a processor, where the memory is configured to store a computer program, and the processor runs the computer program to enable the electronic device to execute the three-dimensional flow field simulation method of the first embodiment.
Alternatively, the electronic device may be a server.
In addition, the embodiment of the invention also provides a computer readable storage medium, which stores a computer program, and the computer program realizes the three-dimensional flow field simulation method of the first embodiment when being executed by a processor.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other.
The principles and embodiments of the present invention have been described herein with reference to specific examples, the description of which is intended only to assist in understanding the methods of the present invention and the core ideas thereof; also, it is within the scope of the present invention to be modified by those of ordinary skill in the art in light of the present teachings. In view of the foregoing, this description should not be construed as limiting the invention.

Claims (10)

1. A three-dimensional flow field simulation method, characterized in that the three-dimensional flow field simulation method comprises:
acquiring the river basin range and the terrain of a lake to be simulated;
initializing a three-dimensional Euler grid based on the river basin range and the terrain of the lake to be simulated, and initializing the number of particles, the positions and the quality of each particle in the three-dimensional Euler grid; the three-dimensional euler mesh comprises a plurality of sub-meshes;
aiming at any Euler flow field updating period, obtaining an Euler grid flow field at an initial moment in the Euler flow field updating period;
determining the speed of each sub-grid at the initial moment and the speed of each particle at the initial moment according to the Euler grid flow field at the initial moment in the Euler flow field updating period;
dividing the Euler flow field updating period into a plurality of sub-periods, and determining a plurality of microscopic updating moments;
calculating the stress condition of each particle at the micro-updating moment by adopting a smooth particle fluid dynamics method aiming at any micro-updating moment based on the three-dimensional Euler grid, the mass of each particle, the current position of each particle and the speed of each particle at the previous micro-updating moment;
updating the speed and the position of each particle according to the stress condition of each particle at the micro-updating moment and the speed of each particle at the previous micro-updating moment until the last micro-updating moment in the Euler flow field updating period is reached;
and acquiring the Euler grid flow field at the end time in the Euler flow field updating period, and updating the speed of each sub-grid according to the Euler grid flow field at the end time in the Euler flow field updating period so as to simulate the movement condition of particles in the water environment.
2. The method of claim 1, wherein the stress conditions include a density of the particles, a viscous force experienced by the particles, and a pressure experienced by the particles.
3. The three-dimensional flow field simulation method according to claim 2, wherein the density of the particles i is calculated using the following formula:
wherein ρ is i For the density of particle i, m i Is the mass of particle iH is the smooth radius of the steel plate,representing the distance vector between particle i and particle j, determined from the current positions of particle i and particle j.
4. A three-dimensional flow field simulation method according to claim 3, wherein the viscous force to which the particle i is subjected is calculated using the formula:
wherein F is i,v The viscous force applied to the particles i, mu is the dynamic viscosity, m j For the mass of particle j, v i,t-1 For the velocity of particle i at the previous microscopic update instant, v j,t-1 For the velocity of particle j at the previous microscopic update time, particle j is the neighborhood particle of particle i, ρ j For the density of particle i, W () is a velocity smoothing kernel function,is a Nabla operator.
5. The three-dimensional flow field simulation method according to claim 4, wherein the pressure to which the particle i is subjected is calculated using the following formula:
wherein F is i,p Is the pressure to which the particles i are subjected.
6. The three-dimensional flow field simulation method according to claim 2, wherein the speed and the position of each particle are updated according to the stress condition of each particle at the micro-update time and the speed of each particle at the previous micro-update time until the last micro-update time in the euler flow field update period is reached, specifically comprising:
for any particle, calculating the acceleration of the particle according to the stress condition of the particle at the microscopic updating moment;
calculating the speed of the particles at the micro-updating moment according to the acceleration of the particles and the speed of the particles at the previous micro-updating moment;
determining a preliminary position of the particle at the next microscopic update time according to the speed of the particle at the microscopic update time;
judging whether the preliminary position of the particle at the next microscopic updating moment is positioned in an Euler grid flow field or not; if the preliminary position of the particle at the next microscopic updating moment is not positioned in the Euler grid flow field, deleting the particle in the Euler grid flow field; otherwise, updating the position of the particle in the Euler grid flow field according to the initial position of the particle at the next microscopic updating moment;
judging whether the current position of the particle and the position of the previous microscopic updating moment are positioned in the same sub-grid or not; if yes, entering the next microscopic updating moment; otherwise, the speed of the particles is updated in the Euler grid flow field according to the speed of the subgrid corresponding to the current position of the particles and the current speed of the particles, and the next micro-updating time is entered until the last micro-updating time in the Euler flow field updating period is reached.
7. The three-dimensional flow field simulation method according to claim 6, wherein the velocity of the particle i at time t is calculated using the following formula:
wherein v is i,t The velocity of the particle i at the time t, which is the microscopic update time, v i,t-1 For the velocity of particle i at time t-1, Δt is the time step, a i Acceleration for particle iDegree, g i For the external force of particle i ρ i For the density of particle i, F i,p For the pressure to which the particles i are subjected, F i,v Is the viscous force to which the particles i are subjected.
8. The three-dimensional flow field simulation method according to claim 1, further comprising:
and displaying the movement condition of the particles in the water environment in a three-dimensional visualization mode.
9. A three-dimensional flow field simulation system, characterized in that it is applied to the three-dimensional flow field simulation method according to any one of claims 1 to 8, comprising:
the lake data acquisition module is used for acquiring the river basin range and the topography of the lake to be simulated;
the grid particle initializing module is used for initializing a three-dimensional Euler grid based on the river basin range and the terrain of the lake to be simulated, and initializing the number of particles, the positions and the quality of each particle in the three-dimensional Euler grid; the three-dimensional euler mesh comprises a plurality of sub-meshes;
the flow field acquisition module is used for acquiring the Euler grid flow field at the initial moment in the Euler flow field updating period aiming at any Euler flow field updating period;
the speed initialization module is used for determining the speed of each sub-grid at the initial moment and the speed of each particle at the initial moment according to the Euler grid flow field at the initial moment in the Euler flow field updating period;
the period dividing module is used for dividing the Euler flow field updating period into a plurality of sub-periods and determining a plurality of microscopic updating moments;
the stress calculation module is used for calculating the stress condition of each particle at the micro-updating moment by adopting a smooth particle fluid dynamics method according to the three-dimensional Euler grid, the mass of each particle, the current position of each particle and the speed of each particle at the previous micro-updating moment;
the micro-updating module is used for updating the speed and the position of each particle according to the stress condition of each particle at the micro-updating moment and the speed of each particle at the previous micro-updating moment until the last micro-updating moment in the Euler flow field updating period is reached;
the macroscopic updating module is used for acquiring the Euler grid flow field at the end time in the Euler flow field updating period and updating the speed of each sub-grid according to the Euler grid flow field at the end time in the Euler flow field updating period so as to simulate the movement condition of particles in the water environment.
10. An electronic device comprising a memory for storing a computer program and a processor that runs the computer program to cause the electronic device to perform the three-dimensional flow field simulation method of any one of claims 1 to 8.
CN202311041915.2A 2023-08-18 2023-08-18 Three-dimensional flow field simulation method and system and electronic equipment Pending CN117078876A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311041915.2A CN117078876A (en) 2023-08-18 2023-08-18 Three-dimensional flow field simulation method and system and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311041915.2A CN117078876A (en) 2023-08-18 2023-08-18 Three-dimensional flow field simulation method and system and electronic equipment

Publications (1)

Publication Number Publication Date
CN117078876A true CN117078876A (en) 2023-11-17

Family

ID=88716529

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311041915.2A Pending CN117078876A (en) 2023-08-18 2023-08-18 Three-dimensional flow field simulation method and system and electronic equipment

Country Status (1)

Country Link
CN (1) CN117078876A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117592171A (en) * 2024-01-18 2024-02-23 北京适创科技有限公司 Water distribution data calculation method and device and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117592171A (en) * 2024-01-18 2024-02-23 北京适创科技有限公司 Water distribution data calculation method and device and electronic equipment
CN117592171B (en) * 2024-01-18 2024-04-12 北京适创科技有限公司 Water distribution data calculation method and device and electronic equipment

Similar Documents

Publication Publication Date Title
CN109696292B (en) Wave simulation method and device of pool wave generator and wave generating equipment
CN111768502A (en) Non-structural grid two-dimensional flood simulation system based on GPU acceleration technology
CN117078876A (en) Three-dimensional flow field simulation method and system and electronic equipment
CN108983605B (en) Rigid body control method for fluid guidance based on deep reinforcement learning
CN110020459A (en) Based on Dynamic mesh ship with wave the motion simulation method on course-and-bearing
KR100568563B1 (en) A real-time simulation and rendering method for fluid flows using particle dynamics and volume rendering techniques
Liu et al. Multi-block lattice Boltzmann simulations of solute transport in shallow water flows
KR100568562B1 (en) A real-time simulation and rendering method for fluid flows using continuum fluid mechanics and volume rendering techniques
CN105006015A (en) Control method and system for position-based fluid simulation
CN114511995B (en) Flood classification early warning method based on expressed model
CN108108569B (en) Rapid hull modeling method based on buoyancy surface element
CN104517299B (en) Method for restoring and resimulating physical video fluid driving model
CN115600420A (en) Flooding simulation method based on static non-uniform grid and GPU parallel computation
CN111523280B (en) Water flow simulation method based on space coupling integrated numerical model
Pan et al. Wake synthesis for shallow water equation
CN114997006A (en) River sediment transport process numerical simulation method based on multiple GPU parallel frames
Mola et al. Ship sinkage and trim predictions based on a CAD interfaced fully nonlinear potential model
Fujisawa et al. Particle-based shallow water simulation with splashes and breaking waves
KR102026153B1 (en) The method for numerical simulation of advection-diffusion of blue-green algae using multi-scale model including agent-based model
Liu The Third Simulation: Augmented Reality Fluvial Modeling Tool
KR100729149B1 (en) Method for simulating controllable multiphase gas, recording medium and apparatus thereof
Ai et al. An improved shallow water equation model for water animation
Roh et al. Controllable multi-phase smoke with lagrangian particles
Habibi et al. Dynamic particle coating
De-Jian et al. A Neural Network Based Defect Prediction Approach for Virtual High Pressure Die Casting

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