CN112330812B - A gas diffusion visualization method and system - Google Patents

A gas diffusion visualization method and system Download PDF

Info

Publication number
CN112330812B
CN112330812B CN202011221753.7A CN202011221753A CN112330812B CN 112330812 B CN112330812 B CN 112330812B CN 202011221753 A CN202011221753 A CN 202011221753A CN 112330812 B CN112330812 B CN 112330812B
Authority
CN
China
Prior art keywords
diffusion
gas
point
vertex
coordinate system
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.)
Active
Application number
CN202011221753.7A
Other languages
Chinese (zh)
Other versions
CN112330812A (en
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.)
Guilin University of Technology
Original Assignee
Guilin University of Technology
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 Guilin University of Technology filed Critical Guilin University of Technology
Priority to CN202011221753.7A priority Critical patent/CN112330812B/en
Publication of CN112330812A publication Critical patent/CN112330812A/en
Application granted granted Critical
Publication of CN112330812B publication Critical patent/CN112330812B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/23Design optimisation, verification or simulation using finite element methods [FEM] or finite difference methods [FDM]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/10Geometric effects
    • G06T15/20Perspective computation
    • G06T15/205Image-based rendering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2113/00Details relating to the application field
    • G06F2113/08Fluids

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Geometry (AREA)
  • Computer Graphics (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明公开了一种气体扩散可视化方法及系统。方法包括:S1,获取气体扩散参数和待观察气体扩散面的高度,利用高斯扩散模型获取待观察气体扩散面中等间距分布的多个扩散点以及每个扩散点的气体浓度值,按照扩散点的位置关系构建扩散点数据阵列;S2,获得扩散点数据阵列的所有三角面片顶点索引;S3,根据三角面片顶点索引绘制三角面片,匹配颜色数组;S4,将所有三角面片的顶点数据和每个三角面片匹配的颜色数组输入OSG平台进行渲染处理并显示。可视化细节精度由扩散点之间的间距决定,点数据之间间距越小可视化精度越高;能快速简便获取三角面片顶点索引,避免了顶点索引数组的繁琐计算,在OSG中可视化实现更加真实的模拟。

Figure 202011221753

The invention discloses a gas diffusion visualization method and system. The method includes: S1, obtaining the gas diffusion parameters and the height of the gas diffusion surface to be observed, using the Gaussian diffusion model to obtain multiple diffusion points distributed at equal intervals on the gas diffusion surface to be observed and the gas concentration value of each diffusion point, according to the diffusion point Construct the diffusion point data array based on the positional relationship; S2, obtain the vertex indices of all triangle patches in the diffusion point data array; S3, draw the triangle patch according to the vertex index of the triangle patch, and match the color array; S4, convert the vertex data of all triangle patches The color array matched with each triangular facet is input to the OSG platform for rendering and display. The accuracy of visualization details is determined by the distance between diffusion points. The smaller the distance between point data, the higher the visualization accuracy; it can quickly and easily obtain the vertex index of the triangle patch, avoiding the cumbersome calculation of the vertex index array, and the visualization in OSG is more realistic. simulation.

Figure 202011221753

Description

一种气体扩散可视化方法及系统A gas diffusion visualization method and system

技术领域technical field

本发明涉及环境安全技术领域,特别是涉及一种气体扩散可视化方法及系统。The invention relates to the technical field of environmental safety, in particular to a gas diffusion visualization method and system.

背景技术Background technique

生活中常常需要将气体(如毒气、烟气等)的扩散进行可视化,直观地了解气体扩散范围,以便进行污染评估、指导人员疏散等。In life, it is often necessary to visualize the diffusion of gases (such as poisonous gas, smoke, etc.), and intuitively understand the range of gas diffusion, so as to conduct pollution assessment and guide personnel evacuation.

现有技术中,高斯烟气扩散模型与GIS相结合被普遍研究,在ArcGIS平台上实现高斯烟气扩散可视化已经被大众所熟知;OSG(Open Scene Graph)作为开源的图形渲染库,进行高斯烟气扩散可视化还没发现研究。在OSG平台中进行数据渲染时,一般是离散的数据,需要利用插值法对数据进行插值以变成规则的网格数据再进行渲染,并且还需要计算出面片顶点索引数组才能进行OSG渲染,插值处理和计算顶点索引数组的过程复杂,运算量大,耗费时间。In the prior art, the combination of Gaussian smoke diffusion model and GIS has been widely studied, and the visualization of Gaussian smoke diffusion on the ArcGIS platform has been well known to the public; OSG (Open Scene Graph), as an open source graphics rendering library, performs Gaussian smoke diffusion Visualization of gas diffusion has not been studied. When rendering data on the OSG platform, it is generally discrete data. It is necessary to use interpolation to interpolate the data to become regular grid data before rendering, and it is also necessary to calculate the patch vertex index array to perform OSG rendering. Interpolation The process of processing and calculating the vertex index array is complex, computationally intensive and time-consuming.

发明内容Contents of the invention

本发明旨在至少解决现有技术中存在的技术问题,特别创新地提出了一种气体扩散可视化方法及系统。The present invention aims at at least solving the technical problems existing in the prior art, and particularly innovatively proposes a gas diffusion visualization method and system.

为了实现本发明的上述目的,根据本发明的第一个方面,本发明提供了一种气体扩散可视化方法,包括:步骤S1,获取气体扩散参数和待观察气体扩散面的高度,利用高斯扩散模型获取待观察气体扩散面中等间距分布的多个扩散点以及每个扩散点的气体浓度值,将扩散点的高斯坐标系坐标转换为世界坐标系坐标,按照扩散点的位置关系构建扩散点数据阵列,所述扩散点数据阵列中每个元素包括同一扩散点的世界坐标系坐标和气体浓度值;步骤S2,获得所述扩散点数据阵列的所有三角面片顶点索引;步骤S3,根据三角面片顶点索引绘制三角面片,一组三角面片顶点索引绘制一个三角面片,基于三角面片的3个顶点的浓度值匹配颜色数组;步骤S4,将所有三角面片的顶点数据和每个三角面片匹配的颜色数组输入OSG平台进行渲染处理并显示。In order to achieve the above object of the present invention, according to the first aspect of the present invention, the present invention provides a gas diffusion visualization method, comprising: step S1, obtaining gas diffusion parameters and the height of the gas diffusion surface to be observed, using a Gaussian diffusion model Obtain multiple diffusion points distributed at equal intervals in the gas diffusion surface to be observed and the gas concentration value of each diffusion point, convert the Gaussian coordinate system coordinates of the diffusion points into world coordinate system coordinates, and construct the diffusion point data array according to the positional relationship of the diffusion points , each element in the diffusion point data array includes the world coordinate system coordinates and the gas concentration value of the same diffusion point; step S2, obtain all triangle patch vertex indices of the diffusion point data array; step S3, according to the triangle surface The vertex index draws a triangle patch, and a group of triangle patch vertex indexes draws a triangle patch, based on the concentration values of the three vertices of the triangle patch to match the color array; step S4, the vertex data of all triangle patches and each triangle patch The color array matched by the patch is input to the OSG platform for rendering and display.

上述技术方案:本方法在待观察气体扩散面生产等间距的多个扩散点,可视化细节精度由扩散点之间的间距决定,点数据之间间距越小,可视化精度越高;基于扩散点数据等间距的位置关系,能够快速简便地获取三角面片顶点索引,节省了计算顶点索引数组的繁琐计算;OSG平台是基于三维引擎OSG开发的三维数字地球引擎库,可实现三维虚拟地球,并且可以真实的渲染烟气扩散环境的地形地貌,通过三角面片的顶点数据和每个三角面片匹配的颜色数组进行颜色渲染生成等值面图元,完成点数据在OSG中的可视化,可以更直观的展示烟气的污染范围,实现更加真实的模拟,有利于对污染进行评估。The above technical solution: This method produces multiple diffusion points at equal intervals on the gas diffusion surface to be observed, and the accuracy of the visualization details is determined by the distance between the diffusion points. The smaller the distance between the point data, the higher the visualization accuracy; based on the diffusion point data The equidistant positional relationship can quickly and easily obtain the vertex index of the triangular patch, saving the cumbersome calculation of the vertex index array; the OSG platform is a 3D digital earth engine library developed based on the 3D engine OSG, which can realize a 3D virtual earth and can Realistically render the topography of the smoke diffusion environment, perform color rendering through the vertex data of the triangular patch and the matching color array of each triangular patch to generate isosurface primitives, and complete the visualization of point data in OSG, which can be more intuitive It can accurately display the pollution range of flue gas, realize more realistic simulation, and facilitate the evaluation of pollution.

在本发明的一种优选实施方式中,在步骤S2中,获取扩散点数据阵列的三角面片顶点索引的过程为:对于扩散点数据阵列中任意相邻的四个扩散点,设四个扩散点分别为行数为i列数为j的扩散点Pi,j、行数为i列数为j+1的扩散点Pi,j+1、行数为i+1列数为j的扩散点Pi+1,j、行数为i+1列数为j+1的扩散点Pi+1,j+1,在四个扩散点中定义两组三角面片顶点索引,一组三角面片顶点索引由扩散点Pi,j、Pi,j+1、Pi+1,j的行列数组成,另一组三角面片顶点索引由扩散点Pi,j+1、Pi+1,j、Pi+1,j+1的行列数组成,i和j均为正整数。In a preferred embodiment of the present invention, in step S2, the process of obtaining the triangular patch vertex index of the diffusion point data array is as follows: for any adjacent four diffusion points in the diffusion point data array, set four diffusion points The points are the diffusion point P i,j with the number of rows i and the number of columns j, the diffusion point P i,j+1 with the number of rows i and the number of columns j+1, and the diffusion point P i,j+1 with the number of rows i+1 and the number of columns j Diffusion point P i+1,j , diffusion point P i+1,j+1 with row number i+1 and column number j +1 , two sets of triangular patch vertex indices are defined in the four diffusion points, one set The triangle patch vertex index is composed of the number of rows and columns of the diffusion points P i,j , P i,j+1 , P i+1,j , and the other set of triangle patch vertex indexes is composed of the diffusion points P i,j+1 , P i+1,j and P i+1,j+1 are composed of rows and columns, and both i and j are positive integers.

上述技术方案:基于扩散点数据等间距的位置关系,不用计算顶点索引数组,而是利用扩散点的位置关系特点直接定义三角面片顶点索引为三个顶点的行列数,在达到很好的三角面片精细度的同时,简化了过程,节省了计算顶点索引数组的繁琐计算。The above technical solution: based on the equidistant positional relationship of the diffusion point data, instead of calculating the vertex index array, the positional relationship characteristics of the diffusion point are used to directly define the vertex index of the triangle patch as the number of rows and columns of the three vertices. While improving the fineness of the mesh, the process is simplified and the tedious calculation of calculating the vertex index array is saved.

在本发明的一种优选实施方式中,所述气体扩散参数包括气体源位置、排放口平均风速、气体排放速度、气体源有效高度四者中的全部或部分。在本发明的一种优选实施方式中,在所述步骤S1中,高斯扩散模型为:

Figure BDA0002763403660000031
其中,C(x,y,z,H)表示位置点(x,y,z,H)的气体浓度;Q表示气体排放速度;σy表示侧向扩散系数,为气体在高斯坐标系y轴方向分布的标准偏差,
Figure BDA0002763403660000032
γ1表示第一比例系数,
Figure BDA0002763403660000033
表示第一指数系数;σz表示竖向扩散系数,为气体在高斯坐标系z轴方向分布的标准偏差,
Figure BDA0002763403660000034
γ2表示第二比例系数,
Figure BDA0002763403660000035
表示第二指数系数;Up表示气体源排放口处的平均风速;H表示气体源有效高度;x表示下风向上扩散点距离气体源排放点的距离;y表示在高斯坐标系xoy平面上到x轴的垂直距离;z表示气体扩散面高度。In a preferred embodiment of the present invention, the gas diffusion parameters include all or part of the position of the gas source, the average wind speed at the outlet, the gas discharge velocity, and the effective height of the gas source. In a preferred embodiment of the present invention, in the step S1, the Gaussian diffusion model is:
Figure BDA0002763403660000031
Among them, C(x, y, z, H) represents the gas concentration at the position point (x, y, z, H); Q represents the gas emission velocity; σ y represents the lateral diffusion coefficient, which is the gas on the y-axis of the Gaussian coordinate system standard deviation of the orientation distribution,
Figure BDA0002763403660000032
γ 1 represents the first scaling factor,
Figure BDA0002763403660000033
Indicates the first index coefficient; σ z indicates the vertical diffusion coefficient, which is the standard deviation of gas distribution in the z-axis direction of the Gaussian coordinate system,
Figure BDA0002763403660000034
γ 2 represents the second scaling factor,
Figure BDA0002763403660000035
Indicates the second index coefficient; U p indicates the average wind speed at the outlet of the gas source; H indicates the effective height of the gas source; x indicates the distance between the downwind diffusion point and the gas source discharge point; The vertical distance of the axis; z represents the height of the gas diffusion surface.

上述技术方案:利用高斯扩散模型生产的扩散点,可以直观的展示烟气的污染范围,实现了高斯扩散模型的可视化。The above technical solution: using the diffusion points produced by the Gaussian diffusion model, the pollution range of the flue gas can be intuitively displayed, and the visualization of the Gaussian diffusion model is realized.

在本发明的一种优选实施方式中,将扩散点的高斯坐标系坐标转换为世界坐标系坐标的过程为:设扩散点的高斯坐标系坐标为(x,y,C),则所述扩散点的世界坐标系坐标为(LON',LAT',C);具体求解过程包括:步骤A,经度LON计算公式为:In a preferred embodiment of the present invention, the process of transforming the Gaussian coordinate system coordinates of the diffusion point into the world coordinate system coordinates is: if the Gaussian coordinate system coordinates of the diffusion point are (x, y, C), then the diffusion point The world coordinate system coordinates of the point are (LON', LAT', C); the specific solution process includes: Step A, the longitude LON calculation formula is:

Figure BDA0002763403660000041
纬度LAT计算公式为:
Figure BDA0002763403660000042
其中,C表示扩散点(x,y)的气体浓度值;Bf表示底点纬度,通过高斯x轴坐标求取;y表示高斯y轴坐标;e表示地球椭圆第一偏心率;e表示地球椭圆第二偏心率;a表示地球椭圆长半轴;所述Bf的获取过程为:步骤一,设i为迭代次数,变量m0=a(1-e2),变量
Figure BDA0002763403660000043
变量
Figure BDA0002763403660000044
变量
Figure BDA0002763403660000045
变量
Figure BDA0002763403660000046
变量
Figure BDA0002763403660000047
变量
Figure BDA0002763403660000048
变量
Figure BDA0002763403660000049
变量
Figure BDA00027634036600000410
设Bf的初始迭代值为Bf 1=x/a0,ε为差值阈值,0<|ε|<0.000001;步骤二,计算
Figure BDA00027634036600000411
判断Bf i+1-Bf i<ε是否成立,若Bf i+1-Bf i<ε成立,令Bf=Bf i+1,获取Bf的过程结束,进入步骤B,若Bf i+1-Bf i<ε不成立,令i=i+1,返回步骤一;步骤B,通过LON计算公式和纬度LAT计算公式获得数据原点(0,0)的经纬度坐标(LAT0,LON0);将所述扩散点的高斯坐标系坐标(x,y)代入经度LON计算公式和纬度LAT计算公式获得(LATi,LONi);设世界坐标系模拟场景中的事故点为(LATs,LONs),则所述扩散点的世界坐标系坐标为:LAT'=LATi-LAT0+LATs,LON'=LONi-LON0+LONs
Figure BDA0002763403660000041
Latitude LAT calculation formula is:
Figure BDA0002763403660000042
Among them, C represents the gas concentration value of the diffusion point (x, y); B f represents the latitude of the bottom point, obtained through the Gaussian x-axis coordinate; y represents the Gaussian y-axis coordinate; e represents the first eccentricity of the earth ellipse; e represents The second eccentricity of the earth ellipse; a represents the semi-major axis of the earth ellipse; the acquisition process of the B f is: Step 1, set i as the number of iterations, variable m 0 =a(1-e 2 ), variable
Figure BDA0002763403660000043
variable
Figure BDA0002763403660000044
variable
Figure BDA0002763403660000045
variable
Figure BDA0002763403660000046
variable
Figure BDA0002763403660000047
variable
Figure BDA0002763403660000048
variable
Figure BDA0002763403660000049
variable
Figure BDA00027634036600000410
Let the initial iteration value of B f be B f 1 =x/a 0 , ε is the difference threshold, 0<|ε|<0.000001; step 2, calculate
Figure BDA00027634036600000411
Determine whether B f i+1 -B f i <ε is true, if B f i+1 -B f i <ε is true, set B f =B f i+1 , the process of obtaining B f is over, and enter step B, If B f i+1 -B f i <ε is not established, let i=i+1, return to step one; step B, obtain the latitude and longitude coordinates (LAT) of the data origin (0, 0) through the calculation formula of LON and the calculation formula of latitude 0 , LON 0 ); Substituting the Gaussian coordinate system coordinates (x, y) of the diffusion point into the longitude LON calculation formula and the latitude LAT calculation formula to obtain (LAT i , LON i ); set the world coordinate system to simulate the accident point in the scene is (LAT s , LON s ), then the world coordinate system coordinates of the diffusion point are: LAT'=LAT i -LAT 0 +LAT s , LON'=LON i -LON 0 +LON s .

