Method for validating spacecraft design based on hybrid precision data optimization ugwkwp method

By optimizing the UGKWP method with mixed precision data, and combining high-precision correction, scale-independent relative coordinate transformation, and low-precision dynamic quantization, the problem of excessive memory requirements of the UGKWP method is solved, achieving efficient memory utilization and stable computational accuracy, making it suitable for multi-scale flow simulation in spacecraft design.

CN121980689BActive Publication Date: 2026-06-19CHINA AERODYNAMICS RES AND DEV CENT ULTRA-HIGH SPEED AERODYNAMICS RES INST

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA AERODYNAMICS RES AND DEV CENT ULTRA-HIGH SPEED AERODYNAMICS RES INST
Filing Date
2026-04-07
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

The UGKWP method has excessive memory requirements during computation, which limits its application scale. Furthermore, it is difficult to expand the video memory on heterogeneous parallel processors, resulting in a performance bottleneck. In addition, the high memory overhead of double-precision floating-point numbers cannot be effectively compressed.

Method used

The UGKWP method, which optimizes data using mixed precision, optimizes memory usage for macroscopic and microscopic physical quantities of cells by using mixed precision data optimization and precision compensation algorithms, including bool data, int16 data, FP16 data and a small amount of FP64 data. It also reduces memory requirements by using a high-precision calibrated data localization strategy, a scale-independent relative coordinate transformation method and a low-precision dynamic quantization method.

Benefits of technology

It significantly reduces memory requirements while maintaining computational accuracy, reduces bandwidth usage, and improves computational efficiency, making it suitable for multi-scale flow simulation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121980689B_ABST
    Figure CN121980689B_ABST
Patent Text Reader

Abstract

This invention discloses a method for verifying spacecraft design based on hybrid precision data optimization using the UGKWP method, relating to the field of spacecraft design. The method includes: S1, using the designed shape data of the spacecraft as input data for the UGKWP method; S2, the UGKWP method performing simulation calculations based on the input data to obtain theoretical values ​​of the external flow field of the spacecraft in a multi-scale environment; S3, verifying the spacecraft's performance based on the theoretical values ​​obtained in S2 to guide further optimization of the spacecraft's shape design. The UGKWP method reduces the memory footprint of macroscopic and microscopic physical quantities during simulation by using hybrid precision data optimization and precision compensation algorithms. Based on the characteristics of different physical quantities and their different uses in the calculation program, this invention uses different low-precision data formats to store microscopic physical quantities and designs different precision compensation algorithms to ensure the conservation of physical quantities and stable computation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of spacecraft design. More specifically, this invention relates to a method for validating spacecraft designs by optimizing the UGKWP method based on mixed-precision data. Background Technology

[0002] With the development of aerospace technology, the airspace explored by humankind has expanded from the traditional dense atmospheric environment to near space, outer space, and even deep space. Correspondingly, the mission airspace of spacecraft has also expanded from the traditional single flow domain to multi-scale flow domains encompassing both continuous and rarefied flows. For example, after traversing continuous and glide flow domains during the ascent phase, hypersonic gliders need to perform maneuvers in suborbital space dominated by transitional or even free molecular flows; reusable launch vehicles, when returning from outer space to Earth's atmosphere, also undergo a multi-scale flow evolution process from free molecular flows to transitional flows, and finally to continuous flows. The UGKWP (Unified Gas-kinetic Wave-particle) method is a gas kinetics approach that focuses on simulating multi-scale flow problems.

[0003] The UGKWP method requires not only recording macroscopic conservation quantities within the cells but also storing a large amount of microscopic information about simulated particles (including mass, velocity, and spatial position). Typically, each grid cell contains tens to hundreds of simulated particles, and this number is further increased when dealing with low-speed flow problems to reduce statistical noise. This large-scale storage requirement for microscopic particle data places higher demands on the memory capacity of computing devices. While CPU servers can flexibly expand their memory capacity by adding memory modules, on heterogeneous parallel processors like GPUs, the memory chips are usually directly soldered onto the substrate, making it difficult for users to arbitrarily expand as needed. Therefore, excessive memory requirements not only limit the algorithm's application scale but also consume more bandwidth, creating a performance bottleneck.

