[go: up one dir, main page]

CN106202522A - The multiplexing method of a kind of flow field integral curve and system - Google Patents

The multiplexing method of a kind of flow field integral curve and system Download PDF

Info

Publication number
CN106202522A
CN106202522A CN201610584306.5A CN201610584306A CN106202522A CN 106202522 A CN106202522 A CN 106202522A CN 201610584306 A CN201610584306 A CN 201610584306A CN 106202522 A CN106202522 A CN 106202522A
Authority
CN
China
Prior art keywords
grid
integral curve
flow field
subspace
spatial
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.)
Granted
Application number
CN201610584306.5A
Other languages
Chinese (zh)
Other versions
CN106202522B (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.)
Peking University
Original Assignee
Peking University
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 Peking University filed Critical Peking University
Priority to CN201610584306.5A priority Critical patent/CN106202522B/en
Publication of CN106202522A publication Critical patent/CN106202522A/en
Application granted granted Critical
Publication of CN106202522B publication Critical patent/CN106202522B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9038Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9027Trees

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Processing Or Creating Images (AREA)

Abstract

本发明公开了一种流场积分曲线的复用方法及系统,属于涉及流场数据分析技术领域。该方法包括:获取流场数据的空间网格结构;在空间网格结构的所有网格点上放置初始种子点,计算每个种子点的积分曲线,并将所述积分曲线保存在存储设备;所述积分曲线为迹线或流线;对所述流场数据进行分析或可视化应用时,在所述存储设备中直接调用所需要的对应网格点位置处的初始种子点种子点的积分曲线。该方法及系统通过预先计算足够多的积分曲线并保存下来,在之后的流场数据分析或可视化应用中,直接根据流场分析或可视化应用指定的区域空间,即可快速的获取到所需的积分曲线,极大地提高了处理效率,尤其适用于大规模流场数据的分析及可视化处理。

The invention discloses a method and system for multiplexing flow field integral curves, and belongs to the technical field of flow field data analysis. The method includes: obtaining a spatial grid structure of flow field data; placing initial seed points on all grid points of the spatial grid structure, calculating an integral curve of each seed point, and storing the integral curve in a storage device; The integral curve is a trace or a streamline; when analyzing or visualizing the flow field data, the integral curve of the initial seed point seed point at the required corresponding grid point position is directly called in the storage device . The method and system pre-calculate and save enough integral curves, and in the subsequent flow field data analysis or visualization application, the required data can be quickly obtained directly according to the area space specified by the flow field analysis or visualization application. The integral curve greatly improves the processing efficiency, and is especially suitable for the analysis and visualization processing of large-scale flow field data.

Description

一种流场积分曲线的复用方法及系统A method and system for multiplexing flow field integral curves

技术领域technical field

本发明涉及流场数据分析技术领域,具体涉及一种流场积分曲线的复用方法及系统。The invention relates to the technical field of flow field data analysis, in particular to a method and system for multiplexing flow field integral curves.

背景技术Background technique

流场(Flow Field)即流体运动所占据的空间,流场数据是一类重要的科学数据,其通常定义在二维或者三维空间中,并至少包含一个速度场。最常见的流场数据包括海洋模拟中的洋流数据、大气模拟中的风场数据等等。许多已有的流场可视化方法都基于积分曲线,例如积分曲线的直接渲染、源汇查询、FTLE场(有限时间李亚普诺夫指数场)计算、以及其他一些专门设计的可视化与分析方法。在非定常流场(即速度场随时间变化)中,最常见的积分曲线是迹线(在流场中某位置放置一个无质量的质点(称作初始种子点),让其在速度场中运动,所形成的轨迹就是一条迹线);在定常流场(即速度场不随时间变化)中,则对应为流线(在流场中每一点上都与速度矢量相切的曲线称为流线)。实际计算中,迹线和流线都是通过数值积分来求得,所以称它们为积分曲线。Flow field is the space occupied by fluid motion. Flow field data is an important type of scientific data, which is usually defined in two-dimensional or three-dimensional space and contains at least one velocity field. The most common flow field data include ocean current data in ocean simulations, wind field data in atmospheric simulations, and so on. Many existing flow field visualization methods are based on integral curves, such as direct rendering of integral curves, source-sink query, FTLE field (finite-time Lyapunov exponent field) calculation, and some other specially designed visualization and analysis methods. In the unsteady flow field (that is, the velocity field changes with time), the most common integral curve is the trace (place a massless particle (called the initial seed point) at a certain position in the flow field, let it be in the velocity field motion, the formed trajectory is a trajectory); in a steady flow field (that is, the velocity field does not change with time), it corresponds to a streamline (the curve tangent to the velocity vector at each point in the flow field is called a flow Wire). In actual calculation, the trace and streamline are obtained by numerical integration, so they are called integral curves.

常见的流场可视化方法通常根据需要在不同的时间和位置放置种子点,并计算大量的迹线。对于较大的流场数据,这个计算过程花费大量的时间代价,并且由于计算所得的迹线数据量太大,通常会将作为中间结果的迹线丢弃,这样更加造成计算资源的浪费。为了克服现有技术的不足,本发明提供一种流场积分曲线的复用方法及系统。Common flow field visualization methods usually place seed points at different times and locations as needed, and calculate a large number of traces. For large flow field data, this calculation process takes a lot of time, and because the amount of calculated trace data is too large, the trace as an intermediate result is usually discarded, which causes a waste of computing resources. In order to overcome the deficiencies of the prior art, the present invention provides a method and system for multiplexing flow field integral curves.

发明内容Contents of the invention

针对现有技术中存在的缺陷,本发明的目的在于提供一种流场积分曲线的复用方法及系统,通过该方法及系统,能够有效提高流场数据分析或可视化应用时积分曲线的获取效率。Aiming at the defects existing in the prior art, the object of the present invention is to provide a method and system for multiplexing flow field integral curves, through which the acquisition efficiency of flow field data analysis or visualization applications can be effectively improved .

为实现上述目的,本发明采用的技术方案为:一种流场积分曲线的复用方法,包括以下步骤:In order to achieve the above object, the technical solution adopted in the present invention is: a method for multiplexing flow field integral curves, comprising the following steps:

(1)获取流场数据的空间网格结构;(1) Obtain the spatial grid structure of the flow field data;

(2)在所述空间网格结构的所有网格点上放置初始种子点,计算每个种子点的积分曲线,并将所述积分曲线保存在存储设备;所述积分曲线为迹线或流线;(2) Place initial seed points on all grid points of the spatial grid structure, calculate the integral curve of each seed point, and store the integral curve in a storage device; the integral curve is a trace or a stream Wire;

(3)对所述流场数据进行分析或可视化应用时,在所述存储设备中直接调用所需要的对应网格点位置处的初始种子点的积分曲线。(3) When analyzing or visualizing the flow field data, directly call the required integral curve of the initial seed point corresponding to the grid point position in the storage device.

进一步,如上所述的一种流场积分曲线的复用方法,步骤(1)中,所述空间网格结构为规则网格,当获取的流场数据的空间网格结构为非规则网格时,在非规则网格的基础上,构建流场数据的规则空间网格结构;所述规则网格为二维规则网格或三维规则网格。Further, in a method for multiplexing flow field integral curves as described above, in step (1), the spatial grid structure is a regular grid, and when the spatial grid structure of the acquired flow field data is an irregular grid When , on the basis of the irregular grid, a regular spatial grid structure of the flow field data is constructed; the regular grid is a two-dimensional regular grid or a three-dimensional regular grid.

进一步,如上所述的一种流场积分曲线的复用方法,步骤(2)中,将所述积分曲线保存在存储设备,包括:Further, a method for multiplexing the integral curve of the flow field as described above, in step (2), storing the integral curve in a storage device, including:

2.1)将所述空间网格结构的空间区域进行划分,划分为多个子空间;2.1) dividing the spatial region of the spatial grid structure into a plurality of subspaces;

2.2)建立每个子空间的索引,将每个子空间中所包含的初始种子点对应的积分曲线与其子空间的索引关联保存于存储设备中。2.2) Establish the index of each subspace, and store the integral curve corresponding to the initial seed point contained in each subspace in association with the index of the subspace in the storage device.

进一步,如上所述的一种流场积分曲线的复用方法,当所述空间网格结构为二维规则网格时,将所述积分曲线保存在存储设备,包括:Further, a method for multiplexing the flow field integral curve as described above, when the spatial grid structure is a two-dimensional regular grid, storing the integral curve in a storage device includes:

1)以所述二维规则网格的整个区域作为四叉树的根节点,建立二维空间网格的四叉树结构,将所述二维规则网格的空间划分为多个二维子空间,四叉树结构的每个叶子节点对应一个二维子空间;1) With the whole region of the two-dimensional regular grid as the root node of the quadtree, set up the quadtree structure of the two-dimensional spatial grid, and divide the space of the two-dimensional regular grid into a plurality of two-dimensional sub-trees Space, each leaf node of the quadtree structure corresponds to a two-dimensional subspace;