上述技术方案:能够快速准确地换算出扩散点的世界坐标系坐标。The above technical solution: the world coordinate system coordinates of the diffusion point can be quickly and accurately converted.

在本发明的一种优选实施方式中,所述步骤S3中基于三角面片3个顶点的浓度值匹配颜色数组的过程包括:建立多个颜色数组和多个气体浓度范围,颜色数组与气体浓度范围一一对应,所述颜色数组表示为[R,G,B,A],其中,R、G、B代表颜色的三原色分量,A代表颜色的透明度;将所述三角面片3个顶点浓度值所在气体浓度范围或者3个顶点浓度值的平均值所在气体浓度范围对应的颜色数组作为所述三角面片匹配的颜色数组。In a preferred embodiment of the present invention, the process of matching the color array based on the concentration values of the three vertices of the triangular surface in step S3 includes: establishing multiple color arrays and multiple gas concentration ranges, and the color array and gas concentration Ranges correspond one-to-one, and the color array is expressed as [R, G, B, A], wherein R, G, B represent the three primary color components of the color, and A represents the transparency of the color; The color array corresponding to the gas concentration range of the value or the gas concentration range of the average value of the three vertex concentration values is used as the color array matched by the triangular patch.

上述技术方案:生成等值面图元,有利于气体扩散评估。The above technical solution: generating isosurface primitives is beneficial to gas diffusion evaluation.

