A method for calculating the shortest shielding depth in ray tracing

By modifying the GEANT4 framework and calculating the vertical path step size, the problem of inaccurate shielding depth assessment in ray tracing method is solved, more accurate dose estimation is achieved, and the scope of application is expanded.

CN115186568BActive Publication Date: 2025-08-15HARBIN INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210769946.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-30
Publication Date
2025-08-15
Estimated Expiration
2042-06-30

AI Technical Summary

Technical Problem

When calculating the shielding depth, the existing ray tracing method uses a linear tracing method to cause the result to be too large. The simulation of vertical path method exceeds the spatial range and it is impossible to accurately evaluate the shielding depth of particles such as electrons.

Method used

By modifying the GEANT4 framework, inherit a specific class and calculate the vertical and slash path step sizes of each step of the ray, multiplying the smaller by the material density to add shielding depth, ensuring that the path is within the analysis space and the result is smaller than the linear method.

Benefits of technology

A more accurate shielding depth evaluation is achieved, the accuracy of total dose estimation is improved, and the application range and flexibility of ray tracing is expanded.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115186568B_ABST
    Figure CN115186568B_ABST
Patent Text Reader

Abstract

The present invention provides a method for calculating the shortest shielding depth in a ray tracing method, which belongs to the field of satellite space environment analysis technology. The method includes: S1, modifying and compiling the GEANT4 framework; S2, inheriting a specific class, and implementing the relevant functions in the specific class; S3, calculating the vertical path step length and the oblique path step length of each step of the ray path; S4, taking the smaller of the vertical path step length and the oblique path step length, multiplying it by the material density, to obtain the shielding depth of the step path, and accumulating the shielding depth of each step path of the ray to form the shortest shielding depth of the ray. The present invention uses GEANT4 software to realize the method of moving forward along a straight path, but accumulating the shielding depth perpendicular to the incident direction, which can ensure that the calculated path is within the space involved in the analysis, and the shielding depth result is less than or equal to the straight line method, and can more accurately evaluate the shielding depth of particles such as electrons.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of satellite space environment analysis, and in particular to a method for calculating the shortest shielding depth in a ray tracing method. Background Art

[0002] The radiation environment of an on-orbit spacecraft is rife with a variety of high-energy particles, which can damage sensitive components within the spacecraft, leading to increased orbital deviation, reduced system functionality, and, in severe cases, even complete spacecraft failure. To ensure the accuracy of a spacecraft's flight trajectory and the reliability of its flight functions, it is necessary to individually assess the radiation damage caused by different particles and calculate the radiation doses received by sensitive components. This allows for the study of their impact on spacecraft performance and the development of targeted protection technologies and countermeasures.

[0003] Ray tracing is a common method for analyzing the radiation dose received by sensitive components under specific particle irradiation conditions. This method can quickly estimate the total dose. Its basic principle is to estimate the total dose using the equivalent shielding depth method. In practice, the spherical space is divided into several sectors. Starting from the detection point, the equivalent shielding depth of each sector is calculated. The dose contribution of each sector is obtained by interpolating the equivalent shielding depth of each sector in the depth-dose curve. A weighted accumulation operation is then performed to obtain the total dose. Ray tracing generally uses a straight line to trace the ray path. In this method, the path does not change direction at all. The accumulated shielding depth is the product of the actual material density traversed and the length of the single step in the path direction. For high-energy electrons, for example, this method can overestimate the shielding depth, resulting in an underestimation of the calculated dose and hindering total dose estimation. Alternatively, a path perpendicular to the material boundary is simulated, but this can cause the path to veer significantly beyond the estimated spatial range and even result in a shielding depth longer than that obtained using the straight-line method, yielding inappropriate results. Furthermore, different particles have different properties and paths, leading to differences in shielding depth. Therefore, in order to more accurately estimate the shielding depth of different particles, it is imperative to use different methods to calculate the shielding depth. Summary of the Invention

[0004] In view of the above problems in the prior art, the present invention provides a method for calculating the shortest shielding depth in a ray tracing method.