[0004] In the field of scientific computing, using double-precision data for numerical computation has become the de facto standard. This practice is mainly based on two key factors: first, according to the IEEE 754 standard, double-precision floating-point numbers have a very wide range of numerical representations; second, double-precision floating-point numbers can provide 15-17 decimal significant digits. This high precision effectively avoids the accumulation of truncation errors caused by complex calculations and frequent iterations. This is especially true for the UGKWP method. Compared to traditional CFD methods based on macroscopic quantities, UGKWP simulates the flow field through analytical distribution functions and simulated particles. Its moment calculation process and particle parameters contain many small quantities. Only by using double-precision data can we ensure that these small quantities are not truncated during the calculation process. However, each double-precision floating-point number requires 8 bytes of memory space, which is significantly higher than that of single-precision floating-point numbers (4 bytes) and half-precision floating-point numbers (2 bytes). Therefore, using mixed-precision data has become the most direct way to compress the algorithm's memory. Summary of the Invention

[0005] One object of the present invention is to solve at least the above-mentioned problems and / or defects, and to provide at least the advantages described below.

[0006] To achieve these objectives and other advantages of the present invention, a method for optimizing the UGKWP method based on mixed-precision data to verify spacecraft designs is provided, comprising:

[0007] S1. Use the spacecraft's designed shape data as input data for the UGKWP method;

[0008] The S2 and UGKWP methods perform simulation calculations based on input data to obtain theoretical values ​​of the external flow field of the spacecraft in a multi-scale environment;

[0009] S3. Verify the spacecraft's performance based on the theoretical values ​​obtained in S2 to guide the next step of spacecraft shape design optimization;

[0010] Among them, the UGKWP method reduces the memory usage of macroscopic and microscopic physical quantities of the unit during the simulation process by using a hybrid precision data optimization and precision compensation algorithm.

[0011] Preferably, the mixed precision data includes: bool data, int16 data, FP16 data, and FP64 data.

[0012] Preferably, in the UGKWP method, the update form of the unit macroscopic quantity based on mixed-precision data optimization is characterized by the following formula:

[0013]

[0014] In the above formula, and They are respectively n and n +1 moment i Macroscopic quantities of a unit For the volume of this unit, This represents the area of ​​the grid interface. To balance flux, Represents analytical transport flux. The net particle flux within the time step, and , where m, 'e' represents mass, velocity, and energy, respectively. This represents the physical quantities carried by microscopic particles in low-precision FP16 form, and 'p' is short for particle. Let N(i) represent the moment when the particle's motion ends, and let N(i) represent all the mesh faces of element i. FP16 indicates the moment before the particle's motion, representing a quantity expressed in low precision.

[0015] For the time step, the flux term of the correction particle is given, and ,in, This represents the microscopic physical information carried by the equivalent particle, and , eqv means equivalent.

[0016] Preferably, the microscopic physical quantities mainly include: particle flight time prtTf, particle mass prtMass, particle velocity prtVloc, and particle position prtPos;

[0017] In the UGKWP method, the particle flight time prtTf and particle mass prtMass are optimized respectively through a data localization strategy based on high-precision correction.

[0018] In the UGKWP method, the particle position prtPos data is optimized using a scale-independent relative coordinate transformation method;

[0019] In the UGKWP method, the particle velocity prtVloc data is optimized using a low-precision dynamic quantization method.

[0020] Preferably, the high-precision correction data localization strategy refers to:

[0021] Based on the fixed-point data method, low-precision int16 data is used to store two types of data: particle flight time prtTf and particle mass prtMass. A set of high-precision FP64 adjoint correction arrays is introduced to correct the stored fixed-point low-precision particle mass prtMass data.

[0022] The length of the accompanying correction array is the same as the number of grids in the computational domain, and the accompanying correction array includes three parts: mass correction, momentum correction, and energy correction.

[0023] Preferably, the data localization strategy for particle time-of-flight (prtTf) is characterized by the following formula:

[0024] The quantization factor 2 is dynamically calculated based on the maximum value of the original high-precision FP64 array. m Quantization is performed to obtain the fixed-point form of the particle flight time prtTf quantization. The following relationship should be satisfied:

[0025]

[0026] In the above formula, This represents the maximum value that low-precision data (int16) can represent. 2 is the time step size of the current step. m This refers to the quantization factor dynamically calculated using the maximum value of the original high-precision FP64 array, and .

[0027] Preferably, the data localization strategy for particle mass prtMass refers to:

[0028] Using quantization factor 2 m After the original high-precision data is quantized and amplified, its integer part is stored in the half-precision mass array in the form of int16, while the truncated decimal part and the momentum and energy corresponding to the truncated part are accumulated into the high-precision correction array of the corresponding grid as mass correction, momentum correction and energy correction respectively.

[0029] Since the accompanying correction array independently participates in the calculation of particle flux and the statistical process of macroscopic quantities, and is updated in each iteration step, the quantization factor 2 is updated based on the extreme value of particle mass. m Then, the collision-free P should be updated according to the new quantization factor. left The low-precision mass array of the particles, and during the update process, P left The truncation error caused by the precision conversion of particles and the newly sampled particle P samp The truncation error during the quantization process is accumulated in the accompanying correction array.

[0030] Preferably, after updating the adjoint correction array, the mass, momentum, and energy recorded in the adjoint correction array of each grid are equivalent to an adjoint simulated particle P. eqv And P eqvThe transport time is sampled in the same way as other actual simulated particles;

[0031] Among them, P eqv The quality and velocity are obtained from the macroscopic quantities accumulated in the accompanying correction array, and in P eqv During the movement, the correction flux generated through the mesh interface Considered free transport flux A portion of it participates in the calculation of the unit net flux, and is included in the macroscopic quantities of the statistical particle part. At that time, P, which did not collide eqv They will be included in the statistical scope.

[0032] Preferably, the scale-independent relative coordinate transformation method refers to using low-precision FP16 data to store particle position information, and decomposing the particle position information into high-precision absolute coordinates of the cell center and low-precision relative coordinates of the particles, and recording them separately.

[0033] In the particle tracking process, the low-precision particle relative coordinates are calculated using the following formula. :

[0034]

[0035] In the above formula, For high-precision absolute coordinates of the unit center, Represents the projection vector of the control volume. These are the absolute coordinates of the particle's position;

[0036] When the positional relationship of particles in the cell grid changes, the relative coordinates of the corresponding particles need to be updated according to the absolute coordinates of the center of the new grid and the projection. If a particle collides, the low-precision particle data corresponding to the colliding particle is removed from memory.

[0037] Preferably, the low-precision dynamic quantization method refers to decomposing the microscopic particle velocity into unit macroscopic velocity and sampling velocity, and storing them separately;

[0038] Among them, the macroscopic velocity always maintains a double-precision form. The sampling velocity is represented by a low-precision FP16 dataset that can meet the predetermined normal distribution characteristics. The low-precision data is obtained by processing the particle velocity data through low-precision quantization. The low-precision quantization refers to reducing storage requirements by truncating the low significant digits of the high-precision data through a predetermined precision loss.

[0039] When precise velocity values ​​are required, the sampled velocity and the macroscopic velocity of the unit cell can be combined to restore the high-precision microscopic particle velocity using the following formula:

[0040]

[0041] In the above formula, Let be the velocity of a microscopic particle, and let the velocity of the microscopic particle satisfy the following condition: The standard deviation is It follows a normal distribution.

[0042] The present invention has at least the following beneficial effects:

[0043] Based on the characteristics of different physical quantities and their different uses in calculation programs, this invention uses different low-precision data formats to store microscopic physical quantities and designs different precision compensation algorithms to ensure the conservation of physical quantities and the stable progress of calculation.

[0044] Other advantages, objectives and features of the present invention will become apparent in part from the following description, and in part from those skilled in the art through study and practice of the invention. Attached Figure Description

[0045] Figure 1 This is a schematic diagram illustrating the process of performing high-precision correction on particle mass data prtMass based on the high-precision correction data localization strategy of the present invention.

[0046] Figure 2 This is a schematic diagram of the algorithm flow for high-precision correction of particle mass data prtMass based on the data localization strategy of high-precision correction according to the present invention.

[0047] Figure 3 This diagram illustrates the process of "aligning" the exponent bits when performing arithmetic operations using floating-point numbers.

[0048] Figure 4 This is a schematic diagram illustrating the particle coordinate transformation of particle position data prtPos using the scale-independent relative coordinate transformation method of the present invention.

[0049] Figure 5 This is a schematic diagram illustrating the simulated particle position distribution after multiple iterations when processing particle position data prtPos using a scale-independent relative coordinate transformation method according to the present invention.

[0050] Figure 6 This is a schematic diagram of the probability distribution of low-precision data when the particle velocity rtVloc is processed based on the low-precision dynamic quantization method of the present invention.

