Self-adaptive Monte Carlo macro particle simulation method and system based on parallel computing

By adopting the adaptive Monte Carlo macro particle simulation method with parallel calculation, the problems of insufficient accuracy and waste of computing resources in the existing technology of simulating the breakdown process of lightning high voltage gas in the lightning are solved, and a variety of high voltage gases are realized with high efficiency and accuracy Simulation of discharge scenarios.

CN119446302APending Publication Date: 2025-02-14GUIZHOU POWER GRID CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411449086.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The existing methods to simulate the lightning high voltage gas breakdown process have problems of insufficient accuracy and waste of computing resources, and are difficult to apply to a variety of high voltage gas discharge scenarios.

Method used

Adaptive Monte Carlo macro particle simulation method based on parallel calculations is adopted, and the charge density and electric field density are calculated by initializing parameters, balancing particle loading, and macro particles representing real particles for parallel updates, dynamically adjusting grid density and handling collisions event.

Benefits of technology

It significantly improves the calculation speed and accuracy, is suitable for simulation of large-scale or complex electrical environments, can more accurately simulate actual discharge scenarios, and improves the model's adaptability to different electric field configurations and complex geometric structures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119446302A_ABST
    Figure CN119446302A_ABST
Patent Text Reader

Abstract

The invention discloses a self-adaptive Monte Carlo macro particle simulation method and system based on parallel computing, and relates to the technical field of particle simulation, and the method comprises the steps: initializing parameters, if the current step number is not the maximum step number, storing node data, balancing particle loading, and calculating charge density and battery density; using macro particles to represent a group of real particles, updating the positions and speeds of all the particles in parallel, and calculating new charge distribution; setting adaptive grid configuration, and dynamically adjusting grid density according to electric field intensity and local density of charge distribution; and based on the updated particle position and speed, evaluating and processing a collision event, storing collision data, re-calculating surface charge density data, adding 1 to the current step number, and circularly executing to finish simulation when the maximum step number is reached. According to the method, the accuracy of a simulation result is improved through the improved collision model, electrical discharge behaviors under different conditions are better predicted, and more reliable data support is provided for design and safety evaluation of high-voltage equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of particle simulation, in particular to a self-adaptive Monte Carlo macro particle simulation method and system based on parallel computing. Background Art

[0002] Lightning is a natural phenomenon, usually accompanied by high voltage and strong current. The electromagnetic effects it produces have serious impacts on power systems and electronic equipment. Simulating the lightning breakdown process is an important method for studying lightning protection. Existing methods for simulating the lightning high-voltage gas breakdown process mainly rely on discharge experiments and theoretical calculations in the laboratory. Although the experimental method is intuitive, it is costly and dangerous, while the theoretical calculation is limited by the accuracy of the model and computing resources. Therefore, a simulation method based on Monte Carlo macro-particle parallel program is proposed, which can efficiently and accurately simulate the lightning high-voltage gas breakdown process, which has important practical significance.

[0003] Gas discharge refers to the phenomenon that in a gas medium, when the applied voltage exceeds a certain threshold, gas molecules are ionized and form a conductive channel. This process involves multiple physical mechanisms, mainly including the following aspects:

[0004] Ionization: When an external electric field gives gas molecules or atoms enough energy, electrons escape from the nuclei to form free electrons and positive ions. This process is called ionization. The main mechanisms of ionization include electron impact ionization, photoionization, and field ionization. Electron impact ionization is the most common mechanism, which refers to the collision of high-energy electrons with gas molecules, transferring energy to ionize the molecules. For example, in the air, electrons collide with oxygen molecules and nitrogen molecules to form O2+, N2+, and free electrons, respectively.

[0005] Electron recombination: Free electrons and positive ions are attracted to each other under the action of the electric field and may recombine to form neutral atoms or molecules, while releasing energy, usually in the form of photons. Electron recombination is the main mechanism for reducing the number of conductive particles and has an important influence on the equilibrium state during the discharge process. The recombination process can be divided into radiative recombination and non-radiative recombination. Radiative recombination refers to the release of photons, while non-radiative recombination releases energy in other forms (such as heat).

[0006] Electron transport: Under the action of an external electric field, free electrons and ions move in opposite directions to form an electric current. The accelerated motion and collision of electrons in the electric field will further induce gas ionization, leading to the maintenance and development of the discharge process. The mobility of electrons and ions are important parameters that describe their movement speed in an electric field. Generally, the mobility of electrons is much greater than that of ions. Under a strong electric field, the drift velocity of electrons will be close to the thermal velocity, so that the electrons have enough kinetic energy to collide with more gas molecules, triggering an avalanche-like ionization process.

