CN116310171A - Streamline visualization method based on lattice point data - Google Patents

Streamline visualization method based on lattice point data Download PDF

Info

Publication number
CN116310171A
CN116310171A CN202310209759.XA CN202310209759A CN116310171A CN 116310171 A CN116310171 A CN 116310171A CN 202310209759 A CN202310209759 A CN 202310209759A CN 116310171 A CN116310171 A CN 116310171A
Authority
CN
China
Prior art keywords
point
streamline
grid
data
lattice
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310209759.XA
Other languages
Chinese (zh)
Inventor
徐晓
刘伯俊
张弛
许多
王彦迪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Enruite Industrial Co Ltd
Original Assignee
Nanjing Enruite Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Enruite Industrial Co Ltd filed Critical Nanjing Enruite Industrial Co Ltd
Priority to CN202310209759.XA priority Critical patent/CN116310171A/en
Publication of CN116310171A publication Critical patent/CN116310171A/en
Pending legal-status Critical Current

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/05Geographic models
    • 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
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/04Indexing scheme for image data processing or generation, in general involving 3D image data
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Computer Graphics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Remote Sensing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

A streamline visualization method based on lattice point data is to collect the space range, wind speed data, wind direction data and lattice point row number of lattice points, preprocess the lattice point data, take the total number of lattice points as traversing upper limit value, take the column number or line number of original lattice points as base number, set encryption coefficient, place seed points by using thinning mechanism, calculate numerical integration order by using second-order range-Kutta method, calculate integration step by maximum value of integral step coefficient, lattice length and lattice speed component, generate streamline, forward track the streamline flow from seed point, backward track, draw line by streamline track coordinate data, define color and thickness, and make visual display.

Description

Streamline visualization method based on lattice point data
Technical Field
The invention belongs to the technical field of meteorological data processing, and particularly relates to a streamline visualization technology.
Background
The flow field visualization is an important branch in scientific calculation visualization, converts complex simulation data of computational fluid dynamics into visual images, provides visual graphic images for researchers, helps the researchers to efficiently analyze and understand physical phenomena in complex flow, and insights into complex physical laws contained in massive data.
The meteorological data observed by each meteorological site is processed into graphic images such as wind speed, wind direction and the like, so that weather researchers are helped to accurately analyze and predict future weather, and scientific basis is provided for timely preventing extreme weather.
The flow field visualization is divided into three stages of preprocessing of original data, data mapping and drawing display, the flow field visualization effect and the mapping mode are not divided, and the flow field visualization is divided into direct visualization, geometric visualization, texture visualization and feature visualization, and different visualization methods have respective advantages and disadvantages.
The direct visual rendering speed is high, but when the data volume is too large, the visual effect is poor. Texture visualization has good global properties, can represent all details of the flow field, but is computationally time consuming. Feature visualization highlights the feature structure of the flow field, but has data dependence. The geometric streamline is visual and efficient, but the seed point selection is key, and local details are easy to lose.
The meteorological data volume is large, global and detail features are emphasized, an optimized geometrical streamline visualization method is sought, and the method has very important significance. The streamline seed point distribution is the basis of streamline visualization, the characteristic type and the position of a predicted flow field cannot be extracted depending on the number and the position of the seed points, and the streamline visualization effect is difficult to ensure the integrity of the flow field characteristics. After the seed points are selected, flow direction tracking is carried out, and independent forward tracking or reverse tracking can lead to incomplete flow line generation, so that the number of flow lines is increased, and the efficiency is reduced. The adaptive step length calculation model in the prior art is easy to cause the phenomena of aliasing crossover, iteration dead loop and the like, and is difficult to meet the requirement of actual research.
Disclosure of Invention
The invention adopts the following technical ideas to solve the following technical problems:
how do seed point placement? Seed point placement is the first step of streamline visualization, and the sparseness degree of the streamline is controlled. Excellent seed point placement can generate long and uniform streamline and optimize the visual effect. And continuously testing the seed point placement intervals, comparing and analyzing to find the positions of the seed points which can cover the whole data and can generate long streamline with high uniformity and continuity, and determining the seed point placement intervals. According to the invention, through repeated experiments, when the grid point size is 0.25 degrees multiplied by 0.25 degrees under the spatial scale of the Chinese area, the generated streamline is uniform, and the visualization effect is good.
How to select the streamline step? The streamlines are not straight or smooth, and it is most important to choose the integration step size to generate the streamlines. Where the rotation angle is large, the integral curve may be distorted if the step size is too large. In a relatively straight place, the step size is too small, the computational complexity increases dramatically, and the requirements of driving visualization cannot be met. According to the method, the integral step length is calculated according to the size and the speed vector of each grid point, and the integral step length generated by the maximum value of the integral step length coefficient [0.2,0.5] multiplied by the grid size/speed is used for meeting the visualization requirement and improving the visualization efficiency.
How are streamlines generated? After the seed point position and step size are determined, the flow direction is tracked forward or backward. The invention starts from the seed point, and firstly tracks forward according to the step length until the grid point speed is 0 or the index exceeds the grid point range, and stops tracking. And then starting from the current seed point, reversely tracking according to the step length until the grid point speed is 0 or the index exceeds the grid point range, and stopping tracking.
How to avoid aliasing crossover of streamlines, iterative dead-loop phenomenon? The multiple streamline generation process can repeatedly track lattice points, resulting in overlapping and crossing of streamlines. When the step length is too short and the speed direction is too large, the dead loop is easy to iterate. The present invention defines a track array and stores grid point indexes through which streamlines have been generated. And judging whether the grid point where the point is located is in the track array or not when the next inflection point of the streamline is determined each time, if so, stopping tracking, otherwise, continuing tracking. And setting the upper limit value of the total inflection point of the streamline, avoiding overlong streamline or iterative dead cycle, and improving the streamline generation efficiency.
The invention adopts the following technical means in order to obtain the following technical effects:
considering the placement interval of the seed points, the invention adopts the seed point encryption parameter and the thinning mechanism based on the seed point selection algorithm, so that the generated streamline is more uniform.
Based on a unidirectional tracking streamline generating algorithm, the bidirectional streamline generating algorithm of forward tracking and backward tracking is adopted, so that too short streamline is avoided, and continuity and integrity of the streamline are improved.
In order to overcome the aliasing crossover phenomenon and iteration dead loop which are easy to occur in the self-adaptive step calculation model, the invention adopts the self-adaptive streamline step calculation and a crossover avoidance mechanism according to the grid point data resolution, avoids the streamline inaccuracy phenomenon caused by different data specifications, and ensures the streamline accuracy and the visualization effect.
According to the invention, the seed point placement method is optimized, the seed points generated for the first time are uniformly thinned, the subsequent calculated amount is reduced, and the calculation efficiency is improved.
The invention adopts a second-order range-Kutta method to carry out numerical integration, ensures calculation accuracy and calculation efficiency, generates an integration step according to an integration step coefficient, a grid length and a wind speed value, defines the value of the integration step coefficient, improves the coverage and uniformity of a streamline, and has better visualization effect.
The invention provides a streamline visualization method based on lattice point data, which adopts the following technical scheme.
Preprocessing lattice point data: the method comprises the steps of collecting the space range, wind speed data, wind direction data and grid point row and column numbers of grid points, calculating grid point intervals according to the grid point row and column numbers and the space range, setting an optimal grid point length calculation encryption coefficient N by adopting a grid point encryption mechanism in order to enable generated streamline data to be finer and smoother, dividing an original grid point into N multiplied by N grids, assigning values to the N multiplied by N grids by using the wind speed data and the wind direction data of the original grid point, avoiding wind flow sparseness caused by coarse grid point resolution, and enabling the final effect to be more uniform.
Further, the lattice point encryption mechanism adopts lattice point intervals and encryption parameters, and adopts colMaxExtent as the maximum latitude value of the lattice point data in the X direction, colMinExtent as the minimum latitude value of the lattice point data in the X direction, and colNunber as the total column number of the lattice point data, so that the lattice point intervals cell_len= [ colMaxExtent-colMinExtent ]/colNunber are rounded, and the encryption parameters epParameters=Math. Floor (cell_len/0.4) are calculated.
Seed point placement: taking the total number of grid points as a traversing upper limit value, taking the number of columns or rows of original grid points as a base number, setting an encryption coefficient, encrypting the original grid points, determining the placement position of a seed point, storing the seed point in a seed point array, and retaining the details of a wind streamline.
The total number of grid points is too large, so that the calculation efficiency of wind flow line tracks is affected, the wind flow line density is too high, the visual effect is affected, and the positions of seed points are calculated and selected by adopting a thinning mechanism.
Further, setting a thinning coefficient M, if indexes of rows and columns of grid points can be divided by M, determining seed points, realizing uniform placement, optimizing calculation efficiency and visualization effect of wind streamlines, setting girdRow as the number of rows traversing the current grid point, setting gridCol as the number of columns traversing the current grid point, and using a formula of girdRow% m= 0& gridcol% m= 0 as a thinning mechanism.
Streamline visual mapping: the numerical integration order is calculated by adopting a second-order range-Kutta method, so that the calculation accuracy and calculation efficiency are ensured, the integration step length is calculated by the integration step length coefficient, the grid length and the maximum value of the grid speed component, a streamline is generated, and the streamline flow is firstly tracked forward and then reversely from a seed point.
Further, let X (t) be the current integration position, X (t+Δt) be the position of the next point obtained by integration, Δt be the integration step, V (X (t)) be the velocity vector of X (t) in the vector field, and X represents the conjugate, expressed by the formula
Figure BDA0004112203220000031
A numerical integration order is calculated.
Further, let D step Is an integralStep length, L grrid For the grid point length, V max For wind speed value, I is integral step length coefficient, and through multiple debugging analysis, the range of I is set to be 0.2 and 0.5]The best effect is achieved by using the formula D step =I*L grid /V max An integration step is calculated.
Further, setting an inflection point upper limit value, defining an array, storing grid point index data of which the streamline has passed, judging whether the grid point where the inflection point is located is in the array or not every time the inflection point position is determined in the forward tracking and the backward tracking processes, if so, stopping tracking, otherwise, judging whether the grid point speed is 0 or the index exceeds the grid point range or not, if so, stopping tracking, and repeating the judgment until all seed points generate the streamline.
Let (X, Y) be the longitude and latitude value of the current inflection point coordinate, D step For the integral step length, U_value and V_value are velocity components of the current inflection point in the direction X, Y, the motion direction of the next inflection point is controlled, and a formula is used
Figure BDA0004112203220000032
And calculating the inflection point coordinate position.
Streamline visualization: drawing lines by streamline track coordinate data, defining colors and thicknesses, and performing visual display.
Drawings
Fig. 1 is a visual effect diagram.
Description of the embodiments
Taking the data of the wind grid points of the national range of 2021, 7 and 23 as an example, the wind flow line is visualized, and the technical scheme of the invention is specifically described.
And acquiring current grid point data, wherein the current grid point data comprises the space position coordinates of grid points, wind speed, wind direction, the space range of the grid point data and the total row number and the total column number of the grid point data.
And calculating the lattice point interval according to the lattice point data space range and the total row number of the lattice points, encrypting the lattice points, and encrypting the lattice point resolution to 0.25 through experiments.
And selecting a second-order Runge-Kutta method to carry out numerical integration, then designing an integration step length method, constructing a function for searching the next inflection point, and carrying out streamline generation.
Setting the seed point thinning coefficient as 5, traversing the lattice point data, calculating to obtain a uniformly distributed seed point data set, and constructing a forward tracking method and a reverse tracking method.
According to the integration method, calculating an integration step length according to the length of the current grid point and the maximum value of the velocity component, and carrying out forward and reverse tracking on the streamline until all the seed points meeting the conditions generate the streamline.
Finally, the wind streamline visual display is carried out by adopting the WebGL technology, and the effect is shown in figure 1.
The foregoing is illustrative of the present invention and is not to be construed as limiting thereof, but rather as being included within the spirit and scope of the present invention.

Claims (7)

1. A method for visualizing streamlines based on lattice data, comprising:
preprocessing lattice point data: collecting the space range, wind speed data, wind direction data and grid point row and column numbers of grid points, calculating grid point intervals by the grid point row and column numbers and the space range, setting an optimal grid point length calculation encryption coefficient N by adopting a grid point encryption mechanism, dividing an original grid point into N multiplied by N grids, and assigning values to the grid points by using the wind speed data and the wind direction data of the original grid point;
seed point placement: taking the total number of grid points as a traversing upper limit value, taking the number of columns or rows of original grid points as a base number, setting an encryption coefficient, encrypting the original grid points, determining the placement position of a seed point, storing the seed point in a seed point array, retaining the details of a wind streamline, and calculating and selecting the position of the seed point by adopting a thinning mechanism;
streamline visual mapping: calculating a numerical integration order by adopting a second-order range-Kutta method, calculating an integration step by using the integration step coefficient, the grid length and the maximum value of grid speed components, generating a streamline, and tracking the streamline flow from a seed point in a forward direction and then in a reverse direction;
streamline visualization: drawing lines by streamline track coordinate data, defining colors and thicknesses, and performing visual display.
2. The method of claim 1, wherein the preprocessing of the trellis point data comprises: the lattice point encryption mechanism adopts lattice point intervals and encryption parameters, and is characterized in that colMaxExtent is the maximum latitude value of lattice point data in the X direction, colMinExtent is the minimum latitude value of lattice point data in the X direction, colNunber is the total column number of the lattice point data, then the lattice point intervals cell_len= [ colMaxExtent-colMinExtent ]/colNunber are calculated, and the encryption parameters epParameters=Math. Floor (cell_len/0.4) are calculated in a rounding mode.
3. The grid point data based streamline visualization method of claim 1, wherein the seed point placement comprises: setting a thinning coefficient M, if indexes of rows and columns of grid points can be divided by M, judging the grid points as seed points, setting girdRow as the row number traversing the current grid point, setting gridCol as the column number traversing the current grid point, and using a formula of girdRow% M= 0& gridCol% M= 0 as a thinning mechanism.
4. The method of claim 1, wherein the computing numerical integration order in the streamline visualization map comprises: let X (t) be the current integration position, X (t+Deltat) be the position of the next point obtained by integration, deltat be the integration step length, V (X (t)) be the velocity vector of X (t) in the vector field, the expression taking the conjugate, and using the formula
Figure FDA0004112203210000011
A numerical integration order is calculated.
5. The method of claim 1, wherein calculating integration steps in the streamline visualization map comprises: set D step For integrating step length, L grrid Is netLattice length, V max For wind speed, I is the integral step factor, and the range of I is set to be [0.2,0.5]By formula D step =I*L grid /V max An integration step is calculated.
6. The method of claim 1, wherein the forward tracking and then reverse tracking in the streamline visualization map comprises: setting an inflection point upper limit value, defining an array, storing grid point index data of which the streamline has passed, judging whether the grid point where the inflection point is located is in the array or not every time one inflection point position is determined in the forward tracking and the backward tracking processes, if so, stopping tracking, otherwise, judging whether the grid point speed is 0 or whether the index exceeds the grid point range or not, if so, stopping tracking, and repeating the judgment until all seed points generate the streamline.
7. The grid point data based streamline visualization method of claim 6, further comprising: let (X, Y) be the longitude and latitude value of the current inflection point coordinate, D step For the integral step length, U_value and V_value are velocity components of the current inflection point in the direction X, Y, the motion direction of the next inflection point is controlled, and a formula is used
Figure FDA0004112203210000021
And calculating the inflection point coordinate position.
CN202310209759.XA 2023-03-02 2023-03-02 Streamline visualization method based on lattice point data Pending CN116310171A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310209759.XA CN116310171A (en) 2023-03-02 2023-03-02 Streamline visualization method based on lattice point data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310209759.XA CN116310171A (en) 2023-03-02 2023-03-02 Streamline visualization method based on lattice point data

Publications (1)

Publication Number Publication Date
CN116310171A true CN116310171A (en) 2023-06-23

Family

ID=86818042

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310209759.XA Pending CN116310171A (en) 2023-03-02 2023-03-02 Streamline visualization method based on lattice point data

Country Status (1)

Country Link
CN (1) CN116310171A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117274534A (en) * 2023-11-20 2023-12-22 中国空气动力研究与发展中心计算空气动力研究所 Three-dimensional structured grid surface streamline generation method, device and medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117274534A (en) * 2023-11-20 2023-12-22 中国空气动力研究与发展中心计算空气动力研究所 Three-dimensional structured grid surface streamline generation method, device and medium
CN117274534B (en) * 2023-11-20 2024-02-06 中国空气动力研究与发展中心计算空气动力研究所 Three-dimensional structured grid surface streamline generation method, device and medium

Similar Documents

Publication Publication Date Title
Mitasova et al. Modelling spatially and temporally distributed phenomena: new methods and tools for GRASS GIS
CN110096500B (en) Visual analysis method and system for ocean multidimensional data
CN105118090B (en) A kind of point cloud filtering method of adaptive complicated landform structure
CN108010103A (en) The quick fine generation method of river with complicated landform
GB2547816A (en) Actually-measured marine environment data assimilation method based on sequence recursive spare filtering three-dimensional variation
Zhang et al. Automatic velocity picking based on deep learning
CN110197035B (en) Channel underwater terrain change analysis system and method
CN116310171A (en) Streamline visualization method based on lattice point data
CN113743577A (en) Fine grid data partition construction method and system for mesoscale vortex identification
CN113628339B (en) Broken layer slice extraction method based on local reservation projection
Fan Research on deep learning energy consumption prediction based on generating confrontation network
CN109190800B (en) Sea surface temperature prediction method based on spark frame
CN116186864B (en) Deep foundation pit model rapid modeling method and system based on BIM technology
CN110555189B (en) Spatial interpolation method based on reverse computing thinking
CN115964546B (en) Vortex migration channel extraction and visualization method based on edge binding
CN110751726A (en) River engineering quality detection method
Chen et al. 3D point cloud generation reconstruction from single image based on image retrieval
CN116050460A (en) Air temperature data spatial interpolation method based on attention neural network
CN115759291A (en) Space nonlinear regression method and system based on ensemble learning
CN104036552A (en) Method for generating blue noise meshes on basis of farthest point optimization
CN115272594A (en) Iso-surface generation method based on geotools
CN114756997A (en) Method and device for detecting self-intersecting line of hull plate curved surface design and storable medium
Zhang et al. Peviz: an in situ progressive visual analytics system for ocean ensemble data
CN113656852A (en) Rapid generation method for refined river terrain
CN108564658A (en) A kind of gradual three-dimensional entity model structure system and method based on reverse-engineering

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