2)建立四叉树结构的每一个叶子节点的索引,将每一个叶子节点对应的二维子空间所包含的初始种子点对应的积分曲线与其节点索引关联保存于存储设备中;2) Establish the index of each leaf node of the quadtree structure, and store the integral curve corresponding to the initial seed point corresponding to the two-dimensional subspace corresponding to each leaf node and its node index in the storage device;

当所述空间网格结构为三维规则网格时,将所述积分曲线保存在存储设备,包括:When the spatial grid structure is a three-dimensional regular grid, storing the integral curve in a storage device includes:

①以所述三维规则网格的整个区域作为八叉树的根节点,建立三维规则网格的八叉树结构,将所述三维规则网格的空间划分为多个三维子空间,八叉树结构的每一个叶子节点对应一个三维子空间;1. using the entire area of the three-dimensional regular grid as the root node of the octree, set up the octree structure of the three-dimensional regular grid, and divide the space of the three-dimensional regular grid into multiple three-dimensional subspaces, the octree Each leaf node of the structure corresponds to a three-dimensional subspace;

②建立八叉树结构中每一个叶子节点的索引,将每一个叶子节点所对应的三维子空间中所包含的初始种子点对应的积分曲线与其节点索引关联保存在存储设备中。②Establish the index of each leaf node in the octree structure, and store the integral curve corresponding to the initial seed point contained in the three-dimensional subspace corresponding to each leaf node and its node index in the storage device.

进一步,如上所述的一种流场积分曲线的复用方法,步骤(2)中,将初始种子点对应的积分曲线压缩后保存在存储设备中。Furthermore, in the method for multiplexing the integral curve of the flow field as described above, in step (2), the integral curve corresponding to the initial seed point is compressed and stored in the storage device.

进一步,如上所述的一种流场积分曲线的复用方法,将所述空间网格结构的空间区域划分为多个子空间,包括:Further, a method for multiplexing flow field integral curves as described above divides the spatial region of the spatial grid structure into multiple subspaces, including:

a.设置积分曲线的压缩比阈值;a. Set the compression ratio threshold of the integral curve;

b.将所述空间网格结构进行初次划分,得到若干个子空间;b. dividing the space grid structure for the first time to obtain several subspaces;

c.将每个子空间再次划分为M个子空间;c. Divide each subspace into M subspaces again;

d.对于每一个再次划分的子空间,将划分前的子空间中所包含的初始种子点对应的积分曲线进行压缩,压缩后的字节数记为N1,将划分后的M子空间中所包含的初始种子点对应的积分曲线分别进行压缩,M个压缩后字节数之和记为N2,判断N1与N2的比值是否小于或等于压缩比阈值,若是,则所述二维规则网格或三维规则网格的空间划分完成,再次划分前的划分结果为最终划分结果,若否,则返回步骤c。d. For each re-divided subspace, compress the integral curve corresponding to the initial seed point contained in the subspace before the division, and record the number of bytes after compression as N1. The integral curves corresponding to the initial seed points included are respectively compressed, and the sum of M compressed bytes is recorded as N2, and it is judged whether the ratio of N1 to N2 is less than or equal to the compression ratio threshold, and if so, the two-dimensional regular grid Or the space division of the three-dimensional regular grid is completed, the division result before the second division is the final division result, if not, return to step c.

进一步,如上所述的一种流场积分曲线的复用方法,步骤(3)中,在所述存储设备中直接调用所需要的对应网格点对应位置处的初始种子点的积分曲线,包括:Further, a method for multiplexing the integral curve of the flow field as described above, in step (3), the integral curve of the initial seed point at the corresponding position of the required corresponding grid point is directly called in the storage device, including :

3.1)确定进行分析或可视化应用所指定的流场数据空间区域,以及在所述空间区域中放置初始种子点的空间密度;3.1) determining the flow field data spatial region specified for the analysis or visualization application, and the spatial density of initial seed points placed in the spatial region;

3.2)在空间网格结构的所有子空间中查找与所述空间区域相交的子空间;3.2) Find the subspace intersecting with the spatial region in all subspaces of the spatial grid structure;

3.3)根据所述与所述空间区域相交的子空间的索引查找存储设备中关联保存的积分曲线;3.3) according to the index of the subspace intersecting with the space region, look up the integral curve associated and stored in the storage device;

3.4)根据所述空间密度在查找到的积分曲线中提取出对应的积分曲线。3.4) Extract the corresponding integral curve from the searched integral curve according to the space density.

一种流场积分曲线的复用系统,包括:A multiplexing system for flow field integral curves, comprising:

空间网格结构获取模块,用于获取流场数据的空间网格结构;The spatial grid structure acquisition module is used to acquire the spatial grid structure of the flow field data;

积分曲线计算模块,用于在所述空间网格结构的所有网格点上放置初始种子点,计算每个种子点的积分曲线;所述积分曲线为迹线或流线;An integral curve calculation module, configured to place initial seed points on all grid points of the spatial grid structure, and calculate the integral curve of each seed point; the integral curve is a trace or a streamline;

积分曲线保存模块,用于将所述积分曲线保存在存储设备中;An integral curve saving module, configured to store the integral curve in a storage device;

积分曲线调用模块,用于对所述流场数据进行分析或可视化应用时,在所述存储设备中直接调用所需要的对应网格点位置处的初始种子点的积分曲线。The integral curve calling module is used to directly call the required integral curve of the initial seed point corresponding to the grid point position in the storage device when analyzing or visualizing the flow field data.

进一步,如上所述的一种流场积分曲线的复用系统,所述积分曲线保存模块包括:Further, in the multiplexing system of flow field integral curves as described above, the integral curve preservation module includes:

空间网格划分单元,用于将所述空间网格结构的空间区域进行划分,划分为多个子空间;a spatial grid division unit, configured to divide the spatial area of the spatial grid structure into multiple subspaces;

曲线关联存储单元,用于建立每个子空间的索引,将每个子空间中所包含的初始种子点对应的积分曲线与其子空间的索引关联保存于存储设备中。The curve association storage unit is used to establish the index of each subspace, and store the integral curve corresponding to the initial seed point contained in each subspace in association with the index of the subspace in the storage device.

进一步,如上所述的一种流场积分曲线的复用系统,当所述空间网格结构为二维规则网格时,所述空间网格划分单元,包括:Further, in the above-mentioned multiplexing system of flow field integral curves, when the spatial grid structure is a two-dimensional regular grid, the spatial grid division unit includes:

第一网格划分子单元,用于以二维规则网格的整个区域作为四叉树的根节点,建立二维空间网格的四叉树结构,将所述二维规则网格的空间划分为多个二维子空间,四叉树结构的每个叶子节点对应一个二维子空间;The first grid division subunit is used to use the entire area of the two-dimensional regular grid as the root node of the quadtree to establish a quadtree structure of the two-dimensional spatial grid, and divide the space of the two-dimensional regular grid For multiple two-dimensional subspaces, each leaf node of the quadtree structure corresponds to a two-dimensional subspace;

所述曲线关联存储单元包括:The curve associated storage unit includes:

第一关联存储子单元,用于建立四叉树结构的每一个叶子节点的索引,将每一个叶子节点对应的二维子空间所包含的初始种子点对应的积分曲线与其节点索引关联保存于存储设备中;The first associative storage subunit is used to establish the index of each leaf node of the quadtree structure, and store the integral curve corresponding to the initial seed point contained in the two-dimensional subspace corresponding to each leaf node and its node index in the storage equipment;

当所述空间网格结构为三维规则网格时,所述空间网格划分单元,包括:When the spatial grid structure is a three-dimensional regular grid, the spatial grid division unit includes:

第二网格划分子单元,用于以所述三维规则网格的整个区域作为八叉树的根节点,建立三维规则网格的八叉树结构,将所述三维规则网格的空间划分为多个三维子空间,八叉树结构的每一个叶子节点对应一个三维子空间;The second grid division subunit is used to use the entire area of the three-dimensional regular grid as the root node of the octree to establish an octree structure of the three-dimensional regular grid, and divide the space of the three-dimensional regular grid into Multiple three-dimensional subspaces, each leaf node of the octree structure corresponds to a three-dimensional subspace;

所述曲线关联存储单元包括:The curve associated storage unit includes:

第二关联存储子单元,用于建立八叉树结构中每一个叶子节点的索引,将每一个叶子节点所对应的三维子空间中所包含的初始种子点对应的积分曲线与其节点索引关联保存在存储设备中。The second associative storage subunit is used to establish the index of each leaf node in the octree structure, and the integral curve corresponding to the initial seed point contained in the three-dimensional subspace corresponding to each leaf node is stored in association with its node index. in the storage device.

进一步,如上所述的一种流场积分曲线的复用系统,所述积分曲线保存模块还包括:Further, in the multiplexing system of the integral curve of the flow field as described above, the integral curve preservation module further includes:

积分曲线压缩单元,用于将初始种子点对应的积分曲线压缩后保存在存储设备中。The integral curve compression unit is configured to compress the integral curve corresponding to the initial seed point and save it in the storage device.