[0007] Collision process: During the discharge process, the collision between electrons and gas molecules is a key physical process. Collisions can be divided into elastic collisions and inelastic collisions. Elastic collisions refer to the transfer of kinetic energy between electrons and molecules without causing ionization. Inelastic collisions will cause gas molecules to ionize or be excited to a higher energy level. An important process in inelastic collisions is excitation collisions, which refers to electrons transferring energy to gas molecules, causing their electrons to jump to a higher energy level, and then releasing energy through radiation and returning to the ground state.

[0008] Maintenance and propagation of discharge: Once the discharge process begins, the electron avalanche effect ionizes more molecules to form a conductive channel. This channel continues to expand and propagate under the maintenance of the electric field, forming a visible discharge phenomenon. In the lightning process, the initial electron seeds may come from the action of cosmic rays, triggering the breakdown process in the air.

[0009] The interaction of these basic physical processes in a high voltage electric field leads to the phenomenon of electrical breakdown, i.e. the transition of the gas from an insulating state to a conductive state. This is the basic principle of lightning and high voltage equipment discharge.

[0010] Lightning discharge: Lightning discharge in the atmosphere is caused by the accumulation of electric charges in the cloud layer. When the electric field strength exceeds the breakdown strength of the air, the electron avalanche effect driven by the electric field triggers the lightning phenomenon. After the lightning channel is formed, a large amount of electrical energy is released instantly, generating strong light and heat.

[0011] High voltage equipment discharge: In high voltage equipment, such as transformers and circuit breakers, discharge occurs when the electric field strength inside or outside the equipment exceeds the breakdown strength of the gas medium. This discharge phenomenon may cause equipment damage and power system failure, so its simulation and research are of great significance.

[0012] By simulating the above physical processes, we can better understand and predict the discharge behavior of lightning and high-voltage equipment, and provide a theoretical basis for lightning protection technology and high-voltage insulation design.

[0013] At present, the simulation of gas discharge process mainly relies on the following technologies:

[0014] Fluid model: Electrons and ions are regarded as continuous fluids, and the macroscopic behavior of particles in the electric field is described by solving the fluid dynamics equations. The Navier-Stokes equation, Poisson's equation and continuity equation are mainly used to describe the density, velocity and electric field distribution of charged particles. It can effectively simulate the discharge process in large-scale systems, has a fast calculation speed, and is suitable for describing the spatial distribution of electron density and electric field intensity. The description of microscopic processes is not accurate enough, especially in the initial stage of discharge and rapid changes such as ionization and recombination.

[0015] Particle-grid model: Treat a part of electrons or ions as a macroparticle, whose motion is directly controlled by the electromagnetic field, and update the particle position and velocity by solving the electric field distribution on the grid. Initialize the particle position and velocity; calculate the electric field distribution on the grid; update the particle position and velocity through the electric field force; calculate the charge distribution of the particle and update the electric field. It can accurately simulate the microscopic motion of charged particles and is suitable for describing the discharge process in complex electromagnetic fields, such as the formation of plasma sheath and discharge channel. The amount of calculation is large, especially when the number of particles is large, the calculation efficiency is low, and a large amount of computing resources are required.

[0016] Hybrid model: Combines the macroscopic description of the fluid model with the microscopic accuracy of the PIC model to handle complex discharge scenarios. It is suitable for discharges in non-uniform fields, such as discharge processes under complex geometric structures, arc discharges, and lightning. The fluid model is used to simulate the electron density and electric field distribution in large-scale areas, and the PIC model is used to simulate the movement and collision of microscopic particles in the discharge area. It can maintain the high efficiency of the calculation while providing an accurate microscopic description in the discharge area, and is suitable for multi-scale, multi-physics field coupled discharge simulations. As the complexity of the model increases, the processing of the coupled area requires sophisticated numerical methods, and the calculation is difficult to implement. Summary of the invention

[0017] In view of the problems existing in the existing adaptive Monte Carlo macro-particle simulation method based on parallel computing, the present invention is proposed.

[0018] Therefore, the problem to be solved by the present invention is how to be applicable to various high-voltage gas discharge scenarios while ensuring accuracy.

[0019] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0020] In the first aspect, an embodiment of the present invention provides an adaptive Monte Carlo macro-particle simulation method based on parallel computing, which includes initializing parameters, saving node data if the current step number is not the maximum step number, balancing particle loading, and calculating charge density and battery density; using macro particles to represent a group of real particles, updating the positions and velocities of all particles in parallel, and recalculating new charge distribution in parallel; setting an adaptive grid configuration, dynamically adjusting the grid density according to the electric field strength and the local density of the charge distribution; based on the updated particle position and velocity, evaluating and processing collision events, saving collision data, recalculating surface charge density data, and adding 1 to the current step number, executing the loop, and completing the simulation when the maximum step number is reached.