为了实现本发明的上述目的,根据本发明的第二个方面,本发明提供了一种气体扩散可视化系统,包括气体扩散参数获取模块、处理器和OSG平台,所述处理器分别与气体扩散参数获取模块和OSG平台连接;所述处理器执行本发明所述的气体扩散可视化方法,将所有三角面片的顶点数据和每个三角面片对应的颜色数组输入OSG平台,由OSG平台进行渲染处理并将渲染处理结果显示。In order to achieve the above object of the present invention, according to a second aspect of the present invention, the present invention provides a gas diffusion visualization system, including a gas diffusion parameter acquisition module, a processor and an OSG platform, and the processor is respectively connected with the gas diffusion parameter The acquisition module is connected to the OSG platform; the processor executes the gas diffusion visualization method of the present invention, and inputs the vertex data of all triangular faces and the corresponding color array of each triangular face into the OSG platform, and the OSG platform performs rendering processing And display the rendering processing result.

上述技术方案:在待观察气体扩散面生产等间距的多个扩散点,可视化细节精度由扩散点之间的间距决定,点数据之间间距越小,可视化精度越高;基于扩散点数据等间距的位置关系,能够快速简便地获取三角面片顶点索引,节省了计算顶点索引数组的繁琐计算;OSG平台是基于三维引擎osg开发的三维数字地球引擎库,可实现三维虚拟地球,并且可以真实的渲染烟气扩散环境的地形地貌,通过三角面片的顶点数据和每个三角面片匹配的颜色数组进行颜色渲染生成等值面图元,完成点数据在OSG中的可视化,可以更直观的展示烟气的污染范围,实现更加真实的模拟,有利于对污染进行评估。The above technical solution: produce multiple diffusion points at equal intervals on the gas diffusion surface to be observed, and the accuracy of the visualization details is determined by the distance between the diffusion points. The smaller the distance between the point data, the higher the visualization accuracy; The positional relationship of the triangular surface can quickly and easily obtain the vertex index of the triangle surface, saving the tedious calculation of calculating the vertex index array; the OSG platform is a 3D digital earth engine library developed based on the 3D engine osg, which can realize a 3D virtual earth and can be real Render the topography of the smoke diffusion environment, perform color rendering through the vertex data of the triangular patch and the color array matched by each triangular patch to generate isosurface primitives, and complete the visualization of point data in OSG, which can be displayed more intuitively The pollution range of the flue gas can achieve a more realistic simulation, which is conducive to the evaluation of pollution.

附图说明Description of drawings

图1是本发明一具体实施方式中气体扩散可视化方法的流程示意图;Fig. 1 is a schematic flow chart of a gas diffusion visualization method in a specific embodiment of the present invention;

图2是本发明一具体实施方式中气体源示意图。Fig. 2 is a schematic diagram of a gas source in a specific embodiment of the present invention.

具体实施方式detailed description

下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本发明,而不能理解为对本发明的限制。Embodiments of the present invention are described in detail below, examples of which are shown in the drawings, wherein the same or similar reference numerals designate the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the figures are exemplary only for explaining the present invention and should not be construed as limiting the present invention.

在本发明的描述中,需要理解的是,术语“纵向”、“横向”、“上”、“下”、“前”、“后”、“左”、“右”、“竖直”、“水平”、“顶”、“底”“内”、“外”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本发明和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本发明的限制。In describing the present invention, it should be understood that the terms "longitudinal", "transverse", "upper", "lower", "front", "rear", "left", "right", "vertical", The orientation or positional relationship indicated by "horizontal", "top", "bottom", "inner", "outer", etc. are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than Nothing indicating or implying that a referenced device or element must have a particular orientation, be constructed, and operate in a particular orientation should therefore not be construed as limiting the invention.