[0051] Figure 7 This diagram illustrates the comparison of memory usage before and after implementing the UGKWP method with the MPMO simplification strategy. Detailed Implementation

[0052] The present invention will now be described in further detail with reference to the accompanying drawings, so that those skilled in the art can implement it based on the description.

[0053] This invention develops a Mixed Precision Memory Optimization (MPMO) strategy for the UGKW method, which uses bool, int16, FP16 and a small amount of FP64 data to replace the single FP64 data storage scheme. At the same time, it designs a variety of precision compensation algorithms to ensure that the computational accuracy is not affected while significantly reducing memory requirements.

[0054] The core step in implementing the UGKWP method within the finite volume method framework is the updating of the macroscopic quantities of the elements. The process of updating the original UGKWP macroscopic quantities can be expressed by the following formula:

[0055]

[0056] In the above formula, and They are respectively n and n +1 moment i Macroscopic quantities of a unit For the volume of this unit, This represents the area of ​​the grid interface. To balance flux, Represents analytical transport flux. This represents the net particle flux within the time step.

[0057] The update form of macroscopic quantities of the unit needs to be adjusted after the introduction of the MPMO strategy, as shown in the following equation:

[0058]

[0059] In the above formula and These are the low-precision particle flux and the correction particle flux terms within the time step, respectively.

[0060] Low-precision particle flux The low-precision physical quantity carried by the particles is obtained by calculating the difference in the total number of microscopic particles within the unit before and after the time step, as shown in the following formula:

[0061]

[0062] in, This represents the low-precision, microscopic physical information carried by a particle; the subscript p is short for particle, m, ... 'e' represents mass, velocity, and energy, respectively. Let N(i) represent the moment when the particle's motion ends, and let N(i) represent all the mesh faces of element i. FP16 indicates the moment before the particle's motion, representing a quantity expressed in low precision.

[0063] Corrected flux The result is obtained by observing the changes in the corrected physical quantities carried by the "accompanying particles" within the statistical unit, as shown in the following formula:

[0064]

[0065] In the above formula The superscript eqv in the above formula represents the microscopic physical information carried by the equivalent particle. It is an abbreviation for equivalent. The generation and tracking mechanism of the accompanying particle will be explained in detail later.

[0066] In the UGKWP method, the microscopic physical quantities carried by microparticles are mainly time of flight (prtTf), mass (prtMass), velocity (prtVloc), and position (prtPos). This invention will store microscopic physical quantities in different low-precision data formats according to the characteristics of different physical quantities and their different uses in the calculation program, and design different precision compensation algorithms to ensure the conservation of physical quantities and the stable progress of the calculation.

[0067] 1. Data localization strategy based on high-precision correction (prtTf, prtMass)

[0068] The data localization strategy based on high-precision correction refers to using low-precision data (unsigned int16) to store the flight time (prtTf) and mass (prtMass) data of simulated particles, and introducing a set of accompanying data (FP64) to correct the localized low-precision data, thereby avoiding the mass non-conservation problem caused by truncation error while ensuring memory efficiency.