[0021] As a preferred solution of the adaptive Monte Carlo macro-particle simulation method based on parallel computing described in the present invention, the initialization parameters include: setting initial conditions, including the number of particles, initial position and velocity distribution, electric field strength and configuration, and time step; allocating computing resources according to the input parameters and determining the number of CPU cores or GPU resources to be used.

[0022] As a preferred solution of the adaptive Monte Carlo macro particle simulation method based on parallel computing of the present invention, the balanced particle loading adopts a dynamic particle allocation algorithm to redistribute particles based on the processor load, which is expressed as:

[0023]

[0024] Among them, N i is the number of particles assigned to the ith processor, N total is the total number of particles, C i is the computing power of the i-th processor, P is the total number of processors; the computing power C of each processor is regularly evaluated i , including the processor's clock speed, the actual computation time of the last few time steps, the current memory usage, and the processor temperature; calculate the load imbalance index:

[0025]

[0026] If I imbalance When the preset threshold is exceeded, the redistribution process is triggered and the target number of particles N for each processor is calculated. i , determine the number and direction of particles that need to be transferred, and use a communication strategy to transmit particle data; the calculation of the charge density and battery density is expressed as: the charge density and electric field density are calculated using an improved particle-grid method, expressed as:

[0027] ρ(x)=∑ p q p W(xx p )

[0028]

[0029] Where ρ(x) is the charge density at point x in space, q p is the charge of particle p, W(x) is the shape function, and φ(x) is the electric potential.

[0030] As a preferred solution of the adaptive Monte Carlo macro-particle simulation method based on parallel computing described in the present invention, the macro-particles represent a group of real particles with uniform position, velocity and charge properties, and their weights are expressed as:

[0031]

[0032] Among them, w is the macro particle weight, n real is the real particle number density, V sim is the simulation volume, N 宏 is the total number of macro particles; the speed and position of the particles are updated in parallel. At each time step, a parallel algorithm is used to process the movement of each particle through multithreading based on CUDA or MPI, including half-step speed update, rotation step, half-step speed update and position update; the half-step speed update is expressed as:

[0033]

[0034] Among them, v - Indicates the middle value of speed, v n represents the velocity of the particle at the nth time step, q represents the charge of the particle, Δt represents the time step, m represents the mass of the particle, and E n represents the electric field at the position of the particle at the nth time step; the rotation step is affected by the magnetic field, which is expressed as:

[0035]

[0036] Among them, v + represents the intermediate speed after rotation, v - represents the speed after the half-step speed update, t represents the dimensionless rotation vector, representing the influence of the magnetic field; the half-step speed update is expressed as:

[0037]

[0038] Among them, v n+1 represents the velocity of the particle at the n+1th time step, v + represents the intermediate speed after rotation; the position update is expressed as:

[0039] [x n+1 =x n +v n+1 Δt]

[0040] Among them, x n+1 represents the position of the particle at the n+1th time step, x n represents the position of the particle at the nth time step, v n +1 The velocity of the particle at the n+1th time step, Δt represents the time step.

[0041] As a preferred solution of the adaptive Monte Carlo macro-particle simulation method based on parallel computing of the present invention, an adaptive weight function is introduced to calculate the charge distribution, which is expressed as:

[0042]

[0043] Among them, ρ i,j,k represents the charge density at the grid node (i,j,k)(i,j,k)(i,j,k), q p represents the charge of the pth particle, x p represents the position of the pth particle, x i,j,k represents the position of the grid node (i,j,k)(i,j,k)(i,j,k), and W(x) represents the weight function. The weight function W(x) determines how the particle charge is distributed among the grid nodes. The adaptive weight function is introduced to dynamically adjust the charge distribution according to the local particle density. Then W(x) is expressed as:

[0044]

[0045] Among them, Δx is the cell size of the grid, α represents each direction (x, y, z), and f(x) represents the adaptation factor.

[0046] As a preferred solution of the adaptive Monte Carlo macro-particle simulation method based on parallel computing of the present invention, the adaptive grid configuration uses a refinement index to measure whether the grid needs to be refined in a certain area, which is expressed as:

[0047]

[0048] Among them, R represents the grid refinement index, α and β represent the weight coefficients, |E|max represents the global maximum value of the electric field intensity, ρmax represents the global maximum value of the charge density, represents the gradient of the electric field strength, Represents the gradient of charge density; set a threshold, when R exceeds the threshold, it means that the grid needs to be refined.

[0049] As a preferred solution of the adaptive Monte Carlo macro-particle simulation method based on parallel computing described in the present invention, the Monte Carlo zero-collision model is used to process the collision event, and the collision probability is calculated according to the energy of the particle and the local gas condition. In each time step, the probability of particle collision is related to the average collision frequency in the time step, that is, in a period of time Δt, the collision probability P is expressed as:

[0050] p=1-exp(-vΔt)