在本发明的描述中,除非另有规定和限定,需要说明的是,术语“安装”、“相连”、“连接”应做广义理解,例如,可以是机械连接或电连接,也可以是两个元件内部的连通,可以是直接相连,也可以通过中间媒介间接相连,对于本领域的普通技术人员而言,可以根据具体情况理解上述术语的具体含义。In the description of the present invention, unless otherwise specified and limited, it should be noted that the terms "installation", "connection" and "connection" should be understood in a broad sense, for example, it can be mechanical connection or electrical connection, or two The internal communication of each element may be directly connected or indirectly connected through an intermediary. Those skilled in the art can understand the specific meanings of the above terms according to specific situations.

本发明公开了一种气体扩散可视化方法,在一种优选实施方式中,该方法的流程示意图如图1所示,具体包括:The present invention discloses a gas diffusion visualization method. In a preferred embodiment, the flow diagram of the method is shown in Figure 1, which specifically includes:

步骤S1,获取气体扩散参数和待观察气体扩散面的高度,利用高斯扩散模型获取待观察气体扩散面中等间距分布的多个扩散点以及每个扩散点的气体浓度值,将扩散点的高斯坐标系坐标转换为世界坐标系坐标,按照扩散点的位置关系构建扩散点数据阵列,扩散点数据阵列中每个元素包括同一扩散点的世界坐标系坐标和气体浓度值;Step S1, obtain the gas diffusion parameters and the height of the gas diffusion surface to be observed, use the Gaussian diffusion model to obtain multiple diffusion points distributed at equal intervals on the gas diffusion surface to be observed and the gas concentration value of each diffusion point, and convert the Gaussian coordinates of the diffusion points to System coordinates are converted into world coordinate system coordinates, and the diffusion point data array is constructed according to the positional relationship of the diffusion points, and each element in the diffusion point data array includes the world coordinate system coordinates and gas concentration values of the same diffusion point;

步骤S2,获得扩散点数据阵列的所有三角面片顶点索引;Step S2, obtaining all triangle patch vertex indexes of the diffusion point data array;

步骤S3,根据三角面片顶点索引绘制三角面片,一组三角面片顶点索引绘制一个三角面片,基于三角面片的3个顶点的浓度值匹配颜色数组;Step S3, draw a triangle patch according to the vertex index of the triangle patch, draw a triangle patch with a group of triangle patch vertex indexes, and match the color array based on the concentration values of the three vertices of the triangle patch;

步骤S4,将所有三角面片的顶点数据和每个三角面片匹配的颜色数组输入OSG平台进行渲染处理并显示。通过OSGEarth加载机制,将大地坐标系下的等值面渲染加载到地球模型对应经纬度位置,实现可视化。Step S4, input the vertex data of all triangle faces and the matching color array of each triangle face into the OSG platform for rendering and displaying. Through the OSGEarth loading mechanism, the isosurface rendering under the geodetic coordinate system is loaded to the corresponding longitude and latitude position of the earth model to realize visualization.

在本实施方式中,待观察气体扩散面的高度可为观察气体扩散面距离海平面的高度,即海拔。本方法输入待观察气体扩散面的高度后,输出待观察气体扩散面的气体扩散示意图。气体优选但不限于为各种火灾烟气、化工厂烟冲排放的污染气体、有毒气体。In this embodiment, the height of the gas diffusion surface to be observed may be the height of the observed gas diffusion surface from the sea level, that is, the altitude. This method outputs the gas diffusion schematic diagram of the gas diffusion surface to be observed after inputting the height of the gas diffusion surface to be observed. The gas is preferably, but not limited to, various fire smoke, polluted gas and toxic gas discharged from flue gas of chemical plants.

在本实施方式中,待观察气体扩散面中的扩散点在高斯坐标系的x轴和y轴方向均等间距,形成的是一系列阵列点,因此按照扩散点的位置关系构建成扩散点数据阵列中,行与行之间相差的物理距离和列与列之间相差的物理距离相等。In this embodiment, the diffusion points in the gas diffusion surface to be observed are equally spaced in the x-axis and y-axis directions of the Gaussian coordinate system, forming a series of array points, so the diffusion point data array is constructed according to the positional relationship of the diffusion points In , the physical distance between rows is equal to the physical distance between columns.

在本实施方式中,利用高斯扩散模型获取的扩散点位置坐标基于高斯坐标系,优选的,需要先将高斯坐标系转换为经纬度坐标系,将扩散点数据(经度,纬度,浓度)保存到TXT文件中,再通过OSG平台将扩散点数据由经纬度坐标系转换为OSG数字地球的世界坐标系下,以便在OSG平台进行渲染可视化。优选但不限于通过Python编写高斯扩散模型以及本方法其它步骤。In this embodiment, the position coordinates of the diffusion point obtained by using the Gaussian diffusion model are based on the Gaussian coordinate system. Preferably, the Gaussian coordinate system needs to be converted into a latitude-longitude coordinate system first, and the diffusion point data (longitude, latitude, concentration) is saved to TXT In the file, the diffusion point data is converted from the latitude and longitude coordinate system to the world coordinate system of OSG Digital Earth through the OSG platform, so that it can be rendered and visualized on the OSG platform. It is preferred but not limited to programming the Gaussian diffusion model and other steps of the method by Python.

在一种优选实施方式中,在步骤S2中,获取扩散点数据阵列的三角面片顶点索引的过程为:对于扩散点数据阵列中任意相邻的四个扩散点,设四个扩散点分别为行数为i列数为j的扩散点Pi,j、行数为i列数为j+1的扩散点Pi,j+1、行数为i+1列数为j的扩散点Pi+1,j、行数为i+1列数为j+1的扩散点Pi+1,j+1,在四个扩散点中定义两组三角面片顶点索引,一组三角面片顶点索引由扩散点Pi,j、Pi,j+1、Pi+1,j的行列数组成,另一组三角面片顶点索引由扩散点Pi,j+1、Pi+1,j、Pi+1,j+1的行列数组成,i和j均为正整数。In a preferred embodiment, in step S2, the process of obtaining the triangular patch vertex index of the diffusion point data array is as follows: for any adjacent four diffusion points in the diffusion point data array, the four diffusion points are respectively Diffusion point P i,j with row number i and column number j, diffusion point P i,j+1 with row number i and column number j+1, diffusion point P with row number i+1 column number j i+1,j , the diffusion point P i+1,j+1 with the number of rows i+1 and the number of columns j+1, defines two sets of triangular patch vertex indices in the four diffusing points, and a set of triangular patch The vertex index is composed of the number of rows and columns of the diffusion points P i,j , P i,j+1 , P i+1,j , and the other group of triangular patch vertex indexes is composed of the diffusion points P i,j+1 , P i+1 , j , P i+1, j+1 rows and columns, i and j are both positive integers.