[0069] Fixed-point numbers are a numerical representation method that falls between floating-point and integer data types. The term "fixed-point" refers to the fixed position of the decimal point, as opposed to "floating-point." Under the same bit width, fixed-point numbers do not require storing and processing the exponent and mantissa, thus offering a larger data representation range and higher computational efficiency than floating-point numbers. In high-level languages ​​such as C / C++ and Fortran, the behavior of fixed-point numbers can be simulated using built-in data types. To achieve the goal of minimizing memory usage while maintaining accuracy, this invention uses unsigned half-precision integer (unsigned int16) data to represent fixed-point numbers. Therefore, the original high-precision (FP64) data first needs to be quantized. To ensure that the quantized array data fully adapts to the fixed-point representation range, the quantization factor needs to be dynamically calculated based on the maximum value of the array. The maximum value in the prtTf data is the time step size of the current step. Assuming the quantization factor is in the form of 2 m Then the fixed-point form of the particle flight time quantization ( The following relationship should be satisfied:

[0070]

[0071] In the above formula, This is the maximum value that an unsigned int16 can represent. According to the definition of a floating-point number above, It is a number greater than or equal to 0 and less than 1, therefore the exponent m of the quantization factor should satisfy: .

[0072] For the mass data prtMass, due to the limited precision of unsigned int16 data, to avoid mass non-conservation caused by the accumulation of truncation errors during data transformation, this scheme introduces an additional FP64 adjoint correction array. This array includes three parts: mass correction, momentum correction, and energy correction, and its length is the same as the number of grid cells (cellAmt) in the computational domain. All truncation errors generated during the localization of simulated particles in the grid are accumulated in the correction array, such as... Figure 1 As shown, Figure 1 The scale markings on the number line represent the exponent part of the floating-point number. Since the sampled raw particle mass data is double-precision, the minimum value of the number line is 2. −1022 (Considering only normalized floating-point numbers); the maximum value of unsigned int16 is 2. 16 -1, therefore the exponent of the quantized particle mass cannot exceed 2. 15 ,Right now Figure 1 The maximum value on the number line; the quantized data is in units of 2. 0 The data is divided into integer and fractional parts, and stored in different arrays. Figure 1 The squares in the diagram represent particle data in memory. According to the definition of floating-point numbers, assume the mantissa bits of the original high-precision data are... a 1. a 2 and a 3, the corresponding exponents are e1, e2 and e3 respectively. Figure 1 The solid square on the left represents the original high-precision data stored in memory. This is achieved using a quantization factor of 2. m After amplifying the data, the exponents become e1+m, e2+m, and e3+m, that is... Figure 1 The data is represented by the dashed squares. The quantized integer part is stored as an unsigned int16 in the half-precision mass array. The truncated fractional part, along with the corresponding momentum and energy, is accumulated in the high-precision correction array of the corresponding grid. This effectively avoids the problem of failing to satisfy conservation laws when simulating particle mass, momentum, and energy using only low-precision data storage. When particle mass data is needed in the kernel function, a quantization factor of 2 is used. m Dequantization restores low-precision fixed-point data to high-precision floating-point numbers, that is, it restores the exponents of the data from e1+m, e2+m and e3+m back to e1, e2 and e3.

[0073] The accompanying correction array will independently participate in the calculation of particle flux and the statistical process of macroscopic quantities, and will be updated in each iteration step. Figure 2 This is a flowchart of the high-precision calibration process for the prtMass array. The calibration array changes dynamically in each iteration step and needs to be recalculated. The quantization factor 2 is updated based on the extreme particle mass values. m Then, the collisionless particle P is first updated according to the new quantization factor. left The low-precision quality array. During the update process, the truncation error caused by the precision conversion is first accumulated in the correction array. New sampled particle P samp The truncation error during the quantization process is also accumulated in the correction array of the corresponding grid.

[0074] Based on the characteristics of the UGKWP method, after updating the calibration array, the data in the array needs to be redistributed. Specifically, this involves equating the mass, momentum, and energy recorded in the calibration array of each grid to the physical information carried by an accompanying simulated particle. This equivalent accompanying particle P... eqv It will be randomly distributed at any position in this grid. The transport time is sampled like other actual simulated particles. Therefore, this companion particle may or may not collide at the current time step. The collision probability depends on the macroscopic quantity of the element. P eqvThe mass and velocity are derived from the accumulated macroscopic quantities in the accompanying correction data, and follow the same motion rules as actual simulated particles, sometimes even moving into adjacent grid cells. Therefore, the correction flux generated when the accompanying particle moves across the grid interface... It will be considered as free transport flux A portion of this is involved in the calculation of the unit's net flux. In the macroscopic quantities of the statistical particle part... At that time, accompanying particles that did not collide are included in the statistics.

[0075] In the UGKWP method, each grid cell typically contains tens to hundreds of simulated particles, meaning the number of particles prtAmt and the number of grid cells cellAmt satisfy the relationship prtAmt≍poly(10)·cellAmt. After introducing a data localization strategy based on high-precision correction, the lengths of both prtTf and prtMass arrays were reduced from 8 prtAmt to 2 prtAmt + 8 cellAmt, significantly reducing the memory usage of these two arrays.

[0076] 2. Scale-independent relative coordinate transformation method (prtPos)

[0077] The exponential representation of floating-point numbers results in an uneven distribution of data values ​​on the number line. This leads to more pronounced rounding errors when performing calculations on natural numbers with larger absolute values. The position of the decimal point in floating-point numbers is not fixed; before addition or subtraction, it is essential to ensure that the exponents of the two floating-point numbers are identical, i.e., the decimal points must be aligned. During exponent alignment, the smaller exponent needs to be incremented by a certain value, which causes a rightward shift of the mantissa (e.g., ...). Figure 3 (As shown). The limited number of mantissa bits can cause the loss of significant bits in the smaller part of the number. When the mantissa bits are shifted too far to the right, and all significant mantissa bits are converted to truncated bits, the smaller floating-point number cannot be reflected in the calculation. Therefore, in the UGKWP method, the position data of simulated particles is usually stored using double-precision floating-point numbers. This ensures that the smaller floating-point number always has enough significant bits over a large range, avoiding the phenomenon of "large numbers eating small numbers".

[0078] In simulations of Gnussen number flow, most particles in the flow field persist for several iterations, and the truncation error in their position update process accumulates over time, such as... Figure 5As shown, directly using low-precision data to record particle positions leads to a gradual increase in positional error with each iteration, resulting in errors in the particle-unit relationship calculation. Ultimately, this causes a non-conservation of particle flux and macroscopic particle quantities, leading to calculation failure. Therefore, to ensure computational stability and accuracy, the UGKWP method needs to use double-precision floating-point numbers to record particle position information. To save valuable memory resources on GPU devices, this paper proposes a method for storing particle position information using low-precision FP16 data, namely a scale-independent relative coordinate transformation method. Figure 4 As shown, Figure 4 The solid gray dots represent simulated particles, the solid red lines identify a grid cell, the black coordinate system is the global reference system, and the red coordinate system is the local reference system. Figure 4 The black dashed line 'a' and the red dashed line 'c' are used to represent the coordinates from the global reference system. x 1. y 1) Transform to local reference frame coordinates ( x' 1. y' In the process of 1), the black dashed line b and the red dashed line d are used to represent the coordinates from the global reference system ( x 2. y 2) Transform to local reference frame coordinates ( x' 2. y' 2). To fully utilize the limited effective bits of the FP16, when calculating the relative coordinates of the particles, the relative coordinates are dimensionless using the projections of the control volume in each direction, as shown in the following equation:

[0079]

[0080] In the above formula, These are the absolute coordinates of the particle's position. Represents low-precision relative coordinates. The coordinates of the unit center are Represents the projection vector of the control volume.

[0081] This method decomposes particle position information into high-precision absolute coordinates of the cell center and low-precision relative coordinates of the particles, and records them separately. When particle position data is needed (mainly in particle tracking), the absolute coordinates of the particles can be recalculated based on the absolute coordinates of the cell center and the relative coordinates of the particles. After the particle cell relationship changes, the relative coordinates of the particles need to be updated based on the absolute coordinates of the new grid center and the projection. If a particle collides, the low-precision particle data also needs to be removed from memory (it should be noted that, just like in actual simulated particles, low-precision particle data after a collision needs to be removed). Figure 5The particle position distributions of data records with different precisions after multiple iterations were compared. The results show that using only FP16 leads to significant deviations in particle positions, and this error accumulates with increasing iteration count. In contrast, after multiple iterations, using a scale-independent relative coordinate transformation method, the particles can still be accurately distributed on the reference line, indicating that this method can achieve numerical precision comparable to double-precision floating-point numbers while saving memory space.

[0082] 3. Low-precision dynamic quantization method (prtVloc)

[0083] Simulating particle velocity in the UGKWP method Satisfying the mean is The standard deviation is The formula for the normal distribution is as follows:

[0084]

[0085] In the above formula, n is a normally distributed random number. Since there is no direct correlation between the data distribution characteristics and storage precision, particle velocity data can be processed by low-precision quantization.

[0086] Low-precision quantization refers to a technique that reduces storage requirements by truncating the least significant digits of high-precision data, utilizing controllable precision loss. Taking the normally distributed dataset 0.508050379, −1.76866128, and 2.12960716 as an example, low-precision quantization converts them to 0.508, −1.768, and 2.1296. After testing this low-precision dataset using the Kolmogorov-Smirnov method, the p-value is greater than 0.15, indicating that at a 95% confidence level, the data maintains the same normal distribution characteristics before and after quantization. Figure 6 As shown, particle velocity can be decomposed into macroscopic velocity and sampled velocity, and stored separately. The former always maintains a double-precision form, while the latter can be represented using a low-precision dataset that satisfies specific normal distribution characteristics. Since the macroscopic velocity is always recorded in memory, this low-precision quantization method reduces the length of each particle velocity array from 8 prtAmt to 2 prtAmt, significantly saving memory.