[0005] To achieve the above objectives, the present invention is specifically implemented through the following technologies:

[0006] The present invention provides a method for calculating the shortest shielding depth in a ray tracing method, comprising the following steps:

[0007] S1. Modify and compile the GEANT4 framework so that the path estimation function does not interfere with the internal path state;

[0008] S2. Inherit a specific class and implement related functions in the specific class to calculate and store the path length of the ray;

[0009] S3, calculating the vertical path step length and the oblique path step length of each step of the ray path;

[0010] S4. Take the smaller of the vertical path step length and the oblique path step length, multiply it by the material density to obtain the shielding depth of the step path, and accumulate the shielding depths of each step path of the ray to form the shortest shielding depth of the ray.

[0011] Furthermore, the specific operations of modifying and compiling the GEANT4 framework include: modifying the source code of the geometric navigation part of the 4.10.5.p01 version of the GEANT4 framework, then using the Cmake tool to configure and build the project, obtain the project file, and use the Visual Studio 2019 development environment to open the generated project file for compilation and generation.

[0012] Furthermore, the method of modifying the source code of the geometric navigation part of the GEANT4 framework includes: adding the string "G4VoxelNavigationsvoxelNav;" to line 481 of the G4Navigator.hh file; adding the string "fSaveState.svoxelNav=fvoxelNav;" to line 689 of the G4Navigator.cc file; and adding the string "fvoxelNav=fSaveState.svoxelNav;" to line 718 of the G4Navigator.cc file.

[0013] Furthermore, inheriting the specific class and implementing the relevant functions in the specific class specifically include: inheriting the G4VDiscreteProcess class to implement the PoststepDoIt function; inheriting the G4UserSteppingAction class to implement the UserSteppingAction function; inheriting the RTNormalBuffer class to implement the SetNormal function and the GetNormal function.

[0014] Furthermore, the specific operation of calculating the vertical path step length and the oblique path step length of each step of the ray path includes:

[0015] S31, obtaining a normal vector of the material boundary;

[0016] S32, converting the local coordinate system into a global coordinate system, and calculating the vertical path step length of the ray along the normal vector direction and the oblique path step length along the path direction in the PoststepDoIt function;

[0017] S33. Use the RTNormalBuffer class to buffer and store the data calculated in step S32, use the SetNormal function to set the vertical path step size of the next step, and use the GetNormal function to assign the vertical path step size of the next step to the current step.

[0018] Furthermore, the specific operations of step S31 include: first, calling the G4Step.GetPostStepPoint function in the PoststepDoIt function to obtain the end point of the current step; second, calling the G4Navigator.GetLocalExitNormal function to calculate the vector perpendicular to the boundary direction between the end point of the current step and the end point of the next step according to the current geometric coordinate system, which is the normal vector.

[0019] Furthermore, the specific operations of step S32 include: calling the G4Navigator.GetLocalToGlobalTransform function to convert the local coordinate system into the global coordinate system, then calling the G4Navigator.CheckNextStep function in the PoststepDoIt function to calculate the vertical path step length of the next step of the ray, and calling the G4Step.GetStepLength function in the PoststepDoIt function to calculate the diagonal path step length of the current step of the ray.

[0020] Furthermore, the specific operation of taking the smaller one between the vertical path step length and the diagonal path step length includes: calling the UserSteppingAction function, comparing the vertical path step length and the diagonal path step length of the current step stored in the RTNormalBuffer class, and taking the smaller one between the vertical path step length and the diagonal path step length.

[0021] Furthermore, the material density is obtained by calling the G4Step.GetPreStepPoint().GetMaterial().GetDensity() function.

[0022] The present invention is based on the geometric method and path estimation function provided in the GEANT4 program. With the help of non-interacting virtual particles provided by the GEANT4 software, it is achieved by moving along a straight path, but accumulating the shielding depth perpendicular to the incident direction. This ensures that the calculated path is within the space involved in the analysis, and the shielding depth result is less than or equal to that of the straight-line method. This can more accurately assess the shielding depth of particles such as electrons, help improve the accuracy of total dose estimation, and expand the application scope and flexibility of the ray tracing method. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of 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 paying any creative work.

