A multi-thread based parallel computing method for the intersection of fragments and targets
Patent Information
- Application Number
- CN202311647719.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-04
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2043-12-04
AI Technical Summary
当战斗部破片较多且目标面元模型较为精细时,计算量较大导致单工况条件下计算耗时较长
[0026]This application introduces multi-threaded parallel computing technology into the fragment-target intersection calculation process to solve the problem of poor timeliness caused by single-threaded computing. To adapt to multi-threaded computing, the complete fragmentation field of the warhead is divided into multiple sub-fragmentation fields, and each sub-fragmentation field is assigned an independent thread. The intersection calculation between the sub-fragmentation field and the target surface model is completed within the independent thread. After all threads have completed their calculations, the results are fused to obtain the intersection result between the complete fragmentation field of the fragmented warhead and the target surface model. This application makes full use of parallel computing resources to complete the refined intersection calculation between the fragmented warhead field and the target surface model in a short time.
Smart Images

Figure CN117648188B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of parallel computation technology for the intersection of fragment force fields and target surface models, and particularly to a multi-threaded parallel computation method for the intersection of fragments and targets. Background Technology
[0002] For refined damage assessment of fragmentation warheads, it is necessary to establish a target element model and, under given projectile-target intersection conditions, determine whether the fragments intersect with the target element model and calculate the intersection point. When there are many warhead fragments and the target element model is highly detailed, the computational load is large, resulting in long calculation times under single-condition conditions.
[0003] Therefore, it is necessary to develop a parallel computation method for fragment and target intersection based on multithreading to solve the above problems. Summary of the Invention
[0004] The purpose of this invention is to design a parallel calculation method for fragment and target intersection based on multithreading in order to solve the above problems.
[0005] The present invention achieves the above objectives through the following technical solutions:
[0006] A multi-threaded parallel computation method for fragment and target intersection includes the following steps:
[0007] S1. Obtain the initial position and initial velocity information of the fragment in the warhead coordinate system; obtain the position information of the target surface vertex in the target coordinate system; obtain the attitude, position, and velocity information of the warhead and the target in the ground coordinate system;
[0008] S2. Divide the fragmentation power field into n sub-fragmentation power fields:
[0009] S3. Assign a sub-thread to each sub-fragment power field;
[0010] S4. Based on the attitude, position, and velocity information of the warhead and the target in the ground coordinate system, calculate the initial velocity and initial position of the fragment in the target coordinate system;
[0011] S5. Within the sub-thread, calculate the intersection information between the sub-fragment power field and the target triangular surface model based on the fragment firing trajectory method, and store the intersection information in the list space; after the sub-thread calculation is completed, set the sub-thread flag to 1;
[0012] S6. Start all child threads in the main thread and wait for all child threads to complete the calculation. When all child thread flags are set to 1, extract the information from the child thread result list and save it in a complete array space to achieve data fusion of the calculation results.
[0013] In step S4, the initial velocity of the fragment in the target coordinate system is calculated. and initial position The calculation formula is:
[0014]
[0015]
[0016]
[0017]
[0018] In step S5, the calculation of the intersection information between the sub-fragment force field and the target triangular element model based on the fragment firing trajectory method specifically includes:
[0019] S51. Calculate the equation coefficients (a) of the plane formed by the three vertices of the target triangular element. k b k c k d k k = 1, 2, ...
[0020] S52. Based on the initial position and initial velocity of the fragment, determine whether the fragment intersects with the target triangular element using the firing trajectory method; the specific determination method is as follows: calculate the time t when the fragment reaches the plane where the triangular element is located, and the calculation formula is shown in equation (5):
[0021]
[0022] If t is greater than or equal to zero, the fragmentation trajectory intersects the plane. The intersection point of the fragmentation trajectory and the plane is then calculated using the formula (6).
[0023]
[0024] Determine whether the intersection point is inside the triangular element. If the intersection point is inside the triangular element, the fragment is considered to intersect with the target triangular element. In this way, traverse all the target triangular elements and store the intersection point information in a list space.
[0025] The beneficial effects of this invention are as follows:
[0026] This application introduces multi-threaded parallel computing technology into the fragment-target intersection calculation process to solve the problem of poor timeliness caused by single-threaded computing. To adapt to multi-threaded computing, the complete fragmentation field of the warhead is divided into multiple sub-fragmentation fields, and each sub-fragmentation field is assigned an independent thread. The intersection calculation between the sub-fragmentation field and the target surface model is completed within the independent thread. After all threads have completed their calculations, the results are fused to obtain the intersection result between the complete fragmentation field of the fragmented warhead and the target surface model. This application makes full use of parallel computing resources to complete the refined intersection calculation between the fragmented warhead field and the target surface model in a short time. Attached Figure Description
[0027] Figure 1 This is a flowchart illustrating the process of this application. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0029] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0030] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0031] In the description of this invention, it should be understood that the terms "upper," "lower," "inner," "outer," "left," "right," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product of this invention is in use, or the orientation or positional relationship commonly understood by those skilled in the art. They are only used to facilitate the description of this invention and to simplify the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0032] Furthermore, the terms "first," "second," etc., are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.
[0033] In the description of this invention, it should also be noted that, unless otherwise explicitly specified and limited, terms such as "set" and "connection" should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium; it can be a connection within two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0034] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0035] like Figure 1 As shown, a multi-threaded parallel computation method for fragment and target intersection includes the following steps:
[0036] First, establish the warhead coordinate system o w x w y w z w The origin is at the center of the warhead, and the warhead coordinate system is x. w The axis coincides with the longitudinal axis of the warhead, pointing towards the warhead head, y w The axis is perpendicular to x w The axis points in any direction, z w The x-axis is determined by the right-hand rule. w y w The plane is perpendicular. Establish the target coordinate system o. b x b y b z b The origin is at the center of the target, and the target coordinate system is x. b The y-axis coincides with the target's vertical axis and points directly in front of the target. b The axis is perpendicular to x b The axis points upwards from the target, z b The x-axis is determined by the right-hand rule. b y b The plane is perpendicular. Establish a ground coordinate system. e x e y e z e Ground coordinate system x e The axis is on a horizontal plane, and its direction can be set arbitrarily. e The axis is perpendicular to x e The axis points upwards, z e The x-axis is determined by the right-hand rule. e y e Plane perpendicular;
[0037] S1. Obtain the initial position of the fragment in the warhead coordinate system. and initial velocity Coordinates of the vertices of the target triangle in the target coordinate system Position of the target in the ground coordinate system attitude [θ] b γ b ψ b ] T ,speed Position of the warhead in the ground coordinate system attitude [θ] w γ w ψ w ] T ,speed m represents the number of fragments, and L represents the number of target triangular facets.
[0038] S2. Divide the fragmentation field into n sub-fragmentation fields: The initial position of each sub-fragmentation field in the warhead coordinate system is... and initial velocity in m j The number of fragments in the fragmentation field.
[0039] S3. Assign a sub-thread to each sub-fragment force field. Set a global flag for each thread, initially setting it to 0, and allocate an independent list space to store intersection point information. Using C# as an example, the thread allocation statement is: `my_thread = new Thread(new ThreadStart(fun))`, where `my_thread` is the newly created thread, and `fun` is the calculation function that performs the intersection calculation between the sub-fragment force field and the target triangular element model. At the end of the calculation function, set the corresponding global flag to 1.
[0040] S4. Based on the attitude, position, and velocity information of the warhead and the target in the ground coordinate system, calculate the initial velocity of the fragment in the target coordinate system. and initial position The calculation formula is shown below;
[0041]
[0042]
[0043]
[0044]
[0045] in, This is the transformation matrix from the ground coordinate system to the target coordinate system; This is the transformation matrix from the warhead coordinate system to the ground coordinate system.
[0046] S5. Within the sub-thread, calculate the intersection information (intersection calculation) between the sub-fragment power field and the target triangular surface model based on the fragment firing trajectory method, and store the intersection information in the list space; after the sub-thread calculation is completed, set the sub-thread flag to 1;
[0047] The specific information on the intersection of the sub-fragment power field and the target triangular element model calculated based on the fragment firing trajectory method includes:
[0048] S51. Calculate the equation coefficients (a) of the plane formed by the three vertices of the target triangular element. k b k c k d k k = 1, 2, ...
[0049] S52. Based on the initial position and initial velocity of the fragment, determine whether the fragment intersects with the target triangular element using the firing trajectory method; the specific determination method is as follows: calculate the time t when the fragment reaches the plane where the triangular element is located, and the calculation formula is shown in equation (5):
[0050]
[0051] Among them, a k b k c k d k is the plane coefficient of the triangular element.
[0052] If t is greater than or equal to zero, the fragmentation trajectory intersects the plane. The intersection point of the fragmentation trajectory and the plane is then calculated using the formula (6).
[0053]
[0054] in, The coordinates are the points where the ray intersects the plane containing the triangular element.
[0055] Determine whether the intersection point is inside the triangular element. If the intersection point is inside the triangular element, the fragment is considered to intersect with the target triangular element. In this way, traverse all the target triangular elements and store the intersection point information in a list space.
[0056] S6. Start all child threads in the main thread and wait for all child threads to complete the calculation. When all child thread flags are set to 1 (when all corresponding global flags of all threads are 1, it is considered that all threads have completed the calculation, otherwise continue to wait), extract the information from the child thread result list and save it in a complete array space to realize the data fusion of the calculation results and obtain the intersection of the complete fragment force field and the target surface model.
[0057] In this application, the fragmentation power field is divided into n sub-fragmentation power fields, each of which is independent of each other. Each sub-fragmentation power field is assigned a sub-thread, in which the intersection calculation between the sub-fragmentation power field and the target triangular surface model is completed. This makes full use of limited computing resources and greatly improves computing efficiency.
[0058] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A multi-thread based parallel computing method for the intersection of a fragment and a target, characterized in that, Includes the following steps: S1. Obtain the initial position and initial velocity information of the fragment in the warhead coordinate system; Obtain the position information of the target surface vertex in the target coordinate system; obtain the attitude, position, and velocity information of the warhead and the target in the ground coordinate system; S2. Divide the fragmentation power field into n sub-fragmentation power fields: S3. Assign a sub-thread to each sub-fragment power field; S4. Based on the attitude, position, and velocity information of the warhead and the target in the ground coordinate system, calculate the initial velocity and initial position of the fragment in the target coordinate system; S5. Within the sub-thread, calculate the intersection information between the sub-fragment power field and the target triangular surface model based on the fragment firing trajectory method, and store the intersection information in the list space; after the sub-thread calculation is completed, set the sub-thread flag to 1; S6. Start all child threads in the main thread and wait for all child threads to complete the calculation. When all child thread flags are set to 1, extract the information from the child thread result list and store it in a complete array space to achieve data fusion of the calculation results. In step S4, the initial velocity of the fragment in the target coordinate system is calculated and the initial position is calculated as follows: (1) (2) (3) (4) in, This is the transformation matrix from the ground coordinate system to the target coordinate system; This is the transformation matrix from the warhead coordinate system to the ground coordinate system; In step S5, the calculation of the intersection information between the sub-fragment force field and the target triangular element model based on the fragment firing trajectory method specifically includes: S51. Calculate the equation coefficients of the plane formed by the three vertices of the target triangular element. ; S52. Based on the initial position and initial velocity of the fragment, determine whether the fragment intersects with the target triangular element using the firing trajectory method; the specific determination method is: calculate the time it takes for the fragment to reach the plane containing the triangular element. The calculation formula is shown in equation (5): (5) in, , , , The plane coefficient of the triangular element; if If the value is greater than or equal to zero, then the fragment firing trajectory intersects the plane. The intersection point of the fragment firing trajectory and the plane is then calculated using the formula (6). (6) in, , , The coordinates of the intersection point of the ray and the plane containing the triangular element; Determine whether the intersection point is inside the triangular element. If the intersection point is inside the triangular element, the fragment is considered to intersect with the target triangular element. In this way, traverse all the target triangular elements and store the intersection point information in a list space.
Citation Information
Patent Citations
Method for evaluating damage to opposite target by multiple types of multiple explosive bombs
CN114722573A
Methods and Means for Nucleic Acid Sequencing
US20070287151A1