在本实施方式中,通过扩散点数据阵列的行列数设置三角面片顶点索引,三角面片顶点索引为进行三角面片绘制时点的顺序,由三个点按顺序绘制成三角面,可预先设置OSG顶点索引数组,将获得的三角面片顶点索引存入OSG顶点索引数组中。三角面片顶点索引获取过程如下:以第一行数据的第一、二扩散点与第二行第一个扩散点的行列数组成一组三角面片顶点索引,再以第一行的第二个扩散点与第二行的第一、二个扩散点的行列数组成另一组三角面片顶点索引;点数据阵列中四个点数据组成2组三角面片顶点索引,根据扩散点阵列行数列数进行依次循环,得到所有数据的顶点索引(即所在的行列位置)。In this embodiment, the triangle patch vertex index is set by the number of rows and columns of the diffusion point data array. The triangle patch vertex index is the order of the points when the triangle patch is drawn, and the triangle surface is drawn in sequence from three points, which can be pre-set Set the OSG vertex index array, and store the obtained triangle patch vertex index into the OSG vertex index array. The triangular patch vertex index acquisition process is as follows: the first and second diffusion points of the first row of data and the number of rows and columns of the first diffusion point of the second row form a set of triangular patch vertex indices, and then the second row and column number of the first row of data The number of rows and columns of the first and second diffusion points in the second row forms another set of triangular patch vertex indices; the four point data in the point data array form 2 sets of triangular patch vertex indices, according to the diffusion point array rows The sequence numbers are cycled sequentially to obtain the vertex indexes (that is, the row and column positions) of all the data.

在一种优选实施方式中,气体扩散参数包括气体源位置、排放口平均风速、气体排放速度、气体源有效高度四者中的全部或部分。In a preferred embodiment, the gas diffusion parameters include all or part of the position of the gas source, the average wind speed at the outlet, the gas discharge speed, and the effective height of the gas source.

在一种优选实施方式中,如图2所示的气体源结构示意图,在步骤S1中,高斯扩散模型为:In a preferred embodiment, as shown in the schematic diagram of the gas source structure in Figure 2, in step S1, the Gaussian diffusion model is:

Figure BDA0002763403660000081
Figure BDA0002763403660000081

其中,C(x,y,z,H)表示位置点(x,y,z,H)的气体浓度;Q表示气体排放速度;σy表示侧向扩散系数,为气体在高斯坐标系y轴方向分布的标准偏差,

Figure BDA0002763403660000082
γ1表示第一比例系数,
Figure BDA0002763403660000091
表示第一指数系数;σz表示竖向扩散系数,为气体在高斯坐标系z轴方向分布的标准偏差,
Figure BDA0002763403660000092
γ2表示第二比例系数,
Figure BDA0002763403660000093
表示第二指数系数;Up表示气体源排放口处的平均风速;H表示气体源有效高度;x表示下风向上扩散点距离气体源排放点的距离;y表示在高斯坐标系xoy平面上到x轴的垂直距离;z表示气体扩散面高度。Among them, C(x, y, z, H) represents the gas concentration at the position point (x, y, z, H); Q represents the gas emission velocity; σ y represents the lateral diffusion coefficient, which is the gas on the y-axis of the Gaussian coordinate system standard deviation of the orientation distribution,
Figure BDA0002763403660000082
γ 1 represents the first scaling factor,
Figure BDA0002763403660000091
Indicates the first index coefficient; σ z indicates the vertical diffusion coefficient, which is the standard deviation of gas distribution in the z-axis direction of the Gaussian coordinate system,
Figure BDA0002763403660000092
γ 2 represents the second scaling factor,
Figure BDA0002763403660000093
Indicates the second index coefficient; U p indicates the average wind speed at the outlet of the gas source; H indicates the effective height of the gas source; x indicates the distance between the downwind diffusion point and the gas source discharge point; The vertical distance of the axis; z represents the height of the gas diffusion surface.

在本实施方式中,优选的,第一比例系数γ1、第一指数系数

Figure BDA0002763403660000094
均可在GB3840-91《制定地方大气污染物排放标准的技术方法》中表D1根据模拟情况选取;第二比例系数γ2、第二指数系数
Figure BDA0002763403660000097
均可在GB3840-91《制定地方大气污染物排放标准的技术方法》中表D2根据模拟情况选取。In this embodiment, preferably, the first proportional coefficient γ 1 , the first exponential coefficient
Figure BDA0002763403660000094
All can be selected according to the simulation situation in Table D1 of GB3840-91 "Technical Methods for Establishing Local Air Pollutant Emission Standards"; the second proportional coefficient γ 2 and the second index coefficient
Figure BDA0002763403660000097
All can be selected according to the simulation situation in Table D2 of GB3840-91 "Technical Methods for Establishing Local Air Pollutant Emission Standards".

在一种优选实施方式中,将扩散点的高斯坐标系坐标转换为世界坐标系坐标的过程为:In a preferred embodiment, the process of transforming the Gaussian coordinate system coordinates of the diffusion point into the world coordinate system coordinates is as follows:

设扩散点的高斯坐标系坐标为(x,y,C),则所述扩散点的世界坐标系坐标为(LON',LAT',C);,具体求解过程包括:Assuming that the Gaussian coordinate system coordinates of the diffusion point are (x, y, C), then the world coordinate system coordinates of the diffusion point are (LON', LAT', C); the specific solution process includes:

步骤A,经度LON计算公式为:Step A, the longitude LON calculation formula is:

Figure BDA0002763403660000095
Figure BDA0002763403660000095

纬度LAT计算公式为:Latitude LAT calculation formula is:

Figure BDA0002763403660000096
Figure BDA0002763403660000096

其中,C表示扩散点(x,y)的气体浓度值;Bf表示底点纬度,通过高斯x轴坐标求取;y表示高斯y轴坐标;e表示地球椭圆第一偏心率;e表示地球椭圆第二偏心率;a表示地球椭圆长半轴;Among them, C represents the gas concentration value of the diffusion point (x, y); B f represents the latitude of the bottom point, obtained through the Gaussian x-axis coordinate; y represents the Gaussian y-axis coordinate; e represents the first eccentricity of the earth ellipse; e represents The second eccentricity of the earth ellipse; a represents the semi-major axis of the earth ellipse;

所述Bf的获取过程为:The acquisition process of Bf is:

步骤一,设i为迭代次数,变量m0=a(1-e2),变量

Figure BDA0002763403660000101
变量
Figure BDA0002763403660000102
变量
Figure BDA0002763403660000103
变量
Figure BDA0002763403660000104
变量
Figure BDA0002763403660000105
变量
Figure BDA0002763403660000106
变量
Figure BDA0002763403660000107
变量
Figure BDA0002763403660000108
设Bf的初始迭代值为Bf 1=x/a0,ε为差值阈值,0<|ε|<0.000001;Step 1, set i as the number of iterations, variable m 0 =a(1-e 2 ), variable
Figure BDA0002763403660000101
variable
Figure BDA0002763403660000102
variable
Figure BDA0002763403660000103
variable
Figure BDA0002763403660000104
variable
Figure BDA0002763403660000105
variable
Figure BDA0002763403660000106
variable
Figure BDA0002763403660000107
variable
Figure BDA0002763403660000108
Let the initial iteration value of B f be B f 1 =x/a 0 , ε is the difference threshold, 0<|ε|<0.000001;

步骤二,计算

Figure BDA0002763403660000109
判断Bf i+1-Bf i<ε是否成立,若Bf i+1-Bf i<ε成立,令Bf=Bf i+1,获取Bf的过程结束,进入步骤B,若Bf i+1-Bf i<ε不成立,令i=i+1,返回步骤一;Step two, calculate
Figure BDA0002763403660000109
Determine whether B f i+1 -B f i <ε is true, if B f i+1 -B f i <ε is true, set B f =B f i+1 , the process of obtaining B f is over, and enter step B, If B f i+1 -B f i <ε is not established, set i=i+1 and return to step 1;