[0024] Figure 1 This is a schematic diagram of engineering construction using the Cmake tool in Example 1 of the present invention;

[0025] Figure 2 Schematic diagram of a calculation model for the vertical path step length under a straight path according to Example 1 of the present invention;

[0026] Figure 3 Schematic diagram of a calculation mode for the step length of an oblique path under a straight path according to Example 1 of the present invention;

[0027] Figure 4 Calculation result diagram of vertical path step length of a certain model in Example 1 of the present invention;

[0028] Figure 5 This is a schematic diagram of the cumulative calculation of the shortest shielding depth in Example 1 of the present invention. DETAILED DESCRIPTION

[0029] It should be noted that, unless otherwise specified, the embodiments and features within the embodiments of the present invention may be combined with one another. Furthermore, the terms "comprising," "containing," and "having" are non-restrictive and may include other steps and components that do not affect the results. Unless otherwise specified, materials, equipment, and reagents were all commercially available.

[0030] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0031] An embodiment of the present invention provides a method for calculating the shortest shielding depth in a ray tracing method, comprising the following steps:

[0032] S1. Modify and compile the GEANT4 framework: Directly using the original GEANT4 framework will encounter the problem that the operation of the path estimation function interferes with the internal path state, resulting in inaccurate path length calculation. Therefore, it is necessary to modify the GEANT4 framework to prevent the path estimation function from interfering with the internal path state.

[0033] Specifically, the source code of the geometric navigation part of the 4.10.5.p01 version of the GEANT4 framework was modified, and then the Cmake tool was used to configure and build the project to obtain the project file. The generated project file was opened using the Visual Studio 2019 development environment for compilation and generation.

[0034] For example, according to publicly available information, the 4.10.5.p01 version source code of GEANT4 is downloaded and decompressed. The geometric navigation part in the source code is modified to ensure that the path estimation function does not interfere with the internal path state. Then, under the Windows platform, the source code folder is opened using the Cmake tool and reference is made to Figure 1 Configure and build the project, obtain the project file in Visual Studio format, use the VisualStudio 2019 development environment to open the generated project file, and compile and generate it.

[0035] Table 1 Modification methods of GEANT4 (version 4.10.5.p01) source code

[0036] Modify location Modification method Location 1: G4Navigator.hh line 481 Add "G4VoxelNavigation svoxelNav;" Location 2: G4Navigator.cc line 689 Add "fSaveState.svoxelNav=fvoxelNav;" Location 3: G4Navigator.cc line 718 Add "fvoxelNav=fSaveState.svoxelNav;"

[0037] S2. Inherit a specific class and implement related functions in the specific class to calculate and store the path length of the ray;

[0038] In the context of the present invention, the term "inheritance" means that when multiple classes have the same characteristics (or attributes) and behaviors (or methods), in order to achieve code reuse, the subclass needs to inherit the characteristics and behaviors of the parent class so that the subclass has various attributes and methods of the parent class, but in addition to the characteristics and behaviors of the parent class, the subclass also has some special characteristics and behaviors of its own.

[0039] In the context of the present invention, the term "implementation" means: using a certain programming language to write a certain algorithm or process into a specific program fragment, or writing a specific program for the abstract interface or virtual function given by a certain class.

[0040] Specifically, according to the process of step S3, inherit the G4VDiscreteProcess class and implement the PoststepDoIt function to describe the physical process of the interaction between particles and matter. This part will be used to calculate the single-step path length. Inherit the G4UserSteppingAction class and implement the UserSteppingAction function to accumulate the shielding depth of each step. This part will participate in the cumulative calculation of the shielding depth. Inherit the RTNormalBuffer class to provide storage and buffering of the vertical path length in a single step; the private members of the RTNormalBuffer class are two double-type floating-point numbers, representing the path length of the next step and the path length of the current step respectively. Implement the SetNormal function to set the path length of the next step, implement the GetNormal function to obtain the path length of the current step, and assign the next path length to the current step.