[0051] Where v is the collision frequency, which depends on the particle energy, collision cross section and local gas density conditions, and Δt is the time step. To avoid resolving the collision frequency in each calculation, P is introduced. null It indicates the probability that no actual collision occurs in the current time step, expressed as:

[0052] p null =1-exp(-v max Δt)

[0053] Among them, P null represents the probability of a virtual collision of particles in the current time step, ν max represents the maximum collision frequency, ν max Represented as v max =nσ max v max ; where n is the gas density, σ max is the maximum collision cross section, v max is the maximum velocity of the particle, Δt represents the time step; a random number r is generated, 0≤r≤1, if r≤P, an actual collision occurs, and the particle will update its state according to the collision cross section and energy distribution; if P <r≤P null , a null collision occurs and the state of the particle remains unchanged.

[0054] In the second aspect, an embodiment of the present invention provides an adaptive Monte Carlo macro-particle simulation system based on parallel computing, which includes: a computing module, used to initialize parameters, save node data, balance particle loading, and calculate charge density and battery density; an update module, used to update the positions and velocities of all particles in parallel, and recalculate the new charge distribution in parallel; a grid adjustment module, used to dynamically adjust the grid density according to the electric field strength and the local density of the charge distribution; a collision module, used to evaluate and process collision events, save collision data, recalculate surface charge density data, and the current step number is increased by 1, and the execution is cyclic. When the maximum number of steps is reached, the simulation is completed.

[0055] In a third aspect, an embodiment of the present invention provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the processor executes the computer program, it implements any step of the above-mentioned adaptive Monte Carlo macroparticle simulation method based on parallel computing.

[0056] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, any step of the above-mentioned adaptive Monte Carlo macroparticle simulation method based on parallel computing is implemented.

[0057] The beneficial effect of the present invention is that the high parallel performance of modern multi-core processors or GPUs can be effectively utilized through the parallel processing of the Monte Carlo macro-particle model, significantly improving the calculation speed. It is particularly suitable for the simulation of large-scale or complex electrical environments, making it possible to simulate large-scale electrical discharges, and can be completed in a relatively short time, supporting real-time analysis and decision-making. The adaptability of the model to different electric field configurations and complex geometric structures is greatly improved, so that it can more accurately simulate actual discharge scenarios. The improved collision model enhances the physical reality of the model and can more accurately simulate the interaction and energy conversion between particles. Not only does it improve the accuracy of the simulation results, but it also enables the model to better predict the electrical discharge behavior under different conditions, providing more reliable data support for the design and safety assessment of high-voltage equipment. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:

[0059] Figure 1 is a flow chart of the present invention;

[0060] Figure 2 It is a parallel computing structure diagram;

[0061] Figure 3 Processing flow chart for the Monte Carlo zero-collision model. DETAILED DESCRIPTION

[0062] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.

[0063] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0064] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.

[0065] Example 1

[0066] Reference Figure 1 to Figure 3 , which is the first embodiment of the present invention, and provides an adaptive Monte Carlo macro particle simulation method based on parallel computing, comprising:

[0067] S1: Initialize parameters. If the current step number is not the maximum step number, save node data, balance particle loading, and calculate charge density and battery density.

[0068] Set initial conditions, including the number of particles, initial position and velocity distribution, electric field strength and configuration, and time step;

[0069] Based on the input parameters, computing resources are allocated to determine the number of CPU cores or GPU resources to be used.

[0070] Determine whether the current step number is the maximum step number. If not, execute the main physical processes such as particle propulsion, electromagnetic field update, particle-wall collision process, particle-background gas collision, diagnosis, etc. in sequence, and cycle in sequence until the preset time step is reached.

[0071] During the particle advancement process, the particle load needs to be balanced. A dynamic particle allocation algorithm is used to redistribute particles based on the processor load, which is expressed as:

[0072]

[0073] Among them, N i is the number of particles assigned to the ith processor, N total is the total number of particles, C i is the computing power of the i-th processor, and P is the total number of processors;

[0074] Regularly evaluate the computing power of each processor C i , including the processor’s clock speed, actual computation time for the last few time steps, current memory usage, and processor temperature;

[0075] Calculate the load imbalance index:

[0076]

[0077] If I imbalance When the preset threshold is exceeded, the redistribution process is triggered and the target number of particles N for each processor is calculated.i , determine the number and direction of particles that need to be transferred, and use communication strategies to transmit particle data;

[0078] To avoid sudden large-scale particle migration, a smoothing factor α is introduced:

[0079]

[0080] Among them, α can be set between 0.1 and 0.3 to achieve progressive load balancing.

[0081] For processors close to the boundary of the computational domain, consider introducing virtual particles or overlapping regions to maintain the continuity of the computation.

[0082] Then, the charge density and battery density are further calculated and expressed as:

[0083] The charge density and electric field density are calculated using the modified particle-mesh method and are expressed as:

[0084] ρ(x)=∑ p q p W(xx p )

[0085]

[0086] Where ρ(x) is the charge density at point x in space, q p is the charge of particle p, W(x) is the shape function, and φ(x) is the electric potential.

[0087] S2: Use macro particles to represent a group of real particles, update the positions and velocities of all particles in parallel, and recalculate the new charge distribution in parallel.

[0088] Each macroparticle represents a group of real particles with uniform position, velocity and charge properties. The design of macroparticles reduces the number of particles that need to be processed, thereby optimizing computing performance. Compared with fluid models, it has higher accuracy and can analyze more physical processes and phenomena.

[0089] The particle's properties such as position, velocity, and charge are stored in contiguous memory blocks to support efficient parallel access and processing.

[0090] The weight of the macro particle is expressed as:

[0091]

[0092] Among them, w is the macro particle weight, n real is the real particle number density, V sim is the simulation volume, N 宏 is the total number of macro particles;

[0093] Update the velocity and position of particles in parallel. At each time step, a parallel algorithm is used to process the movement of each particle through multi-threading based on CUDA or MPI, including half-step velocity update, rotation step, half-step velocity update, and position update.

[0094] The half-step velocity update is expressed as:

[0095]

[0096] Among them, v - Indicates the middle value of speed, v n represents the velocity of the particle at the nth time step, q represents the charge of the particle, Δt represents the time step, m represents the mass of the particle, and E n represents the electric field at the position of the particle at the nth time step;

[0097] The rotation step is affected by the magnetic field and is expressed as:

[0098]

[0099] Among them, v + represents the intermediate speed after rotation, v - represents the speed after the half-step speed update, t represents the dimensionless rotation vector, which represents the influence of the magnetic field;

[0100] The half-step velocity update is expressed as:

[0101]

[0102] Among them, v n+1 represents the velocity of the particle at the n+1th time step, v + Indicates the intermediate speed after rotation;

[0103] The location update is expressed as:

[0104] [x n+1 =x n +v n+1 Δt]

[0105] Among them, x n+1 represents the position of the particle at the n+1th time step, x n represents the position of the particle at the nth time step, v n +1 The velocity of the particle at the n+1th time step, Δt represents the time step.

[0106] The parameter t is expressed as:

[0107]

[0108] Where t is a dimensionless rotation vector, which represents the influence of the magnetic field, and B n represents the magnetic field of the particle at the nth time step.

[0109] The introduction of adaptive time step Δt is to maintain the accuracy and efficiency of calculation under different electromagnetic field strengths. Usually, the adaptive time step is dynamically adjusted according to the size of the local electric and magnetic fields, expressed as:

[0110]

[0111] Among them, C1 and C2 are adjustment parameters used to control the maximum value of the time step to prevent the time step from being too small in areas with very large electric or magnetic fields, resulting in low calculation efficiency.

[0112] When the local electric field |E| is large, Δt decreases to better capture the acceleration changes of particles under strong electric fields.

[0113] When the local magnetic field |B| is larger, Δt will also decrease to better capture the rotational motion of particles under strong magnetic fields.

[0114] The time step can be automatically shortened in areas where the electric and magnetic fields change dramatically, thereby improving the calculation accuracy. At the same time, a larger step size can be used in areas with weaker field strength to improve the calculation efficiency.

[0115] An adaptive weight function is introduced to calculate the charge distribution, which is expressed as:

[0116]

[0117] Among them, ρ i,j,k represents the charge density at the grid node (i,j,k)(i,j,k)(i,j,k), q p represents the charge of the pth particle, x p represents the position of the pth particle, x i,j,k represents the position of the grid node (i,j,k)(i,j,k)(i,j,k), and W(x) represents the weight function;

[0118] The weight function W(x) determines how the particle charge is distributed among the grid nodes. The introduction of the adaptive weight function can dynamically adjust the charge distribution according to the local particle density. Then W(x) is expressed as:

[0119]

[0120] Among them, Δx is the cell size of the grid, α represents each direction (x, y, z), and f(x) represents the adaptation factor.

[0121] The calculation of local density is expressed as:

[0122]

[0123] Among them, ρ loc (x p ) The local density at particle p, V represents the volume of the calculation area, r represents the neighborhood radius for calculating the local density, q q Represents the charge of particles in the neighborhood.

[0124] Then the adaptive factor f(x) is set as a function of the local density, expressed as:

[0125]

[0126] Among them, ρ ref is the reference density, usually set to the global average density or the expected density value, ρ loc (x) Local density at position x.

[0127] S3: Set the adaptive grid configuration to dynamically adjust the grid density according to the electric field strength and the local density of charge distribution.

[0128] After each time step or a predetermined number of time steps, the current charge distribution and electric field changes are evaluated and the mesh configuration is automatically adjusted.