进一步,如上所述的一种流场积分曲线的复用系统,所述空间网格划分单元包括:Further, in the above-mentioned multiplexing system of flow field integral curves, the space grid division unit includes:

初次划分子单元,用于将所述空间网格结构进行初次划分,得到若干个子空间;Dividing the subunits for the first time is used to divide the space grid structure for the first time to obtain several subspaces;

再次划分子单元,用于将初次划分子单元划分得到的每个子空间再次划分为M个子空间;Dividing subunits again is used to divide each subspace obtained by dividing the subunits for the first time into M subspaces again;

划分结果确定子单元,用于对于每一个再次划分的子空间,判断将划分前的子空间中所包含的初始种子点对应的积分曲线进行压缩后的字节数N1与将划分后的M子空间中所包含的初始种子点对应的积分曲线分别进行压缩后的M个压缩后的字节数之和N2的比值是否小于或等于压缩比阈值,若是,则所述二维规则网格或三维规则网格的空间划分完成,再次划分前的划分结果为最终划分结果,若否,则进入再次划分子单元。The division result determination subunit is used to determine the number of bytes N1 after compressing the integral curve corresponding to the initial seed point contained in the subspace before division and the M subspace after division for each subspace divided again. Whether the ratio of the sum N2 of the M compressed bytes corresponding to the integral curves corresponding to the initial seed points contained in the space is less than or equal to the compression ratio threshold, if so, the two-dimensional regular grid or the three-dimensional The space division of the regular grid is completed, and the division result before the second division is the final division result. If not, enter the second division subunit.

进一步,如上所述的一种流场积分曲线的复用系统,所述积分曲线调用模块包括:Further, in the multiplexing system of flow field integral curves as described above, the integral curve calling module includes:

待分析区域确定单元,用于确定进行分析或可视化应用所指定的流场数据空间区域,以及在所述空间区域中放置初始种子点的空间密度;The area-to-be-analyzed determination unit is used to determine the flow field data spatial area specified by the analysis or visualization application, and the spatial density of initial seed points placed in the spatial area;

子空间确定单元,用于在空间网格结构的子空间中查找与所述空间区域相交的子空间;a subspace determining unit, configured to search for a subspace intersecting the spatial region in the subspace of the spatial grid structure;

积分曲线查找单元,用于根据所述与所述空间区域相交的子空间的索引查找存储设备中关联保存的积分曲线;An integral curve search unit, configured to search for an associated integral curve stored in a storage device according to the index of the subspace intersecting the spatial region;

积分曲线提取单元,用于根据所述空间密度在查找到的积分曲线中提取出对应的积分曲线。An integral curve extracting unit, configured to extract a corresponding integral curve from the found integral curves according to the space density.

本发明的有益效果在于:本发明所提供的流场积分曲线的复用方法及系统,通过预先计算足够多的积分曲线并保存下来,在之后的流场数据分析或可视化应用中,直接根据流场分析或可视化应用指定的区域空间,即可快速的获取到对应子空间内对应种子点的积分曲线,极大地较少了积分曲线的获取时间,提高了处理效率,尤其适用于大规模流场数据的分析及可视化处理。The beneficial effects of the present invention are: the multiplexing method and system of the flow field integral curve provided by the present invention, by pre-calculating and saving enough integral curves, in the subsequent flow field data analysis or visualization application, directly according to the flow In the area space specified by field analysis or visualization application, the integral curve of the corresponding seed point in the corresponding subspace can be quickly obtained, which greatly reduces the acquisition time of the integral curve and improves the processing efficiency, especially suitable for large-scale flow fields Data analysis and visualization.

附图说明Description of drawings

图1为具体实施方式中提供的一种流场积分曲线的复用方法的流程图;Fig. 1 is a flow chart of a method for multiplexing a flow field integral curve provided in the specific embodiment;

图2为具体实施方式中流场数据的空间网格结构划分的流程图;Fig. 2 is the flowchart of the spatial grid structure division of flow field data in the specific embodiment;

图3为具体实施方式中提供的一种流场积分曲线的复用系统的结构框图;Fig. 3 is a structural block diagram of a multiplexing system of a flow field integral curve provided in the specific embodiment;

图4为具体实施方式中积分曲线保存模块的结构框图;Fig. 4 is the structural block diagram of integral curve preservation module in the specific embodiment;

图5为具体实施方式中空间网格划分单元的结构框图;Fig. 5 is the structural block diagram of the spatial grid division unit in the specific embodiment;

图6为实施例中三维规则网格结构及初始种子点的放置示意图。Fig. 6 is a schematic diagram of the three-dimensional regular grid structure and the placement of initial seed points in the embodiment.

具体实施方式detailed description

下面结合说明书附图与具体实施方式对本发明做进一步的详细说明。The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

本发明所提供的流场积分曲线的复用方法及系统,基本思路是预先计算后续需要分析的流场数据的足够多的积分曲线并存储下来,在之后的分析或可视化中,直接从所存的数据中提取所需的积分曲线即可。The basic idea of the method and system for multiplexing flow field integral curves provided by the present invention is to pre-calculate and store enough integral curves of the flow field data that need to be analyzed later, and to use them directly from the stored data in subsequent analysis or visualization. The required integral curve can be extracted from the data.

图1示出了本实施方式中提供的一种流场积分曲线的复用方法的流程图,由图中可以看出,该方法主要可以包括以下三个步骤:Fig. 1 shows a flow chart of a method for multiplexing a flow field integral curve provided in this embodiment, as can be seen from the figure, the method may mainly include the following three steps:

步骤S100:获取流场数据的空间网格结构;Step S100: Obtain the spatial grid structure of the flow field data;

对于后续需要进行分析或者可视化应用的流场数据,首先获取其空间网格结构。一般来说,流场数据所定义的空间通常表示为二维或者三维规则网格,如直线网格(rectilinear grid)、矩形网格(erctilinear grid)等,也有可能是曲线网格(curvilinear grid)或者非结构网格(unstructured grid)。For the flow field data that needs to be analyzed or visualized later, its spatial grid structure is first obtained. Generally speaking, the space defined by the flow field data is usually expressed as a two-dimensional or three-dimensional regular grid, such as a rectilinear grid, a rectangular grid, etc., and may also be a curvilinear grid. Or an unstructured grid.

本实施方式中,所述空间网格结构为规则网格,当获取的流场数据的空间网格结构为非规则网格时,在非规则网格的基础上,构建流场数据的规则空间网格结构;所述规则网格为二维规则网格或三维规则网格。In this embodiment, the spatial grid structure is a regular grid, and when the acquired spatial grid structure of the flow field data is an irregular grid, the regular space of the flow field data is constructed on the basis of the irregular grid Grid structure; the regular grid is a two-dimensional regular grid or a three-dimensional regular grid.

如果流场数据本身就已经有规则网格结构,可以直接采用其规则网格结构即可,如果流场数据本身的网格结构为非规则网格,只要其数据本身所在的空间是三维空间,就可以构建一套流场数据的规则网格,具体构建方式采用现有流场数据的空间网格构建方式即可。If the flow field data itself already has a regular grid structure, you can directly use its regular grid structure. If the grid structure of the flow field data itself is an irregular grid, as long as the space where the data itself is located is a three-dimensional space, A set of regular grids of flow field data can be constructed, and the specific construction method can adopt the existing spatial grid construction method of flow field data.

步骤S200:在流场数据的空间网格结构的所有网格点上放置初始种子点,计算每个种子点的积分曲线并保存;Step S200: Place initial seed points on all grid points of the spatial grid structure of the flow field data, calculate and save the integral curve of each seed point;

在流场数据的空间网格结构的所有网格点上放置初始种子点,计算每个种子点的积分曲线,并将所述积分曲线保存在存储设备;所述积分曲线为迹线或流线。Place initial seed points on all grid points of the spatial grid structure of the flow field data, calculate the integral curve of each seed point, and save the integral curve in a storage device; the integral curve is a trace or a streamline .

所述积分曲线为初始种子点的迹线或流线,在非定常流场(即速度场随时间变化)中,最常见的积分曲线是迹线,在定常流场(即速度场不随时间变化)中,则对应为流线。所述初始种子点,即在流场中某位置放置一个无质量的质点,让其在速度场中运动,所形成的轨迹就是一条迹线或流线。The integral curve is the trace or streamline of the initial seed point. In an unsteady flow field (that is, the velocity field changes with time), the most common integral curve is a trace. In a steady flow field (that is, the velocity field does not change with time) ), it corresponds to the streamline. The initial seed point is to place a massless mass point at a certain position in the flow field, and let it move in the velocity field, and the trajectory formed is a trace or streamline.