步骤B,通过LON计算公式和纬度LAT计算公式获得数据原点(0,0)的经纬度坐标(LAT0,LON0);将所述扩散点的高斯坐标系坐标(x,y)代入经度LON计算公式和纬度LAT计算公式获得(LATi,LONi);设世界坐标系模拟场景中的事故点为(LATs,LONs),则所述扩散点的世界坐标系坐标为:LAT'=LATi-LAT0+LATs,LON'=LONi-LON0+LONsStep B, obtain the latitude and longitude coordinates (LAT 0 , LON 0 ) of the data origin (0, 0) through the LON calculation formula and the latitude LAT calculation formula; Substitute the Gaussian coordinate system coordinates (x, y) of the diffusion point into the longitude LON calculation The formula and the latitude LAT calculation formula are obtained (LAT i , LON i ); if the accident point in the world coordinate system simulation scene is (LAT s , LON s ), then the world coordinate system coordinates of the diffusion point are: LAT'=LAT i −LAT 0 +LAT s , LON′=LON i −LON 0 +LON s .

在一种优选实施方式中,步骤S3中基于三角面片3个顶点的浓度值匹配颜色数组的过程包括:建立多个颜色数组和多个气体浓度范围,颜色数组与气体浓度范围一一对应,颜色数组表示为[R,G,B,A],其中,R、G、B代表颜色的三原色分量,A代表颜色的透明度;将三角面片3个顶点浓度值所在气体浓度范围或者3个顶点浓度值的平均值所在气体浓度范围对应的颜色数组作为三角面片匹配的颜色数组。In a preferred embodiment, the process of matching the color array based on the concentration values of the three vertices of the triangular surface in step S3 includes: establishing multiple color arrays and multiple gas concentration ranges, the color arrays correspond to the gas concentration ranges one by one, The color array is expressed as [R, G, B, A], where R, G, and B represent the three primary color components of the color, and A represents the transparency of the color; the gas concentration range of the three vertex concentration values of the triangular surface or the three vertices The color array corresponding to the gas concentration range where the average concentration value is located is used as the color array matched by the triangular patch.

本发明还公开了一种气体扩散可视化系统,在一种优选实施方式中,该系统包括气体扩散参数获取模块、处理器和OSG平台,处理器分别与气体扩散参数获取模块和OSG平台连接;处理器执行上述气体扩散可视化方法,将所有三角面片的顶点数据和每个三角面片对应的颜色数组输入OSG平台,由OSG平台进行渲染处理并将渲染处理结果显示。The invention also discloses a gas diffusion visualization system. In a preferred embodiment, the system includes a gas diffusion parameter acquisition module, a processor and an OSG platform, and the processor is respectively connected to the gas diffusion parameter acquisition module and the OSG platform; The device implements the above gas diffusion visualization method, and inputs the vertex data of all triangular faces and the color array corresponding to each triangular face into the OSG platform, and the OSG platform performs rendering processing and displays the rendering processing results.

在本实施方式中,气体扩散参数获取模块可用于获取气体扩散参数以及待观察气体扩散面的高度,气体扩散参数获取模块优选但不限于为键盘灯输入设备。In this embodiment, the gas diffusion parameter acquisition module can be used to acquire the gas diffusion parameters and the height of the gas diffusion surface to be observed. The gas diffusion parameter acquisition module is preferably but not limited to a keyboard light input device.

在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。In the description of this specification, descriptions referring to the terms "one embodiment", "some embodiments", "example", "specific examples", or "some examples" mean that specific features described in connection with the embodiment or example , structure, material or feature is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

尽管已经示出和描述了本发明的实施例,本领域的普通技术人员可以理解:在不脱离本发明的原理和宗旨的情况下可以对这些实施例进行多种变化、修改、替换和变型,本发明的范围由权利要求及其等同物限定。Although the embodiments of the present invention have been shown and described, those skilled in the art can understand that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principle and spirit of the present invention. The scope of the invention is defined by the claims and their equivalents.

Claims (5)