[0129] Adaptive grid configuration uses a refinement index to measure whether the grid needs to be refined in a certain area, expressed as:

[0130]

[0131] Among them, R represents the grid refinement index, α and β represent the weight coefficients, |E|max represents the global maximum value of the electric field intensity, ρmax represents the global maximum value of the charge density, represents the gradient of the electric field strength, represents the gradient of charge density;

[0132] α and β are used to balance the influence of electric field intensity gradient and charge density gradient on the grid refinement index RRR.

[0133] α controls the electric field intensity gradient Contribution to the refinement index, a larger α value means that the electric field intensity gradient plays a more important role in the refinement decision. If the electric field intensity changes drastically, the refinement will be more obvious.

[0134] β controls the charge density gradient Contribution to the refinement metric, a larger β value means that the charge density gradient plays a more important role in the refinement decision. Regions with high charge density gradient will be refined.

[0135] The normalization factor is used to normalize the electric field intensity gradient and the charge density gradient so that they can be directly compared at different magnitudes.

[0136] Set the refinement threshold R threshold , when R>R threshold , a denser mesh is generated.

[0137] S4: Based on the updated particle position and velocity, evaluate and process the collision event, save the collision data, calculate the surface charge density data again, and add 1 to the current step number. If it is the maximum parameter, complete the simulation.

[0138] like Figure 3 The figure shows the flow chart of the particle collision model.

[0139] The particle collision process requires several considerations: First, what particles are involved in the collision process (mainly electrons, ions, and fast atoms)? Second, how many particles are involved? Finally, what type of collision process is involved (e.g., elastic collision, excitation, ionization, etc.)?

[0140] In actual scenarios, a large number of particles need to be simulated to solve the problem well. Such a large number of particles are simulated in parallel to increase the simulation speed. The particles are evenly distributed to the loaded computing nodes, and then these nodes are allowed to process these particles at the same time. The collision process of particles on each node is handled by the Monte Carlo zero-collision model.

[0141] The collision probability is calculated based on the energy of the particles and the local gas conditions. In each time step, the probability of a particle collision is related to the average collision frequency in that time step, that is, within a period of time Δt, the collision probability P is expressed as:

[0142] p=1-exp(-vΔt)

[0143] Here, v is the collision frequency, which depends on the particle energy, collision cross section and local gas density conditions, and Δt is the time step.

[0144] In order to avoid resolving the collision frequency in each calculation, P is introduced null It indicates the probability that no actual collision occurs in the current time step, expressed as:

[0145] p null =1-exp(-v max Δt)

[0146] Among them, P null represents the probability of a virtual collision of particles in the current time step, ν max represents the maximum collision frequency, ν max Represented as v max =nσmax v max ; where n is the gas density, σ max is the maximum collision cross section, v max is the maximum particle velocity, Δt represents the time step;

[0147] By introducing a uniform ν max , which can ensure that all particles are judged in the same time step, improving the consistency of the simulation. It can prevent the adverse effects of particle collision frequency on the calculation when it is too high or too low, such as too large time step leading to inaccurate calculation, or too small time step leading to high calculation cost, simplifying the simulation process.

[0148] Generate a random number r, 0≤r≤1,

[0149] If r≤P, an actual collision occurs, and the particle will update its state according to the collision cross section and energy distribution;

[0150] If P <r≤P null , a null collision occurs, in which case the state of the particle remains unchanged, but the time step continues to advance.

[0151] After updating the particle position and velocity, the system evaluates and processes the collision event. This process is executed in parallel, and each processing unit is responsible for the collision processing of a part of the particles. It should be noted that the particles are assigned to each computing node for processing, so their collision process is also processed and calculated by the corresponding node.

[0152] In summary, the present invention can effectively utilize the high parallel performance of modern multi-core processors or GPUs through the parallel processing of the Monte Carlo macro-particle model, and significantly improve the calculation speed. It is particularly suitable for the simulation of large-scale or complex electrical environments, making it possible to simulate large-scale electrical discharges, and can be completed in a relatively short time, supporting real-time analysis and decision-making. The adaptive grid technology enables the present invention to automatically adjust the calculation accuracy while maintaining high calculation efficiency, especially in areas where the electric field is complex or the charge distribution changes rapidly. The adaptability of the model to different electric field configurations and complex geometric structures is greatly improved, so that it can more accurately simulate actual discharge scenarios. The improved collision model enhances the physical reality of the model and can more accurately simulate the interaction and energy conversion between particles. Not only does it improve the accuracy of the simulation results, but it also enables the model to better predict the electrical discharge behavior under different conditions, providing more reliable data support for the design and safety assessment of high-voltage equipment.

[0153] Example 2