本实施方式中,流场数据所定义的空间中密集地放置的初始种子点的积分曲线,轨迹应尽量长,直至种子点走出所定义的空间停止。积分曲线的计算方法采用现有的迹线或流线的计算方式或者使用已有的可视化工具来直接生成,在实际应用中,当流场数据较小时,可以在单台计算机上计算,当数据较大时,可以在集群环境下并行计算。In this embodiment, the trajectory of the integral curve of the densely placed initial seed points in the space defined by the flow field data should be as long as possible until the seed points go out of the defined space. The calculation method of the integral curve adopts the existing trajectory or streamline calculation method or uses the existing visualization tool to directly generate. In practical applications, when the flow field data is small, it can be calculated on a single computer. When the data When it is large, it can be calculated in parallel in a cluster environment.

本实施方式中,将所有初始种子点的积分曲线保存在存储设备的方式为:In this embodiment, the way of storing the integral curves of all initial seed points in the storage device is as follows:

1)将所述空间网格结构的空间区域进行划分,划分为多个子空间;1) dividing the spatial region of the spatial grid structure into multiple subspaces;

2)建立每个子空间的索引,将每个子空间中所包含的初始种子点对应的积分曲线与其子空间的索引关联保存于存储设备中。2) An index of each subspace is established, and the integral curve corresponding to the initial seed point contained in each subspace is associated with the index of the subspace and stored in the storage device.

通过该存储方式,在后续查找积分曲线时,只需要根据子空间的索引即可在存储设备中找到对应的节分曲线。Through this storage method, when the integral curve is searched subsequently, the corresponding nodal curve can be found in the storage device only according to the index of the subspace.

对于不同的空间网格结构,本实施方式提供了两种不同的积分曲线保存方式。当所述空间网格结构为二维规则网格时,将所述积分曲线保存在存储设备的具体方式为:For different spatial grid structures, this embodiment provides two different ways of saving integral curves. When the spatial grid structure is a two-dimensional regular grid, the specific way of storing the integral curve in the storage device is as follows:

1)以所述二维规则网格的整个区域作为四叉树的根节点,建立二维空间网格的四叉树结构,将所述二维规则网格的空间划分为多个二维子空间,四叉树结构的每个叶子节点对应一个二维子空间;1) With the whole region of the two-dimensional regular grid as the root node of the quadtree, set up the quadtree structure of the two-dimensional spatial grid, and divide the space of the two-dimensional regular grid into a plurality of two-dimensional sub-trees Space, each leaf node of the quadtree structure corresponds to a two-dimensional subspace;

2)建立四叉树结构的每一个叶子节点的索引,将每一个叶子节点对应的二维子空间所包含的初始种子点对应的积分曲线与其节点索引关联保存于存储设备中。2) Establishing the index of each leaf node of the quadtree structure, and storing the integral curve corresponding to the initial seed point contained in the two-dimensional subspace corresponding to each leaf node and its node index in a storage device.

当所述空间网格结构为三维规则网格时,将所述积分曲线保存在存储设备的具体方式为:When the spatial grid structure is a three-dimensional regular grid, the specific way of storing the integral curve in the storage device is as follows:

①以所述三维规则网格的整个区域作为八叉树的根节点,建立三维规则网格的八叉树结构,将所述三维规则网格的空间划分为多个三维子空间,八叉树结构的每一个叶子节点对应一个三维子空间;1. using the entire area of the three-dimensional regular grid as the root node of the octree, set up the octree structure of the three-dimensional regular grid, and divide the space of the three-dimensional regular grid into multiple three-dimensional subspaces, the octree Each leaf node of the structure corresponds to a three-dimensional subspace;

②建立八叉树结构中每一个叶子节点的索引,将每一个叶子节点所对应的三维子空间中所包含的初始种子点对应的积分曲线与其节点索引关联保存在存储设备中。②Establish the index of each leaf node in the octree structure, and store the integral curve corresponding to the initial seed point contained in the three-dimensional subspace corresponding to each leaf node and its node index in the storage device.

由于需要计算的初始种子点的积分曲线通常是原始流场数据的数百或数千倍,为了保证所有的流场积分曲线都能够存储下来,本实施方式中,在将积分曲线保存在存储设备时,首先对初始种子点对应的积分曲线进行压缩处理,再将压缩后的结果与子空间的索引(或节点索引)关联存储。Since the integral curve of the initial seed point that needs to be calculated is usually hundreds or thousands of times of the original flow field data, in order to ensure that all flow field integral curves can be stored, in this embodiment, the integral curve is stored in the storage device When , the integral curve corresponding to the initial seed point is firstly compressed, and then the compressed result is stored in association with the subspace index (or node index).

在实际应用中,具体的积分曲线的压缩方式可以根据实际情况进行选择。例如,可以而将每个子空间中所包含的初始种子点对应的积分曲线一起进行压缩,也可以子空间中所包含的每个初始种子点对应的积分曲线一一进行压缩,将压缩后的结果进行合并后再压缩。具体的压缩算法也可以根据需要选择,可以使用参数曲线对积分曲线进行拟合的压缩方法,如贝塞尔曲线拟合为;也可以是针对任意浮点数数组的压缩算法,如fpzip算法,当然也可以是多种压缩算法组合使用。为了减少由于压缩造成的积分曲线对应的初始种子点在网格中的位置误差,在进行曲线压缩时,一般需要设置压缩误差上限。In practical applications, the specific compression method of the integral curve can be selected according to the actual situation. For example, the integral curves corresponding to the initial seed points contained in each subspace can be compressed together, or the integral curves corresponding to each initial seed point contained in the subspace can be compressed one by one, and the compressed result Merge and then compress. The specific compression algorithm can also be selected according to the needs, and the compression method that can use the parameter curve to fit the integral curve, such as Bezier curve fitting is; it can also be a compression algorithm for any floating-point number array, such as the fpzip algorithm, of course Multiple compression algorithms can also be used in combination. In order to reduce the position error of the initial seed point corresponding to the integral curve in the grid due to compression, it is generally necessary to set the upper limit of the compression error when performing curve compression.

对于流场数据的空间网格结构的划分,如果子空间的个数越少,每个子空间中所包含的初始种子点越多,对应的积分曲线也就越多,进行压缩时压缩效果越好(压缩后的字节数更少),但是在后续调用需要的积分曲线时,解压缩的时候会更慢,为了平衡这两方面,本实施方式中还提供了一种空间网格结构的划分方式,该方式如图2所示,流程如下:For the division of the spatial grid structure of the flow field data, if the number of subspaces is small, the initial seed points contained in each subspace are more, the corresponding integral curves are more, and the compression effect is better when performing compression. (The number of bytes after compression is less), but when the integral curve required is called later, the decompression will be slower. In order to balance these two aspects, this embodiment also provides a division of the spatial grid structure The method is shown in Figure 2, and the process is as follows:

a.设置积分曲线的压缩比阈值;所述压缩比阈值为经验值。a. Set the compression ratio threshold of the integral curve; the compression ratio threshold is an empirical value.

b.将所述空间网格结构进行初次划分,得到若干个子空间;b. dividing the space grid structure for the first time to obtain several subspaces;

c.将每个子空间再次划分为M个子空间;c. Divide each subspace into M subspaces again;

d.对于每一个再次划分的子空间,将划分前的子空间中所包含的初始种子点对应的积分曲线进行压缩,压缩后的字节数记为N1,将划分后的M子空间中所包含的初始种子点对应的积分曲线分别进行压缩,M个压缩后字节数之和记为N2,判断N1与N2的比值是否小于或等于压缩比阈值,若是,则所述二维规则网格或三维规则网格的空间划分完成,再次划分前的划分结果为最终划分结果,若否,则返回步骤c。d. For each re-divided subspace, compress the integral curve corresponding to the initial seed point contained in the subspace before the division, and record the number of bytes after compression as N1. The integral curves corresponding to the initial seed points included are respectively compressed, and the sum of M compressed bytes is recorded as N2, and it is judged whether the ratio of N1 to N2 is less than or equal to the compression ratio threshold, and if so, the two-dimensional regular grid Or the space division of the three-dimensional regular grid is completed, the division result before the second division is the final division result, if not, return to step c.

该方式通过判断一个子空间划分前的空间中所包含的所有初始种子点对应的积分曲线压缩后的字节数与将该子空间划分后对应的所有子空间对应的积分曲线分别压缩后的若干个字节数之和的比值与设定的压缩比阈值之间的关系,确定出是否需要在对子空间继续进行划分。This method judges the number of compressed bytes of integral curves corresponding to all initial seed points contained in the space before a subspace is divided and the number of compressed integral curves corresponding to all subspaces corresponding to the subspace after division. The relationship between the ratio of the sum of the number of bytes and the set compression ratio threshold determines whether it is necessary to continue dividing the subspace.

例如,对于上述三位规则网格采用八叉树结构进行划分时,首先将真个三维网格空间划分为8个第一子空间,分别记为空间S1-S8,之后通过上述方式判断是否需要对8个第一子空间再次进行划分,例如对于空间S1,首先将其再次划分为S11-S18,对S1中所包含的初始种子点对应的积分曲线进行压缩,压缩后的字节数记为T1,对S11-S18分别进行压缩,将8个压缩后的字节数相加得到T2,如果T1/T2≤压缩比阈值T,则判定空间S1不需要在划分成S11-S18。For example, when the octree structure is used to divide the above-mentioned three-dimensional regular grid, the real three-dimensional grid space is firstly divided into 8 first subspaces, which are respectively recorded as spaces S1-S8, and then it is judged whether it is necessary to Divide the 8 first subspaces again. For example, for space S1, first divide it into S11-S18 again, compress the integral curve corresponding to the initial seed point contained in S1, and record the number of compressed bytes as T1, respectively compress S11-S18, and add up the 8 compressed bytes to get T2. If T1/T2≤compression ratio threshold T, it is determined that space S1 does not need to be divided into S11-S18.

