[go: up one dir, main page]

CN117873963A - Method for converting phase space file into input file usable by other programs - Google Patents

Method for converting phase space file into input file usable by other programs Download PDF

Info

Publication number
CN117873963A
CN117873963A CN202410061211.XA CN202410061211A CN117873963A CN 117873963 A CN117873963 A CN 117873963A CN 202410061211 A CN202410061211 A CN 202410061211A CN 117873963 A CN117873963 A CN 117873963A
Authority
CN
China
Prior art keywords
programs
phase space
files
particle
neutron
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410061211.XA
Other languages
Chinese (zh)
Inventor
王盛
李志峰
张馨镭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huaboron Neutron Technology Hangzhou Co ltd
Original Assignee
Huaboron Neutron Technology Hangzhou Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huaboron Neutron Technology Hangzhou Co ltd filed Critical Huaboron Neutron Technology Hangzhou Co ltd
Priority to CN202410061211.XA priority Critical patent/CN117873963A/en
Publication of CN117873963A publication Critical patent/CN117873963A/en
Priority to CN202411507488.7A priority patent/CN119025478B/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/116Details of conversion of file system types or formats
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/11Complex mathematical operations for solving equations, e.g. nonlinear equations, general mathematical optimization problems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N7/00Computing arrangements based on specific mathematical models
    • G06N7/01Probabilistic graphical models, e.g. probabilistic networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Optimization (AREA)
  • General Engineering & Computer Science (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Algebra (AREA)
  • Operations Research (AREA)
  • Probability & Statistics with Applications (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a method for converting a phase space file into an input file usable by other programs, which comprises the following steps: reading phase space files generated by different programs, and generating an accurate geometric model; defining physical properties for each tissue and substance in the geometric model; coupling calculation is carried out through a definite theory method and a probability theory method, and a Boltzmann neutron transport equation is solved to obtain flux distribution; in the simulation process, recording the interaction condition of each particle and the substance, and calculating the distribution condition of the dose in different tissues and positions; verifying consistency of simulation results and experimental data, and calibrating; and outputting input files available for other programs. The invention can read the phase space files generated by different programs, couple the transportation programs according to the needed determinism and probability theory, output the needed particle information, and also output the files into the phase space file format defined by IAEA, and use the files as the input files of the programs.

Description

一种相空间文件转换为其他程序可用的输入文件的方法A method to convert phase space files into input files that can be used by other programs

技术领域Technical Field

本发明涉及放射治疗剂量计算领域,尤其涉及一种相空间文件转换为其他程序可用的输入文件的方法。The invention relates to the field of radiation therapy dose calculation, and in particular to a method for converting a phase space file into an input file available for other programs.

背景技术Background technique

硼中子俘获疗法(Boron Neutron Capture Therapy)简称BNCT,是一种肿瘤治疗方法,通过硼-10同位素对中子的高俘获概率来达到治疗肿瘤的目的。该疗法的基本原理是,患者首先会被注射含有硼-10同位素的化合物。然后,患者接受中子束的照射,这些中子会与硼-10发生俘获反应,释放出一个α粒子和一个锂离子,这对肿瘤组织有很高的局部杀伤作用。由于硼-10同位素对中子的高俘获截面(俘获概率)以及反应产物的高能量释放,BNCT在肿瘤治疗中具有潜在的优势。因为中子束只会与带有硼-10的肿瘤细胞发生作用,相对于周围正常组织,可以实现更加精准的肿瘤治疗,从而减少了对健康组织的损伤。Boron Neutron Capture Therapy (BNCT) is a tumor treatment method that achieves the purpose of tumor treatment through the high capture probability of neutrons by the boron-10 isotope. The basic principle of this therapy is that the patient is first injected with a compound containing the boron-10 isotope. Then, the patient is irradiated with a neutron beam, which will react with the boron-10 to release an alpha particle and a lithium ion, which has a high local killing effect on tumor tissue. Due to the high capture cross-section (capture probability) of the boron-10 isotope for neutrons and the high energy release of the reaction products, BNCT has potential advantages in tumor treatment. Because the neutron beam only reacts with tumor cells carrying boron-10, more precise tumor treatment can be achieved compared to surrounding normal tissue, thereby reducing damage to healthy tissue.

相空间文件是用于存储粒子或系统的状态信息的文件,其中通常包含了系统中每个粒子的位置、动量、能量、权重等状态信息,以及可能的其他相关信息。这些文件用于记录模拟过程中粒子的运动轨迹和状态变化,以便在模拟结束后进行分析和可视化。相空间文件的内容可以根据系统和模拟的需要而异。根据国际原子能机构(International AtomicEnergy Agency;IAEA)的相空间数据来看,相空间文件中至少包括粒子的类型、相应粒子的能量,方向、位置、统计权重和历史数等信息。通过使用相空间文件,可以在粒子源相同的条件下模拟计算,得到病人接受的剂量,对制定治疗计划、优化剂量分布,以及评估不同治疗方案的效果有很好的帮助。Phase space files are files used to store state information of particles or systems, which usually contain state information such as the position, momentum, energy, weight, and other possible related information of each particle in the system. These files are used to record the motion trajectory and state changes of particles during the simulation so that they can be analyzed and visualized after the simulation. The content of the phase space file can vary according to the needs of the system and simulation. According to the phase space data of the International Atomic Energy Agency (IAEA), the phase space file at least includes information such as the type of particle, the energy of the corresponding particle, direction, position, statistical weight, and history number. By using phase space files, simulation calculations can be performed under the same conditions of the particle source to obtain the dose received by the patient, which is very helpful for formulating treatment plans, optimizing dose distribution, and evaluating the effects of different treatment plans.

尽管在大多数概率论的计算程序中广泛实现了创建相空间文件的功能,但每个代码都使用自己的特定格式,这限制了不同代码之间的兼容性和再现性。为了解决这个问题,IAEA定义了一种标准的相空间文件格式,可以使用其提供的数据库进行读写。使用这种格式,原子能机构通过汇编经过适当验证的现有数据,创建了一个公共数据库(IAEA NAPCNuclear Data Section 2020),用于外部放射治疗中使用的线性加速器的相空间文件。Although the functionality to create phase space files is widely implemented in most probabilistic computational programs, each code uses its own specific format, which limits compatibility and reproducibility between different codes. To address this issue, the IAEA has defined a standard phase space file format that can be read and written using a database it provides. Using this format, the IAEA has created a common database (IAEA NAPCNuclear Data Section 2020) for phase space files for linear accelerators used in external radiation therapy by compiling existing data that has been appropriately validated.

不同的设备制造商其相空间文件的输入格式不同,当医院或科研人员出于校准或放疗计划中的剂量估计的不同目的需要时,需要使用不同的制造商的设备,考虑到制造商的信息通常受到严格的保密协议的约束,因此有必要将相空间文件转换为其他程序可用的输入文件。Different equipment manufacturers have different input formats for phase space files. When hospitals or researchers need to use equipment from different manufacturers for different purposes such as calibration or dose estimation in radiotherapy planning, and considering that the manufacturer's information is usually subject to strict confidentiality agreements, it is necessary to convert the phase space files into input files that can be used by other programs.

发明内容Summary of the invention

为克服现有技术的不足,本发明提出一种相空间文件转换为其他程序可用的输入文件的方法。In order to overcome the deficiencies of the prior art, the present invention provides a method for converting a phase space file into an input file that can be used by other programs.

本发明的技术方案是这样实现的:一种相空间文件转换为其他程序可用的输入文件的方法,包括步骤:The technical solution of the present invention is implemented as follows: a method for converting a phase space file into an input file that can be used by other programs, comprising the steps of:

S1,读取不同程序所生成的相空间文件,生成精确的几何模型,所述几何模型包括中子源、俘获剂分布、肿瘤组织和周围正常组织;S1, reading phase space files generated by different programs to generate an accurate geometric model, wherein the geometric model includes a neutron source, capture agent distribution, tumor tissue, and surrounding normal tissue;

S2,对所述几何模型里的每个组织和物质,定义其核反应截面、相互作用概率和能量传输的物理性质;S2, for each tissue and substance in the geometric model, define the physical properties of nuclear reaction cross section, interaction probability and energy transfer;

S3,通过确定论方法和概率论方法耦合计算,求解Boltzmann中子输运方程,得到通量的分布,包括步骤:S3, by coupling the deterministic method with the probabilistic method, solve the Boltzmann neutron transport equation and obtain the flux distribution, including the following steps:

S31,使用确定论方法快速计算出中子通量的分布;S31, uses deterministic methods to quickly calculate the distribution of neutron flux;

S32,将所述中子通量的分布作为指导蒙特卡罗程序模拟的价值函数,使用概率论的蒙特卡罗方法模拟中子运动状态;S32, using the distribution of the neutron flux as a value function to guide the Monte Carlo program simulation, and using a Monte Carlo method based on probability theory to simulate the neutron motion state;

S4,在模拟过程中,记录每个粒子与物质相互作用的情况,计算剂量在不同组织和位置的分布情况;S4, during the simulation, records the interaction between each particle and the material and calculates the distribution of dose in different tissues and locations;

S5,验证模拟结果与实验数据或其他计算方法的一致性,并进行校准;S5, verify the consistency of simulation results with experimental data or other calculation methods, and perform calibration;

S6,输出其他程序可用的输入文件。S6, outputs input files that can be used by other programs.

进一步地,所述S1中读取的不同程序所生成的相空间文件包括但不限于MCNP文件、PHITS文件、IAEAheader和IAEAphsp文件。Furthermore, the phase space files generated by the different programs read in S1 include but are not limited to MCNP files, PHITS files, IAEAheader and IAEAphsp files.

进一步地,所述步骤S31包括步骤:Furthermore, the step S31 includes the steps of:

S311,对Boltzmann中子输运方程进行近似;S311, approximation of the Boltzmann neutron transport equation;

S312,求Boltzmann中子输运方程的近似解或解析解。S312, find the approximate or analytical solution to the Boltzmann neutron transport equation.

更进一步地,所述S311中对Boltzmann中子输运方程进行近似的方法包括但不限于界面的多群近似和Legendre展开。Furthermore, the method for approximating the Boltzmann neutron transport equation in S311 includes but is not limited to multi-group approximation of the interface and Legendre expansion.

更近一步地,所述S312中求Boltzmann中子输运方程的近似解或解析解的方法包括但不限于离散坐标法、球谐函数法和有限元法。Furthermore, the method for obtaining an approximate solution or an analytical solution to the Boltzmann neutron transport equation in S312 includes but is not limited to a discrete coordinate method, a spherical harmonic function method and a finite element method.

进一步地,所述S32包括步骤:在蒙特卡罗模拟中增加权重窗参数,具体包括步骤:Furthermore, the S32 includes the step of: adding a weight window parameter in the Monte Carlo simulation, specifically including the steps of:

S321,计算基于蒙特卡·洛模拟中划分的网格的重要性图,所述重要性图定义为其中,(i,j,k)是蒙特卡洛模拟中划分的网格的索引,g是粒子能群,I(i,j,k,g)是网格(i,j,k,g)的重要性,Rscore(i,j,k,g)是粒子进入网格(i,j,k,g)后的所有探测器响应,Wtotal(i,j,k,g)是所有粒子进入网格(i,j,k,g)的权重加,Rscore(i,j,k,g)由步骤S31中确定论计算得到的通量/>得到,Wtotal(i,j,k,g)由步骤S31中确定论计算记录到的粒子信息得到;S321, calculating an importance map based on the grid divided in the Monte Carlo simulation, wherein the importance map is defined as Wherein, (i,j,k) is the index of the grid divided in the Monte Carlo simulation, g is the particle energy group, I(i,j,k,g) is the importance of the grid (i,j,k,g), R score (i,j,k,g) is the response of all detectors after the particle enters the grid (i,j,k,g), W total (i,j,k,g) is the weighted sum of all particles entering the grid (i,j,k,g), and R score (i,j,k,g) is the flux obtained by the deterministic calculation in step S31/> It is obtained that W total (i,j,k,g) is obtained from the particle information recorded by the deterministic calculation in step S31;

S322,将每一个网格的期望权重定义为其中/>是每个粒子的平均响应。为每个网格生成一个期望权重的窗口;S322, define the expected weight of each grid as Where/> is the average response of each particle. A window of desired weights is generated for each grid;

S323,将实际的粒子权重与分裂和轮盘赌的权重窗口边界进行比较,如果实际权重Wactual大于阈值fupperWexpect,则粒子进行分裂模拟;如果实际权重Wactual小于阈值flowerWexpect,则粒子需要进行轮盘赌来减少模拟;如果实际权重Wactual在阈值fupperWexpect和flowerWexpect中间,则粒子继续模拟,其中fupper和flower是用于阈值设置的常数,分别在(1,+∞)和(0,1)中选取。S323, compare the actual particle weight with the weight window boundary of splitting and roulette. If the actual weight W actual is greater than the threshold f upper W expect , the particle performs splitting simulation; if the actual weight W actual is less than the threshold f lower W expect , the particle needs to perform roulette to reduce simulation; if the actual weight W actual is between the thresholds f upper W expect and f lower W expect , the particle continues to simulate, where f upper and f lower are constants used for threshold setting, selected from (1,+∞) and (0,1) respectively.

本发明的有益效果在于,与现有技术相比,本方法可以读取不同程序所生成的相空间文件,也可以读取IAEA数据库提供的文件,读取文件中储存的粒子信息,根据需要的确定论和概率论耦合输运程序,输出所需的粒子的信息,也可以将文件输出成IAEA定义的相空间文件格式,作为程序的输入文件使用。The beneficial effect of the present invention is that, compared with the prior art, the present method can read phase space files generated by different programs, and can also read files provided by the IAEA database, read the particle information stored in the files, output the required particle information according to the required deterministic and probabilistic coupled transport programs, and can also output the files into the phase space file format defined by the IAEA for use as input files of the program.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1是本发明一种相空间文件转换为其他程序可用的输入文件的方法流程图。FIG. 1 is a flow chart of a method for converting a phase space file into an input file that can be used by other programs according to the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

请参见图1,本发明相空间文件转换为其他程序可用的输入文件的方法包括步骤:一种相空间文件转换为其他程序可用的输入文件的方法,包括步骤:Please refer to FIG1 . The method for converting a phase space file into an input file available for other programs of the present invention comprises the following steps: A method for converting a phase space file into an input file available for other programs comprises the following steps:

S1,读取不同程序所生成的相空间文件,生成精确的几何模型,所述几何模型包括中子源、俘获剂分布、肿瘤组织和周围正常组织等,这个模型需要尽可能准确地反映实际情况;S1, read the phase space files generated by different programs to generate an accurate geometric model, which includes neutron source, capture agent distribution, tumor tissue and surrounding normal tissue, etc. This model needs to reflect the actual situation as accurately as possible;

S2,对所述几何模型里的每个组织和物质,定义其核反应截面、相互作用概率和能量传输等物理性质,这些信息用于模拟中子与物质之间的相互作用;S2, for each tissue and substance in the geometric model, defining its physical properties such as nuclear reaction cross section, interaction probability and energy transfer, and this information is used to simulate the interaction between neutrons and matter;

S3,通过确定论方法和概率论方法耦合计算,求解Boltzmann中子输运方程,得到通量的分布,包括步骤:S3, by coupling the deterministic method with the probabilistic method, solve the Boltzmann neutron transport equation and obtain the flux distribution, including the following steps:

S31,使用确定论方法快速计算出中子通量的分布;S31, uses deterministic methods to quickly calculate the distribution of neutron flux;

S32,将所述中子通量的分布作为指导蒙特卡罗程序模拟的价值函数,使用概率论的蒙特卡罗方法模拟中子运动状态;S32, using the distribution of the neutron flux as a value function to guide the Monte Carlo program simulation, and using a Monte Carlo method based on probability theory to simulate the neutron motion state;

S4,在模拟过程中,记录每个粒子与物质相互作用的情况,包括能量沉积、转移等,根据这些信息,计算剂量在不同组织和位置的分布情况;S4, during the simulation, records the interaction between each particle and matter, including energy deposition and transfer, and based on this information, calculates the distribution of dose in different tissues and locations;

S5,验证模拟结果与实验数据或其他计算方法的一致性,并进行校准,以确保模拟结果的准确性;S5, verify the consistency of simulation results with experimental data or other calculation methods, and perform calibration to ensure the accuracy of simulation results;

S6,输出其他程序可用的输入文件。S6, outputs input files that can be used by other programs.

剂量计算的核心是求解Boltzmann中子输运方程,得到通量的分布,为治疗计划提供依据,Boltzmann中子输运方程稳态形式为The core of dose calculation is to solve the Boltzmann neutron transport equation to obtain the flux distribution and provide a basis for treatment planning. The steady-state form of the Boltzmann neutron transport equation is:

其中,是角通量,/>是总截面,/>为散射截面,是源项。在步骤S3中,本发明通过使用确定论方法和概率论方法耦合计算的方式获得Boltzmann中子输运方程,包括步骤:in, is the angular flux, /> is the total cross section, /> is the scattering cross section, In step S3, the present invention obtains the Boltzmann neutron transport equation by coupling calculation using a deterministic method and a probabilistic method, including the steps of:

S31,使用确定论方法快速计算出中子通量的分布;S31, uses deterministic methods to quickly calculate the distribution of neutron flux;

S32,将所述中子通量的分布作为指导蒙特卡罗程序模拟的价值函数,使用概率论的蒙特卡罗方法模拟中子运动状态。S32, using the distribution of the neutron flux as a value function to guide the Monte Carlo program simulation, and using the Monte Carlo method of probability theory to simulate the neutron motion state.

所述步骤S31包括步骤:The step S31 comprises the steps of:

S311,对Boltzmann中子输运方程进行近似;S311, approximation of the Boltzmann neutron transport equation;

S312,求Boltzmann中子输运方程的近似解或解析解。S312, find the approximate or analytical solution to the Boltzmann neutron transport equation.

步骤S311中,因为中子输运方程没有明确的解析解,所以需要进行近似,转化后求解析解。在步骤S31中,可以使用的近似方法有截面的多群近似和Legendre展开等。其中,Legendre展开为:假如散射只与角度相关,通过L阶Legendre多项式就可以对散射截面进行展开:In step S311, because the neutron transport equation has no clear analytical solution, it is necessary to approximate and convert it to obtain an analytical solution. In step S31, the approximate methods that can be used include multi-group approximation of the cross section and Legendre expansion. Among them, Legendre expansion is: If the scattering is only related to the angle, the scattering cross section can be expanded by the L-order Legendre polynomial:

截面的多群近似为:将连续能量的截面成一些离散的能量群结构,其中每个群具有不同的能量宽度。The multigroup approximation of the cross section is: the continuous energy cross section is divided into some discrete energy group structures, where each group has a different energy width.

用指数g表示的群通量变为 The group flux expressed with the index g becomes

其中,指数g表示的群总截面为 The total cross section of the group represented by the index g is

指数g表示的群总截面为The total cross section of the group represented by the index g is

其中 in

从中可以看出,如果想要求出通量就必须知道一个通量。在实际应用中,为了正确估计平均群常数,需要使用一定的近似权重谱。It can be seen that if we want to find the flux In practical applications, in order to correctly estimate the average group constant, it is necessary to use a certain approximate weight spectrum.

近似后的Boltzmann中子输运方程变为The approximated Boltzmann neutron transport equation becomes

通过将其他群的散射作为有效的源项,可以将多群方程作为有效的单群问题组依次求解,即:By treating the scattering of other groups as valid source terms, the multigroup equations can be solved sequentially as a set of valid single-group problems, namely:

在g表示的能级群内的Boltzmann中子输运方程为The Boltzmann neutron transport equation in the energy level group represented by g is

步骤S312中,Boltzmann中子输运方程的近似解或解析解的方法有散坐标法、球谐函数法和有限元法等。本发明的某些实施例中使用离散坐标方法也称SN方法,是将角度离散成少量的具体方向,再对每个方向上求解粒子输运方程,得到通量的空间分布。具体为:In step S312, the methods for approximate solution or analytical solution of Boltzmann neutron transport equation include discrete coordinate method, spherical harmonic function method and finite element method. In some embodiments of the present invention, the discrete coordinate method, also known as SN method, is used to discretize the angle into a small number of specific directions, and then solve the particle transport equation in each direction to obtain the spatial distribution of flux. Specifically:

如果没有先前的角通量解,就可以假设方向余弦是对称分布的,这样就只用考虑单位球面在一个象限的分布,离散至n个方向需要在坐标轴上选取个点,并且方向余弦集是相同的,即{μn}={ηn}={ξn},加之方向余弦的平方和为1,所以可以推出在集合{αn}中,有If there is no previous solution for the angular flux, we can assume that the direction cosines are symmetrically distributed, so that we only need to consider the distribution of the unit sphere in one quadrant. Discretization into n directions requires selecting on the coordinate axis points, and the direction cosine sets are the same, that is, {μ n } = {η n } = {ξ n }, and the sum of the squares of the direction cosines is 1, so it can be deduced that in the set {α n }, there is

将两式相减可得Subtracting the two equations, we can get

Right now

存在一个使得/> There is a Make/>

连理时的式(1.13)可以求得C,再将其带入式(1.13)可得Lian Li When C is obtained from formula (1.13), we can substitute it into formula (1.13) to get

这说明集合{αn}主要是由α1决定的,通过设定适当的α1,可以提高通量分布的精确度。This shows that the set {α n } is mainly determined by α 1. By setting an appropriate α 1 , the accuracy of the flux distribution can be improved.

概率论的蒙特卡罗方法在放射治疗中的应用能够考虑复杂的物理过程和几何结构,从而提供更准确的剂量分布预测。通过概率论能够直接模拟粒子的运动过程,统计后作为粒子通量的分布。在进行模拟时,首先需要设定一个初始状态,也就是获取中子源的空间位置、能量和方向分布,即并对其抽样作为初始状态。已知初始状态,要得到粒子的运动状态随时间的变化,就需要计算粒子间的相互作用,在n-1表示的过程中下中子的输运长度l服从以下分布The application of the Monte Carlo method of probability theory in radiotherapy can take into account complex physical processes and geometric structures, thereby providing more accurate predictions of dose distribution. The motion of particles can be directly simulated through probability theory, and the distribution of particle flux can be obtained after statistics. When performing the simulation, an initial state must be set first, that is, the spatial position, energy and direction distribution of the neutron source must be obtained, that is, And sample it as the initial state. Knowing the initial state, to obtain the change of the particle's motion state over time, it is necessary to calculate the interaction between particles. In the process represented by n-1, the transport length l of the neutron obeys the following distribution

就可以得到粒子间发生相互作用的位置。接下来确定发生相互作用的粒子类型。如果一个介质是由A和B两种原子构成的,其宏观总截面为The location where the particles interact can be obtained. Next, determine the type of particles that interact. If a medium is composed of two types of atoms, A and B, its total macroscopic cross section is

其中,和/>是A和B两种原子的宏观总截面,中子与A和B碰撞的概率分别为in, and/> is the total macroscopic cross section of two atoms A and B. The probability of a neutron colliding with A and B is

再然后是确定粒子间相互的类型和相应的截面大小,如弹性散射、非弹性散射、裂变反应和俘获等。发生某一种相互作用的概率与原子类型的概率相似,分别为其截面大小与总截面的比值。最后是确定发生相互作用后粒子的运动状态,如果中子被吸收,则没有后续的运动状态;如果发生弹性散射,就可以计算得到中子的能量Then, the type of interaction between particles and the corresponding cross-sectional size are determined, such as elastic scattering, inelastic scattering, fission reaction and capture. The probability of a certain interaction is similar to the probability of the atomic type, which is the ratio of its cross-sectional size to the total cross-sectional size. Finally, the motion state of the particle after the interaction is determined. If the neutron is absorbed, there is no subsequent motion state; if elastic scattering occurs, the energy of the neutron can be calculated.

其中A为发生相互作用的原子和中子的质量比,θC是偏转角。在这些参数计算完毕后,就可以得到单位时间后时粒子的运动状态。重复这个步骤即可得到所需的粒子运动状态。in A is the mass ratio of the interacting atom and neutron, and θ C is the deflection angle. After these parameters are calculated, the motion state of the particle per unit time can be obtained. Repeating this step can obtain the desired particle motion state.

确定论方法计算得到的近似解与精确解有一定偏差,概率论方法计算精确度要更高,但是需要耗费大量的时间进行模拟计算。如果使用确定论方法快速计算出中子通量的分布,并将其作为指导蒙特卡罗程序模拟的价值函数,这可以将采样方案改为更多地从对结果有重要贡献的相空间坐标中采样,在保证可靠精度的情况下,提高模拟的效率,即在蒙特卡罗模拟中增加权重窗参数。The approximate solution calculated by the deterministic method has a certain deviation from the exact solution. The probability method has higher calculation accuracy, but it takes a lot of time to simulate. If the deterministic method is used to quickly calculate the distribution of neutron flux and use it as a value function to guide the Monte Carlo program simulation, the sampling scheme can be changed to sample more from phase space coordinates that contribute significantly to the results, and the efficiency of the simulation can be improved while ensuring reliable accuracy, that is, increasing the weight window parameter in the Monte Carlo simulation.

步骤S32中,在蒙特卡罗模拟中增加权重窗参数,具体包括步骤:In step S32, a weight window parameter is added in the Monte Carlo simulation, specifically comprising the steps of:

S321,计算基于蒙特卡·洛模拟中划分的网格的重要性图,所述重要性图定义为其中,(i,j,k)是蒙特卡洛模拟中划分的网格的索引,g是粒子能群,I(i,j,k,g)是网格(i,j,k,g)的重要性,Rscore(i,j,k,g)是粒子进入网格(i,j,k,g)后的所有探测器响应,Wtotal(i,j,k,g)是所有粒子进入网格(i,j,k,g)的权重加,Rscore(i,j,k,g)由步骤S31中确定论计算得到的通量/>得到,Wtotal(i,j,k,g)由步骤S31中确定论计算记录到的粒子信息得到;S321, calculating an importance map based on the grid divided in the Monte Carlo simulation, wherein the importance map is defined as Wherein, (i,j,k) is the index of the grid divided in the Monte Carlo simulation, g is the particle energy group, I(i,j,k,g) is the importance of the grid (i,j,k,g), R score (i,j,k,g) is the response of all detectors after the particle enters the grid (i,j,k,g), W total (i,j,k,g) is the weighted sum of all particles entering the grid (i,j,k,g), and R score (i,j,k,g) is the flux obtained by the deterministic calculation in step S31/> It is obtained that W total (i,j,k,g) is obtained from the particle information recorded by the deterministic calculation in step S31;

S322,将每一个网格的期望权重定义为(0.25),其中/>是每个粒子的平均响应。为每个网格生成一个期望权重的窗口;S322, define the expected weight of each grid as (0.25), where/> is the average response of each particle. A window of desired weights is generated for each grid;

S323,将实际的粒子权重与分裂和轮盘赌的权重窗口边界进行比较,如果实际权重Wactual大于阈值fupperWexpect,则粒子进行分裂模拟;如果实际权重Wactual小于阈值flowerWexpect,则粒子需要进行轮盘赌来减少模拟;如果实际权重Wactual在阈值fupperWexpect和flowerWexpect中间,则粒子继续模拟,其中fupper和flower是用于阈值设置的常数,分别在(1,+∞)和(0,1)中选取。S323, compare the actual particle weight with the weight window boundary of splitting and roulette. If the actual weight W actual is greater than the threshold f upper W expect , the particle performs splitting simulation; if the actual weight W actual is less than the threshold f lower W expect , the particle needs to perform roulette to reduce simulation; if the actual weight W actual is between the thresholds f upper W expect and f lower W expect , the particle continues to simulate, where f upper and f lower are constants used for threshold setting, selected from (1,+∞) and (0,1) respectively.

本发明可以读取不同程序所生成的相空间文件,如MCNP、PHITS等,也可以读取IAEA数据库提供的文件(IAEAheader和IAEAphsp文件),读取文件中储存的粒子信息。如果需要对面源进行旋转、平移等操作,需要输入旋转的角度、平移的位移,否则保留原始数据。最后根据需要的确定论和概率论耦合输运程序,输出所需的粒子的信息,如类型、能量、方向、位置和统计权重等,也可以将文件输出成IAEA定义的相空间文件格式,作为程序的输入文件使用。以上所述是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也视为本发明的保护范围。The present invention can read the phase space files generated by different programs, such as MCNP, PHITS, etc., and can also read the files (IAEAheader and IAEAphsp files) provided by the IAEA database, and read the particle information stored in the files. If it is necessary to rotate, translate, etc. the surface source, it is necessary to input the rotation angle and the translation displacement, otherwise the original data is retained. Finally, according to the required deterministic and probabilistic coupled transport programs, the information of the required particles, such as type, energy, direction, position and statistical weight, etc., can be output, and the file can also be exported into the phase space file format defined by the IAEA, as the input file of the program. The above is a preferred embodiment of the present invention. It should be pointed out that for those of ordinary skill in the art, without departing from the principle of the present invention, some improvements and embellishments can also be made, and these improvements and embellishments are also considered as the protection scope of the present invention.

Claims (6)

1. A method for converting a phase space file into an input file usable by other programs, comprising the steps of:
s1, reading phase space files generated by different programs, and generating an accurate geometric model, wherein the geometric model comprises neutron sources, capturing agent distribution, tumor tissues and surrounding normal tissues;
s2, defining the nuclear reaction section, interaction probability and physical properties of energy transmission of each tissue and substance in the geometric model;
s3, solving a Boltzmann neutron transport equation by coupling calculation of a definite theory method and a probability theory method to obtain flux distribution, wherein the method comprises the following steps:
s31, rapidly calculating neutron flux distribution by using a definite theory method;
s32, taking the distribution of neutron flux as a cost function for guiding Monte Carlo program simulation, and simulating neutron motion state by using a Monte Carlo method of probability theory;
s4, in the simulation process, recording the interaction condition of each particle and the substance, and calculating the distribution condition of the dose in different tissues and positions;
s5, verifying consistency of simulation results and experimental data or other calculation methods, and calibrating;
s6, outputting input files available for other programs.
2. The method of claim 1, wherein the phase space files generated by the different programs read in S1 include, but are not limited to, MCNP files, bits files, iaeahead files, and IAEAphsp files.
3. The method for converting a phase space file into an input file usable by other programs according to claim 1, wherein said step S31 comprises the steps of:
s311, approximating a Boltzmann neutron transport equation;
s312, solving an approximate solution or an analytical solution of the Boltzmann neutron transport equation.
4. The method of converting a phase space file into an input file usable by other programs according to claim 3, wherein the method of approximating the Boltzmann neutron transport equation in S311 includes, but is not limited to, a multi-cluster approximation of an interface and Legendre expansion.
5. A method of converting a phase space file into an input file usable by other programs as claimed in claim 3, wherein the method of approximating or resolving the Boltzmann neutron transport equation in S312 includes, but is not limited to, a discrete coordinate method, a spherical harmonic method, and a finite element method.
6. The method for converting a phase space file into an input file usable by other programs according to claim 1, wherein said S32 comprises the steps of: the method for adding the weight window parameters in the Monte Carlo simulation specifically comprises the following steps:
s321, calculating an importance map based on grids divided in Monte Carlo simulation, wherein the importance map is defined asWhere (I, j, k) is the index of the grid divided in the Monte Carlo simulation, g is the particle energy group, I (I, j, k, g) is the importance of the grid (I, j, k, g), R score (i, j, k, g) is the response of all detectors after the particle enters the grid (i, j, k, g), W total (i, j, k, g) is the weight addition of all particles into the grid (i, j, k, g), R score (i, j, k, g) flux +.>Obtained, W total (i, j, k, g) from the particle information recorded by the definitive calculation in step S31;
s322, defining the expected weight of each grid asWherein->Is the average response of each particle. Generating a window of desired weight for each grid;
s323, comparing the actual particle weight with the weight window boundary of the split and roulette, if the actual weight W actual Greater than threshold f upper W expect Then the particles undergo fragmentation simulation; if the actual weight W actual Less than threshold f lower W expect The particle would need to make roulette to reduce the simulation; if the actual weight W actual At threshold f upper W expect And f lower W expect In the middle, the particles continue to simulate, where f upper And f lower Is a constant for the threshold setting, in the respective steps (1), + -infinity) and (0, 1 is selected from the group consisting of.
CN202410061211.XA 2024-01-16 2024-01-16 Method for converting phase space file into input file usable by other programs Pending CN117873963A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202410061211.XA CN117873963A (en) 2024-01-16 2024-01-16 Method for converting phase space file into input file usable by other programs
CN202411507488.7A CN119025478B (en) 2024-01-16 2024-10-28 A method to convert phase space files into input files that can be used by other programs

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410061211.XA CN117873963A (en) 2024-01-16 2024-01-16 Method for converting phase space file into input file usable by other programs

Publications (1)

Publication Number Publication Date
CN117873963A true CN117873963A (en) 2024-04-12

Family

ID=90591687

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202410061211.XA Pending CN117873963A (en) 2024-01-16 2024-01-16 Method for converting phase space file into input file usable by other programs
CN202411507488.7A Active CN119025478B (en) 2024-01-16 2024-10-28 A method to convert phase space files into input files that can be used by other programs

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202411507488.7A Active CN119025478B (en) 2024-01-16 2024-10-28 A method to convert phase space files into input files that can be used by other programs

Country Status (1)

Country Link
CN (2) CN117873963A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119920407B (en) * 2025-01-03 2025-10-03 合肥综合性国家科学中心能源研究院(安徽省能源实验室) Method for converting CT image into Mongolian card program cosRMC input file

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7197404B2 (en) * 2004-03-01 2007-03-27 Richard Andrew Holland Computation of radiating particle and wave distributions using a generalized discrete field constructed from representative ray sets
US10621988B2 (en) * 2005-10-26 2020-04-14 Cortica Ltd System and method for speech to text translation using cores of a natural liquid architecture system
CN103106301B (en) * 2013-01-22 2015-09-23 中国科学院合肥物质科学研究院 A kind of method of the calculating radiation shield be coupled with characteristic line method based on Monte Carlo method
CN113230549B (en) * 2021-06-10 2021-12-31 哈尔滨医科大学 Construction method of photon source model function of medical linear accelerator
US20230154586A1 (en) * 2021-11-17 2023-05-18 James Castle System and method for fast monte carlo dose calculation using a virtual source model
US20230390579A1 (en) * 2022-06-03 2023-12-07 Mayo Foundation For Medical Education And Research Virtual Particle Based Monte Carlo Dose Calculation for Charged Particle Therapy Treatment Planning

Also Published As

Publication number Publication date
CN119025478A (en) 2024-11-26
CN119025478B (en) 2025-01-21

Similar Documents

Publication Publication Date Title
Waters et al. The MCNPX Monte Carlo radiation transport code
Kwiatkowski et al. HERACLES: an event generator for ep interactions at HERA energies including radiative processes
CN119025478B (en) A method to convert phase space files into input files that can be used by other programs
Sterpin et al. A Fano cavity test for Monte Carlo proton transport algorithms
CN108804865B (en) Method, system, computer equipment and storage medium for simulating fusion reaction of deuterium and tritium in plasma
Perfetti et al. Development of a SCALE Tool for Continuous–Energy Eigenvalue Sensitivity Coefficient Calculations
Nelson Improved convergence rate of multi-group scattering moment tallies for Monte Carlo neutron transport codes
JP2004361240A (en) Radiation dose calculation system, radiation dose calculation method, and program
Tantillo et al. Adjoint neutron flux estimator implementation and verification in the continuous energy Monte Carlo code MONK
Burke Kernel Density Estimation Techniques for Monte Carlo Reactor Analysis.
Ogheard et al. Monte-Carlo simulations of the new LNHB manganese bath facility
Kong et al. Microdosimetric analysis of monoenergetic electrons and beta-emitting radionuclides based on mesh-type cell models and RBE prediction
Mokhov Simulation of particle-material interactions
Hoff et al. Application Developers: Geant4 and XRMC Comparison and
Kotiluoto Adaptive tree multigrids and simplified spherical harmonics approximation in deterministic neutral and charged particle transport
Zhang et al. Development and verification of neutron and photon multi-group cross sections processing code TXMAT2. 0
ABDOU CALCULATIONAL METHODS FOR NUCLEAR HEATING AND NEUTRONICS AND PHOTONICS DESIGN FOR CTR (CONTROLLED THERMONUCLEAR REACTOR) BLANKETS AND SHIELDS
Rose Comparison of Attila SN Particle Transport Code with MCNP in the Analysis of Small Modular Reactor Shielding
Brown et al. Verification of MCNP5
Shuiyin et al. Neudep: a GPU-based Monte Carlo transport program, coupling full physical reaction models of neutrons, photons, electrons/positrons
Looman et al. An overview of NDA instruments modeled with the MCNP-PTA code at the JRC Ispra
Lam Generation of Multigroup Multiband Cross Sections with Monte Carlo Simulations
Lahdour et al. Validation of deterministic code OpenNTP for the analysis of the C5G7-1D benchmark with different configurations
Trahan Monte Carlo Transport: Computational Physics Summer Workshop [Slides]
Chen et al. A Simulated Comprehensive Photon Flux Shielding Spectra Dataset for Advanced Radiation Safety Assessment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20240412