[0154] Reference Figure 1Based on the first embodiment, this embodiment further provides an adaptive Monte Carlo macro particle simulation system based on parallel computing, including:

[0155] The calculation module is used to initialize parameters, save node data, balance particle loading, and calculate charge density and battery density;

[0156] The update module is used to update the positions and velocities of all particles in parallel and recalculate the new charge distribution in parallel;

[0157] A grid adjustment module for dynamically adjusting the grid density according to the electric field strength and the local density of the charge distribution;

[0158] The collision module is used to evaluate and process collision events, save collision data, recalculate surface charge density data, and increase the current step number by 1. The cycle is executed and the simulation is completed when the maximum step number is reached.

[0159] This embodiment also provides a computer device, which is suitable for the case of an adaptive Monte Carlo macro-particle simulation method based on parallel computing, including a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute computer-executable instructions to implement the adaptive Monte Carlo macro-particle simulation method based on parallel computing proposed in the above embodiment.

[0160] The computer device may be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covering the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.

[0161] This embodiment further provides a storage medium on which a computer program is stored. When the program is executed by a processor, the method for implementing the adaptive Monte Carlo macro-particle simulation based on parallel computing proposed in the above embodiment is implemented.

[0162] The storage medium proposed in this embodiment and the data storage method proposed in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be found in the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0163] Example 3

[0164] like Figure 3 As shown, based on the previous two embodiments, this embodiment provides an adaptive Monte Carlo macro-particle simulation method based on parallel computing, which is scientifically demonstrated through simulation experiments.

[0165] The collision experiment is carried out through the Monte Carlo zero-collision model. The collision probability is calculated based on the energy of the particle and the local gas conditions. The cross-section data of the collision process of a specific gas needs to be input. The model includes elastic collisions, ionization and excitation processes between electrons and particles. Here, the high-voltage breakdown of argon is used as an example to show the types of collisions involved. The results are shown in Table 1:

[0166] Table 1 Experimental table of the collision process of argon

[0167]

[0168] The Monte Carlo method is used to randomly select whether a collision occurs and the type of collision to ensure the randomness and authenticity of the simulation.

[0169] By judging the distribution of collision types under different conditions, we can find the optimal combination of parameters such as electric field strength, gas density, and temperature to optimize the effect of the discharge experiment. Different collision types correspond to different plasma reaction characteristics. Judging the collision type can help predict the spectral radiation, discharge stability and other characteristics of the plasma, and provide guidance for experimental design and the development of plasma equipment.

[0170] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. An adaptive Monte Carlo macroparticle simulation method based on parallel computing, characterized by: include, Initialize parameters. If the current number of steps is not the maximum number of steps, save node data, balance particle loading, and calculate charge density and battery density. Using macro particles to represent a group of real particles, the positions and velocities of all particles are updated in parallel, and the new charge distribution is recalculated in parallel; Set adaptive mesh configuration to dynamically adjust mesh density based on the electric field strength and local density of charge distribution; Based on the updated particle position and velocity, the collision event is evaluated and processed, the collision data is saved, the surface charge density data is calculated, and the current step number is increased by 1. The loop is executed and the simulation is completed when the maximum step number is reached.

2. The method of adaptive Monte Carlo macro particle simulation based on parallel computing as claimed in claim 1, characterized in that: The initialization parameters include: Set initial conditions, including the number of particles, initial position and velocity distribution, electric field strength and configuration, and time step; Based on the input parameters, computing resources are allocated to determine the number of CPU cores or GPU resources to be used.

3. The adaptive Monte Carlo macro particle simulation method based on parallel computing as claimed in claim 2, characterized in that: The balanced particle loading adopts a dynamic particle allocation algorithm to redistribute particles based on the processor load, which is expressed as: Among them, N i is the number of particles assigned to the ith processor, N total is the total number of particles, C i is the computing power of the i-th processor, and P is the total number of processors; Regularly evaluate the computing power of each processor C i , including the processor’s clock speed, actual computation time for the last few time steps, current memory usage, and processor temperature; Calculate the load imbalance index: If I imbalance When the preset threshold is exceeded, the redistribution process is triggered and the target number of particles N for each processor is calculated. i , determine the number and direction of particles that need to be transferred, and use communication strategies to transmit particle data; The calculation of the charge density and battery density is expressed as: The charge density and electric field density are calculated using the modified particle-mesh method and are expressed as: ρ(x)=∑ p q p W(x-x p ) Where ρ(x) is the charge density at point x in space, q p is the charge of particle p, W(x) is the shape function, and φ(x) is the electric potential.