步骤S300:在存储设备中直接调用所需要的积分曲线,完成流场数据的分析或可视化应用。Step S300: directly call the required integral curve in the storage device, and complete the analysis or visualization application of the flow field data.

对所述流场数据进行分析或可视化应用时,在所述存储设备中直接调用所需要的对应网格点位置处的初始种子点的积分曲线。When analyzing or visualizing the flow field data, the required integral curve of the initial seed point corresponding to the grid point position is directly called in the storage device.

本实施方式中,在所述存储设备中直接调用所需要的对应网格点对应位置处的初始种子点的积分曲线的具体方式为:In this embodiment, the specific method of directly calling the integral curve of the initial seed point at the corresponding position of the required corresponding grid point in the storage device is as follows:

1)确定进行分析或可视化应用所指定的流场数据空间区域,以及在所述空间区域中放置初始种子点的空间密度;空间密度是指每隔几个网格点放置一个初始种子点;1) Determine the specified flow field data spatial region for analysis or visualization application, and place the spatial density of initial seed points in the spatial region; spatial density refers to placing an initial seed point every few grid points;

2)在空间网格结构的所有子空间中查找与所述空间区域相交的子空间;两个空间区域相交就是指两个空间有相交的部分,对于二维网格区间,就是平面区域有相交的部分,对于三维网格区间,就是指长方体有相交的部分;2) Find the subspace intersecting with the space region in all subspaces of the spatial grid structure; the intersection of two space regions means that the two spaces have intersecting parts, and for the two-dimensional grid interval, it means that the plane regions intersect The part of , for the three-dimensional grid interval, refers to the intersecting part of the cuboid;

3)根据所述与所述空间区域相交的子空间的索引查找存储设备中关联保存的积分曲线;3) according to the index of the subspace that intersects with the space region, look up the integral curve associated and stored in the storage device;

4)根据所述空间密度在查找到的积分曲线中提取出对应的积分曲线。4) Extracting a corresponding integral curve from the found integral curves according to the space density.

当然,如果积分曲线是压缩后保存在存储设备中的,需要首先根据子空间的索引在存储设备中查找到对应的压缩数据,然后解压缩后再提取出对应的积分曲线。Of course, if the integral curve is compressed and stored in the storage device, it is necessary to first find the corresponding compressed data in the storage device according to the index of the subspace, and then extract the corresponding integral curve after decompression.

其中,对流场数据的可视化应用包括但不限于积分曲线的直接渲染、源汇查询、FTLE场(有限时间李亚普诺夫指数场)计算、以及其他一些专门设计的可视化与分析方法。Among them, the visualization application of flow field data includes but not limited to direct rendering of integral curve, source-sink query, FTLE field (finite-time Lyapunov exponent field) calculation, and some other specially designed visualization and analysis methods.

采用本发明所提供的方法,能够大大提高流场数据积分曲线的获取效率能在资源有限的情况下处理大规模流场数据。By adopting the method provided by the invention, the acquisition efficiency of flow field data integral curves can be greatly improved, and large-scale flow field data can be processed under the condition of limited resources.

与图1中所示的方法相对应,本实施方式中还提供了一种流场积分曲线的复用系统,如图3所示,该系统包括空间网格结构获取模块100、积分曲线计算模块200、积分曲线保存模块300和积分曲线调用模块400。其中:Corresponding to the method shown in FIG. 1 , this embodiment also provides a multiplexing system of flow field integral curves. As shown in FIG. 3 , the system includes a spatial grid structure acquisition module 100 and an integral curve calculation module 200 . The integral curve saving module 300 and the integral curve calling module 400 . in:

空间网格结构获取模块100,用于获取流场数据的空间网格结构;The spatial grid structure acquisition module 100 is used to acquire the spatial grid structure of the flow field data;

积分曲线计算模块200,用于在所述空间网格结构的所有网格点上放置初始种子点,计算每个种子点的积分曲线;所述积分曲线为迹线或流线;An integral curve calculation module 200, configured to place initial seed points on all grid points of the spatial grid structure, and calculate the integral curve of each seed point; the integral curve is a trace or a streamline;

积分曲线保存模块300,用于将所述积分曲线保存在存储设备中;An integral curve saving module 300, configured to store the integral curve in a storage device;

积分曲线调用模块400,用于对所述流场数据进行分析或可视化应用时,在所述存储设备中直接调用所需要的对应网格点位置处的初始种子点的积分曲线。The integral curve calling module 400 is used for directly calling the required integral curve of the initial seed point corresponding to the grid point position in the storage device when analyzing or visualizing the flow field data.

本实施方式中,所述积分曲线保存模块300可以包括空间网格划分单元310和曲线关联存储单元320。In this embodiment, the integral curve saving module 300 may include a space grid division unit 310 and a curve association storage unit 320 .

空间网格划分单元310,用于将所述空间网格结构的空间区域进行划分,划分为多个子空间;A spatial grid division unit 310, configured to divide the spatial area of the spatial grid structure into a plurality of subspaces;

曲线关联存储单元320,用于建立每个子空间的索引,将每个子空间中所包含的初始种子点对应的积分曲线与其子空间的索引关联保存于存储设备中。The curve association storage unit 320 is configured to establish an index of each subspace, and store the integral curve corresponding to the initial seed point contained in each subspace in association with the index of the subspace in the storage device.

当流场数据的空间网格结构为二维规则网格时,所述空间网格划分单元310可以包括第一网格划分子单元311,所述曲线关联存储单元320可以包括第一关联存储子单元321。当所述空间网格结构为三维规则网格时,所述空间网格划分单元310可以包括第二网格划分子单元312,所述曲线关联存储单元320可以包括第二关联存储子单元322。如图4所示。When the spatial grid structure of the flow field data is a two-dimensional regular grid, the spatial grid division unit 310 may include a first grid division subunit 311, and the curve association storage unit 320 may include a first association storage subunit Unit 321. When the spatial grid structure is a three-dimensional regular grid, the spatial grid division unit 310 may include a second grid division subunit 312 , and the curve association storage unit 320 may include a second association storage subunit 322 . As shown in Figure 4.

第一网格划分子单元311,用于以二维规则网格的整个区域作为四叉树的根节点,建立二维空间网格的四叉树结构,将所述二维规则网格的空间划分为多个二维子空间,四叉树结构的每个叶子节点对应一个二维子空间;The first grid division subunit 311 is used to use the entire area of the two-dimensional regular grid as the root node of the quadtree to establish a quadtree structure of the two-dimensional spatial grid, and divide the space of the two-dimensional regular grid Divided into multiple two-dimensional subspaces, each leaf node of the quadtree structure corresponds to a two-dimensional subspace;

第一关联存储子单元321,用于建立四叉树结构的每一个叶子节点的索引,将每一个叶子节点对应的二维子空间所包含的初始种子点对应的积分曲线与其节点索引关联保存于存储设备中。The first associative storage subunit 321 is used to establish the index of each leaf node of the quadtree structure, and store the integral curve corresponding to the initial seed point corresponding to the two-dimensional subspace corresponding to each leaf node and its node index in in the storage device.

第二网格划分子单元312,用于以所述三维规则网格的整个区域作为八叉树的根节点,建立三维规则网格的八叉树结构,将所述三维规则网格的空间划分为多个三维子空间,八叉树结构的每一个叶子节点对应一个三维子空间;The second grid division subunit 312 is used to use the entire area of the three-dimensional regular grid as the root node of the octree to establish an octree structure of the three-dimensional regular grid, and divide the space of the three-dimensional regular grid For multiple three-dimensional subspaces, each leaf node of the octree structure corresponds to a three-dimensional subspace;

第二关联存储子单元322,用于建立八叉树结构中每一个叶子节点的索引,将每一个叶子节点所对应的三维子空间中所包含的初始种子点对应的积分曲线与其节点索引关联保存在存储设备中。The second associative storage subunit 322 is used to establish the index of each leaf node in the octree structure, and store the integral curve corresponding to the initial seed point contained in the three-dimensional subspace corresponding to each leaf node in association with its node index in the storage device.

所述积分曲线保存模块还可以包括积分曲线压缩单元330。The integral curve saving module may also include an integral curve compression unit 330 .

积分曲线压缩单元330,用于将初始种子点对应的积分曲线压缩后保存在存储设备中。The integral curve compression unit 330 is configured to compress the integral curve corresponding to the initial seed point and store it in the storage device.