[0087] The MPMO strategy uses FP16 to store the quantized particle sampling velocities separately. When precise velocity values ​​are needed, they can be synthesized from the macroscopic velocities of the cells using a normal distribution formula to restore high-precision values. Since the microscopic velocity is composed of the macroscopic velocities of the cells and the sampling velocities, the low-precision sampling velocity data needs to be dynamically updated based on the changes in the macroscopic quantities of the cells after each time step. The low-precision particle sampling velocities are only used for storage; when it is actually necessary to calculate the macroscopic quantities and flux of particles within the cells, the high-precision particle velocity data is still used, so there is no issue of accuracy loss.

[0088] By employing the MPMO strategy described above, the memory requirements of the UGKWP method can be significantly reduced. Figure 7 This paper presents the real-time memory usage of mixed-precision and high-precision algorithms during the entire computation process for two different Knudsen number examples before and after adopting this strategy. Since the computation speed of different algorithms varies under different conditions, the time was normalized. When the Knudsen number is 0.001, the peak memory usage of the high-precision UGKWP algorithm is 9.96 GiB, which is reduced to 2.97 GiB after adopting the mixed-precision memory optimization strategy. When Kn=10.0, the peak memory usage decreases from 7.80 GiB to 2.42 GiB, both representing a reduction of approximately 69% in memory consumption.

[0089] In practical applications, the shape data of the spacecraft after design can be used as input data for the UGKWP method. The UGKWP method performs simulation calculations based on the input data to obtain the theoretical values ​​of the external flow field of the spacecraft in a multi-scale environment. The UGKWP method reduces the memory usage of macroscopic and microscopic physical quantities of the unit during the simulation process by using a hybrid precision data optimization and precision compensation algorithm. Furthermore, the obtained theoretical values ​​are used to verify the performance of the spacecraft to guide the next step of spacecraft shape design optimization.

[0090] The above solution is merely an illustration of a preferred example and is not limited thereto. When implementing this invention, appropriate substitutions and / or modifications can be made according to the user's needs.

[0091] Although embodiments of the present invention have been disclosed above, they are not limited to the applications listed in the specification and embodiments. It can be applied to various fields suitable for the present invention. Other modifications can be readily made by those skilled in the art. Therefore, without departing from the general concept defined by the claims and their equivalents, the present invention is not limited to the specific details and examples shown and described herein.

Claims

1. A method for optimizing the UGKWP method based on mixed-precision data to verify spacecraft design, characterized in that, include: S1. Use the spacecraft's designed shape data as input data for the UGKWP method; The S2 and UGKWP methods perform simulation calculations based on input data to obtain theoretical values ​​of the external flow field of the spacecraft in a multi-scale environment; S3. Verify the spacecraft's performance based on the theoretical values ​​obtained in S2 to guide the next step of spacecraft shape design optimization; Among them, the UGKWP method reduces the memory usage of macroscopic and microscopic physical quantities of the unit during the simulation process by using a hybrid precision data optimization and precision compensation algorithm; In the UGKWP method, the update form of the unit macroscopic quantity based on mixed-precision data optimization is characterized by the following formula: In the above formula, and They are respectively n and n +1 moment i Macroscopic quantities of a unit For the volume of this unit, This represents the area of ​​the grid interface. To balance flux, Represents analytical transport flux. The net particle flux within a time step requires adjustment to the update form of macroscopic quantities in the cell after introducing the MPMO strategy, as shown in the following equation: In the above formula, and These are the low-precision particle flux and the corrected particle flux terms within the time step, respectively. , where m, 'e' represents mass, velocity, and energy, respectively. This represents the physical quantities carried by microscopic particles in low-precision FP16 form, and 'p' is short for particle. Let N(i) represent the moment when the particle's motion ends, and let N(i) represent all the mesh faces of element i. FP16 indicates the moment before the particle's motion, representing a quantity expressed in low precision. For the time step, the flux term of the correction particle is given, and ,in, This represents the microscopic physical information carried by the equivalent particle, and eqv means equivalent; The microscopic physical quantities include: particle flight time prtTf, particle mass prtMass, particle velocity prtVloc, and particle position prtPos. In the UGKWP method, the particle flight time prtTf and particle mass prtMass are optimized respectively through a data localization strategy based on high-precision correction. In the UGKWP method, the particle position prtPos data is optimized using a scale-independent relative coordinate transformation method; In the UGKWP method, the particle velocity prtVloc data is optimized using a low-precision dynamic quantization method; The high-precision correction data localization strategy refers to: Based on the fixed-point data method, low-precision int16 data is used to store two types of data: particle flight time prtTf and particle mass prtMass. A set of high-precision FP64 adjoint correction arrays is introduced to correct the stored fixed-point low-precision particle mass prtMass data. The length of the accompanying correction array is the same as the number of grids in the computational domain, and the accompanying correction array includes three parts: mass correction, momentum correction and energy correction. The scale-independent relative coordinate transformation method refers to using low-precision FP16 data to store particle position information, and decomposing the particle position information into high-precision absolute coordinates of the cell center and low-precision relative coordinates of the particles, and recording them separately. In the particle tracking process, the low-precision particle relative coordinates are calculated using the following formula. : In the above formula, For high-precision absolute coordinates of the unit center, Represents the projection vector of the control volume. These are the absolute coordinates of the particle's position; When the positional relationship of particles in the cell grid changes, the relative coordinates of the corresponding particles need to be updated according to the absolute coordinates of the center of the new grid and the projection amount. If a particle collides, the low-precision particle data corresponding to the colliding particle is removed from memory. The low-precision dynamic quantization method refers to breaking down the velocity of microscopic particles into unit macroscopic velocities and sampling velocities, and storing them separately. Among them, the macroscopic velocity always maintains a double-precision form. The sampling velocity is represented by a low-precision FP16 dataset that can meet the predetermined normal distribution characteristics. The low-precision data is obtained by processing the particle velocity data through low-precision quantization. The low-precision quantization refers to reducing storage requirements by truncating the low significant digits of the high-precision data through a predetermined precision loss. When precise velocity values ​​are required, the sampled velocity and the macroscopic velocity of the unit cell are synthesized and restored to a high-precision microscopic particle velocity using the following formula: In the above formula, Let be the velocity of a microscopic particle, and let the velocity of the microscopic particle satisfy the following condition: The standard deviation is It follows a normal distribution.

