Hierarchical cloud fluid simulation method based on weak air particles and lennard-jones potential
By employing a layered cloud fluid simulation method based on weak air particles and Lennard-Jones potential, the problems of unrealistic cloud surface changes and slow rendering speed in existing technologies are solved. This method enables real-time rendering of cloud simulations and comprehensive consideration of environmental factors, thereby improving the realism of cloud surfaces and rendering speed.
Patent Information
- Application Number
- CN202211581605.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-08
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2042-12-08
AI Technical Summary
Existing cloud fluid simulation methods have shortcomings in rendering speed and consideration of environmental factors. In particular, they ignore the influence of atmospheric pressure on the cloud surface, resulting in unrealistic cloud surface changes and high computational complexity, making them unsuitable for real-time applications.
A layered cloud fluid simulation method based on weak air particles and Lennard-Jones potential is adopted. Meteorological data is collected through spatial layering, and the interaction force between particles is calculated by combining Lennard-Jones potential. The concept of weak air particles is introduced, and GPU acceleration computing and screen space rendering technology are used to consider the influence of various environmental factors such as wind speed, temperature, and humidity.
It achieves greater realism in cloud surface changes and improves rendering speed, reduces computational complexity, is suitable for real-time applications, and the cloud simulation is more in line with the real environment.
Smart Images