1.一种气体扩散可视化方法,其特征在于,包括:1. A gas diffusion visualization method, characterized in that, comprising: 步骤S1,获取气体扩散参数和待观察气体扩散面的高度,利用高斯扩散模型获取待观察气体扩散面中等间距分布的多个扩散点以及每个扩散点的气体浓度值,将扩散点的高斯坐标系坐标转换为世界坐标系坐标,按照扩散点的位置关系构建扩散点数据阵列,所述扩散点数据阵列中每个元素包括同一扩散点的世界坐标系坐标和气体浓度值;Step S1, obtain the gas diffusion parameters and the height of the gas diffusion surface to be observed, use the Gaussian diffusion model to obtain multiple diffusion points distributed at equal intervals on the gas diffusion surface to be observed and the gas concentration value of each diffusion point, and convert the Gaussian coordinates of the diffusion points to The system coordinates are converted into world coordinate system coordinates, and the diffusion point data array is constructed according to the positional relationship of the diffusion points, and each element in the diffusion point data array includes the world coordinate system coordinates and the gas concentration value of the same diffusion point; 步骤S2,获得所述扩散点数据阵列的所有三角面片顶点索引;Step S2, obtaining all triangle patch vertex indexes of the diffusion point data array; 步骤S3,根据三角面片顶点索引绘制三角面片,一组三角面片顶点索引绘制一个三角面片,基于三角面片的3个顶点的浓度值匹配颜色数组;Step S3, draw a triangle patch according to the vertex index of the triangle patch, draw a triangle patch with a group of triangle patch vertex indexes, and match the color array based on the concentration values of the three vertices of the triangle patch; 步骤S4,将所有三角面片的顶点数据和每个三角面片匹配的颜色数组输入OSG平台进行渲染处理并显示;Step S4, input the vertex data of all triangular faces and the matching color array of each triangular face into the OSG platform for rendering and displaying; 在所述步骤S1中,高斯扩散模型为:In the step S1, the Gaussian diffusion model is:
Figure FDA0003930864730000011
Figure FDA0003930864730000011
其中,C(x,y,z,H)表示位置点(x,y,z,H)的气体浓度;Q表示气体排放速度;σy表示侧向扩散系数,为气体在高斯坐标系y轴方向分布的标准偏差,
Figure FDA0003930864730000012
γ1表示第一比例系数,
Figure FDA0003930864730000013
表示第一指数系数;σz表示竖向扩散系数,为气体在高斯坐标系z轴方向分布的标准偏差,
Figure FDA0003930864730000014
γ2表示第二比例系数,
Figure FDA0003930864730000015
表示第二指数系数;Up表示气体源排放口处的平均风速;H表示气体源有效高度;x表示下风向上扩散点距离气体源排放点的距离;y表示在高斯坐标系xoy平面上到x轴的垂直距离;z表示气体扩散面高度;
Among them, C(x, y, z, H) represents the gas concentration at the position point (x, y, z, H); Q represents the gas emission velocity; σ y represents the lateral diffusion coefficient, which is the gas on the y-axis of the Gaussian coordinate system standard deviation of the orientation distribution,
Figure FDA0003930864730000012
γ 1 represents the first scaling factor,
Figure FDA0003930864730000013
Indicates the first index coefficient; σ z indicates the vertical diffusion coefficient, which is the standard deviation of gas distribution in the z-axis direction of the Gaussian coordinate system,
Figure FDA0003930864730000014
γ 2 represents the second scaling factor,
Figure FDA0003930864730000015
Indicates the second index coefficient; U p indicates the average wind speed at the outlet of the gas source; H indicates the effective height of the gas source; x indicates the distance between the downwind diffusion point and the gas source discharge point; The vertical distance of the axis; z represents the height of the gas diffusion surface;
将扩散点的高斯坐标系坐标转换为世界坐标系坐标的过程为:The process of transforming the Gaussian coordinate system coordinates of the diffusion point into the world coordinate system coordinates is: 设扩散点的高斯坐标系坐标为(x,y,C),则所述扩散点的世界坐标系坐标为(LON',LAT',C),具体求解过程包括:Assuming that the Gaussian coordinate system coordinates of the diffusion point are (x, y, C), then the world coordinate system coordinates of the diffusion point are (LON', LAT', C), and the specific solution process includes: 步骤A,经度LON计算公式为:Step A, the longitude LON calculation formula is:
Figure FDA0003930864730000021
Figure FDA0003930864730000021
纬度LAT计算公式为:The formula for calculating latitude LAT is:
Figure FDA0003930864730000022
Figure FDA0003930864730000022
其中,C表示扩散点(x,y)的气体浓度值;Bf表示底点纬度,通过高斯x轴坐标求取;y表示高斯y轴坐标;e表示地球椭圆第一偏心率;e表示地球椭圆第二偏心率;a表示地球椭圆长半轴;Among them, C represents the gas concentration value of the diffusion point (x, y); B f represents the latitude of the bottom point, obtained through the Gaussian x-axis coordinate; y represents the Gaussian y-axis coordinate; e represents the first eccentricity of the earth ellipse; e represents The second eccentricity of the earth ellipse; a represents the semi-major axis of the earth ellipse; 所述Bf的获取过程为:The acquisition process of Bf is: 步骤一,设i为迭代次数,变量m0=a(1-e2),变量
Figure FDA0003930864730000023
变量
Figure FDA0003930864730000024
变量
Figure FDA0003930864730000025
变量
Figure FDA0003930864730000026
变量
Figure FDA0003930864730000027
变量
Figure FDA0003930864730000028
变量
Figure FDA0003930864730000029
变量
Figure FDA00039308647300000210
设Bf的初始迭代值为Bf 1=x/a0,ε为差值阈值,0<|ε|<0.000001;
Step 1, set i as the number of iterations, variable m 0 =a(1-e 2 ), variable
Figure FDA0003930864730000023
variable
Figure FDA0003930864730000024
variable
Figure FDA0003930864730000025
variable
Figure FDA0003930864730000026
variable
Figure FDA0003930864730000027
variable
Figure FDA0003930864730000028
variable
Figure FDA0003930864730000029
variable
Figure FDA00039308647300000210
Let the initial iteration value of B f be B f 1 =x/a 0 , ε is the difference threshold, 0<|ε|<0.000001;
步骤二,计算
Figure FDA00039308647300000211
判断Bf i+1-Bf i<ε是否成立,若Bf i+1-Bf i<ε成立,令Bf=Bf i+1,获取Bf的过程结束,进入步骤B,若Bf i+1-Bf i<ε不成立,令i=i+1,返回步骤一;
Step two, calculate
Figure FDA00039308647300000211
Determine whether B f i+1 -B f i <ε is true, if B f i+1 -B f i <ε is true, set B f =B f i+1 , the process of obtaining B f is over, and enter step B, If B f i+1 -B f i <ε is not established, set i=i+1 and return to step 1;
步骤B,通过LON计算公式和纬度LAT计算公式获得数据原点(0,0)的经纬度坐标(LAT0,LON0);将所述扩散点的高斯坐标系坐标(x,y)代入经度LON计算公式和纬度LAT计算公式获得(LATi,LONi);设世界坐标系模拟场景中的事故点为(LATs,LONs),则所述扩散点的世界坐标系坐标为:LAT'=LATi-LAT0+LATs,LON'=LONi-LON0+LONsStep B, obtain the latitude and longitude coordinates (LAT 0 , LON 0 ) of the data origin (0,0) through the LON calculation formula and the latitude LAT calculation formula; Substitute the Gaussian coordinate system coordinates (x, y) of the diffusion point into the longitude LON calculation The formula and the latitude LAT calculation formula are obtained (LAT i , LON i ); if the accident point in the world coordinate system simulation scene is (LAT s , LON s ), then the world coordinate system coordinates of the diffusion point are: LAT'=LAT i −LAT 0 +LAT s , LON′=LON i −LON 0 +LON s .
2.如权利要求1所述的气体扩散可视化方法,其特征在于,在步骤S2中,获取扩散点数据阵列的三角面片顶点索引的过程为:2. gas diffusion visualization method as claimed in claim 1, is characterized in that, in step S2, the process of obtaining the triangular patch vertex index of diffusion point data array is: 对于扩散点数据阵列中任意相邻的四个扩散点,设四个扩散点分别为行数为i列数为j的扩散点Pi,j、行数为i列数为j+1的扩散点Pi,j+1、行数为i+1列数为j的扩散点Pi+1,j、行数为i+1列数为j+1的扩散点Pi+1,j+1,在四个扩散点中定义两组三角面片顶点索引,一组三角面片顶点索引由扩散点Pi,j、Pi,j+1、Pi+1,j的行列数组成,另一组三角面片顶点索引由扩散点Pi,j+1、Pi+1,j、Pi+1,j+1的行列数组成,i和j均为正整数。For any four adjacent diffusion points in the diffusion point data array, let the four diffusion points be the diffusion point P i,j with the row number i and the column number j, and the diffusion point P i,j with the row number i and the column number j+1 Point P i,j+1 , diffusion point P i+1,j with row number i+1 and column number j, diffusion point P i+1,j+ with row number i+1 and column number j+1 1. Define two sets of triangular patch vertex indices in the four diffusion points. A set of triangular patch vertex indices consists of the number of rows and columns of diffusion points P i,j , P i,j+1 , and P i+1,j . Another set of triangular patch vertex indices consists of the number of rows and columns of diffusion points P i,j+1 , P i+1,j , and P i+1,j+1 , where i and j are both positive integers. 3.如权利要求1所述的气体扩散可视化方法,其特征在于,所述气体扩散参数包括气体源位置、排放口平均风速、气体排放速度、气体源有效高度四者中的全部或部分。3. The gas diffusion visualization method according to claim 1, wherein the gas diffusion parameters include all or part of the gas source position, the average wind speed at the discharge port, the gas discharge velocity, and the effective height of the gas source. 4.如权利要求1所述的气体扩散可视化方法,其特征在于,所述步骤S3中基于三角面片3个顶点的浓度值匹配颜色数组的过程包括:4. The gas diffusion visualization method according to claim 1, wherein the process of matching the color array based on the concentration values of the 3 vertices of the triangle surface in the step S3 comprises: 建立多个颜色数组和多个气体浓度范围,颜色数组与气体浓度范围一一对应,所述颜色数组表示为[R,G,B,A],其中,R、G、B代表颜色的三原色分量,A代表颜色的透明度;Establish multiple color arrays and multiple gas concentration ranges. The color arrays correspond to the gas concentration ranges one by one. The color arrays are expressed as [R, G, B, A], where R, G, and B represent the three primary color components of the color , A represents the transparency of the color; 将所述三角面片3个顶点浓度值所在气体浓度范围或者3个顶点浓度值的平均值所在气体浓度范围对应的颜色数组作为所述三角面片匹配的颜色数组。The color array corresponding to the gas concentration range of the three vertex concentration values of the triangular surface or the gas concentration range of the average value of the three vertex concentration values is used as the matching color array of the triangular surface. 5.一种气体扩散可视化系统,其特征在于,包括气体扩散参数获取模块、处理器和OSG平台,所述处理器分别与气体扩散参数获取模块和OSG平台连接;5. A gas diffusion visualization system, characterized in that, comprises a gas diffusion parameter acquisition module, a processor and an OSG platform, and the processor is connected with the gas diffusion parameter acquisition module and the OSG platform respectively; 所述处理器执行权利要求1-4之一所述的气体扩散可视化方法,将所有三角面片的顶点数据和每个三角面片对应的颜色数组输入OSG平台,由OSG平台进行渲染处理并将渲染处理结果显示。The processor executes the gas diffusion visualization method described in any one of claims 1-4, inputs the vertex data of all triangular faces and the color array corresponding to each triangular face into the OSG platform, performs rendering processing by the OSG platform and The result of the rendering process is displayed.
CN202011221753.7A 2020-11-05 2020-11-05 A gas diffusion visualization method and system Active CN112330812B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011221753.7A CN112330812B (en) 2020-11-05 2020-11-05 A gas diffusion visualization method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011221753.7A CN112330812B (en) 2020-11-05 2020-11-05 A gas diffusion visualization method and system