本实施方式中,所述空间网格划分单元310包括初次划分子单元3101、再次划分子单元3102和划分结果确定子单元3103,如图5所示。In this embodiment, the spatial grid division unit 310 includes a primary division subunit 3101 , a second division subunit 3102 and a division result determination subunit 3103 , as shown in FIG. 5 .

初次划分子单元3101,用于将所述空间网格结构进行初次划分,得到若干个子空间;The initial division subunit 3101 is used to divide the space grid structure for the first time to obtain several subspaces;

再次划分子单元3102,用于将初次划分子单元划分得到的每个子空间再次划分为M个子空间;Re-dividing the sub-unit 3102, used to divide each sub-space obtained by dividing the sub-unit for the first time into M sub-spaces again;

划分结果确定子单元3103,用于对于每一个再次划分的子空间,判断将划分前的子空间中所包含的初始种子点对应的积分曲线进行压缩后的字节数N1与将划分后的M子空间中所包含的初始种子点对应的积分曲线分别进行压缩后的M个压缩后的字节数之和N2的比值是否小于或等于压缩比阈值,若是,则所述二维规则网格或三维规则网格的空间划分完成,再次划分前的划分结果为最终划分结果,若否,则进入再次划分子单元3102。The division result determination subunit 3103 is used to determine the number of bytes N1 after compressing the integral curve corresponding to the initial seed point contained in the subspace before division and the M after division for each subspace divided again. Whether the integral curve corresponding to the initial seed point contained in the subspace is respectively compressed and whether the ratio of the sum N2 of the M compressed bytes is less than or equal to the compression ratio threshold, if so, the two-dimensional regular grid or The space division of the three-dimensional regular grid is completed, and the division result before the second division is the final division result; if not, enter the second division subunit 3102 .

所述积分曲线调用模块400可以包括待分析区域确定单元410、子空间确定单元420、积分曲线查找单元430和积分曲线提取单元440。The integral curve calling module 400 may include a region to be analyzed determination unit 410 , a subspace determination unit 420 , an integral curve search unit 430 and an integral curve extraction unit 440 .

待分析区域确定单元410,用于确定进行分析或可视化应用所指定的流场数据空间区域,以及在所述空间区域中放置初始种子点的空间密度;The region to be analyzed determining unit 410, configured to determine the flow field data spatial region specified by the analysis or visualization application, and place the initial seed point spatial density in the spatial region;

子空间确定单元420,用于在空间网格结构的子空间中查找与所述空间区域相交的子空间;A subspace determining unit 420, configured to search for a subspace intersecting the spatial region in the subspace of the spatial grid structure;

积分曲线查找单元430,用于根据所述与所述空间区域相交的子空间的索引查找存储设备中关联保存的积分曲线;An integral curve search unit 430, configured to search for an associated stored integral curve in a storage device according to the index of the subspace intersecting the spatial region;

积分曲线提取单元440,用于根据所述空间密度在查找到的积分曲线中提取出对应的积分曲线。The integral curve extraction unit 440 is configured to extract a corresponding integral curve from the found integral curves according to the spatial density.

为更好的理解本发明,下面结合具体实施例对本发明进行进一步说明。In order to better understand the present invention, the present invention will be further described below in conjunction with specific examples.

实施例Example

本实施例中的流场数据为飓风伊莎贝尔数据,飓风伊莎贝尔数据的空间网格结构定义在500×500×100的三维空间网格上,如图6所示。The flow field data in this embodiment is Hurricane Isabel data, and the spatial grid structure of Hurricane Isabel data is defined on a 500×500×100 three-dimensional spatial grid, as shown in FIG. 6 .

首先,在三维空间网格的所有网格点上放置初始种子点,如图6中网格点出的圆点所示,让这些种子点在飓风伊莎贝尔数据的速度场中运动,并计算出每个种子点的积分曲线。First, place initial seed points on all grid points of the three-dimensional space grid, as shown by the circle points out of the grid points in Figure 6, let these seed points move in the velocity field of Hurricane Isabel data, and calculate each Integral curve of seed points.

之后,将整个三维空间区域作为八叉树的根节点,将三维空间网格按照八叉树结构划分为多个三维子空间,并设置每个三维子空间的索引,八叉树结构的每个叶子节点对应一个三维子空间(可以简单的看作一个长方体)Afterwards, the entire 3D space area is used as the root node of the octree, the 3D space grid is divided into multiple 3D subspaces according to the octree structure, and the index of each 3D subspace is set, each of the octree structure The leaf node corresponds to a three-dimensional subspace (it can be simply regarded as a cuboid)

将每个子空间中所包含的初始种子点对应的积分曲线进行压缩,压缩后的数据与子空间对应的叶子节点的索引关联。本实施例中将约160GB的积分曲线压缩至8GB,并将各积分曲线上种子点的位置误差(压缩误差)控制在1个格点以内。The integral curve corresponding to the initial seed point contained in each subspace is compressed, and the compressed data is associated with the index of the leaf node corresponding to the subspace. In this embodiment, the integral curve of about 160 GB is compressed to 8 GB, and the position error (compression error) of the seed point on each integral curve is controlled within 1 grid point.

之后用户可以启动多次针对该流场数据的分析或者可视化应用,根据八叉树结构中对应的叶子节点的索引,从压缩后的数据中解压缩提取所需的积分曲线即可。例如,有应用需要计算FTLE场,其需要在三个方向上每隔4个格点放置一个初始种子点,总共为125×125×25个种子点,此时,只需要从已经存储的数据中解压缩提取到对应位置处的种子点的积分曲线拿来进行后续FTLE场的计算即可,大大提高了处理效率。After that, the user can start multiple analysis or visualization applications for the flow field data, and decompress and extract the required integral curve from the compressed data according to the index of the corresponding leaf node in the octree structure. For example, if there is an application that needs to calculate the FTLE field, it needs to place an initial seed point every 4 grid points in three directions, a total of 125×125×25 seed points, at this time, only need to start from the stored data Decompress and extract the integral curve of the seed point at the corresponding position and use it to calculate the subsequent FTLE field, which greatly improves the processing efficiency.

显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其同等技术的范围之内,则本发明也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and equivalent technologies, the present invention also intends to include these modifications and variations.

Claims (13)