[0041] S3, calculating the vertical path step length and the oblique path step length of each step of the ray path;

[0042] The above-mentioned calculation of the vertical path step length and the oblique path step length of each step of the ray path specifically includes:

[0043] S31. Get the normal vector of the material boundary. Specifically, first, call the G4Step.GetPostStepPoint function in the PoststepDoIt function to obtain the end point of the current step. Second, call the G4Navigator.GetLocalExitNormal function to calculate the vector perpendicular to the boundary direction from the end point of the current step to the end point of the next step according to the current geometric coordinate system. This is the normal vector. In other words, the normal vector is perpendicular to the incident direction of the ray.

[0044] S32. Convert the local coordinate system to the global coordinate system, and calculate the path length of the ray along the normal vector direction and the path length along the path direction in the PoststepDoIt function, which are the vertical path step and the diagonal path step respectively; specifically, call the G4Navigator.GetLocalToGlobalTransform function to convert the local coordinate system to the global coordinate system, then call the G4Navigator.CheckNextStep function in the PoststepDoIt function to calculate the path length of the ray in the normal vector direction for the next step, which is the vertical path step for the next step, and call the G4Step.GetStepLength function in the PoststepDoIt function to calculate the path length of the ray along the path direction, which is the diagonal path step for the current step. Figure 2 and Figure 3The calculation modes of the path lengths in the vertical direction and the oblique direction under a straight path are shown respectively. Figure 4 The calculation results of the vertical path step length of a certain model are given as an example.

[0045] S33. Use the RTNormalBuffer class inherited in step S2 to buffer and store the data calculated in step S32, use the SetNormal function to set the vertical path step size of the next step, and use the GetNormal function to assign the vertical path step size of the next step to the current step.

[0046] S4. Take the smaller of the vertical path step length and the oblique path step length, multiply it by the material density, calculate the shielding depth of the step path, accumulate the shielding depths of each step path of the ray, and form the shortest shielding depth of the ray.

[0047] Specifically, call the UserSteppingAction function to compare the vertical path step length and the diagonal path step length of the current step stored in the RTNormalBuffer class. It should be noted that there is no vertical path step length in the first step because the material interface has not yet been crossed. Take the smaller of the vertical path step length and the diagonal path step length, multiply it by the material density, and calculate the shielding depth of the current step path. The shielding depth of the current step path is accumulated into the shielding depth of this ray, that is, the shielding depth of each step path is accumulated on the entire ray path to form the shortest shielding depth of the ray. For details, see Figure 5 .

[0048] The material density described above is obtained by calling the G4Step.GetPreStepPoint().GetMaterial().GetDensity() function. Here, you need to chain functions together, adding brackets to indicate each function is executed.

[0049] The present invention is based on the geometric method and path estimation function provided in the GEANT4 program. With the help of non-interacting virtual particles provided by the GEANT4 software, it is achieved by moving along a straight path, but accumulating the shielding depth perpendicular to the incident direction. This ensures that the calculated path is within the space involved in the analysis, and the shielding depth result is less than or equal to that of the straight-line method. This can more accurately assess the shielding depth of particles such as electrons, help improve the accuracy of total dose estimation, and expand the application scope and flexibility of the ray tracing method.

[0050] The present invention will be further described below in conjunction with specific examples. It should be understood that these examples are intended to illustrate the present invention only and are not intended to limit the scope of the present invention. The experimental methods in the following examples where specific conditions are not specified are generally based on the conditions recommended by the manufacturer.

[0051] Example 1

[0052] A method for calculating the shortest shielding depth in a ray tracing method comprises the following steps:

[0053] S1. Modify and compile the GEANT4 framework so that the path estimation function does not interfere with the internal path state. Specifically, according to publicly available information, download the GEANT4 version 4.10.5.p01 source code, decompress it, and modify the geometric navigation part of the source code (file names: G4Navigator.hh and G4Navigator.cc) as shown in Table 1. Then, use the Cmake tool to open the source code folder on the Windows platform and refer to Figure 1 Configure and build the project, obtain the Visual Studio project file, open the generated project file using the Visual Studio 2019 development environment, and compile and generate it;