2. The method for verifying spacecraft design based on hybrid precision data optimization of the UGKWP method as described in claim 1, characterized in that, The mixed precision data includes: bool data, int16 data, FP16 data, and FP64 data.

3. The method for verifying spacecraft design based on hybrid precision data optimization of the UGKWP method as described in claim 1, characterized in that, The data localization strategy for particle time-of-flight (prtTf) is characterized by the following formula: The quantization factor 2 is dynamically calculated based on the maximum value of the original high-precision FP64 array. m Quantization is performed to obtain the fixed-point form of the particle flight time prtTf quantization. The following relationship should be satisfied: In the above formula, This represents the maximum value that low-precision data (int16) can represent. 2 is the time step size of the current step. m This refers to the quantization factor dynamically calculated using the maximum value of the original high-precision FP64 array, and .

4. The method for verifying spacecraft design based on hybrid precision data optimization of the UGKWP method as described in claim 3, characterized in that, The data localization strategy for particle mass prtMass refers to: In the case of using quantization factor 2 m After the original high-precision data is quantized and amplified, the integer part is saved in the half-precision quality array in the form of int16, and the truncated decimal part and the momentum and energy corresponding to the truncated part are accumulated into the high-precision correction array of the corresponding grid as quality correction, momentum correction and energy correction respectively; Where, since the correction array will independently participate in the calculation of particle flux and the statistical process of macroscopic quantity, and will be updated at each iteration step, the quantization factor 2 m After that, the low-precision mass array of the particles should be updated according to the new quantization factor 2 left P left The truncation error of the particles due to the accuracy conversion and the new sampling particles P samp The truncation error in the quantization process is accumulated in the correction array.

5. The method for verifying spacecraft design by optimizing the UGKWP method based on mixed precision data as described in claim 4, characterized in that... , After the update of the adjoint correction array is completed, the mass, momentum and energy recorded in the adjoint correction array in each grid are equivalent to an adjoint simulation particle P eqv , and the transport time of P eqv is sampled as other actual simulation particles. Among them, P eqv The quality and velocity are obtained from the macroscopic quantities accumulated in the accompanying correction array, and in P eqv During the movement, the correction flux generated through the mesh interface Considered free transport flux A portion of it participates in the calculation of the unit net flux, and is included in the macroscopic quantities of the statistical particle part. At that time, P, which did not collide eqv They will be included in the statistical scope.