Publications (2)

Publication Number Publication Date
CN112330812A CN112330812A (en) 2021-02-05
CN112330812B true CN112330812B (en) 2023-01-10

Family

ID=74315977

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011221753.7A Active CN112330812B (en) 2020-11-05 2020-11-05 A gas diffusion visualization method and system

Country Status (1)

Country Link
CN (1) CN112330812B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114610944B (en) * 2022-05-11 2022-09-06 山东捷瑞数字科技股份有限公司 Optimization method for intelligent keyword matching resource material based on three-dimensional engine
CN118096968B (en) * 2024-01-18 2024-08-16 南京大学 Adaptive 3D rendering method of groundwater pollution plume based on point data

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE1002829B (en) * 1955-04-01 1957-02-21 Ruhrchemie Ag Gas diffusion electrode with a specific distribution of its pore radii and method for producing such electrodes
CN102609906A (en) * 2012-01-12 2012-07-25 北京理工大学 Gas infrared image enhancing method based on anisotropic diffusion
CN103337095A (en) * 2013-06-25 2013-10-02 桂林理工大学 Three-dimensional virtual display method of real-space three-dimensional geographic entity
CN103698477A (en) * 2013-12-18 2014-04-02 广东电网公司潮州供电局 Visual monitoring method and system for concentration of SF6 gas in GIS (gas insulated substation) chamber
CN104333675A (en) * 2014-10-20 2015-02-04 长春理工大学 Panoramic electronic image stabilization method based on spherical projection
CN107093207A (en) * 2017-04-12 2017-08-25 武汉大学 A kind of dynamic and visual method of the natural gas leaking diffusion based on GPGPU
CN108952813A (en) * 2018-08-01 2018-12-07 中国矿业大学(北京) Novel gas management early warning and emergency evacuation intelligence designation system based on LBS
CN109783966A (en) * 2019-01-25 2019-05-21 清华大学 Improved method and device for Calpuff model to simulate light gas diffusion
CN111563321A (en) * 2020-04-23 2020-08-21 华南理工大学 PCISPH-based physically-driven fabric water content simulation visualization method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101052353B1 (en) * 2009-11-04 2011-07-27 한국과학기술원 Thermal management fuel cell visualization device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE1002829B (en) * 1955-04-01 1957-02-21 Ruhrchemie Ag Gas diffusion electrode with a specific distribution of its pore radii and method for producing such electrodes
CN102609906A (en) * 2012-01-12 2012-07-25 北京理工大学 Gas infrared image enhancing method based on anisotropic diffusion
CN103337095A (en) * 2013-06-25 2013-10-02 桂林理工大学 Three-dimensional virtual display method of real-space three-dimensional geographic entity
CN103698477A (en) * 2013-12-18 2014-04-02 广东电网公司潮州供电局 Visual monitoring method and system for concentration of SF6 gas in GIS (gas insulated substation) chamber
CN104333675A (en) * 2014-10-20 2015-02-04 长春理工大学 Panoramic electronic image stabilization method based on spherical projection
CN107093207A (en) * 2017-04-12 2017-08-25 武汉大学 A kind of dynamic and visual method of the natural gas leaking diffusion based on GPGPU
CN108952813A (en) * 2018-08-01 2018-12-07 中国矿业大学(北京) Novel gas management early warning and emergency evacuation intelligence designation system based on LBS
CN109783966A (en) * 2019-01-25 2019-05-21 清华大学 Improved method and device for Calpuff model to simulate light gas diffusion
CN111563321A (en) * 2020-04-23 2020-08-21 华南理工大学 PCISPH-based physically-driven fabric water content simulation visualization method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Research on 3D dynamic visualization simulation system of toxic gas diffusion based on virtual reality technology;Songbai Cheng 等;《Process Safety and Environmental Protection》;20090318;第87卷(第3期);第175-183页 *
地铁站点有害气体扩散三维可视化研究;简洪登 等;《测绘科学》;20130120;第38卷(第1期);第136-138、141页 *
轻量级有毒气体扩散在线可视化仿真平台;贾金原 等;《系统仿真学报》;20190208;第31卷(第2期);第294-298、305页 *

Also Published As

Publication number Publication date
CN112330812A (en) 2021-02-05

Similar Documents

Publication Publication Date Title
US7586489B2 (en) Method of generating surface defined by boundary of three-dimensional point cloud
CN112330812B (en) A gas diffusion visualization method and system
US20070269102A1 (en) Method and System of Generating 3D Images with Airborne Oblique/Vertical Imagery, GPS/IMU Data, and LIDAR Elevation Data
CN110246220A (en) A kind of three-dimensional tube platform construction method, system, device and medium based on GIS
CN103606188A (en) Geographical information on-demand acquisition method based on image point cloud
CN111968227B (en) Three-dimensional geological fault network uncertainty analysis method, system and storage medium
Khayyal et al. Creation and spatial analysis of 3D city modeling based on GIS data
US8395760B2 (en) Unified spectral and geospatial information model and the method and system generating it
CN106530398A (en) Terrain visibility analysis-oriented visibility graph network construction method
CN110059209A (en) Information of real estate display methods, device, equipment and storage medium
CN115409957A (en) Map construction method based on illusion engine, electronic device and storage medium
CN102800125A (en) Large-scale point cloud selection method for supporting lasso
CN103236083A (en) Real-time three-dimensional measuring method based on stereo image library
CN109918738B (en) Three-dimensional visualization method, evaluation method and system for reactor power state of nuclear power plant
US20110221751A1 (en) Space debris visualization
CN116796455A (en) Rock mass fracture occurrence characterization method
CN117195769A (en) A flow field online simulation and visualization method and system
CN116721202A (en) Three-dimensional visual inversion method for harmful non-heavy gas leakage
CN114218640A (en) Artificial intelligence-based rockery mass design method
Janssen et al. Parametric Modelling with GIS
CN115409960A (en) Model construction method based on illusion engine, electronic device and storage medium
CN115409962A (en) Method for constructing coordinate system in illusion engine, electronic equipment and storage medium
JP2003228599A (en) Cae device for supporting analytical work using numerical map data information
WO2021250734A1 (en) Coordinate conversion device, coordinate conversion method, and coordinate conversion program
CN111179398A (en) Motor vehicle exhaust diffusion simulation and stereoscopic visualization method based on 3DGIS

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
GR01 Patent grant
GR01 Patent grant