[0054] Table 1 Modification methods of GEANT4 (version 4.10.5.p01) source code

[0055]

[0056]

[0057] S2. Inherit a specific class and implement related functions in the specific class to calculate and store the path length of the ray; specifically, inherit the G4VDiscreteProcess class and implement the PoststepDoIt function; inherit the G4UserSteppingAction class and implement the UserSteppingAction function; inherit the RTNormalBuffer class and implement the SetNormal function and the GetNormal function;

[0058] S3. Calculate the vertical path step length and the diagonal path step length of each step of the ray path; specifically including:

[0059] S31. Get the normal vector of the material boundary. Specifically, first, call the G4Step.GetPostStepPoint function in the PoststepDoIt function to obtain the end point of the current step. Second, call the G4Navigator.GetLocalExitNormal function to calculate the vector perpendicular to the boundary direction from the end point of the current step to the end point of the next step according to the current geometric coordinate system. This is the normal vector. In other words, the normal vector is perpendicular to the incident direction of the ray.

[0060] S32. Convert the local coordinate system to the global coordinate system, and calculate the path length of the ray along the normal vector direction and the path length along the path direction in the PoststepDoIt function, which are the vertical path step length and the diagonal path step length, respectively. Specifically, call the G4Navigator.GetLocalToGlobalTransform function to convert the local coordinate system to the global coordinate system, then call the G4Navigator.CheckNextStep function in the PoststepDoIt function to calculate the path length of the ray in the normal vector direction for the next step, which is the vertical path step length for the next step, and call the G4Step.GetStepLength function in the PoststepDoIt function to calculate the path length of the ray along the path direction, which is the diagonal path step length for the current step. Figure 2 and Figure 3 The calculation modes of the path lengths in the vertical direction and the oblique direction under a straight path are shown respectively. Figure 4 The calculation results of the vertical path step length of a certain model are given as an example;

[0061] S33, using the SetNormal function of the RTNormalBuffer class to buffer and store the aforementioned data, and using the SetNormal function to set the vertical path step size for the next step;

[0062] S4. Call the UserSteppingAction function to compare the vertical path step length and the diagonal path step length of the current step stored in the RTNormalBuffer class. Specifically, use the GetNormal function of the RTNormalBuffer class to obtain the vertical path step length of the current step, and assign the path length of the next step to the current step to form a buffer. Compare the vertical path step length of the current step with the diagonal path step length of the current step calculated using the G4Step.GetStepLength function, take the smaller of the two, multiply it by the material density obtained using G4Step.GetPreStepPoint().GetMaterial().GetDensity(), and add it to the shielding depth of this ray. In the first step, since it has not yet crossed the material interface, there is no vertical path step length, and only the diagonal step length is taken.

[0063] by Figure 5 As an example, let's assume the cumulative depth is 0. Then, as shown in sequence 1, calculate the step length for the first time on the path. The step length of the oblique path is 20.88 mm, multiplied by the material density of 2.7 g / cm 3 The shielding depth of the first step path is 5.634g / cm 2, after the first step, the value is 5.63; according to sequence number 2, the oblique path step length is 19.32mm, the vertical path step length is 385.54mm, and the smaller oblique path step length is taken and multiplied by the material density 1e -25 g / cm 3 , the shielding depth of the second step path is 1.932e -24 g / cm 2 , this value is small and can be ignored. After adding the first and second steps, the value is 5.63. According to the sequence number 3, the oblique path step length is 48.99mm and the vertical path step length is 49.05mm. The smaller oblique path step length is taken and multiplied by the material density 2.7g / cm 3 , and the shielding depth is 13.22g / cm 2 , after adding the first to third steps, the value is 18.85; according to sequence number 4, the oblique path step length is 309.36mm, the vertical path step length is 246.67mm, and the smaller vertical path step length is taken and multiplied by the material density 1e -25 g / cm 3 , and the shielding depth is 2.467e -24 g / cm 2 , add the cumulative step length, and the value after the first to fourth steps is 18.85; and so on, the shortest shielding depth of this ray is obtained.