Figure CN115879390B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of computer graphics simulation, and relates to a cloud fluid simulation method. BACKGROUND
[0002] Clouds are physically a collection of small water droplets in the atmosphere, and are considered as one of the important components that should be simulated in outdoor scene visualization, such as flight simulators and video games. In such applications, clouds are not the only rendering object, and the combination of realism and real-time rendering is still a hot research topic in the field of virtual reality.
[0003] Existing methods to generate accurate animation of clouds can be divided into physical methods and procedural methods. Physical-based methods, such as relying on physical rules to simulate the macro behavior of clouds, however, these methods require high computational cost. On the other hand, procedural methods (such as reducing the computational time), but the control of cloud shape is usually carried out by trial and error. Clouds can be represented as fluid morphology. Therefore, the most commonly used method to simulate cloud fluid dynamics is to solve the Navier-Stokes equation, which is specifically used to describe fluid motion at a macroscopic scale. Although solving these partial differential equations can generate realistic cloud animation, the time step required to simulate incompressible fluid particles is still not suitable for real-time applications. At the same time, in the process of cloud simulation, only wind speed data and temperature data are collected to affect the movement of cloud simulation, and other factors affecting cloud generation are ignored, such as atmospheric pressure. When simulating cloud fluid, atmospheric pressure is usually ignored and free surface boundary conditions at the interface are assumed, so that the cloud surface will not change with the action of atmospheric pressure. SUMMARY
[0004] The present application overcomes the above-mentioned shortcomings of the prior art, and provides a layered cloud fluid simulation method based on weak air particles and Lennard-Jones potential.
[0005] In order to ensure rendering speed while considering as many environmental factors (wind speed, temperature, humidity, atmospheric pressure, etc.) as possible that affect cloud fluid simulation, the present application provides a cloud fluid simulation method that has fast rendering speed (SSF technology), uses Lennard-Jones potential to calculate the interaction force between cloud particles to reduce the computational complexity between particles caused by Navier-Stokes equation, introduces the concept of layering and weak air particles to solve the influence of different environmental factors and atmospheric pressure on cloud fluid simulation.
[0006] The technical scheme adopted by the present application to solve its technical problems is:
[0007] A layered cloud fluid simulation method based on weak air particles and Lennard-Jones potential, the simulation method comprising the following steps:
[0008] Step 1: Divide the space into layers according to height and collect meteorological data at different heights for each layer, such as temperature, wind speed, atmospheric pressure, humidity, and other data that affect cloud flow.
[0009] Step 2: Since the movement of cloud fluids is affected by different meteorological factors, different analyses are required for different meteorological data.
[0010] Step 3: For each layer of data, the interaction forces between gas particles can be calculated using the Lennard-Jones potential. The Lennard-Jones potential calculates the influence of different forces on gas particles based on the distance between them. This improves the original fluid particle calculation of the Navier-Stokes equations and can be accelerated by using GPUs to speed up the calculation.
[0011] Step 4: Since the space is divided into layers of height to import meteorological data at different altitudes, the concept of weak air particles can be introduced to calculate the changes in particle motion caused by different atmospheric pressures when particles enter different layers. The concept of two-phase flow can be used to calculate the changes in particle motion.
[0012] Step 5: After obtaining the specific values of particle motion changes, it is necessary to render them in screen space. Here, the ion surface construction method of Marching Cube will no longer be used. Instead, the more efficient SSF (Screen Space Particle Rendering) technology will be used to accelerate its rendering speed.
[0013] Furthermore, in step 2, the impact of each type of data on changes in the cloud formation set is as follows:
[0014] (2.1) Since temperature data has a great influence on the thermal field and also on the intermolecular forces in the Lennard-Jones potential, and the thermal field is significant for maintaining and correcting the motion stability of cloud fluids, it is necessary to construct the thermal field for the temperature data of each layer, and at the same time, it is also necessary to generate thermodynamic variables to calculate the force exerted by temperature on the motion of cloud fluids.
[0015] (2.2) Wind field data includes wind speed and wind direction. Wind speed affects the speed of cloud fluid movement, while wind direction affects the direction of cloud fluid movement. Wind speed and wind direction are different at different altitudes. Therefore, it is necessary to construct a relevant field for the wind field data generated in each layer of data to apply relevant speed changes to the cloud fluid data.
[0016] (2.3) Humidity data will affect the density of the cloud fluid changes, and then through the density equation calculation, the role, so need to each layer of data for different processing, humidity data at different altitudes are not the same. At the same time can help humidity data, dynamic adjustment of the size of the cloud particles, cloud particles in the formation of cloud surface process more natural.
[0017] Further, the step 3, based on the Lennard-Jones potential calculation process of the distance between particles as follows:
[0018]
[0019] Where alpha and beta are the gravitational term and repulsive term, they are constant terms, respectively, 12 and 6, r ij is the distance between molecules; sigma is the minimum separation distance between molecules, where the potential energy between molecules is 0; ∈ represents the strength of the potential energy between molecules.
[0020] (3.1) The interaction between two particles can be obtained by the distance between molecules, the specific calculation formula as follows:
[0021]
[0022] Since the force on the particle comes from the force of all particles within the surrounding smooth core radius, it is necessary to calculate the contribution of all particles around the force, the formula as follows:
[0023] F i =∑ i f(r ij ) r ij <r c (3)
[0024] Where r c is the maximum sampling radius.
[0025] (3.2) After calculating the distance on the force between particles, in order to ensure the stability of the whole system, also need to set the thermodynamic variables according to the different height temperature layer, to ensure system stability, for each layer of the thermodynamic variables calculation formula as follows:
[0026]
[0027] N is the number of particles in the current layer, m is the mass of the particle, generally default to 1.
[0028] With the thermodynamic variables of each layer, also need to adjust the speed of each particle based on the thermodynamic variables of each layer, the specific formula as follows:
[0029]
[0030] Further, in step 4, the process of introducing weak air particles is as follows:
[0031] (4.1) For different atmospheric pressures under different stratifications, the concept of weak air particles is introduced to interact with cloud particles to avoid instability caused by the entire movement system due to the large difference in particle density. At the same time, the weak air particle size radius is twice the size radius of the cloud particle to reduce the calculation overhead.
[0032] (5.2) After the concept of weak air particles is introduced, the position correction change formula of weak air particles in each time step in each layer needs to be calculated, and the specific calculation formula is as follows:
[0033]
[0034] Ω a ,Ω l are the weak air particle set and the cloud particle set, respectively, ρ a,0 is the density of the weak air particle, k l is a positive number to ensure the stability of the collision between the weak air particle and the cloud particle, is the partial derivative of the kernel function with a radius of h. Through the above formula, we can calculate the position correction value of the weak air particle, and then add it to the Lennard-Jones potential to participate in the calculation of the cloud particle.
[0035] (4.3) Because of the introduction of weak air particles, the position of the cloud particle also needs to be partially corrected, and the correction formula is as follows:
[0036]
[0037] where ρ i,0 is the density of the cloud particle. It can be seen here that the contribution of the weak air particle to the position correction of the cloud particle is ignored, which is also different from the weak air particle.
[0038] (4.4) The weak air particle also exerts a surface force on the surface formed by the cloud particle, so we also need to calculate the surface force on the surface of the cloud particle and the tension originally possessed by the surface.
[0039] Under the action of atmospheric pressure in meteorological data, a surface pressure will be exerted on the surface formed by the cloud particle, and the calculation formula of this surface pressure is as follows:
[0040]
[0041] where A i represents the relative density of air with respect to the static state and is gradually increased with the compression process, V i represents the volume of cloud particles, and p0 is the input current stratified atmospheric pressure value.
[0042] The beneficial effects of the present application mainly manifest in:
[0043] (1) Less rendering time. Based on the screen space rendering technique, the texture is generated in the form of GPU rendering acceleration, which is much faster than the previous Marching Cube grid construction technique and has better effect.
[0044] (2) The cloud surface changes more realistically. Based on the original Lennard-Jones potential, the weak air particle concept is introduced, and the atmospheric pressure data which has a greater impact on the cloud surface is added, so that the cloud surface is more consistent with the changes in the real environment.
[0045] (3) Based on high stratification, the cloud at different heights is more realistic. Discard the original interpolation based on the entire height space, divide according to the meteorological monitoring data height, more detailed meteorological data import, better stratified simulation, make the cloud simulation more consistent with the real data driving. BRIEF DESCRIPTION OF DRAWINGS
[0046] Figure 1 is a flowchart of the method of the present application.
[0047] DETAILED DESCRIPTION
[0048] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be described clearly and completely in combination with the drawings of the embodiments of the present application.
[0049] The present application will be further described below in combination with the drawings.
[0050] Step 1: stratify the space according to the height, and collect the meteorological data of different heights corresponding to each stratification, such as temperature, wind speed, atmospheric pressure, humidity and other data that will affect the cloud fluid motion.
[0051] Step 2: Since the motion of cloud fluid will be affected by different meteorological elements, different analyses need to be performed for different meteorological data
[0052] (2.1) Since temperature data has a great influence on the thermal field and the intermolecular force in the Lennard-Jones potential, and the thermal field is significant for the maintenance and correction of the motion stability of the cloud fluid, the temperature data of each layer needs to be constructed into a thermal field, and the thermodynamic variables also need to be generated to calculate the force exerted by the temperature on the cloud fluid motion.
[0053] (2.2) The wind field data includes wind speed and wind direction, which will affect the movement speed of the cloud fluid, and the wind direction will affect the movement direction of the cloud fluid. The wind speed and direction at different altitudes are not the same, so the wind field data generated for each layer of data needs to be constructed into a related field to exert a related speed change on the cloud fluid data.
[0054] (2.3) Humidity data will affect the change of the density of the cloud fluid, and the effect will be generated when the density equation is calculated, so different processing is needed for each layer of data. The humidity data at different altitudes are not the same. At the same time, the size of the cloud particle can be dynamically adjusted with the help of humidity data, so that the cloud particle is more natural in the process of forming the cloud surface.
[0055] Step 3: For each layer of data, the Lennard-Jones potential can be used to calculate the interaction force between gas particles. The Lennard-Jones potential can calculate the different forces between gas particles according to the distance between them. This can improve the original fluid particle calculation of the Navier-Stokes equation, and can accelerate the calculation speed of the fluid particle by using GPU acceleration. The optimized Lennard-Jones potential calculation formula based on the distance between particles is as follows:
[0056]
[0057] Where α and β are the gravitational term and the repulsive term, respectively, which are constant terms, 12 and 6, respectively, r ij is the distance between molecules; σ is the minimum separation distance between molecules, where the potential energy between molecules is 0; ∈ represents the strength of the potential energy between molecules.
[0058] (3.1) The interaction force between two particles can be obtained by the distance between molecules, and the specific calculation formula is as follows:
[0059]
[0060] Since the force on the particle comes from the force of all particles within the smooth core radius around it, the force contributed by all particles around it needs to be calculated, and the formula is as follows:
[0061] Fi =∑ i f(r ij ) r ij <r c (3)
[0062] where r c is the maximum sampling radius.
[0063] (3.2) After calculating the effect of distance on the inter-particle force, in order to ensure the stability of the entire system, the thermodynamic variables need to be set according to different height temperature layers, to ensure system stability. The thermodynamic variable calculation formula for each temperature layer is as follows:
[0064]
[0065] N is the number of particles in the current layer, and m is the mass of the particle, which is generally defaulted to 1.
[0066] After obtaining the thermodynamic variables of each layer, the speed of each particle based on the thermodynamic variables of each layer also needs to be adjusted, and the specific formula is as follows:
[0067]
[0068] Step 4: Since the space is highly layered to import meteorological data at different heights, the movement change of particles caused by different atmospheric pressures when entering different layers can be introduced into the concept of weak air particles, and the concept of two-phase flow can be used to calculate the movement change of particles.
[0069] (4.1) For the difference of atmospheric pressure in different layers, the concept of weak air particles is introduced, which interacts with cloud particles to avoid the instability of the entire movement system caused by the large difference in particle density. At the same time, the weak air particle size radius is twice the size radius of the cloud particle to reduce the calculation overhead.
[0070] (4.2) After introducing the concept of weak air particles, the position correction change formula of weak air particles in each time step in each layer needs to be calculated, and the specific calculation formula is as follows:
[0071]
[0072] Ω a ,Ω l are the weak air particle set and the cloud particle set, respectively, ρ a,0 is the density of the weak air particle, k l is a positive number to ensure the stability of the collision between the weak air particle and the cloud particle, is the partial derivative of the kernel function with radius h. Through the above formula, we can calculate the position correction value of the weak air particle, so as to add it into the Lennard-Jones potential and participate in the calculation of the cloud particle.
[0073] (4.3) Because the weak air particle is introduced, the position of the cloud particle also needs to be partially corrected, and the correction formula is as follows:
[0074]
[0075] where ρ i,0 is the density of the cloud particle. Here it can be seen that the contribution of the weak air particle to the position correction of the cloud particle is ignored, which is also different from the weak air particle.
[0076] (4.4) The weak air particle will also exert a surface force on the surface formed by the cloud particle, so we also need to calculate the surface force on the surface of the cloud particle and the tension originally possessed by the surface.
[0077] Under the action of atmospheric pressure in meteorological data, a surface pressure will be exerted on the surface formed by the cloud particle, and the calculation formula of the surface pressure is as follows:
[0078]
[0079] where A i represents the relative density of air relative to the static state and gradually increases with the compression process, V i represents the volume of the cloud particle, and p0 is the input current atmospheric pressure value of the stratification.
[0080] Step 5: After obtaining the specific numerical value of the particle motion change, it needs to be rendered in the screen space. Here, the Marching Cube ion surface construction method is not used, and the SSF (Screen Space Particle Rendering) technology with higher efficiency is selected to speed up the rendering rate.
[0081] The SSF technology mainly uses point sprites to draw all particles, records the depth of the drawn point sprite, and calculates the depth of the point sprite as a sphere, which is saved to the depth buffer. According to the drawn point sprite, its thickness is recorded, and the thickness calculation also regards the point sprite as a sphere, which is saved to the thickness buffer. The thickness cannot be output at the same time as the depth using MRT, because the thickness needs to be accumulated, so the depth test needs to be turned off, and alpha addition blending is used to accumulate the thickness. Then, through the corresponding filtering, the surface is processed, and finally output to 2 frame buffers to render the surface of the cloud. Compared with the Marching Cube surface calculation in the CPU, the SSF uses the GPU for surface reconstruction, greatly speeding up the rendering process.
Claims
1. A cloud fluid simulation method based on weak air particles and Lennard- Jones potential, characterized in that: The method comprises the following steps: Step 1: stratify the space according to height, and collect meteorological data of different heights corresponding to each stratification, which has an influence on the movement of cloud fluid; Step 2: analyze different meteorological data; Step 3: for each stratification data, the Lennard-Jones potential is used to calculate the interaction force between gas particles, and the Lennard-Jones potential is used to calculate the influence of different forces between gas particles according to the distance between gas particles, so as to improve the original fluid particle calculation of Navier-Stokes equation, and accelerate the operation by means of GPU, and accelerate the fluid particle calculation speed; Step 4: due to the stratification of space according to height, different height meteorological data is introduced, and the movement change of particles caused by different atmospheric pressures when entering different stratifications is introduced, and the concept of weak air particles is introduced, and the concept of two-phase flow is used to calculate the movement change of particles; the process of introducing weak air particles is as follows: (4.1) for the difference of atmospheric pressure in different stratifications, the concept of weak air particles is introduced, the interaction between weak air particles and cloud particles is realized, the instability phenomenon caused by the whole movement system due to the too large difference of particle density is avoided, and the size radius of the weak air particles is twice that of the cloud particles, so as to reduce the calculation overhead; (4.2) after the concept of weak air particles is introduced, the position correction change formula of weak air particles in each time step and in each layer needs to be calculated, and the specific calculation formula is as follows: (6) Ω a, Ω l are the set of weak air particles and the set of cloud particles, respectively, is the density of the weak air particles, is a positive number to ensure the stability of the collision between the weak air particles and the cloud particles, is the partial derivative of the kernel function with radius h; through the above formula, the position correction value of the weak air particles is calculated, which is added to the Lennard-Jones potential to participate in the influence on the calculation of the cloud particles; (4.3) because the weak air particles are introduced, the position of the cloud particles also needs to be partially corrected, and the correction formula is as follows: (7) wherein is the density of the cloud particles; (4.4) calculate the surface force on the surface of the cloud particles and the tension originally possessed by the surface; Under the action of atmospheric pressure in meteorological data, a surface pressure is applied to the surface formed by the cloud particles, and the calculation formula of the surface pressure is as follows: (8) where A i represents the relative density of air with respect to the static state and is gradually increased with the compression process, V i represents the volume of cloud particles, and p0is the input current stratified atmospheric pressure value; Step 5: adopt screen space particle rendering technology SSF to accelerate the rendering rate.
2. The method of claim 1, wherein the method is based on weak air particles and Lennard-Jones potential. The meteorological data in step 1 includes temperature, wind speed, atmospheric pressure and humidity.
3. The cloud fluid simulation method based on weak air particles and Lennard-Jones potential as described in claim 1, characterized in that: In step 2, the influence of each type of data on the change of cloud formation set is as follows: (2.1) temperature data has a great influence on thermal field and has a great influence on the interaction force between molecules in Lennard-Jones potential, and the thermal field has significance for the maintenance and correction of the movement stability of cloud fluid, so the thermal field of each stratification temperature data needs to be constructed, and the thermodynamic variable also needs to be generated to calculate the action force of temperature on cloud fluid movement; (2.2) the wind field data includes wind speed and wind direction, the wind speed will affect the movement speed of cloud fluid, and the wind direction will affect the movement direction of cloud fluid, and the wind speed and wind direction at different heights are different, so the wind field data generated in each stratification data needs to be constructed into a related field to exert a related speed change on the cloud fluid data; (2.3) Humidity data will affect the density of the cloud fluid changes, in the calculation by the density equation, so the need for each layer of data processing, humidity data at different altitudes are not the same.
4. The cloud fluid simulation method based on weak air particles and Lennard-Jones potential as described in claim 1, characterized in that: In step 3, the Lennard-Jones potential calculation process based on the distance between particles is as follows: (1) where a and b are the attractive and repulsive terms, respectively, which are constant terms, 12 and 6, respectively, r ij is the intermolecular distance; is the minimum separation distance between molecules, where the potential energy between molecules is 0; represents the strength of the potential energy between molecules; (3.1) The interaction force between two particles can be obtained by the intermolecular distance, and the specific calculation formula is as follows: (2) Since the force on the particle comes from the force of all particles within the surrounding smooth core radius, it is necessary to calculate the contribution of the force of all particles around it, and the formula is as follows: (3) where r c is the maximum sampling radius; (3.2) After calculating the effect of distance on the interaction between particles, in order to ensure the stability of the whole system, the thermodynamic variables need to be set according to the temperature layer at different altitudes to ensure the stability of the system. The calculation formula of the thermodynamic variable of each temperature layer is as follows: (4) N is the number of particles in the current layer, m is the mass of the particle, and 1 is the mass of the particle. After obtaining the thermodynamic variable of each layer, the speed of each particle based on the thermodynamic variable of each layer needs to be adjusted again, and the specific formula is as follows: (5) 5. The cloud fluid simulation method based on weak air particles and Lennard-Jones potential as described in claim 1, characterized in that: Step 5 specifically includes: SSF technology uses point sprites to draw all particles, records the depth of the point sprite according to the drawn point sprite, and calculates the point sprite as a sphere to save to the depth buffer; records the thickness of the point sprite according to the drawn point sprite, and also calculates the point sprite as a sphere to save to the thickness buffer; the thickness cannot be output at the same time as the depth using MRT, because the thickness needs to be accumulated, so the depth test needs to be turned off, and alpha addition blending is used to accumulate the thickness; then the surface is processed through the corresponding filter, and finally output to 2 frame buffers for cloud surface rendering.
Citation Information
Patent Citations
GPU (graphics processing unit) acceleration based real-time hybrid particle blood flow-blood vessel coupling method
CN104462830A
Three-dimensional cloud motion evolution method based on physics
CN110096766A