CN112330812B - Gas diffusion visualization method and system - Google Patents
Gas diffusion visualization method and system Download PDFInfo
- 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
- triangular
- point
- vertex
- 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
Links
Images
Classifications
-
- 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
- G06T17/20—Finite element generation, e.g. wire-frame surface description, tesselation
-
- 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
- G06F30/23—Design optimisation, verification or simulation using finite element methods [FEM] or finite difference methods [FDM]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/005—General purpose rendering architectures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/10—Geometric effects
- G06T15/20—Perspective computation
- G06T15/205—Image-based rendering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2113/00—Details relating to the application field
- G06F2113/08—Fluids
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
The invention discloses a gas diffusion visualization method and a gas diffusion visualization system. The method comprises the following steps: s1, obtaining gas diffusion parameters and the height of a gas diffusion surface to be observed, obtaining a plurality of diffusion points distributed at equal intervals on the gas diffusion surface to be observed and a gas concentration value of each diffusion point by using a Gaussian diffusion model, and constructing a diffusion point data array according to the position relation of the diffusion points; s2, obtaining vertex indexes of all triangular surface patches of the diffusion point data array; s3, drawing a triangular patch according to the vertex index of the triangular patch, and matching a color array; and S4, inputting the vertex data of all the triangular surface patches and the color array matched with each triangular surface patch into an OSG platform for rendering and displaying. The visualization detail precision is determined by the distance between the diffusion points, and the smaller the distance between the point data is, the higher the visualization precision is; the method can quickly and simply obtain the vertex index of the triangular patch, avoids the complex calculation of a vertex index array, and realizes more real simulation in OSG in a visualized mode.
Description
Technical Field
The invention relates to the technical field of environmental safety, in particular to a gas diffusion visualization method and system.
Background
In daily life, the diffusion of gas (such as toxic gas, smoke and the like) is often required to be visualized, and the gas diffusion range is intuitively known so as to evaluate pollution, guide personnel to evacuate and the like.
In the prior art, the combination of a Gaussian smoke diffusion model and a GIS is generally researched, and the realization of Gaussian smoke diffusion visualization on an ArcGIS platform is well known by the public; no research has been found on the visualization of gaussian smoke diffusion by using OSG (Open Scene Graph) as an Open source graphics rendering library. When data rendering is performed in an OSG platform, generally discrete data is needed, interpolation is performed on the data by using an interpolation method to change the data into regular grid data, and then rendering is performed, and OSG rendering can be performed only by calculating a patch vertex index array.
Disclosure of Invention
The invention aims to at least solve the technical problems in the prior art, and particularly provides a gas diffusion visualization method and system.
In order to achieve the above object of the present invention, according to a first aspect of the present invention, there is provided a gas diffusion visualization method including: the method comprises the steps of S1, obtaining a gas diffusion parameter and the height of a gas diffusion surface to be observed, obtaining a plurality of diffusion points which are distributed at equal intervals on the gas diffusion surface to be observed and a gas concentration value of each diffusion point by using a Gaussian diffusion model, converting Gaussian coordinate system coordinates of the diffusion points into world coordinate system coordinates, and constructing a diffusion point data array according to the position relation of the diffusion points, wherein each element in the diffusion point data array comprises the world coordinate system coordinates and the gas concentration value of the same diffusion point; s2, obtaining vertex indexes of all triangular patches of the diffusion point data array; s3, drawing a triangular patch according to the vertex indexes of the triangular patch, drawing one triangular patch according to the vertex indexes of a group of triangular patches, and matching a color array based on the concentration values of 3 vertexes of the triangular patch; and S4, inputting the vertex data of all the triangular surface patches and the color array matched with each triangular surface patch into an OSG platform for rendering and displaying.
The technical scheme is as follows: the method produces a plurality of diffusion points with equal spacing on the gas diffusion surface to be observed, the visualization detail precision is determined by the spacing between the diffusion points, and the smaller the spacing between the point data is, the higher the visualization precision is; based on the equidistant position relation of the diffusion point data, the vertex index of the triangular patch can be quickly, simply and conveniently obtained, and the complex calculation of calculating the vertex index array is saved; the OSG platform is a three-dimensional digital earth engine library developed based on a three-dimensional engine OSG, can realize a three-dimensional virtual earth, can truly render the landform and the landform of a smoke diffusion environment, carries out color rendering through vertex data of triangular surface patches and color arrays matched with each triangular surface patch to generate equivalent surface primitives, completes visualization of the point data in the OSG, can more visually display the pollution range of smoke, realizes more real simulation, and is favorable for evaluating pollution.
In a preferred embodiment of the present invention, in step S2, the process of obtaining the vertex index of the triangular patch 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 set as the diffusion points P with the row number i and the column number j i,j Diffusion point P with i rows and j +1 columns i,j+1 Diffusion point P with i +1 rows and j columns i+1,j Diffusion point P with i +1 rows and j +1 columns i+1,j+1 Defining two groups of triangular patch vertex indexes among four diffusion points, wherein one group of triangular patch vertex indexes is formed by diffusion points P i,j 、P i,j+1 、P i+1,j Is formed by row and column, and the vertex index of another set of triangular patches is formed by diffusion point P i,j+1 、P i+1,j 、P i+1,j+1 Is composed of rows and columns, i and j are positive integers.
The technical scheme is as follows: based on the equidistant position relation of the diffusion point data, the vertex index array is not required to be calculated, but the row and column numbers of three vertexes of the triangular surface patch with the vertex indexes directly defined by using the position relation characteristics of the diffusion points, so that the fine fineness of the triangular surface patch is achieved, the process is simplified, and the complicated calculation for calculating the vertex index array is saved.
In a preferred embodiment of the present invention, the gas diffusion parameters include all or part of a gas source position, a mean discharge port wind speed, a gas discharge velocity, and a gas source effective height. In a preferred embodiment of the present invention, in step S1, the gaussian diffusion model is:wherein C (x, y, z, H) represents the gas concentration at the position point (x, y, z, H); q represents a gas discharge rate; sigma y The lateral diffusion coefficient is expressed and is the standard deviation of the gas distribution in the Y-axis direction of a Gaussian coordinate system,γ 1 a first scale factor is expressed in terms of,representing a first exponential coefficient; sigma z The vertical diffusion coefficient is expressed and is the standard deviation of the distribution of the gas in the direction of the z axis of a Gaussian coordinate system,γ 2 which represents the second scaling factor, is,representing a second exponential coefficient; u shape p Represents the average wind speed at the gas source discharge; h represents the effective height of the gas source; x represents the distance of the upwind diffusion point from the discharge point of the gas source; y represents the perpendicular distance to the x-axis on the plane of the gaussian coordinate system xoy; z representsGas diffusion surface height.
The technical scheme is as follows: the diffusion points produced by the Gaussian diffusion model can visually display the pollution range of the flue gas, and the visualization of the Gaussian diffusion model is realized.
In a preferred embodiment of the present invention, the process of converting the gaussian coordinate system coordinates of the diffusion points into world coordinate system coordinates is: setting the coordinates of a Gaussian coordinate system of the diffusion point as (x, y, C), and then setting the coordinates of a world coordinate system of the diffusion point as (LON ', LAT', C); the specific solving process comprises the following steps: step A, the longitude LON calculation formula is as follows:
the LAT calculation formula is:wherein C represents a gas concentration value of the diffusion point (x, y); b is f Expressing the latitude of the bottom point, and solving through a Gauss x-axis coordinate; y represents a Gaussian y-axis coordinate; e represents a first eccentricity of the earth ellipse; e.g. of a cylinder ∫ Representing a second eccentricity of the earth ellipse; a represents the semiaxis of the ellipse of the earth; b is f The acquisition process comprises the following steps: step one, setting i as iteration times and variable m 0 =a(1-e 2 ) Of variable quantityVariables ofVariables ofVariables ofVariables ofVariables ofVariables ofVariables ofLet B f Has an initial iteration value of B f 1 =x/a 0 Epsilon is a difference threshold value, 0 < | epsilon | is less than 0.000001; step two, calculatingJudgment B f i+1 -B f i If < ε is true, if B f i+1 -B f i If < epsilon is true, let B f =B f i+1 Obtaining B f If B is finished, entering step B f i+1 -B f i If the epsilon is not over, making i = i +1, and returning to the step one; b, obtaining longitude and latitude coordinates (LAT) of the data origin (0, 0) through an LON calculation formula and a latitude LAT calculation formula 0 ,LON 0 ) (ii) a Substituting the coordinates (x, y) of the diffusion point in the longitude LON calculation formula and the latitude LAT calculation formula to obtain (LAT) i ,LON i ) (ii) a Let the accident point in the world coordinate system simulation scene be (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 technical scheme is as follows: the world coordinate system coordinates of the diffusion points can be quickly and accurately converted.
In a preferred embodiment of the present invention, the process of matching the color array based on the density values of the 3 vertices of the triangular patch in step S3 includes: establishing a plurality of color arrays and a plurality of gas concentration ranges, wherein the color arrays correspond to the gas concentration ranges one by one, and the color arrays are represented as [ R, G, B, A ], wherein R, G and B represent three primary color components of colors, and A represents the transparency of the colors; and taking the color array corresponding to the gas concentration range in which the 3 vertex concentration values of the triangular patch are located or the gas concentration range in which the average value of the 3 vertex concentration values is located as the color array matched with the triangular patch.
The technical scheme is as follows: and generating an isosurface primitive, which is beneficial to gas diffusion evaluation.
In order to achieve the above object, according to a second aspect of the present invention, there is provided a gas diffusion visualization system, including a gas diffusion parameter obtaining module, a processor and an OSG platform, wherein the processor is connected to the gas diffusion parameter obtaining module and the OSG platform respectively; the processor executes the gas diffusion visualization method, inputs the vertex data of all the triangular surface patches and the color array corresponding to each triangular surface patch into the OSG platform, and the OSG platform performs rendering processing and displays the rendering processing result.
The technical scheme is as follows: a plurality of diffusion points with equal intervals are produced on the gas diffusion surface to be observed, the visualization detail precision is determined by the intervals among the diffusion points, and the smaller the interval among the point data is, the higher the visualization precision is; based on the equidistant position relation of the diffusion point data, the vertex indexes of the triangular surface patch can be quickly and simply obtained, and the complex calculation for calculating the vertex index array is saved; the OSG platform is a three-dimensional digital earth engine library developed based on a three-dimensional engine OSG, can realize a three-dimensional virtual earth, can truly render the landform and the landform of a smoke diffusion environment, carries out color rendering through vertex data of triangular surface patches and color arrays matched with each triangular surface patch to generate equivalent surface primitives, completes visualization of the point data in the OSG, can more visually display the pollution range of smoke, realizes more realistic simulation, and is favorable for evaluating pollution.
Drawings
FIG. 1 is a schematic flow chart of a method for visualizing gas diffusion according to an embodiment of the present invention;
FIG. 2 is a schematic illustration of a gas source in accordance with one embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention.
In the description of the present invention, it is to be understood that the terms "longitudinal", "lateral", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. indicate orientations or positional relationships based on those shown in the drawings, and are merely for convenience of description and simplicity of description, but do not indicate or imply that the device or element referred to must have a particular orientation, be constructed in a particular orientation, and be operated, and thus, are not to be construed as limiting the present invention.
In the description of the present invention, unless otherwise specified and limited, it is to be noted that the terms "mounted," "connected," and "connected" are to be interpreted broadly, and may be, for example, a mechanical connection or an electrical connection, a communication between two elements, a direct connection, or an indirect connection via an intermediate medium, and specific meanings of the terms may be understood by those skilled in the art according to specific situations.
The invention discloses a gas diffusion visualization method, and in a preferred embodiment, a flow diagram of the method is shown in fig. 1, and specifically comprises the following steps:
the method comprises the following steps of S1, obtaining a gas diffusion parameter and the height of a gas diffusion surface to be observed, obtaining a plurality of diffusion points which are distributed at equal intervals on the gas diffusion surface to be observed and a gas concentration value of each diffusion point by using a Gaussian diffusion model, converting Gaussian coordinate system coordinates of the diffusion points into world coordinate system coordinates, and constructing a diffusion point data array according to the position relation of the diffusion points, wherein each element in the diffusion point data array comprises the world coordinate system coordinates and the gas concentration value of the same diffusion point;
s2, obtaining vertex indexes of all triangular surface patches of the diffusion point data array;
s3, drawing a triangular surface patch according to the vertex indexes of the triangular surface patch, drawing one triangular surface patch by using the vertex indexes of a group of triangular surface patches, and matching a color array based on the concentration values of 3 vertexes of the triangular surface patch;
and S4, inputting the vertex data of all the triangular surface patches and the color array matched with each triangular surface patch into an OSG platform for rendering and displaying. And rendering and loading the equivalent surface under the geodetic coordinate system to the corresponding longitude and latitude positions of the earth model through an OSGEarth loading mechanism to realize visualization.
In the present embodiment, the height of the gas diffusion surface to be observed may be the height of the gas diffusion surface to be observed from the sea level, i.e., the altitude. After the height of the gas diffusion surface to be observed is input, the gas diffusion schematic diagram of the gas diffusion surface to be observed is output. The gas is preferably, but not limited to, various fire smoke, pollution gas discharged by chemical plant smoke, and toxic gas.
In the present embodiment, since the diffusion points in the gas diffusion surface to be observed are formed as a series of array points at equal intervals in the x-axis and y-axis directions of the gaussian coordinate system, the physical distance between rows and the physical distance between columns are equal in the diffusion point data array constructed in accordance with the positional relationship of the diffusion points.
In this embodiment, the coordinates of the diffusion point obtained by using the gaussian diffusion model are based on a gaussian coordinate system, and preferably, the gaussian coordinate system needs to be converted into a longitude and latitude coordinate system, the diffusion point data (longitude, latitude, concentration) is stored in a TXT file, and then the diffusion point data is converted from the longitude and latitude coordinate system into a world coordinate system of the OSG digital earth through the OSG platform, so as to render and visualize the diffusion point on the OSG platform. Preferably but not limited to writing a gaussian diffusion model by Python and other steps of the method.
In a preferred embodiment, in step S2, the process of obtaining the vertex index of the triangle patch 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 set as the diffusion points P with the row number i and the column number j i,j Diffusion point P with i rows and j +1 columns i,j+1 Row number of i +1 columnDiffusion point P of number j i+1,j Diffusion point P with i +1 rows and j +1 columns i+1,j+1 Defining two groups of triangular patch vertex indexes among four diffusion points, wherein one group of triangular patch vertex indexes is formed by diffusion points P i,j 、P i,j+1 、P i+1,j Is formed by row and column, and the vertex index of another set of triangular patches is formed by diffusion point P i,j+1 、P i+1,j 、P i+1,j+1 I and j are positive integers.
In this embodiment, a triangular patch vertex index is set by the number of rows and columns of the diffusion point data array, the triangular patch vertex index is the order of points when the triangular patch is drawn, three points are drawn into a triangular surface in order, an OSG vertex index array may be set in advance, and the obtained triangular patch vertex index is stored in the OSG vertex index array. The triangular patch vertex index obtaining process is as follows: forming a group of triangular patch top point indexes by using the row and column arrays of the first diffusion points and the second diffusion points of the first row of data and the second diffusion points of the second row of data, and forming another group of triangular patch top point indexes by using the row and column arrays of the second diffusion points of the first row and the second diffusion points of the second row; four dot data in the dot data array form 2 groups of triangular patch vertex indexes, and the vertex indexes (namely the row and column positions) of all data are obtained by sequentially circulating according to the row and column numbers of the diffusion dot array.
In a preferred embodiment, the gas diffusion parameters include all or part of the gas source location, mean discharge port wind speed, gas discharge velocity, effective gas source height.
In a preferred embodiment, as shown in the schematic diagram of the gas source structure in fig. 2, in step S1, the gaussian diffusion model is:
wherein C (x, y, z, H) represents the gas concentration at the location point (x, y, z, H); q represents a gas discharge rate; sigma y The lateral diffusion coefficient is expressed and is the standard deviation of the gas distribution in the Y-axis direction of a Gaussian coordinate system,γ 1 a first scale factor is expressed in terms of,representing a first exponential coefficient; sigma z The vertical diffusion coefficient is expressed and is the standard deviation of the gas distribution in the direction of the z axis of a Gaussian coordinate system,γ 2 which represents the second scaling factor, is,representing a second exponential coefficient; u shape p Represents the average wind speed at the source discharge; h represents the effective height of the gas source; x represents the distance of the upwind diffusion point from the discharge point of the gas source; y represents the perpendicular distance to the x-axis on the plane of the gaussian coordinate system xoy; z represents the gas diffusion surface height.
In the present embodiment, it is preferable that the first scale factor γ is 1 First exponential coefficientAll can be selected according to simulation conditions in a table D1 in GB3840-91 technical method for formulating local atmospheric pollutant emission standards; second proportionality coefficient gamma 2 The second index coefficientAll can be selected according to simulation conditions in a table D2 in GB3840-91 technical method for formulating local atmospheric pollutant emission standards.
In a preferred embodiment, the process of converting the gaussian coordinate system coordinates of the diffusion points into world coordinate system coordinates is:
setting the coordinates of a Gaussian coordinate system of the diffusion point as (x, y, C), and then setting the coordinates of a world coordinate system of the diffusion point as (LON ', LAT', C); specifically, the solving process includes:
step A, the longitude LON calculation formula is as follows:
the LAT calculation formula is:
wherein C represents a gas concentration value of the diffusion point (x, y); b is f Expressing the latitude of the bottom point, and solving through a Gaussian x-axis coordinate; y represents a Gaussian y-axis coordinate; e represents the first eccentricity of the earth ellipse; e.g. of the type ∫ Representing a second eccentricity of the earth ellipse; a represents the semiaxis of the ellipse of the earth;
b is described f The acquisition process comprises the following steps:
step one, setting i as iteration times and variable m 0 =a(1-e 2 ) Of variable quantityVariables ofVariables ofVariables ofVariables ofVariables ofVariables ofVariables ofLet B f Has an initial iteration value of B f 1 =x/a 0 Epsilon is a difference threshold value, 0 < | epsilon | is less than 0.000001;
step two, calculatingJudgment B f i+1 -B f i If < ε is true, if B f i+1 -B f i If < epsilon is true, let B f =B f i+1 Obtaining B f If B is finished, enter step B f i+1 -B f i If the epsilon is not over, making i = i +1, and returning to the step one;
b, obtaining longitude and latitude coordinates (LAT) of the data origin (0, 0) through an LON calculation formula and a latitude LAT calculation formula 0 ,LON 0 ) (ii) a Substituting the Gaussian coordinate system coordinates (x, y) of the diffusion points into a longitude LON calculation formula and a latitude LAT calculation formula to obtain (LAT) i ,LON i ) (ii) a Let the accident point in the world coordinate system simulation scene be (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 。
In a preferred embodiment, the process of matching the color array based on the density values of the 3 vertices of the triangular patch in step S3 includes: establishing a plurality of color arrays and a plurality of gas concentration ranges, wherein the color arrays correspond to the gas concentration ranges one by one, and the color arrays are represented as [ R, G, B, A ], wherein R, G and B represent three primary color components of colors, and A represents the transparency of the colors; and taking the color array corresponding to the gas concentration range in which the concentration values of 3 vertexes of the triangular patch are located or the gas concentration range in which the average value of the concentration values of 3 vertexes of the triangular patch is located as the color array matched with the triangular patch.
The invention also discloses a gas diffusion visualization system, in a preferred embodiment, the system comprises a gas diffusion parameter acquisition module, a processor and an OSG platform, wherein the processor is respectively connected with the gas diffusion parameter acquisition module and the OSG platform; and the processor executes the gas diffusion visualization method, inputs the vertex data of all the triangular surface patches and the color array corresponding to each triangular surface patch into the OSG platform, and carries out rendering processing by the OSG platform and displays the rendering processing result.
In the present embodiment, the gas diffusion parameter obtaining module may be used to obtain the gas diffusion parameter and the height of the gas diffusion surface to be observed, and the gas diffusion parameter obtaining module is preferably, but not limited to, a keyboard light input device.
In the description of the specification, reference to the description of "one embodiment," "some embodiments," "an example," "a specific example," or "some examples" or the like means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Claims (5)
1. A gas diffusion visualization method, comprising:
the method comprises the following steps of S1, obtaining gas diffusion parameters and the height of a gas diffusion surface to be observed, obtaining a plurality of diffusion points which are distributed at equal intervals on the gas diffusion surface to be observed and a gas concentration value of each diffusion point by using a Gaussian diffusion model, converting Gaussian coordinate system coordinates of the diffusion points into world coordinate system coordinates, and constructing a diffusion point data array according to the position relation of the diffusion points, wherein each element in the diffusion point data array comprises the world coordinate system coordinates and the gas concentration value of the same diffusion point;
s2, obtaining vertex indexes of all triangular patches of the diffusion point data array;
s3, drawing a triangular surface patch according to the vertex indexes of the triangular surface patch, drawing one triangular surface patch by using the vertex indexes of a group of triangular surface patches, and matching a color array based on the concentration values of 3 vertexes of the triangular surface patch;
s4, inputting vertex data of all the triangular surface patches and the color array matched with each triangular surface patch into an OSG platform for rendering and displaying;
in step S1, the gaussian diffusion model is:
wherein C (x, y, z, H) represents the gas concentration at the position point (x, y, z, H); q represents a gas discharge rate; sigma y The lateral diffusion coefficient is expressed and is the standard deviation of the gas distribution in the Y-axis direction of a Gaussian coordinate system,γ 1 a first scale factor is expressed in terms of,representing a first exponential coefficient; sigma z The vertical diffusion coefficient is expressed and is the standard deviation of the gas distribution in the direction of the z axis of a Gaussian coordinate system,γ 2 which is indicative of a second scaling factor that is,representing a second exponential coefficient; u shape p Represents the average wind speed at the source discharge; h represents the effective height of the gas source; x represents the distance of the upwind diffusion point from the discharge point of the gas source; y represents the perpendicular distance to the x-axis on the plane of the gaussian coordinate system xoy; z represents the gas diffusion surface height;
the process of converting the gaussian coordinate system coordinates of the diffusion points into world coordinate system coordinates is as follows:
and (2) setting the coordinates of the Gaussian coordinate system of the diffusion point as (x, y and C), and setting the coordinates of the world coordinate system of the diffusion point as (LON ', LAT' and C), wherein the specific solving process comprises the following steps:
step A, the longitude LON calculation formula is as follows:
the LAT calculation formula is:
wherein C represents a gas concentration value of the diffusion point (x, y); b is f Expressing the latitude of the bottom point, and solving through a Gaussian x-axis coordinate; y represents a Gaussian y-axis coordinate; e represents the first eccentricity of the earth ellipse; e.g. of the type ∫ Representing a second eccentricity of the earth ellipse; a represents the semiaxis of the ellipse of the earth;
b is described f The acquisition process comprises the following steps:
step one, setting i as iteration times and variable m 0 =a(1-e 2 ) Of variable quantityVariables ofVariables ofVariables ofVariables ofVariables ofVariables ofVariables ofLet B f Has an initial iteration value of B f 1 =x/a 0 Epsilon is a difference threshold value, 0 < | epsilon | is less than 0.000001;
step two, calculatingJudgment of B f i+1 -B f i If < ε is true, if B f i+1 -B f i < ε is established, let B f =B f i+1 Obtaining B f If B is finished, entering step B f i+1 -B f i If the epsilon is not over, making i = i +1, and returning to the step one;
b, obtaining longitude and latitude coordinates (LAT) of a data origin (0, 0) through an LON calculation formula and a latitude LAT calculation formula 0 ,LON 0 ) (ii) a Substituting the coordinates (x, y) of the diffusion point in the longitude LON calculation formula and the latitude LAT calculation formula to obtain (LAT) i ,LON i ) (ii) a Let the accident point in the world coordinate system simulation scene be (LAT) s ,LON s ) And then the world coordinate system coordinates of the diffusion points are: LAT' = LAT i -LAT 0 +LAT s ,LON'=LON i -LON 0 +LON s 。
2. The gas diffusion visualization method according to claim 1, wherein in step S2, the process of obtaining the triangular patch vertex indices of the diffusion point data array is:
for any adjacent four diffusion points in the diffusion point data array, setting the four diffusion points to be respectivelyFor diffusion points P with rows i and columns j i,j Diffusion point P with i rows and j +1 columns i,j+1 Diffusion point P with i +1 rows and j columns i+1,j Diffusion point P with i +1 row number and j +1 column number i+1,j+1 Defining two groups of triangular patch vertex indexes among four diffusion points, wherein one group of triangular patch vertex indexes is formed by diffusion points P i,j 、P i,j+1 、P i+1,j Is formed by row and column, and the vertex index of another set of triangular patches is formed by diffusion point P i,j+1 、P i+1,j 、P i+1,j+1 I and j are positive integers.
3. The gas diffusion visualization method according to claim 1, wherein the gas diffusion parameters include all or part of a gas source location, a vent mean wind speed, a gas vent velocity, a gas source effective height.
4. The gas diffusion visualization method according to claim 1, wherein the step S3 of matching the color array based on the density values of the 3 vertices of the triangular patch comprises:
establishing a plurality of color arrays and a plurality of gas concentration ranges, wherein the color arrays correspond to the gas concentration ranges one by one, and the color arrays are represented as [ R, G, B, A ], wherein R, G and B represent three primary color components of colors, and A represents the transparency of the colors;
and taking the color array corresponding to the gas concentration range in which the 3 vertex concentration values of the triangular patch are located or the gas concentration range in which the average value of the 3 vertex concentration values is located as the color array matched with the triangular patch.
5. A gas diffusion visualization system is characterized by comprising a gas diffusion parameter acquisition module, a processor and an OSG platform, wherein the processor is respectively connected with the gas diffusion parameter acquisition module and the OSG platform;
the processor executes the gas diffusion visualization method according to any one of claims 1 to 4, inputs vertex data of all the triangular patches and the color array corresponding to each triangular patch into the OSG platform, performs rendering processing by the OSG platform, and displays the rendering processing result.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011221753.7A CN112330812B (en) | 2020-11-05 | 2020-11-05 | 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 | 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 | Gas diffusion visualization method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112330812B (en) |
Families Citing this family (2)
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 | 南京大学 | Self-adaptive underground water pollution plume three-dimensional rendering method based on point data |
Citations (9)
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 of the Calpuff model to light gas diffusion simulations |
CN111563321A (en) * | 2020-04-23 | 2020-08-21 | 华南理工大学 | PCISPH-based physically-driven fabric water content simulation visualization method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101052353B1 (en) * | 2009-11-04 | 2011-07-27 | 한국과학기술원 | Thermal management fuel cell visualization device |
-
2020
- 2020-11-05 CN CN202011221753.7A patent/CN112330812B/en active Active
Patent Citations (9)
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 of the Calpuff model to light gas diffusion simulations |
CN111563321A (en) * | 2020-04-23 | 2020-08-21 | 华南理工大学 | PCISPH-based physically-driven fabric water content simulation visualization method |
Non-Patent Citations (3)
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 |
---|---|---|
CN106127771B (en) | Tunnel orthography system and method is obtained based on laser radar LIDAR point cloud datas | |
CN112330812B (en) | Gas diffusion visualization method and system | |
CN102117497B (en) | Method and system for three-dimensional terrain modeling | |
CN114219902B (en) | Method and device for rendering volume drawing of meteorological data and computer equipment | |
CN104778744B (en) | Extensive three-dimensional forest Visual Scene method for building up based on Lidar data | |
CN105336003A (en) | Three-dimensional terrain model real-time smooth drawing method with combination of GPU technology | |
CN106126816B (en) | Repeat the extensive ALS building point cloud modeling method under building automatic sensing | |
CN113436308B (en) | Three-dimensional environment air quality dynamic rendering method | |
CN110807134A (en) | Ocean three-dimensional scalar field visualization method | |
CN103065361A (en) | Three-dimensional (3d) island sandbox achieving method | |
CN108197283A (en) | The method that flood two, three-dimensional dynamic exhibition are carried out using river measured water level | |
AU602289B2 (en) | Method for displaying intervisibility data | |
Khayyal et al. | Creation and spatial analysis of 3D city modeling based on GIS data | |
CN111784831A (en) | Urban river flood three-dimensional inundation analysis method based on oblique photography | |
CN105488844A (en) | Method for displaying real-time shadow of massive models in three-dimensional scene | |
Du | Application of CAD aided intelligent technology in landscape design | |
CN104937639B (en) | 3-dimensional image creation device and three-dimensional image generating method | |
CN116757004A (en) | EFDC three-dimensional water quality data multi-mode deduction method based on digital twin technology | |
Schulz et al. | Hydrodynamics: Optimizing Methods and Tools | |
CN114218640B (en) | Artificial intelligence-based rockery volume design method | |
CN106683165A (en) | Four-dimensional visualizations method of cultural heritage | |
CN114633850B (en) | Virtual visual reconstruction method for finite element model of ship structure | |
CN114037811B (en) | 3D temperature field graph rendering method, apparatus, medium, and device based on directed distance field | |
CN112307141B (en) | Contour map visualization method considering influence of numerical value and distance | |
CN110807831B (en) | Sensor coverage area calculation method based on minimum unit collision detection |
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 |