Claims

1. A method for calculating the shortest shielding depth in a ray tracing method, characterized in that: Applied to analyzing the radiation dose received by sensitive components, the method comprises the following steps: S1. Modify and compile the GEANT4 framework so that the path estimation function does not interfere with the internal path state; S2. Inherit a specific class and implement related functions in the specific class to calculate and store the path length of the ray; S3, calculating the vertical path step length and the oblique path step length of each step of the ray path; S4. Take the smaller of the vertical path step length and the oblique path step length, multiply it by the material density to obtain the shielding depth of the step path, and accumulate the shielding depths of each step path of the ray to form the shortest shielding depth of the ray.

2. The method according to claim 1, wherein The specific operations of modifying and compiling the GEANT4 framework include: modifying the source code of the geometric navigation part of the GEANT4 framework, then using the Cmake tool to configure and build the project, obtaining the project file, and using the Visual Studio 2019 development environment to open the generated project file for compilation and generation.

3. The method according to claim 2, characterized in that The methods for modifying the source code of the geometric navigation part of the GEANT4 framework include: Add the string "G4VoxelNavigation svoxelNav;" to line 481 of the G4Navigator.hh file. Add the string "fSaveState.svoxelNav = fvoxelNav;" to line 689 of the G4Navigator.cc file. Add the string "fvoxelNav = fSaveState.svoxelNav;" to line 718 of the G4Navigator.cc file.

4. The method according to any one of claims 1 to 3, characterized in that Inheriting the specific class and implementing the relevant functions in the specific class specifically include: Inherit the G4VDiscreteProcess class and implement the PoststepDoIt function; Inherit the G4UserSteppingAction class and implement the UserSteppingAction function; Inherit the RTNormalBuffer class, implement the SetNormal function and the GetNormal function.

5. The method according to claim 4, characterized in that The specific operations of calculating the vertical path step length and the oblique path step length of each step of the ray path include: S31, obtaining a normal vector of the material boundary; S32, converting the local coordinate system into a global coordinate system, and calculating the vertical path step length of the ray along the normal vector direction and the oblique path step length along the path direction in the PoststepDoIt function; S33. Use the RTNormalBuffer class to buffer and store the data calculated in step S32, use the SetNormal function to set the vertical path step size of the next step, and use the GetNormal function to assign the vertical path step size of the next step to the current step.

6. The method according to claim 5, characterized in that The specific operations of step S31 include: First, call the G4Step.GetPostStepPoint function in the PoststepDoIt function to obtain the current step end point; Next, the G4Navigator.GetLocalExitNormal function is called to calculate the vector perpendicular to the boundary direction between the end point of the current step and the end point of the next step according to the current geometric coordinate system, which is the normal vector.

7. The method according to claim 5, characterized in that The specific operations of step S32 include: calling the G4Navigator.GetLocalToGlobalTransform function to convert the local coordinate system into the global coordinate system, then calling the G4Navigator.CheckNextStep function in the PoststepDoIt function to calculate the vertical path step length of the next step of the ray, and calling the G4Step.GetStepLength function in the PoststepDoIt function to calculate the diagonal path step length of the current step of the ray.

8. The method according to claim 4, characterized in that The specific operation of taking the smaller one between the vertical path step length and the diagonal path step length includes: calling the UserSteppingAction function, comparing the vertical path step length and the diagonal path step length of the current step stored in the RTNormalBuffer class, and taking the smaller one between the vertical path step length and the diagonal path step length.

9. The method according to claim 4, characterized in that The material density is obtained by calling the G4Step.GetPreStepPoint().GetMaterial().GetDensity() function.

Citation Information

Patent Citations

  • Radiation shield calculation method based on coupling of Monte Carlo method and characteristic line method

    CN103106301A

  • Stratified model anisotropic ray tracing method and system

    CN107229067A