CN106484991A - A kind of Monte Carlo geometric manipulations method of coupling spline surface and analytic surface in nuclear mockup analysis - Google Patents
A kind of Monte Carlo geometric manipulations method of coupling spline surface and analytic surface in nuclear mockup analysis Download PDFInfo
- Publication number
- CN106484991A CN106484991A CN201610874256.4A CN201610874256A CN106484991A CN 106484991 A CN106484991 A CN 106484991A CN 201610874256 A CN201610874256 A CN 201610874256A CN 106484991 A CN106484991 A CN 106484991A
- Authority
- CN
- China
- Prior art keywords
- spline
- geometry
- monte carlo
- model
- spline surface
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 21
- 238000004458 analytical method Methods 0.000 title claims abstract description 12
- 230000008878 coupling Effects 0.000 title claims abstract description 9
- 238000010168 coupling process Methods 0.000 title claims abstract description 9
- 238000005859 coupling reaction Methods 0.000 title claims abstract description 9
- 239000002245 particle Substances 0.000 claims abstract description 34
- 238000004364 calculation method Methods 0.000 claims abstract description 30
- 238000012545 processing Methods 0.000 claims abstract description 21
- 230000004927 fusion Effects 0.000 claims abstract description 16
- 238000003672 processing method Methods 0.000 claims abstract description 14
- 238000004088 simulation Methods 0.000 claims abstract description 11
- 239000007787 solid Substances 0.000 claims description 22
- 238000006243 chemical reaction Methods 0.000 claims description 2
- 230000014509 gene expression Effects 0.000 description 12
- 238000010586 diagram Methods 0.000 description 4
- 238000013461 design Methods 0.000 description 3
- 230000008676 import Effects 0.000 description 3
- 230000005855 radiation Effects 0.000 description 3
- 238000000342 Monte Carlo simulation Methods 0.000 description 2
- 239000011365 complex material Substances 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000012821 model calculation Methods 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Geometry (AREA)
- General Physics & Mathematics (AREA)
- Computer Graphics (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- Evolutionary Computation (AREA)
- General Engineering & Computer Science (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
本发明公开了一种核模拟分析中耦合样条曲面与解析曲面的蒙特卡罗几何处理方法。在进行反应堆厂房或者聚变堆蒙特卡罗粒子输运计算时,由于几何模型中存在复杂的样条曲面,传统的蒙特卡罗程序无法处理,需要对模型进行简化。本发明对CAD模型中几何体的曲面进行分类处理,解析曲面使用代数方程描述,样条曲面使用参数方程描述,实现了蒙特卡罗程序对任意曲面的几何处理,同时利用样条曲面参数方程的有限空间包围盒,对含有样条曲面的几何处理进行加速。本发明相比于只用代数方程的蒙特卡罗解析曲面几何处理方法,不对原始几何模型做任何简化,保证了模型的计算精度;相比于只用参数方程的蒙特卡罗样条曲面几何处理方法,提升了计算的效率。
The invention discloses a Monte Carlo geometric processing method for coupling a spline surface and an analytic surface in nuclear simulation analysis. When calculating the Monte Carlo particle transport of reactor building or fusion reactor, due to the complex spline surface in the geometric model, the traditional Monte Carlo program cannot handle it, and the model needs to be simplified. The invention classifies and processes the curved surfaces of the geometry in the CAD model. The analytic curved surfaces are described by algebraic equations, and the spline curved surfaces are described by parametric equations, which realizes the geometric processing of arbitrary curved surfaces by the Monte Carlo program, and at the same time utilizes the limited parameters of the spline curved surface parametric equations. Spatial bounding box to accelerate the processing of geometries containing spline surfaces. Compared with the Monte Carlo analytical surface geometry processing method that only uses algebraic equations, the present invention does not simplify the original geometric model, thereby ensuring the calculation accuracy of the model; compared with the Monte Carlo spline surface geometry processing method that only uses parametric equations method to improve the computational efficiency.
Description
技术领域technical field
本发明涉及反应堆物理、中子学分析等领域的蒙特卡罗粒子输运中任意曲面的几何处理方法。The invention relates to a geometric processing method for arbitrary curved surfaces in Monte Carlo particle transport in the fields of reactor physics, neutronics analysis and the like.
背景技术Background technique
聚变能是人类未来能源的主导形式之一,也是目前认识到的可以最终解决人类社会能源问题和环境问题、推动人类社会可持续发展的重要途径之一。核模拟分析是聚变能安全、有效应用的必要手段。由于聚变装置存在各种形状复杂的精细部件,包含大量复杂曲面(以国际热核聚变实验堆ITER为例,模型中存在大量辐射敏感或者包含不同用途孔洞的精细结构需要建模),传统的确定论方法已不能满足聚变装置的精确模拟分析要求。而蒙特卡罗粒子输运方法的最大优点在于能够非常逼真地描述具有随机性质的事物特点及过程,并且对几何模型和材料限制小,可以精确模拟复杂源、复杂材料和复杂几何下的粒子输运问题,因此被广泛应用于聚变堆的核模拟分析中。Fusion energy is one of the dominant forms of human energy in the future, and it is also one of the important ways to finally solve the energy and environmental problems of human society and promote the sustainable development of human society. Nuclear simulation analysis is a necessary means for the safe and effective application of fusion energy. Since the fusion device has various fine parts with complex shapes and a large number of complex surfaces (taking the International Thermonuclear Experimental Reactor ITER as an example, there are a large number of fine structures that are radiation-sensitive or contain holes for different purposes that need to be modeled), the traditional determination The theoretical method can no longer meet the requirements of accurate simulation analysis of fusion devices. The biggest advantage of the Monte Carlo particle transport method is that it can describe the characteristics and processes of things with random properties very realistically, and has little restrictions on geometric models and materials, and can accurately simulate particle transport under complex sources, complex materials, and complex geometries. Therefore, it is widely used in the nuclear simulation analysis of fusion reactors.
反应堆厂房中的辐射剂量计算,其计算的目的是对厂房中的辐射剂量进行评估,以优化厂房屏蔽设计(墙体厚度、管道厚度等),用于反应堆实际运行时,决定工作人员可以停留的时间。原先都是采用简单的点核计算的方式,速度快,适用于厂房内管道较少(或者起主要作用的管道较少),但是对于厂房中包含有大量源强都较高的管道时,计算精度较低,因此需要使用蒙卡方法来处理。The radiation dose calculation in the reactor building, the purpose of the calculation is to evaluate the radiation dose in the building, to optimize the shielding design of the building (wall thickness, pipe thickness, etc.) time. In the past, the simple point-core calculation method was used, which was fast and suitable for fewer pipes in the plant (or fewer pipes that played a major role), but when the plant contained a large number of pipes with high source strength, the calculation The accuracy is low, so it needs to be processed by Monte Carlo method.
在利用蒙卡程序在进行粒子输运模拟计算之前,需要利用特定格式标识符、关键字、几何参数对几何模型的空间位置、大小尺寸、形状类型等关系进行描述,为待计算的物理空间建立完整的空间几何关系,且保证待计算的物理空间中的每一个点被有且被唯一定义,不存在未被定义或重复定义的空间点存在。Before using the Monte Cal program to perform particle transport simulation calculations, it is necessary to use specific format identifiers, keywords, and geometric parameters to describe the spatial position, size, shape type, and other relationships of the geometric model, so as to establish the physical space to be calculated. Complete spatial geometric relationship, and ensure that each point in the physical space to be calculated is uniquely defined, and there are no undefined or repeatedly defined spatial points.
基于蒙特卡罗方法的几何建模系统也存在一定的局限性,无法精确描述样条曲面,例如ITER模型中间等离子体外壁,仿星器装置的表面,管道的接头处等都是典型的样条曲面。虽然,已经有部分蒙特卡罗程序实现了直接基于CAD底层函数库的样条曲面的几何处理,如MCBEND,McCARD,但其几何体的所有曲面都使用了样条曲面的参数方程来描述,程序的计算效率非常低,无法满足设计需求。因此,目前的聚变装置的核设计与分析中,仍然是将样条曲面简化为普通的解析曲面而进行蒙特卡罗粒子输运,难以实现高精度的数值模拟。The geometric modeling system based on the Monte Carlo method also has certain limitations and cannot accurately describe the spline surface. For example, the outer wall of the plasma in the middle of the ITER model, the surface of the stellarator device, and the joints of the pipeline are all typical splines. surface. Although some Monte Carlo programs have realized the geometric processing of spline surfaces directly based on the CAD underlying function library, such as MCBEND and McCARD, all surfaces of the geometry are described by the parametric equations of spline surfaces. The calculation efficiency is very low and cannot meet the design requirements. Therefore, in the nuclear design and analysis of the current fusion device, the spline surface is still simplified to an ordinary analytical surface for Monte Carlo particle transport, and it is difficult to achieve high-precision numerical simulation.
为了解决反应堆厂房和聚变反应堆核模拟分析中任意曲面的几何处理问题,本发明公开了一种耦合样条曲面与解析曲面的蒙特卡罗几何处理方法,对CAD模型中几何体的曲面进行分类处理,解析曲面使用代数方程描述,样条曲面使用参数方程描述,实现了蒙特卡罗程序对任意曲面的几何处理,同时利用样条曲面参数方程的有限空间包围盒,对含有样条曲面的几何处理进行加速。In order to solve the problem of geometric processing of arbitrary curved surfaces in nuclear simulation analysis of reactor buildings and fusion reactors, the invention discloses a Monte Carlo geometric processing method for coupling spline curved surfaces and analytic curved surfaces, which classifies and processes the curved surfaces of geometric bodies in CAD models. The analytic surface is described by algebraic equations, and the spline surface is described by parametric equations, which realizes the geometric processing of arbitrary surfaces by the Monte Carlo program. At the same time, the geometric processing of spline surfaces is carried out by using the bounding box of the limited space of the parametric equations of spline surfaces. accelerate.
发明内容Contents of the invention
本发明目的在于提供蒙特卡罗粒子输运中任意曲面的几何处理方法。对CAD模型中几何体的曲面进行分类处理,解析曲面使用代数方程描述,样条曲面使用参数方程描述,实现了蒙特卡罗程序对任意曲面的几何处理,同时利用样条曲面参数方程的有限空间包围盒,对含有样条曲面的几何处理进行加速。本发明相比于只用代数方程的蒙特卡罗解析曲面几何处理方法,不对原始几何模型做任何简化,保证了模型的计算精度;相比于只用参数方程的蒙特卡罗样条曲面几何处理方法,提升了计算的效率。The purpose of the invention is to provide a geometric processing method for arbitrary curved surfaces in Monte Carlo particle transport. Classify and process the surfaces of the geometry in the CAD model. Analytical surfaces are described by algebraic equations, and spline surfaces are described by parametric equations, which realizes the geometric processing of arbitrary surfaces by Monte Carlo programs, and at the same time utilizes the limited space encircled by the parametric equations of spline surfaces box, to accelerate the processing of geometries containing spline surfaces. Compared with the Monte Carlo analytical surface geometry processing method that only uses algebraic equations, the present invention does not simplify the original geometric model, thereby ensuring the calculation accuracy of the model; compared with the Monte Carlo spline surface geometry processing method that only uses parametric equations method to improve the computational efficiency.
本发明所采用的技术方案实现如下:一种核模拟分析中耦合样条曲面与解析曲面的蒙特卡罗几何处理方法,在进行反应堆厂房或者聚变堆蒙特卡罗粒子输运计算时,由于几何模型中存在复杂的样条曲面,传统的蒙特卡罗程序无法处理,需要对模型进行简化,该方法对CAD模型中几何体的曲面进行分类处理,解析曲面使用代数方程描述,样条曲面使用参数方程描述,实现了蒙特卡罗程序对任意曲面的几何处理,同时利用样条曲面参数方程的有限空间包围盒,对含有样条曲面的几何处理进行加速,具体包含以下步骤:The technical solution adopted in the present invention is realized as follows: a Monte Carlo geometric processing method for coupling spline surfaces and analytical surfaces in nuclear simulation analysis, when performing Monte Carlo particle transport calculations for reactor buildings or fusion reactors, due to the geometric model There are complex spline surfaces in the CAD model, which cannot be handled by the traditional Monte Carlo program, and the model needs to be simplified. This method classifies the surfaces of the geometry in the CAD model. The analytical surface is described by algebraic equations, and the spline surface is described by parametric equations. , to realize the geometric processing of any surface by Monte Carlo program, and at the same time use the bounding box of the limited space of the parametric equation of the spline surface to accelerate the geometric processing of the spline surface, which specifically includes the following steps:
步骤(1)、识别CAD模型中的样条曲面:Step (1), identify the spline surface in the CAD model:
遍历CAD模型中的所有几何体,对于任一几何体,根据其拓扑结构获取组成该几何体的所有曲面,然后判断每个曲面的类型,如果曲面的类型不属于解析曲面(平面、球面、圆柱面、圆锥面、圆环面、二次曲面),则将其标记为样条曲面并记录。Traverse all the geometry in the CAD model, for any geometry, obtain all the surfaces that make up the geometry according to its topology, and then judge the type of each surface, if the type of surface does not belong to the analytical surface (plane, sphere, cylinder, cone surface, torus, quadratic surface), mark it as a spline surface and record it.
步骤(2)、转换CAD模型生成蒙特卡罗计算模型:Step (2), conversion CAD model generates Monte Carlo calculation model:
CAD模型中的所有几何体均使用曲面及曲面之间的布尔运算来描述,当曲面类型为解析曲面时,以面方程的形式表示,记录下解析曲面的类型以及对应的参数,而当曲面类型为样条曲面时,记录下该样条曲面对应的所有几何体以及在对应几何体拓扑结构面列表中的序号,并在计算模型中生成该样条曲面对应的包围盒信息。All the geometry in the CAD model is described by the surface and the Boolean operation between the surfaces. When the surface type is an analytical surface, it is expressed in the form of a surface equation, and the type of the analytical surface and the corresponding parameters are recorded. When the surface type is For a spline surface, record all the geometry corresponding to the spline surface and the serial number in the topology surface list of the corresponding geometry, and generate the bounding box information corresponding to the spline surface in the calculation model.
步骤(3)、耦合样条曲面与解析曲面的蒙特卡罗计算模型几何处理:Step (3), Monte Carlo calculation model geometric processing of coupling spline surface and analytical surface:
进行蒙特卡罗粒子输运时,需要计算粒子沿射线方向到几何体的每个曲面的距离,从而获得粒子沿射线方向到几何体边界的最短距离。遍历几何体中的所有曲面,如果是解析曲面,则直接使用射线与面方程进行求交运算,如果是样条曲面,则根据步骤(2)中的序号找到该样条曲面在对应几何体拓扑结构面列表中的位置,然后利用CAD底层库函数获取到该样条曲面,并利用牛顿迭代法进行求解粒子轨迹与样条曲面交点,据此求解出粒子(沿射线方向)到样条曲面的距离。在求解射线与样条曲面的交点之前,根据样条曲面的空间包围盒,进行射线与包围盒的求交运算,如果射线与包围盒没有交点,则不需要再进行射线与样条曲面的求交运算。When performing Monte Carlo particle transport, it is necessary to calculate the distance from the particle to each surface of the geometry along the ray direction, so as to obtain the shortest distance from the particle to the boundary of the geometry along the ray direction. Traverse all the surfaces in the geometry, if it is an analytic surface, directly use the ray and surface equation to perform intersection operation, if it is a spline surface, find the spline surface on the corresponding geometry topology surface according to the serial number in step (2) The position in the list, and then use the CAD underlying library function to obtain the spline surface, and use the Newton iterative method to solve the intersection point of the particle trajectory and the spline surface, and then calculate the distance from the particle (along the ray direction) to the spline surface. Before solving the intersection point of the ray and the spline surface, according to the space bounding box of the spline surface, perform the intersection operation of the ray and the bounding box, if there is no intersection point between the ray and the bounding box, then there is no need to calculate the ray and the spline surface cross operation.
本发明与现有技术相比的优点在于:The advantage of the present invention compared with prior art is:
(1)本发明相比于只用代数方程的蒙特卡罗解析曲面几何处理方法,不对原始反应堆厂房或者聚变反应堆的几何模型做任何简化,保证了模型的计算精度,同时也节约了大量的模型预处理的时间。(1) Compared with the Monte Carlo analytical surface geometry processing method that only uses algebraic equations, the present invention does not do any simplification to the geometric model of the original reactor building or fusion reactor, which ensures the calculation accuracy of the model and saves a large amount of models at the same time preprocessing time.
(2)本发明相比于只用参数方程的蒙特卡罗样条曲面几何处理方法,在反应堆厂房或者聚变反应堆的粒子输运计算时,提升了复杂模型计算的效率。(2) Compared with the Monte Carlo spline surface geometry processing method that only uses parametric equations, the present invention improves the efficiency of complex model calculations when calculating particle transport in reactor buildings or fusion reactors.
附图说明Description of drawings
图1是耦合样条曲面与解析曲面的蒙特卡罗计算模型生成示意图;Figure 1 is a schematic diagram of the Monte Carlo calculation model generation of coupled spline surfaces and analytical surfaces;
图2是耦合样条曲面与解析曲面的蒙特卡罗几何处理示意图;Fig. 2 is a schematic diagram of Monte Carlo geometric processing of a coupled spline surface and an analytical surface;
图3是计算实例1的模型示意图;Fig. 3 is the model schematic diagram of computing example 1;
图4是计算实例2的模型示意图。FIG. 4 is a schematic diagram of the model of Calculation Example 2.
具体实施方式detailed description
下面结合附图和具体实施方式进一步说明本发明。The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.
本发明一种核模拟分析中耦合样条曲面与解析曲面的蒙特卡罗几何处理方法,在进行反应堆厂房或者聚变堆蒙特卡罗粒子输运计算时,由于几何模型中存在复杂的样条曲面,传统的蒙特卡罗程序无法处理,需要对模型进行简化,该方法对CAD模型中几何体的曲面进行分类处理,解析曲面使用代数方程描述,样条曲面使用参数方程描述,实现了蒙特卡罗程序对任意曲面的几何处理,同时利用样条曲面参数方程的有限空间包围盒,对含有样条曲面的几何处理进行加速,具体步骤如下:The present invention provides a Monte Carlo geometric processing method for coupling spline surfaces and analytical surfaces in nuclear simulation analysis. When performing Monte Carlo particle transport calculations in reactor buildings or fusion reactors, due to complex spline surfaces in the geometric model, The traditional Monte Carlo program cannot handle it, and the model needs to be simplified. This method classifies the surface of the geometry in the CAD model. The analytical surface is described by algebraic equations, and the spline surface is described by parametric equations, which realizes the Monte Carlo program. Geometry processing of arbitrary surfaces, while using the limited space bounding box of the spline surface parametric equation to accelerate the geometry processing containing spline surfaces, the specific steps are as follows:
1.导入/创建CAD几何模型1. Import/create CAD geometry model
将包含全部几何体的CAD模型导入到软件界面中,如果没有现成的CAD模型,则通过软件界面创建计算所需的CAD模型。完成模型的导入/创建后,整个计算区域定义为R。如果是创建的CAD模型,还需要将其导出成通常格式的CAD文件(如SAT、STP等),供耦合CAD与CSG的蒙特卡罗计算模型使用。Import the CAD model containing all the geometry into the software interface, if there is no ready-made CAD model, create the CAD model required for calculation through the software interface. After completing the import/creation of the model, the entire calculation area is defined as R. If it is a created CAD model, it also needs to be exported to a CAD file in a common format (such as SAT, STP, etc.) for use in the Monte Carlo calculation model that couples CAD and CSG.
2.识别CAD模型中的样条曲面2. Identify spline surfaces in CAD models
遍历CAD模型中的所有N个几何体,对于任一几何体Solidi(Solidi∈R,i=1,N),根据其拓扑结构获取组成该几何体的Mi个面Facei,j(Facei,j∈Solidi,j=1,Mi),然后遍历Fi,j并判断每个面的类型。如果Solidi1中Fi1,j1的类型不属于解析曲面(Fi2,j2∈S),其中S=(平面、球面、圆柱面、圆锥面、圆环面、二次曲面),则将Solidi1标记为含有样条曲面的几何体,Fi1,j1标记为样条曲面,同时记录该样条曲面在几何体拓扑结构面列表中的序号j1;如果Solidi2中Fi2,j2的类型都属于解析曲面(Fi2,j2∈S),则不做处理。具体流程如图1所示。Traversing all N geometric bodies in the CAD model, for any geometric body Solid i (Solid i ∈ R, i=1, N), obtain M i faces Face i,j (Face i, j ∈Solid i , j=1,M i ), then traverse F i,j and judge the type of each surface. If the type of F i1, j1 in Solid i1 does not belong to the analytical surface (F i2, j2 ∈ S), where S = (plane, sphere, cylinder, cone, torus, quadratic surface), then Solid i1 Mark as a geometry containing a spline surface, mark F i1, j1 as a spline surface, and record the serial number j1 of the spline surface in the geometry topology surface list; if the types of F i2, j2 in Soli di2 belong to the analytical surface (F i2, j2 ∈ S), then it will not be processed. The specific process is shown in Figure 1.
重复上述操作,直到遍历完模型中的所有几何体及其曲面,形成以下集合,Repeat the above operations until all the geometry and their surfaces in the model have been traversed to form the following collection,
含样条曲面的几何体集合:SolidN={Solidt1}Geometry collection with spline surface: Solid N = {Solid t1 }
只含解析曲面的几何体集合:SolidA={Solidt2}Geometry collection containing only analytical surfaces: Solid A = {Solid t2 }
样条曲面集合:FaceN={Facei,j},(i=i1,f=f1)Set of spline surfaces: Face N = {Face i, j }, (i=i1, f=f1)
解析曲面集合:FaceA={Facei,j},(i=i1&j≠j1)或者(i=i2&j=1,Mi)Analytical surface set: Face A = {Face i, j }, (i=i1&j≠j1) or (i=i2&j=1, Mi)
3.转换CAD模型生成蒙特卡罗计算模型:3. Convert the CAD model to generate a Monte Carlo calculation model:
1)生成解析曲面的表达式。遍历集合FaceA中的所有解析曲面,包括解析曲面的类型以及必须的参数值,同时还需要为每个解析曲面指定一个唯一的字符串(曲面类型+对应的序号),例如,<Analytic_surface id="1"type="plane"para="1 2 3 4"/>1) Generate an expression for an analytic surface. Traverse all the analytic surfaces in the collection Face A , including the type of analytic surface and the necessary parameter values, and also need to specify a unique string (surface type + corresponding serial number) for each analytic surface, for example, <Analytic_surface id= "1"type="plane"para="1 2 3 4"/>
2)生成样条曲面的表达式。遍历集合FaceN中的所有样条曲面,包括对应的几何体的序号,在几何体面列表中的序号以及该样条曲面的包围盒信息,同时还需要为每个样条曲面制定一个唯一的字符串(曲面类型+对应的序号),例如,2) Generate the expression of the spline surface. Traverse all the spline surfaces in the collection Face N , including the serial number of the corresponding geometry, the serial number in the geometry face list and the bounding box information of the spline surface, and also need to formulate a unique string for each spline surface (surface type + corresponding serial number), for example,
<Nurbs_surface id="2"solidnum="2"indexnum="3"boundingbox="-10 -10-10 10 10 10"/><Nurbs_surface id="2"solidnum="2"indexnum="3"boundingbox="-10 -10-10 10 10 10"/>
3)生成几何体的表达式。曲面之间的布尔运算,用特定的字符来表示,布尔交(空格),布尔并(:),布尔减(#)。遍历所有几何体,根据当前几何体曲面之间的布尔关系生成几何体的表达式。同时,每个几何体也需要指定一个唯一的序号(整数型),例如,3) Expressions for generating geometry. Boolean operations between surfaces are represented by specific characters, Boolean intersection (space), Boolean union (:), and Boolean subtraction (#). Iterates over all geometries and generates geometric expressions based on Boolean relationships between the surfaces of the current geometry. At the same time, each geometry also needs to specify a unique serial number (integer type), for example,
<Solid id="2"value="1 2 3 4"/><Solid id="2" value="1 2 3 4"/>
4.耦合CAD与CSG的蒙特卡罗计算模型几何处理:4. Geometry processing of the Monte Carlo calculation model coupled with CAD and CSG:
进行蒙特卡罗粒子输运时,需要计算粒子(沿射线方向)到几何体的每个曲面的距离,从而获得粒子(沿射线方向)到几何体边界的最短距离。遍历几何体中的所有曲面,如果是解析曲面,则直接使用射线与面方程进行求交运算,如果是样条曲面,则根据序号找到该样条曲面在对应几何体拓扑结构面列表中的位置,然后利用CAD底层库函数获取到该样条曲面,并利用牛顿迭代法进行求解粒子轨迹与样条曲面交点,据此求解出粒子(沿射线方向)到样条曲面的距离。在求解射线与样条曲面的交点之前,根据样条曲面的空间包围盒,进行射线与包围盒的求交运算,如果射线与包围盒没有交点,则不需要再进行射线与样条曲面的求交运算。具体流程如图2所示。When performing Monte Carlo particle transport, it is necessary to calculate the distance from the particle (along the ray direction) to each surface of the geometry, so as to obtain the shortest distance from the particle (along the ray direction) to the boundary of the geometry. Traverse all the surfaces in the geometry, if it is an analytic surface, directly use the ray and surface equation to perform intersection operation, if it is a spline surface, find the position of the spline surface in the corresponding geometry topology surface list according to the serial number, and then The spline surface is obtained by using the CAD underlying library function, and the intersection point between the particle trajectory and the spline surface is solved by Newton iterative method, and the distance from the particle (along the ray direction) to the spline surface is calculated accordingly. Before solving the intersection point of the ray and the spline surface, according to the space bounding box of the spline surface, perform the intersection operation of the ray and the bounding box, if there is no intersection point between the ray and the bounding box, then there is no need to calculate the ray and the spline surface cross operation. The specific process is shown in Figure 2.
5.应用实例,包含以下内容:5. Application examples, including the following:
应用实例1:Application example 1:
如图3所示是一个类似管道接头的几何体,该几何体包含有样条曲面。在进行蒙特卡罗粒子输运时,假定给定一个空间点(5.0,5.0,5.0)和射线方向(0.707,0.707,0.0),要求基于耦合样条曲面与解析曲面实现蒙特卡罗几何处理。主要包括以下步骤:As shown in Figure 3, it is a geometry similar to a pipe joint, which contains a spline surface. When performing Monte Carlo particle transport, it is assumed that a space point (5.0, 5.0, 5.0) and a ray direction (0.707, 0.707, 0.0) are given, and it is required to implement Monte Carlo geometric processing based on coupled spline surfaces and analytical surfaces. It mainly includes the following steps:
1)识别CAD模型中的样条曲面。由于该模型只有一个几何体Solid1,根据其拓扑结构获取组成该几何体的3个面Face1,1,Face1,2,Face1,3;然后判断每个面的类型:Face1,1为解析曲面(平面),Face1,2为样条曲面,Face1,1为解析曲面(平面)。这样,Face1,1和Face1,3将被加入解析曲面的集合Facex={Face1,1,Face1,3},Face1,2将被加入样条曲面的集合FaceN={Face1,2}。FaceA集合中的元素Face1,1,Face1,3需要存储其对应的解析曲面的类型“p”(代表平面)以及参数,FaceN集合中的元素Face1,2存储对应的几何体的序号1,在几何体面列表中的序号2以及该样条曲面的包围盒信息(X方向0~25.0;Y方向-25.0~25.0;Z方向-4.000495~6.000495)。同时组成几何体Solid1的曲面类型的集合为SolidSurfaceType={A,S,A},并且其对应的曲面序号的集合为SolidSurfaceIndex={1,1,2}。1) Identify the spline surface in the CAD model. Since the model has only one geometry Solid 1 , the three faces Face 1,1 , Face 1,2 , and Face 1,3 that make up the geometry are obtained according to its topology; then the type of each face is judged: Face 1,1 is analytical Surface (plane), Face 1,2 are spline surfaces, Face 1,1 are analytical surfaces (plane). In this way, Face 1,1 and Face 1,3 will be added to the collection of analytical surfaces Face x ={Face 1,1 ,Face 1,3 }, Face 1,2 will be added to the collection of spline surfaces Face N ={Face 1, 2 }. The elements Face 1 , 1, Face 1, 3 in the Face A collection need to store the type "p" (representing the plane) and parameters of the corresponding analytical surface, and the elements Face 1 and 2 in the Face N collection store the serial number of the corresponding geometry 1. The serial number 2 in the geometry surface list and the bounding box information of the spline surface (0 to 25.0 in the X direction; -25.0 to 25.0 in the Y direction; -4.000495 to 6.000495 in the Z direction). At the same time, the set of surface types that make up the geometry Solid 1 is SolidSurface Type = {A, S, A}, and the set of corresponding surface numbers is SolidSurface Index = {1, 1, 2}.
2)转换CAD模型生成蒙特卡罗计算模型:2) Convert the CAD model to generate a Monte Carlo calculation model:
a)生成解析曲面的表达式。遍历集合F中的所有解析曲面,包括解析曲面的类型以及必须的参数值,同时还需要为每个解析曲面指定一个唯一的字符串(曲面类型+对应的序号),如下:a) Generate an expression for the analytic surface. Traverse all analytical surfaces in the collection F, including the type of the analytical surface and the necessary parameter values, and also need to specify a unique string (surface type + corresponding serial number) for each analytical surface, as follows:
<Analytic_surface id="A1"type="p"para="0 1 0 12"/><Analytic_surface id="A1" type="p" para="0 1 0 12"/>
<Analytic_surface id="A2"type="p"para="1 0 0 0"/><Analytic_surface id="A2" type="p" para="1 0 0 0"/>
b)生成样条曲面的表达式。遍历集合F中的所有样条曲面,包括对应的几何体的序号,在几何体面列表中的序号以及该样条曲面的包围盒信息,同时还需要为每个样条曲面制定一个唯一的字符串(曲面类型+对应的序号),如下:b) Expressions for generating spline surfaces. Traverse all the spline surfaces in the set F, including the serial number of the corresponding geometry, the serial number in the geometry surface list and the bounding box information of the spline surface, and also need to formulate a unique string for each spline surface ( Surface type + corresponding serial number), as follows:
<Nurbs_surface id="S1"solidnum="1"indexnum="2"<Nurbs_surface id="S1"solidnum="1"indexnum="2"
boundingbox="0 -25.0 -4.000495 25.0 25.0 6.000495"/>boundingbox="0 -25.0 -4.000495 25.0 25.0 6.000495"/>
c)生成几何体的表达式。曲面之间的布尔运算,用特定的字符来表示,布尔交(空格),布尔并(:),布尔减(#)。遍历所有几何体,根据当前几何体曲面之间的布尔关系生成几何体的表达式,如下:c) Expressions for generating geometry. Boolean operations between surfaces are represented by specific characters, Boolean intersection (space), Boolean union (:), and Boolean subtraction (#). Traverse all the geometry, and generate the expression of the geometry according to the Boolean relationship between the surfaces of the current geometry, as follows:
<Solid id="1"value="A1 A2 -S1"/><Solid id="1" value="A1 A2 -S1"/>
3)耦合CAD与CSG的蒙特卡罗计算模型几何处理:遍历几何体中的所有曲面,对于Face1,1,Face1,3,直接计算空间点(5.0,5.0,5.0)沿射线方向(0.707,0.707,0.0)到两个平面的距离;对于Face1,2,首先计算空间点(5.0,5.0,5.0)沿射线方向(0.707,0.707,0.0)与样条曲面的包围盒是否相交,相交后再利用CAD底层库函数计算空间点(5.0,5.0,5.0)沿射线方向(0.707,0.707,0.0)到样条平面的距离。3) Geometry processing of the Monte Carlo calculation model coupling CAD and CSG: traverse all surfaces in the geometry, for Face 1 , 1 , Face 1, 3 , directly calculate the spatial point (5.0, 5.0, 5.0) along the ray direction (0.707, 0.707, 0.0) to the two planes; for Face 1 , 2, first calculate whether the space point (5.0, 5.0, 5.0) intersects with the bounding box of the spline surface along the ray direction (0.707, 0.707, 0.0), after the intersection Then use the CAD underlying library function to calculate the distance from the spatial point (5.0, 5.0, 5.0) along the ray direction (0.707, 0.707, 0.0) to the spline plane.
应用实例2:Application example 2:
如图4所示是一个典型的超导仿星器形的聚变反应堆,该聚变反应堆的外部装置由一些规则的几何体或者普通的解析曲面构造而成,而内部部件则主要由样条曲面拼接而成。在进行蒙特卡罗粒子输运时,假定源粒子从图4模型中部的圆柱体中各向同性发射出来,要求基于耦合样条曲面与解析曲面的方法实现蒙特卡罗几何处理。主要包括以下步骤:As shown in Figure 4, it is a typical superconducting stellarator-shaped fusion reactor. The external device of the fusion reactor is constructed by some regular geometric bodies or ordinary analytical surfaces, while the internal parts are mainly spliced by spline surfaces. become. When performing Monte Carlo particle transport, it is assumed that the source particles are emitted isotropically from the cylinder in the middle of the model in Figure 4, and it is required to implement Monte Carlo geometric processing based on the method of coupled spline surface and analytical surface. It mainly includes the following steps:
1)识别CAD模型中的样条曲面。遍历CAD模型中的N个几何体,对于任一几何体Solidi,根据其拓扑结构获取组成该几何体的Mi个面,然后遍历Fi,j并判断每个面的类型。如果Solidi1中Fi1,j1的类型不属于解析曲面,则将Solidi1标记为含有样条曲面的几何体,Fi1,j1标记为样条曲面,同时记录该样条曲面在几何体拓扑结构面列表中的序号j1;如果Solidi2中Fi2,j2的类型都属于解析曲面,则不做处理。1) Identify the spline surface in the CAD model. Traverse the N geometries in the CAD model, for any solid i , obtain the M i faces that make up the geometry according to its topology, then traverse F i,j and judge the type of each face. If the type of F i1,j1 in Solid i1 does not belong to the analytic surface, then mark Solid i1 as a geometry containing a spline surface, mark F i1,j1 as a spline surface, and record the spline surface in the geometry topology surface list The serial number j1 in ; if the types of F i2 and j2 in Solid i2 belong to analytic surfaces, it will not be processed.
重复上述操作,直到遍历完模型中的所有几何体及其曲面,形成以下集合,Repeat the above operations until all the geometry and their surfaces in the model have been traversed to form the following collection,
含样条曲面的几何体集合:SolidN={V5,V6,V7,V8,V9}Geometry set with spline surface: Solid N = {V5, V6, V7, V8, V9}
只含解析曲面的几何体集合:SolidA={V1,V2,V3,V4,V10,V11,V12,V13}Geometry collection containing only analytical surfaces: Solid A = {V1, V2, V3, V4, V10, V11, V12, V13}
样条曲面集合:FaceN={F5,1,……,F9,1}Set of spline surfaces: Face N ={F 5,1 ,…,F 9,1 }
解析曲面集合:FaceA={F1,1,F1,2,F1,3,……,F13,1,F13,2,F13,3,F5,2,F5,3,…………}Analytical surface set: Face A = {F 1,1 , F 1,2 , F 1,3 , ..., F 13,1 , F 13,2 , F 13,3 , F 5,2 , F 5,3 ,………}
2)转换CAD模型生成蒙特卡罗计算模型:2) Convert the CAD model to generate a Monte Carlo calculation model:
a)生成解析曲面的表达式。遍历集合FaceA中的所有解析曲面,包括解析曲面的类型以及必须的参数值,同时还需要为每个解析曲面指定一个唯一的字符串(曲面类型+对应的序号),如下:a) Generate an expression for the analytic surface. Traverse all analytical surfaces in the collection Face A , including the type of the analytical surface and the necessary parameter values, and also need to specify a unique string (surface type + corresponding serial number) for each analytical surface, as follows:
<Analytic_surface id="A11"type="tz"para="0 0-200 1400 1000 1000"/><Analytic_surface id="A11" type="tz" para="0 0-200 1400 1000 1000"/>
<Analytic_surface id="A12"type="px"para="700.0"/><Analytic_surface id="A12" type="px" para="700.0"/>
<Analytic_surface id="A13"type="px"para="2000.0"/><Analytic_surface id="A13" type="px" para="2000.0"/>
……...
<Analytic_surface id="A72"type="p"para="-0.31 0.95 0 0"/><Analytic_surface id="A72" type="p" para="-0.31 0.95 0 0"/>
<Analytic_surface id="A73"type="p"para="0.30 0.95 0 0"/><Analytic_surface id="A73" type="p" para="0.30 0.95 0 0"/>
……...
b)生成样条曲面的表达式。遍历集合FaceN中的所有样条曲面,包括对应的几何体b) Expressions for generating spline surfaces. Traverse all spline surfaces in the collection Face N , including the corresponding geometry
的序号,在几何体面列表中的序号以及该样条曲面的包围盒信息,同时还需要The serial number of the spline surface, the serial number in the geometric surface list and the bounding box information of the spline surface, and also need
为每个样条曲面制定一个唯一的字符串(曲面类型+对应的序号),如下:Make a unique string (surface type + corresponding serial number) for each spline surface, as follows:
……...
<Nurbs_surface id="S71"solidnum="7"indexnum="1"<Nurbs_surface id="S71"solidnum="7"indexnum="1"
boundingbox="1116.15 -592.45 -268.18 1651.49 592.45 268.18"/>boundingbox="1116.15 -592.45 -268.18 1651.49 592.45 268.18"/>
……...
c)生成几何体的表达式。遍历所有几何体,根据当前几何体曲面之间的布尔关系生c) Expressions for generating geometry. Traverse all geometry, generate
成几何体的表达式,如下:The expression into a geometry is as follows:
<Solid id="1"value="-A11 A12 -A13"/><Solid id="1"value="-A11 A12 -A13"/>
……...
<Solid id="7"value="-A71 A72 -A73"/><Solid id="7"value="-A71 A72 -A73"/>
……...
3)耦合CAD与CSG的蒙特卡罗计算模型几何处理:抽样出源粒子的位置和方向后,进行输运计算。当粒子在不含样条曲面的几何体中时,采用原始的方法进行距离计算;当粒子在含有样条曲面的几何体中时,采用粒子射线与样条曲面的包围盒是否相交来筛选有效的样条曲面,并使用CAD底层库进行求交运算,最后计算出粒子刀几何体边界的最短有效距离。3) Geometry processing of the Monte Carlo calculation model coupled with CAD and CSG: After sampling the position and direction of the source particle, the transport calculation is performed. When the particle is in the geometry without spline surface, use the original method to calculate the distance; when the particle is in the geometry with spline surface, use whether the particle ray intersects with the bounding box of the spline surface to filter the effective samples Strip surface, and use the CAD underlying library to perform intersection operation, and finally calculate the shortest effective distance of the particle knife geometry boundary.
本发明未详细阐述的部分属于本领域公知技术。The parts not described in detail in the present invention belong to the well-known technology in the art.
尽管上面对本发明说明性的具体实施方式进行了描述,以便于本技术领的技术人员理解本发明,但应该清楚,本发明不限于具体实施方式的范围,对本技术领域的普通技术人员来讲,只要各种变化在所附的权利要求限定和确定的本发明的精神和范围内,这些变化是显而易见的,一切利用本发明构思的发明创造均在保护之列。Although the illustrative specific embodiments of the present invention have been described above, so that those skilled in the art can understand the present invention, it should be clear that the present invention is not limited to the scope of the specific embodiments. For those of ordinary skill in the art, As long as various changes are within the spirit and scope of the present invention defined and determined by the appended claims, these changes are obvious, and all inventions and creations using the concept of the present invention are included in the protection list.
Claims (2)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610874256.4A CN106484991A (en) | 2016-09-30 | 2016-09-30 | A kind of Monte Carlo geometric manipulations method of coupling spline surface and analytic surface in nuclear mockup analysis |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610874256.4A CN106484991A (en) | 2016-09-30 | 2016-09-30 | A kind of Monte Carlo geometric manipulations method of coupling spline surface and analytic surface in nuclear mockup analysis |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106484991A true CN106484991A (en) | 2017-03-08 |
Family
ID=58268396
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610874256.4A Pending CN106484991A (en) | 2016-09-30 | 2016-09-30 | A kind of Monte Carlo geometric manipulations method of coupling spline surface and analytic surface in nuclear mockup analysis |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106484991A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110580736A (en) * | 2018-06-07 | 2019-12-17 | 中国科学院深圳先进技术研究院 | A ray tracing method and system for non-uniform rational spline surface in plate mode |
CN111353990A (en) * | 2020-03-06 | 2020-06-30 | 深圳力合精密装备科技有限公司 | Method and device for acquiring theoretical value of circular groove, computer equipment and storage medium |
CN112131626A (en) * | 2020-09-16 | 2020-12-25 | 中国工程物理研究院计算机应用研究所 | CAD model geometric feature interaction method and system for non-regional Engine |
CN115168926A (en) * | 2022-09-07 | 2022-10-11 | 上海优集工业软件有限公司 | Curved surface information description method and device and electronic equipment |
-
2016
- 2016-09-30 CN CN201610874256.4A patent/CN106484991A/en active Pending
Non-Patent Citations (3)
Title |
---|
吴斌 等: "反应堆中子学分析精准建模方法", 《核科学与工程》 * |
陆济湘: "三维物体建模和场景构造技术研究", 《万方数据库学位库》 * |
陈珍平 等: "基于CAD邻居列表和包围盒的蒙特卡罗粒子输运几何跟踪加速方法研究", 《核科学与工程》 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110580736A (en) * | 2018-06-07 | 2019-12-17 | 中国科学院深圳先进技术研究院 | A ray tracing method and system for non-uniform rational spline surface in plate mode |
CN110580736B (en) * | 2018-06-07 | 2023-10-20 | 中国科学院深圳先进技术研究院 | Ray tracing method and system for plate mode non-uniform rational spline surface |
CN111353990A (en) * | 2020-03-06 | 2020-06-30 | 深圳力合精密装备科技有限公司 | Method and device for acquiring theoretical value of circular groove, computer equipment and storage medium |
CN111353990B (en) * | 2020-03-06 | 2023-03-28 | 深圳力合精密装备科技有限公司 | Method and device for acquiring circular groove theoretical value, computer equipment and storage medium |
CN112131626A (en) * | 2020-09-16 | 2020-12-25 | 中国工程物理研究院计算机应用研究所 | CAD model geometric feature interaction method and system for non-regional Engine |
CN115168926A (en) * | 2022-09-07 | 2022-10-11 | 上海优集工业软件有限公司 | Curved surface information description method and device and electronic equipment |
CN115168926B (en) * | 2022-09-07 | 2023-02-21 | 上海优集工业软件有限公司 | Method and device for analyzing curved surface information and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104331584B (en) | A kind of two-dimentional hybrid grid automatic generating method calculated towards boundary-layer | |
CN104317772B (en) | A kind of Monte Carlo PARTICLE TRANSPORT FROM fast geometric disposal route based on space lattice segmentation | |
CN103106301B (en) | A kind of method of the calculating radiation shield be coupled with characteristic line method based on Monte Carlo method | |
CN103336854B (en) | A kind of modeling method of high slope three-dimensional finite element model | |
CN106484991A (en) | A kind of Monte Carlo geometric manipulations method of coupling spline surface and analytic surface in nuclear mockup analysis | |
CN104036095B (en) | A Fast Algorithm for Coupling High-Precision Complicated Flow Field Based on Domain Decomposition | |
CN103310058B (en) | 3D Model-Based Dimensional Chain Checking Method | |
CN114861500B (en) | Method and system for automatically generating finite element model of tunnel structure based on three-dimensional point cloud | |
CN106354946A (en) | Transition region based Monte Carlo and certainty theory coupled particle transport method | |
Du et al. | Development of an assistant program for CAD-to-cosRMC modelling | |
CN102298660A (en) | Universal method of boundary modeling based on distinct element method | |
Xu et al. | Cad-mllm: Unifying multimodality-conditioned cad generation with mllm | |
CN105302951A (en) | A Finite Element Mesh Surface Subdivision Method | |
Krijnen et al. | Validation and inference of geometrical relationships in IFC | |
Wang et al. | CMGC: a CAD to Monte Carlo geometry conversion code | |
Li et al. | FreeCAD based modeling study on MCNPX for accelerator driven system | |
Wang et al. | Development of a hybrid parallelism Monte Carlo transport middleware on mesh geometry | |
Sun et al. | An enhanced approach to automatic decomposition of thin-walled components for hexahedral-dominant meshing | |
CN108470093A (en) | A kind of dose of radiation calculating emulation mode of radioactive source cutting operation | |
CN112288874B (en) | Gamma radiation modeling calculation simulation method based on CAD model and Boolean operation | |
CN104392030B (en) | Curved surface machining method based on STL (Standard Template Library) three-dimensional model | |
CN104699879A (en) | Multiple rotation equivalent simulation method for complex multi-target electromagnetic scattering | |
Li et al. | MIGSHIELD: A new model-based interactive point kernel gamma ray shielding package for virtual environment | |
CN108073776B (en) | Complex river network trunk and branch intersection grid drawing and river center continent grid processing method | |
Ninic et al. | Parametric Design and Isogeometric Analysis of Tunnel Linings within the Building Information Modelling Framework. |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170308 |