1.一种流场积分曲线的复用方法,包括以下步骤:1. A method for multiplexing a flow field integral curve, comprising the following steps: (1)获取流场数据的空间网格结构;(1) Obtain the spatial grid structure of the flow field data; (2)在所述空间网格结构的所有网格点上放置初始种子点,计算每个种子点的积分曲线,并将所述积分曲线保存在存储设备;所述积分曲线为迹线或流线;(2) Place initial seed points on all grid points of the spatial grid structure, calculate the integral curve of each seed point, and store the integral curve in a storage device; the integral curve is a trace or a stream Wire; (3)对所述流场数据进行分析或可视化应用时,在所述存储设备中直接调用所需要的对应网格点位置处的初始种子点的积分曲线。(3) When analyzing or visualizing the flow field data, directly call the required integral curve of the initial seed point corresponding to the grid point position in the storage device. 2.根据权利要求1所述的一种流场积分曲线的复用方法,其特征在于:步骤(1)中,所述空间网格结构为规则网格,当获取的流场数据的空间网格结构为非规则网格时,在非规则网格的基础上,构建流场数据的规则空间网格结构;所述规则网格为二维规则网格或三维规则网格。2. the multiplexing method of a kind of flow field integral curve according to claim 1, is characterized in that: in step (1), described spatial grid structure is regular grid, when the spatial network of the flow field data of acquisition When the grid structure is an irregular grid, a regular spatial grid structure of the flow field data is constructed on the basis of the irregular grid; the regular grid is a two-dimensional regular grid or a three-dimensional regular grid. 3.根据权利要求2所述的一种流场积分曲线的复用方法,其特征在于:步骤(2)中,将所述积分曲线保存在存储设备,包括:3. the multiplexing method of a kind of flow field integral curve according to claim 2, is characterized in that: in step (2), described integral curve is preserved in memory device, comprises: 2.1)将所述空间网格结构的空间区域进行划分,划分为多个子空间;2.1) dividing the spatial region of the spatial grid structure into a plurality of subspaces; 2.2)建立每个子空间的索引,将每个子空间中所包含的初始种子点对应的积分曲线与其子空间的索引关联保存于存储设备中。2.2) Establish the index of each subspace, and store the integral curve corresponding to the initial seed point contained in each subspace in association with the index of the subspace in the storage device. 4.根据权利要求3所述的一种流场积分曲线的复用方法,其特征在于:当所述空间网格结构为二维规则网格时,将所述积分曲线保存在存储设备,包括:4. The multiplexing method of a flow field integral curve according to claim 3, characterized in that: when the spatial grid structure is a two-dimensional regular grid, the integral curve is stored in a storage device, including : 1)以所述二维规则网格的整个区域作为四叉树的根节点,建立二维空间网格的四叉树结构,将所述二维规则网格的空间划分为多个二维子空间,四叉树结构的每个叶子节点对应一个二维子空间;1) With the whole region of the two-dimensional regular grid as the root node of the quadtree, set up the quadtree structure of the two-dimensional spatial grid, and divide the space of the two-dimensional regular grid into a plurality of two-dimensional sub-trees Space, each leaf node of the quadtree structure corresponds to a two-dimensional subspace; 2)建立四叉树结构的每一个叶子节点的索引,将每一个叶子节点对应的二维子空间所包含的初始种子点对应的积分曲线与其节点索引关联保存于存储设备中;2) Establish the index of each leaf node of the quadtree structure, and store the integral curve corresponding to the initial seed point corresponding to the two-dimensional subspace corresponding to each leaf node and its node index in the storage device; 当所述空间网格结构为三维规则网格时,将所述积分曲线保存在存储设备,包括:When the spatial grid structure is a three-dimensional regular grid, storing the integral curve in a storage device includes: ①以所述三维规则网格的整个区域作为八叉树的根节点,建立三维规则网格的八叉树结构,将所述三维规则网格的空间划分为多个三维子空间,八叉树结构的每一个叶子节点对应一个三维子空间;1. using the entire area of the three-dimensional regular grid as the root node of the octree, set up the octree structure of the three-dimensional regular grid, and divide the space of the three-dimensional regular grid into multiple three-dimensional subspaces, the octree Each leaf node of the structure corresponds to a three-dimensional subspace; ②建立八叉树结构中每一个叶子节点的索引,将每一个叶子节点所对应的三维子空间中所包含的初始种子点对应的积分曲线与其节点索引关联保存在存储设备中。②Establish the index of each leaf node in the octree structure, and store the integral curve corresponding to the initial seed point contained in the three-dimensional subspace corresponding to each leaf node and its node index in the storage device. 5.根据权利要求3所述的一种流场积分曲线的复用方法,其特征在于:步骤(2)中,将初始种子点对应的积分曲线压缩后保存在存储设备中。5. A method for multiplexing flow field integral curves according to claim 3, characterized in that in step (2), the integral curves corresponding to the initial seed points are compressed and stored in a storage device. 6.根据权利要求5所述的一种流场积分曲线的复用方法,其特征在于:将所述空间网格结构的空间区域划分为多个子空间,包括:6. The multiplexing method of a flow field integral curve according to claim 5, characterized in that: the spatial region of the spatial grid structure is divided into a plurality of subspaces, comprising: a.设置积分曲线的压缩比阈值;a. Set the compression ratio threshold of the integral curve; b.将所述空间网格结构进行初次划分,得到若干个子空间;b. dividing the space grid structure for the first time to obtain several subspaces; c.将每个子空间再次划分为M个子空间;c. Divide each subspace into M subspaces again; d.对于每一个再次划分的子空间,将划分前的子空间中所包含的初始种子点对应的积分曲线进行压缩,压缩后的字节数记为N1,将划分后的M子空间中所包含的初始种子点对应的积分曲线分别进行压缩,M个压缩后字节数之和记为N2,判断N1与N2的比值是否小于或等于压缩比阈值,若是,则所述二维规则网格或三维规则网格的空间划分完成,再次划分前的划分结果为最终划分结果,若否,则返回步骤c。d. For each re-divided subspace, compress the integral curve corresponding to the initial seed point contained in the subspace before the division, and record the number of bytes after compression as N1. The integral curves corresponding to the initial seed points included are respectively compressed, and the sum of M compressed bytes is recorded as N2, and it is judged whether the ratio of N1 to N2 is less than or equal to the compression ratio threshold, and if so, the two-dimensional regular grid Or the space division of the three-dimensional regular grid is completed, the division result before the second division is the final division result, if not, return to step c. 7.根据权利要求3至6之一所述的一种流场积分曲线的复用方法,其特征在于:步骤(3)中,在所述存储设备中直接调用所需要的对应网格点对应位置处的初始种子点的积分曲线,包括:7. A method for multiplexing flow field integral curves according to any one of claims 3 to 6, characterized in that: in step (3), the required corresponding grid points are directly called in the storage device to correspond to The integral curve for the initial seed point at position, consisting of: 3.1)确定进行分析或可视化应用所指定的流场数据空间区域,以及在所述空间区域中放置初始种子点的空间密度;3.1) determining the flow field data spatial region specified for the analysis or visualization application, and the spatial density of initial seed points placed in the spatial region; 3.2)在空间网格结构的所有子空间中查找与所述空间区域相交的子空间;3.2) Find the subspace intersecting with the spatial region in all subspaces of the spatial grid structure; 3.3)根据所述与所述空间区域相交的子空间的索引查找存储设备中关联保存的积分曲线;3.3) according to the index of the subspace intersecting with the space region, look up the integral curve associated and stored in the storage device; 3.4)根据所述空间密度在查找到的积分曲线中提取出对应的积分曲线。3.4) Extract the corresponding integral curve from the searched integral curve according to the space density. 8.一种流场积分曲线的复用系统,包括:8. A multiplexing system for flow field integral curves, comprising: 空间网格结构获取模块,用于获取流场数据的空间网格结构;The spatial grid structure acquisition module is used to acquire the spatial grid structure of the flow field data; 积分曲线计算模块,用于在所述空间网格结构的所有网格点上放置初始种子点,计算每个种子点的积分曲线;所述积分曲线为迹线或流线;An integral curve calculation module, configured to place initial seed points on all grid points of the spatial grid structure, and calculate the integral curve of each seed point; the integral curve is a trace or a streamline; 积分曲线保存模块,用于将所述积分曲线保存在存储设备中;An integral curve saving module, configured to store the integral curve in a storage device; 积分曲线调用模块,用于对所述流场数据进行分析或可视化应用时,在所述存储设备中直接调用所需要的对应网格点位置处的初始种子点的积分曲线。The integral curve calling module is used to directly call the required integral curve of the initial seed point corresponding to the grid point position in the storage device when analyzing or visualizing the flow field data. 9.根据权利要求8所述的一种流场积分曲线的复用系统,其特征在于:所述积分曲线保存模块包括:9. The multiplexing system of a flow field integral curve according to claim 8, characterized in that: the integral curve preservation module comprises: 空间网格划分单元,用于将所述空间网格结构的空间区域进行划分,划分为多个子空间;a spatial grid division unit, configured to divide the spatial area of the spatial grid structure into multiple subspaces; 曲线关联存储单元,用于建立每个子空间的索引,将每个子空间中所包含的初始种子点对应的积分曲线与其子空间的索引关联保存于存储设备中。The curve association storage unit is used to establish the index of each subspace, and store the integral curve corresponding to the initial seed point contained in each subspace in association with the index of the subspace in the storage device. 10.根据权利要求9所述的一种流场积分曲线的复用系统,其特征在于:当所述空间网格结构为二维规则网格时,所述空间网格划分单元,包括:10. The multiplexing system of a flow field integral curve according to claim 9, wherein when the spatial grid structure is a two-dimensional regular grid, the spatial grid division unit includes: 第一网格划分子单元,用于以二维规则网格的整个区域作为四叉树的根节点,建立二维空间网格的四叉树结构,将所述二维规则网格的空间划分为多个二维子空间,四叉树结构的每个叶子节点对应一个二维子空间;The first grid division subunit is used to use the entire area of the two-dimensional regular grid as the root node of the quadtree to establish a quadtree structure of the two-dimensional spatial grid, and divide the space of the two-dimensional regular grid For multiple two-dimensional subspaces, each leaf node of the quadtree structure corresponds to a two-dimensional subspace; 所述曲线关联存储单元包括:The curve associated storage unit includes: 第一关联存储子单元,用于建立四叉树结构的每一个叶子节点的索引,将每一个叶子节点对应的二维子空间所包含的初始种子点对应的积分曲线与其节点索引关联保存于存储设备中;The first associative storage subunit is used to establish the index of each leaf node of the quadtree structure, and store the integral curve corresponding to the initial seed point contained in the two-dimensional subspace corresponding to each leaf node and its node index in the storage equipment; 当所述空间网格结构为三维规则网格时,所述空间网格划分单元,包括:When the spatial grid structure is a three-dimensional regular grid, the spatial grid division unit includes: 第二网格划分子单元,用于以所述三维规则网格的整个区域作为八叉树的根节点,建立三维规则网格的八叉树结构,将所述三维规则网格的空间划分为多个三维子空间,八叉树结构的每一个叶子节点对应一个三维子空间;The second grid division subunit is used to use the entire area of the three-dimensional regular grid as the root node of the octree to establish an octree structure of the three-dimensional regular grid, and divide the space of the three-dimensional regular grid into Multiple three-dimensional subspaces, each leaf node of the octree structure corresponds to a three-dimensional subspace; 所述曲线关联存储单元包括:The curve associated storage unit includes: 第二关联存储子单元,用于建立八叉树结构中每一个叶子节点的索引,将每一个叶子节点所对应的三维子空间中所包含的初始种子点对应的积分曲线与其节点索引关联保存在存储设备中。The second associative storage subunit is used to establish the index of each leaf node in the octree structure, and the integral curve corresponding to the initial seed point contained in the three-dimensional subspace corresponding to each leaf node is stored in association with its node index. in the storage device. 11.根据权利要求9所述的一种流场积分曲线的复用系统,其特征在于:所述积分曲线保存模块还包括:11. The multiplexing system of a flow field integral curve according to claim 9, wherein the integral curve preservation module further comprises: 积分曲线压缩单元,用于将初始种子点对应的积分曲线压缩后保存在存储设备中。The integral curve compression unit is configured to compress the integral curve corresponding to the initial seed point and save it in the storage device. 12.根据权利要求11所述的一种流场积分曲线的复用系统,其特征在于:所述空间网格划分单元包括:12. The multiplexing system of a flow field integral curve according to claim 11, wherein the space grid division unit comprises: 初次划分子单元,用于将所述空间网格结构进行初次划分,得到若干个子空间;Dividing the subunits for the first time is used to divide the space grid structure for the first time to obtain several subspaces; 再次划分子单元,用于将初次划分子单元划分得到的每个子空间再次划分为M个子空间;Dividing subunits again is used to divide each subspace obtained by dividing the subunits for the first time into M subspaces again; 划分结果确定子单元,用于对于每一个再次划分的子空间,判断将划分前的子空间中所包含的初始种子点对应的积分曲线进行压缩后的字节数N1与将划分后的M子空间中所包含的初始种子点对应的积分曲线分别进行压缩后的M个压缩后的字节数之和N2的比值是否小于或等于压缩比阈值,若是,则所述二维规则网格或三维规则网格的空间划分完成,再次划分前的划分结果为最终划分结果,若否,则进入再次划分子单元。The division result determination subunit is used to determine the number of bytes N1 after compressing the integral curve corresponding to the initial seed point contained in the subspace before division and the M subspace after division for each subspace divided again. Whether the ratio of the sum N2 of the M compressed bytes corresponding to the integral curves corresponding to the initial seed points contained in the space is less than or equal to the compression ratio threshold, if so, the two-dimensional regular grid or the three-dimensional The space division of the regular grid is completed, and the division result before the second division is the final division result. If not, enter the second division subunit. 13.根据权利要求9至12之一所述的一种流场积分曲线的复用系统,其特征在于:所述积分曲线调用模块包括:13. A flow field integral curve multiplexing system according to any one of claims 9 to 12, characterized in that: the integral curve call module includes: 待分析区域确定单元,用于确定进行分析或可视化应用所指定的流场数据空间区域,以及在所述空间区域中放置初始种子点的空间密度;The area-to-be-analyzed determination unit is used to determine the flow field data spatial area specified by the analysis or visualization application, and the spatial density of initial seed points placed in the spatial area; 子空间确定单元,用于在空间网格结构的子空间中查找与所述空间区域相交的子空间;a subspace determining unit, configured to search for a subspace intersecting the spatial region in the subspace of the spatial grid structure; 积分曲线查找单元,用于根据所述与所述空间区域相交的子空间的索引查找存储设备中关联保存的积分曲线;An integral curve search unit, configured to search for an associated integral curve stored in a storage device according to the index of the subspace intersecting the spatial region; 积分曲线提取单元,用于根据所述空间密度在查找到的积分曲线中提取出对应的积分曲线。An integral curve extracting unit, configured to extract a corresponding integral curve from the found integral curves according to the space density.
CN201610584306.5A 2016-07-22 2016-07-22 A method and system for multiplexing flow field integral curves Active CN106202522B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610584306.5A CN106202522B (en) 2016-07-22 2016-07-22 A method and system for multiplexing flow field integral curves

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610584306.5A CN106202522B (en) 2016-07-22 2016-07-22 A method and system for multiplexing flow field integral curves