4. The method of adaptive Monte Carlo macro particle simulation based on parallel computing as claimed in claim 3, characterized in that: The macro particles represent a group of real particles with uniform position, velocity and charge properties, and their weights are expressed as: Among them, w is the macro particle weight, n real is the real particle number density, V sim is the simulation volume, N 宏 is the total number of macro particles; Update the velocity and position of particles in parallel. At each time step, a parallel algorithm is used to process the motion of each particle through multithreading based on CUDA or MPI, including half-step velocity update, rotation step, half-step velocity update, and position update. The half-step speed update is expressed as: Among them, v - Indicates the middle value of speed, v n represents the velocity of the particle at the nth time step, q represents the charge of the particle, Δt represents the time step, m represents the mass of the particle, and E n represents the electric field at the position of the particle at the nth time step; The rotation step is affected by a magnetic field and is expressed as: Among them, v + represents the intermediate speed after rotation, v - represents the speed after the half-step speed update, t represents the dimensionless rotation vector, which represents the influence of the magnetic field; The half-step speed update is expressed as: Among them, v n+1 represents the velocity of the particle at the n+1th time step, v + Indicates the intermediate speed after rotation; The location update is expressed as: [x n+1 =x n +v n+1 Δt] Among them, x n+1 represents the position of the particle at the n+1th time step, x n represents the position of the particle at the nth time step, v n+1 The velocity of the particle at the n+1th time step, Δt represents the time step.

5. The method of adaptive Monte Carlo macro particle simulation based on parallel computing as claimed in claim 4, characterized in that: An adaptive weight function is introduced to calculate the charge distribution, which is expressed as: Among them, ρ i,j,k represents the charge density at the grid node (i,j,k)(i,j,k)(i,j,k), q p represents the charge of the pth particle, x p represents the position of the pth particle, x i,j,k represents the position of the grid node (i,j,k)(i,j,k)(i,j,k), and W(x) represents the weight function; The weight function W(x) determines how the particle charge is distributed among the grid nodes. The adaptive weight function is introduced to dynamically adjust the charge distribution according to the local particle density. Then W(x) is expressed as: Among them, Δx is the cell size of the grid, α represents each direction (x, y, z), and f(x) represents the adaptation factor.

6. The method of adaptive Monte Carlo macro particle simulation based on parallel computing as claimed in claim 5, characterized in that: The adaptive grid configuration uses a refinement index to measure whether the grid needs to be refined in a certain area, which is expressed as: Among them, R represents the grid refinement index, α and β represent the weight coefficients, |E|max represents the global maximum value of the electric field intensity, ρmax represents the global maximum value of the charge density, represents the gradient of the electric field strength, represents the gradient of charge density; Set a threshold. When R exceeds the threshold, it means the mesh needs to be refined.

7. The method of adaptive Monte Carlo macro particle simulation based on parallel computing as claimed in claim 6, characterized in that: The Monte Carlo zero-collision model is used to process the collision events. The collision probability is calculated based on the energy of the particles and the local gas conditions. In each time step, the probability of particle collision is related to the average collision frequency in the time step, that is, within a period of time Δt, the collision probability P is expressed as: p=1-exp(-vΔt) Where v is the collision frequency, which depends on the particle energy, collision cross section and local gas density conditions, and Δt is the time step; In order to avoid resolving the collision frequency in each calculation, P is introduced null It indicates the probability that no actual collision occurs in the current time step, expressed as: p null =1-exp(-v max Δt) Among them, P null represents the probability of a virtual collision of particles in the current time step, ν max represents the maximum collision frequency, ν max Represented as v max =nσ max v max ; where n is the gas density, σ max is the maximum collision cross section, v max is the maximum velocity of the particle, Δt represents the time step; Generate a random number r, 0≤r≤1, If r≤P, an actual collision occurs, and the particle will update its state according to the collision cross section and energy distribution; If P <r≤P null , a null collision occurs and the state of the particle remains unchanged.

8. An adaptive Monte Carlo macro particle simulation system based on parallel computing, based on the adaptive Monte Carlo macro particle simulation method based on parallel computing according to any one of claims 1 to 7, characterized in that: include, The calculation module is used to initialize parameters, save node data, balance particle loading, and calculate charge density and battery density; The update module is used to update the positions and velocities of all particles in parallel and recalculate the new charge distribution in parallel; A grid adjustment module for dynamically adjusting the grid density according to the electric field strength and the local density of the charge distribution; The collision module is used to evaluate and process collision events, save collision data, recalculate surface charge density data, and increase the current step number by 1. The cycle is executed and the simulation is completed when the maximum step number is reached.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the adaptive Monte Carlo macro-particle simulation method based on parallel computing described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the adaptive Monte Carlo macro-particle simulation method based on parallel computing described in any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Implicit particle simulation analysis method for atmospheric pressure micro-scale arc discharge kinetic characteristics

    CN120724793A

  • Efficient parallel PIC / MCC rapid calculation method and system

    CN121279056A

  • A high-efficiency parallel PIC / MCC fast calculation method and system

    CN121279056B