Publications (2)

Publication Number Publication Date
CN106202522A true CN106202522A (en) 2016-12-07
CN106202522B CN106202522B (en) 2019-11-08

Family

ID=57492295

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610584306.5A Active CN106202522B (en) 2016-07-22 2016-07-22 A method and system for multiplexing flow field integral curves

Country Status (1)

Country Link
CN (1) CN106202522B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109117433A (en) * 2017-06-23 2019-01-01 菜鸟智能物流控股有限公司 Index tree object creation method and index method and related device thereof
CN110941894A (en) * 2019-11-05 2020-03-31 天津大学 An in situ visualization method for large-scale fluid simulation based on supercomputer
CN112948643A (en) * 2021-05-13 2021-06-11 中国空气动力研究与发展中心计算空气动力研究所 Structured grid streamline integration method based on thread parallelism

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521854A (en) * 2011-12-29 2012-06-27 北京理工大学 Parallel flow line placing method applicable to two-dimensional flow field
CN102646288A (en) * 2012-02-23 2012-08-22 北京理工大学 A 3D Streamline Placing Method with Substantially Even Spacing
CN104658027A (en) * 2015-02-11 2015-05-27 中国海洋大学 Three-dimensional streamline dynamic visualization algorithm facing irregular ocean flow field data
CN105653881A (en) * 2016-03-04 2016-06-08 天津大学 Flow field visualization method based on multi-density levels

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521854A (en) * 2011-12-29 2012-06-27 北京理工大学 Parallel flow line placing method applicable to two-dimensional flow field
CN102646288A (en) * 2012-02-23 2012-08-22 北京理工大学 A 3D Streamline Placing Method with Substantially Even Spacing
CN104658027A (en) * 2015-02-11 2015-05-27 中国海洋大学 Three-dimensional streamline dynamic visualization algorithm facing irregular ocean flow field data
CN105653881A (en) * 2016-03-04 2016-06-08 天津大学 Flow field visualization method based on multi-density levels

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
RALF HARTMUT GUTING ET AL: "SECONDO:An Extensible DBMS Architecture and Prototype", 《COLLABORATIVE DESIGN》 *
何建和等: "基于MATLAB的振动压路机计算机仿真", 《计算机仿真》 *
周璐: "复杂向量场数据可视化技术研究与实现", 《中国博士学位论文全文数据库 信息科技辑》 *
王祖超等: "轨迹数据可视分析研究", 《计算机辅助设计与图形学学报》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109117433A (en) * 2017-06-23 2019-01-01 菜鸟智能物流控股有限公司 Index tree object creation method and index method and related device thereof
CN110941894A (en) * 2019-11-05 2020-03-31 天津大学 An in situ visualization method for large-scale fluid simulation based on supercomputer
CN110941894B (en) * 2019-11-05 2024-02-06 天津大学 In-situ visualization method for large-scale fluid simulation based on supercomputer
CN112948643A (en) * 2021-05-13 2021-06-11 中国空气动力研究与发展中心计算空气动力研究所 Structured grid streamline integration method based on thread parallelism
CN112948643B (en) * 2021-05-13 2021-08-06 中国空气动力研究与发展中心计算空气动力研究所 Structured grid streamline integration method based on thread parallelism

Also Published As

Publication number Publication date
CN106202522B (en) 2019-11-08

Similar Documents

Publication Publication Date Title
WO2022017147A1 (en) Point cloud data processing method and apparatus, radar apparatus, electronic device, and computer readable storage medium
CN111127610B (en) Three-dimensional visualized rendering method and calculation method for point cloud data
CN101477529B (en) Three-dimensional object retrieval method and apparatus
CN103310481B (en) A kind of point cloud compressing method based on fuzzy entropy iteration
CN115145906B (en) Preprocessing and completion method for structured data
CN104182571B (en) Kriging interpolation methods based on Delaunay and GPU
CN111260784B (en) Urban three-dimensional space grid compression coding method and device and terminal equipment
CN110597935A (en) A method and device for spatial analysis
CN107609141A (en) A Fast Probabilistic Modeling Method for Large-Scale Renewable Energy Data
CN105631068A (en) Grid boundary condition processing method of unstructured grid CFD computation
AU2018253470A1 (en) Device and method for extracting terrain boundary
CN103942253B (en) A kind of spatial data handling system of load balancing
CN116611546B (en) Knowledge-graph-based landslide prediction method and system for target research area
CN106202522B (en) A method and system for multiplexing flow field integral curves
Zhou et al. A streaming framework for seamless building reconstruction from large-scale aerial lidar data
CN104035983A (en) Classified variable clustering method based on attribute weight similarity
WO2015143985A1 (en) Result vector determining method and apparatus
CN114676522A (en) Aerodynamic shape optimization design method, system and equipment integrating GAN and transfer learning
CN108304925A (en) A kind of pond computing device and method
CN110334725A (en) Thunderstorm clustering method, device, computer equipment and storage medium for lightning data
CN118230055A (en) Method, system, medium and electronic device for judging coplanarity of local point cloud of rock mass based on multi-scale perception
CN104794747B (en) A kind of three dimensional point cloud compressing method based on ray principle
CN114881850A (en) Point cloud super-resolution method and device, electronic equipment and storage medium
CN115168326A (en) Hadoop big data platform distributed energy data cleaning method and system
CN118898172A (en) Method, system and computing device for constructing airspace grid model of low-altitude airspace

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant