A method and system for visual analysis of groundwater simulation results
By extracting SUTRA model data using regular expressions and combining non-uniform downsampling and environment-driven data pruning, the problems of expensive software dependence and complex boundary handling in the visualization analysis of groundwater simulation results are solved, achieving efficient and accurate visualization results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TIANJIN UNIV
- Filing Date
- 2026-03-18
- Publication Date
- 2026-06-19
AI Technical Summary
Existing technologies for visualizing and analyzing groundwater simulation results suffer from several drawbacks, including reliance on expensive commercial software, complex data format conversion, large interpolation errors, and inaccurate handling of complex boundaries. These issues lead to distorted visualization results and low efficiency.
Regular expressions are used to extract grid data output from the SUTRA model. Masks are constructed using non-uniform downsampling and environment-driven data to generate concentration contour maps and flow velocity vector maps, thus achieving automated data cropping and drawing.
It improves the visualization accuracy and efficiency of groundwater simulation results, avoids the loss of key physical features, accurately focuses on the effective computational domain, and replaces cumbersome manual script operations.
Smart Images

Figure CN121883764B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of hydrogeological simulation and data visualization technology, and to, but is not limited to, a visualization analysis method and system for groundwater simulation results. Background Technology
[0002] With the increasing severity of global water scarcity and groundwater pollution, groundwater numerical simulation technology plays a crucial role in environmental protection, hydrogeological surveys, and geological resource management. Among these technologies, the Saturated-Unsaturated Transport (SUTRA) model, a classic numerical simulation engine, supports coupled simulations of groundwater flow and solute transport in two-dimensional or three-dimensional saturated-unsaturated regions. Due to its high accuracy and well-defined physical mechanisms, the SUTRA model has become a core tool in academia and engineering. However, the SUTRA model faces significant post-processing and visualization bottlenecks in practical applications. The model's raw output is typically stored in ASCII text formats, such as .nod node files and .ele element files. These files are built upon unstructured finite element meshes, resulting in complex structures and massive amounts of data, often containing coordinate information for tens or even millions of nodes, as well as vector data on pressure, concentration, and velocity varying over time. For hydrogeological engineers lacking computer science backgrounds, directly extracting intuitive physical field distributions from these text data streams is quite challenging.
[0003] In existing technologies, the visualization analysis of groundwater simulation results mainly relies on two approaches: First, using general-purpose commercial visualization software such as Tecplot, ArcGIS, or Surfer. While these software programs are powerful, they are often expensive and demanding on computer hardware resources. Furthermore, these general-purpose software programs are not deeply adapted to the unstructured data format specific to the SUTRA model, requiring users to perform tedious data format conversions, such as converting unstructured data to regular raster data before importing, a process highly susceptible to interpolation errors. Second, using programming languages such as MATLAB or Python to write custom processing scripts. While this method is flexible, it requires users to have strong programming skills. Existing open-source scripts typically employ simple uniform downsampling strategies to handle the rendering pressure of large datasets. However, groundwater contaminant plumes often exhibit strong locality, and uniform downsampling can easily lead to the omission of high concentration gradient zones, such as key feature points at the edge of the solute plume, resulting in distorted visualization results that fail to accurately reflect the true diffusion path of pollutants.
[0004] Furthermore, existing visualization methods have significant limitations when handling complex environmental boundaries. For example, in simulating seawater intrusion in coastal ecotones, the simulated area is often an irregular polygon. Traditional methods, during interpolation rendering, struggle to automatically generate accurate clipping masks based on tidal boundaries or geological demarcation lines. This results in numerous invalid artifacts or jagged edges appearing outside the effective computational domain in the generated contour maps, severely impacting the professionalism and physical realism of the maps. In conclusion, developing a visualization and analysis method and system for groundwater simulation results that is independent of expensive commercial software, possesses intelligent feature-preserving downsampling capabilities, and can adaptively handle complex environmental boundaries is a pressing technical challenge in the field of hydrogeological informatization. Summary of the Invention
[0005] Based on the above problems, this application provides a method and system for visual analysis of groundwater simulation results. It aims to efficiently and accurately convert the files output by the SUTRA model into: a concentration contour map representing the solute distribution in the region and a velocity vector map representing the direction and velocity of groundwater flow in the region through automated data extraction, coupling and visualization processing.
[0006] The technical solution of this application embodiment is implemented as follows:
[0007] In a first aspect, embodiments of this application provide a method for visual analysis of groundwater simulation results, comprising: acquiring a grid data file output by a saturated-unsaturated zone transport model; wherein the grid data file is used to characterize the groundwater flow direction and solute transport process within the region; using regular expressions to extract the original concentration data and original velocity data corresponding to each time step from the grid data file; calculating the gradient distribution characteristics of the original concentration data and the velocity modulus characteristics of the original velocity data respectively, and performing non-uniform downsampling on the original concentration data and the original velocity data based on the calculation results to obtain sparsed concentration data and sparsed velocity data; constructing a regional mask based on environmental driving data within the region, and using the regional mask to spatially clip the sparsed concentration data and the sparsed velocity data respectively to obtain filtered concentration data and filtered velocity data; performing interpolation rendering on the filtered concentration data to generate a concentration contour map characterizing the solute distribution within the region, and performing vector drawing on the filtered velocity data to generate a velocity vector map characterizing the groundwater flow direction and velocity within the region.
[0008] In some embodiments, the gradient distribution feature includes: the spatial gradient value of each data point in the original concentration data; the velocity modulus feature includes: the velocity magnitude of each data point in the original velocity data; the step of calculating the gradient distribution feature of the original concentration data and the velocity modulus feature of the original velocity data respectively, and performing non-uniform downsampling on the original concentration data and the original velocity data based on the calculation results to obtain sparsed concentration data and sparsed velocity data includes: calculating the spatial gradient value of each data point in the original concentration data, and establishing the spatial gradient value and concentration retention... A positive correlation mapping relationship is established between the weights to determine the concentration retention weight of each data point in the original concentration data; the original concentration data is weighted and sampled according to the preset first number of rendering points and the concentration retention weight to obtain the sparsified concentration data; the flow rate of each data point in the original flow rate data is calculated, and a positive correlation mapping relationship between the flow rate and the flow rate retention weight is established to determine the flow rate retention weight of each data point in the original flow rate data; the original flow rate data is weighted and sampled according to the preset second number of rendering points and the flow rate retention weight to obtain the sparsified flow rate data.
[0009] In some embodiments, the step of constructing a region mask based on environmental driving data within the region, and using the region mask to spatially clip the sparsed concentration data and the sparsed flow velocity data to obtain filtered concentration data and filtered flow velocity data, includes: parsing the boundary geometric features in the environmental driving data to construct the region mask that identifies the effective computational region; extracting spatial coordinate information from the sparsed concentration data and the sparsed flow velocity data, and performing position matching between the spatial coordinate information and the region mask to obtain a matching result; and, based on the matching result, retaining data points located within the effective computational region and removing data points located outside the effective computational region from the sparsed concentration data and the sparsed flow velocity data to obtain the filtered concentration data and the filtered flow velocity data.
[0010] In some embodiments, when the region is a coastal ecotone, the environmental driving data includes at least: tidal dynamic data reflecting the land-sea interaction boundary; when the region is an inland region, the environmental driving data includes at least: soil type distribution data reflecting the geological permeability boundary.
[0011] In some embodiments, the step of interpolating and rendering the filtered concentration data to generate a concentration contour map characterizing the solute distribution within the region includes: extracting concentration observation data points and their spatial coordinates from the filtered concentration data; constructing an interpolation grid covering the region mask range, and using a Kriging interpolation algorithm to map the concentration observation data points to the interpolation grid based on their spatial coordinates to generate an initial concentration raster surface; using the region mask to clip the initial concentration raster surface to obtain a clipped concentration raster surface; and using a contour extraction algorithm to perform contour tracing and smoothing on the clipped concentration raster surface to generate the concentration contour map.
[0012] In some embodiments, the step of vector plotting the filtered flow velocity data to generate a flow velocity vector map characterizing the direction and velocity of groundwater flow in the region includes: based on the spatial coordinates, X-direction flow velocity component, and Y-direction flow velocity component of each flow velocity monitoring data in the filtered flow velocity data; constructing a two-dimensional flow velocity vector field based on the spatial coordinates, X-direction flow velocity component, and Y-direction flow velocity component of each flow velocity monitoring data; and plotting the flow velocity vector map corresponding to the two-dimensional flow velocity vector field.
[0013] In some embodiments, the grid data file consists of a node definition file that records node information and a cell definition file that records cell topological relationships. The step of extracting the raw concentration data and raw velocity data corresponding to each time step from the grid data file using regular expressions includes: using a text pattern matching algorithm based on regular expressions to identify header keywords that identify time step lengths in the node definition file and the cell definition file; locating data blocks based on the header keywords; parsing and obtaining the concentration scalar parameters and velocity vector parameters corresponding to each time step; and using a data structuring processing program to convert the concentration scalar parameters and velocity vector parameters into a structured two-dimensional data table to construct the raw concentration data and the raw velocity data.
[0014] In some embodiments, after interpolating and rendering the filtered concentration data to generate a concentration contour map representing the solute distribution in the region, and vectorizing the filtered flow velocity data to generate a flow velocity vector map representing the direction and velocity of groundwater flow in the region, the method further includes: receiving rendering adjustment instructions for the concentration contour map and the flow velocity vector map through a visualization configuration interface; parsing the graphic rendering parameters contained in the rendering adjustment instructions; and redrawing the concentration contour map and the flow velocity vector map in real time; wherein the graphic rendering parameters include at least: chromatographic configuration parameters for defining the mapping relationship between numerical values and colors, scaling factors for controlling the geometric dimensions of the flow velocity vector identifiers, and aspect ratio parameters for adjusting the scale of the view coordinate axes.
[0015] Secondly, embodiments of this application provide a visualization analysis system for groundwater simulation results, comprising: a data acquisition module for acquiring a grid data file output by a saturated-unsaturated zone transport model; the grid data file being used to characterize groundwater flow and solute transport processes within a region; a data parsing module for extracting raw concentration data and raw velocity data corresponding to each time step from the grid data file using regular expressions; and a non-uniform downsampling module for calculating the gradient distribution characteristics of the raw concentration data and the velocity modulus characteristics of the raw velocity data, and analyzing the raw concentration data and the raw velocity data based on the calculation results. The data undergoes non-uniform downsampling to obtain sparsed concentration data and sparsed velocity data. A region mask construction and clipping module is used to construct a region mask based on environmental-driven data within the region, and to spatially clip the sparsed concentration data and sparsed velocity data using the region mask to obtain filtered concentration data and filtered velocity data. A visualization generation module is used to interpolate and render the filtered concentration data to generate a concentration contour map representing the solute distribution within the region, and to vectorize the filtered velocity data to generate a velocity vector map representing the direction and velocity of groundwater flow within the region.
[0016] The beneficial effects of the technical solutions provided in this application include at least the following:
[0017] This application provides a method and system for visualizing and analyzing groundwater simulation results. During the execution of this method, firstly, the grid data file output by the SUTRA model is acquired, and regular expressions are used to accurately extract the original concentration and velocity data for each time step. Secondly, a non-uniform downsampling mechanism based on physical characteristics is introduced. This involves calculating the gradient distribution characteristics of concentration and the velocity modulus of flow, intelligently increasing the sampling weights of gradient regions (e.g., solute plume edges) and high-velocity flow regions. This significantly reduces the amount of data while avoiding the loss of key physical features caused by traditional uniform sampling, ensuring the physical authenticity of the visualization results. Thirdly, intelligent region clipping is achieved by combining environmentally driven data. For example, a binary mask is constructed using tidal or geological data to spatially clip sparse data, effectively solving the artifact problem under complex boundary conditions such as coastal ecotones, allowing the visualization results to accurately focus on the effective computational domain. Finally, based on the spatially cropped data, concentration contour maps and flow velocity vector maps are generated, thus achieving full automation and interactivity. In this way, data parsing, cleaning, thinning, cropping, and plotting are integrated into an automated closed loop, replacing tedious manual script operations, which greatly improves the efficiency and accuracy of post-processing of groundwater numerical simulation, enabling efficient and accurate visualization of large-scale groundwater simulation results.
[0018] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the technical solutions provided in the embodiments of this application. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort, wherein:
[0020] Figure 1 This is a flowchart illustrating a method for visualizing and analyzing groundwater simulation results, provided in an embodiment of this application.
[0021] Figure 2 This is a schematic diagram of the main interactive interface of a groundwater simulation visualization analysis system provided in an embodiment of this application;
[0022] Figure 3 A schematic diagram illustrating the visualization effect of the concentration contour map and flow velocity vector map provided in the embodiments of this application;
[0023] Figure 4 A schematic diagram of the interface for visual parameter adjustment and region clipping boundary setting provided in the embodiments of this application;
[0024] Figure 5 A schematic diagram of the visualization result export and saving interface provided in the embodiments of this application;
[0025] Figure 6 A schematic diagram of the functional modules of a groundwater simulation result visualization analysis system provided in this application embodiment;
[0026] Figure 7 This is a schematic diagram of the hardware structure of an electronic device for implementing the method, provided as an embodiment of this application. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. The following embodiments are used to illustrate this application, but are not intended to limit the scope of this application. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0028] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0029] It should be noted that the terms "first, second, and third" used in the embodiments of this application are merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, and third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0030] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which the embodiments of this application pertain. It should also be understood that terms such as those defined in general dictionaries should be understood to have a meaning consistent with their meaning in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0031] Example 1:
[0032] See Figure 1 The diagram shown is a flowchart illustrating a method for visualizing and analyzing groundwater simulation results according to an embodiment of this application. The method includes the following steps:
[0033] Step 101: Obtain the grid data file output by the saturated-unsaturated zone transport model.
[0034] The grid data file is used to characterize the flow of groundwater and solute transport processes within the region.
[0035] In some embodiments of this application, the SUTRA model is a groundwater numerical simulation model. Its output mesh data file may include variables such as node coordinates, pressure, concentration, and velocity vectors at multiple time steps. The mesh data file typically includes a .nod output file (node definition file) and a .ele output file (element definition file). The .nod output file contains physical quantities calculated on each node in the region, such as pressure, concentration, and velocity components. The nodes are the basic vertices of the finite element mesh. The .ele output file contains physical quantities calculated on each element in the region, such as mass or energy flux and saturation. The element is a polygon formed by connecting nodes.
[0036] It should be noted that .nod output files are mainly used for drawing concentration contour maps, flow velocity vector maps, or pressure cloud maps, while .ele output files are mainly used for drawing flux analysis and mass balance calculations.
[0037] In some embodiments of this application, the mesh data file output by the SUTRA model can be obtained on a platform built on Python.
[0038] In some embodiments of this application, such as Figure 2 The diagram shown is a schematic of the main interactive interface of a groundwater simulation visualization analysis system provided in an embodiment of this application; here, the Figure 2 The main interactive interface can be provided by a groundwater simulation result visualization and analysis system based on a Python cross-platform framework; Figure 2 The main interactive interface shown includes a control panel, a file import area, and an image preview area. The file import area can be used to build button controls based on the Tkinter framework. The specific operation process is as follows: First, click... Figure 2 After clicking the "Upload NOD File" and "Upload ELE File" buttons, users can select the data file output by the SUTRA model through the file dialog box, such as a local .nod file and a local .ele file. Then, the background uses the chardet library to automatically detect the file encoding of the limited metadata file. For example, it may be 8-bit Unicode Transformation Format (UTF-8) or National Standard Extension (GBK). At the same time, the main interactive interface will display the file path in the interface tab for user confirmation.
[0039] In this way, by automatically detecting the actual encoding format of the raw result files output by the received SUTRA model, it can be ensured that the output files of SUTRA models from various sources are processed correctly, thereby improving the reliability of grid data file analysis and user experience.
[0040] Step 102: Use regular expressions to extract the raw concentration data and raw flow velocity data corresponding to each time step from the grid data file.
[0041] Referring to the description above, taking grid data files including .nod and .ele output files as an example, regular expressions can be used to extract the concentration and velocity data corresponding to each time step from the .nod and .ele output files.
[0042] In some embodiments of this application, the mesh data file consists of a node definition file (i.e., a .nod output file) that records node information and a cell definition file (i.e., a .ele output file) that records cell topological relationships; step 102 above can be implemented through the following process:
[0043] First, a text pattern matching algorithm based on regular expressions is used to identify the header keywords that identify time steps in the node definition file and the unit definition file.
[0044] Then, based on the header keywords, the data blocks are located, and the concentration scalar parameters and flow velocity vector parameters corresponding to each time step are parsed and obtained.
[0045] Finally, using a data structuring process, the concentration scalar parameter and the flow velocity vector parameter are converted into a structured two-dimensional data table to construct the original concentration data and the original flow velocity data.
[0046] Here, through efficient extraction and spatial mapping processing using regular expressions, a structured dataset containing complete physical field information (concentration + flow velocity) was successfully constructed, laying the data foundation for subsequent non-uniform downsampling based on flow velocity modulus features and concentration gradient distribution features.
[0047] Step 103: Calculate the gradient distribution characteristics of the original concentration data and the velocity modulus characteristics of the original flow velocity data respectively, and perform non-uniform downsampling on the original concentration data and the original flow velocity data based on the calculation results to obtain sparsed concentration data and sparsed flow velocity data.
[0048] In some embodiments of this application, considering that the grid of the extracted raw concentration data and raw flow velocity data is relatively dense, a downsampling operation is used here to significantly improve the drawing efficiency of subsequent related maps and reduce graphic redundancy by sacrificing a small amount of accuracy.
[0049] In some embodiments of this application, the gradient distribution feature includes: the spatial gradient value of each data point in the original concentration data; the velocity modulus feature includes: the velocity magnitude of each data point in the original velocity data; the above step 103 can be implemented through the following process:
[0050] The first step is to calculate the spatial gradient value of each data point in the original concentration data, and establish a positive correlation between the spatial gradient value and the concentration retention weight, so as to determine the concentration retention weight of each data point in the original concentration data.
[0051] The second step is to perform weighted sampling on the original concentration data according to the preset first number of rendering points and the concentration retention weight to obtain the sparsified concentration data.
[0052] The third step is to calculate the flow velocity magnitude of each data point in the original flow velocity data, and establish a positive correlation between the flow velocity magnitude and the flow velocity retention weight, so as to determine the flow velocity retention weight of each data point in the original flow velocity data.
[0053] The fourth step is to perform weighted sampling on the original flow rate data according to the preset second number of rendering points and the flow rate retention weight to obtain the sparse flow rate data.
[0054] In some embodiments of this application, a positive correlation mapping relationship between spatial gradient values and concentration retention weights is first established using the spatial gradient values (gradient distribution characteristics) of each data point in the original concentration data, thereby determining the concentration retention weight of each data point in the original concentration data. For example, the weight of data points with gentle gradient changes in the original concentration data is less than the weight of data points with drastic gradient changes.
[0055] In some embodiments of this application, according to the preset first number of rendering points and the concentration retention weight of each data point in the original concentration data, the data points in the original concentration data are weighted and sampled, i.e. downsampled, to obtain sparse concentration data.
[0056] It should be noted that the first rendering point count refers to the upper limit of the number of rendered point primitives that needs to be stably maintained for a rendering frame in order to achieve the expected performance goals (such as frame rate) and visual quality in a specific application scenario.
[0057] In some embodiments of this application, the velocity modulus of each data point in the original velocity data refers to the scalar value of the intensity or speed of the velocity vector at a certain point in space. It discards the direction information of the vector and only retains its absolute intensity.
[0058] In some embodiments of this application, the kinetic energy of the flow is key information for the original flow velocity data. Therefore, it can be considered that the greater the flow velocity of the data point in the original flow velocity data, the greater its flow velocity retention weight in the original flow velocity data.
[0059] In some embodiments of this application, the first rendering point number and the second rendering point number may be the same or different, and their specific values can be determined according to actual needs. This application does not impose any limitations on this. Furthermore, a detailed explanation of the second rendering point number can be found in the above explanation of the first rendering point number, and will not be repeated here.
[0060] In some embodiments of this application, the data points in the original flow rate data can be weighted and sampled accordingly based on the preset second number of rendering points and the flow rate retention weight of each data point in the original flow rate data, i.e., downsampling, to obtain sparse flow rate data.
[0061] In this way, for the original concentration data, the concentration retention weight of each data point in the original concentration data is determined by the spatial gradient value of each data point in the original concentration data. Then, weighted sampling is performed on the original concentration data based on the concentration retention weight and the first number of rendering points. For the original flow velocity data, the flow velocity retention weight of each data point in the original flow velocity data is calculated by the flow velocity magnitude of each data point in the original flow velocity data. Then, weighted sampling is performed on the original flow velocity data using the flow velocity retention weight and the second number of rendering points. In this way, not only can more data points be retained in areas with drastic changes in concentration or flow velocity, thereby improving rendering efficiency, but the scientific accuracy of the subsequent visualization results of sparse concentration data and sparse flow velocity data is also preserved to the greatest extent. Furthermore, the output scale can be effectively controlled by the first and second number of rendering points, thereby significantly reducing the amount of data that needs to be rendered, and thus greatly improving the subsequent drawing speed.
[0062] Step 104: Construct a region mask based on the environmental driving data within the region, and use the region mask to spatially clip the sparsed concentration data and the sparsed flow velocity data to obtain the filtered concentration data and the filtered flow velocity data.
[0063] In some embodiments of this application, the environmental driving data within a region may vary depending on the type of region.
[0064] Here, in the case that the area is a coastal transition zone, the environmental driving data includes at least: tidal dynamic data reflecting the boundary between land and sea.
[0065] In the case that the region is an inland region, the environmental driving data includes at least: soil type distribution data reflecting the geological permeability boundary.
[0066] In some embodiments of this application, when the region is a coastal ecotone, the environmental driving data may include, in addition to tidal dynamic data, geological structure and stratigraphic permeability data, sea level data, etc. Correspondingly, when the region is an inland area, the environmental driving data may include, in addition to soil type distribution data, stratigraphic structure and lithology data, land use and land cover data, etc. This application does not impose specific limitations in this regard.
[0067] It should be noted that soil type distribution data in inland areas can be classified into different types based on different classifications, such as by texture, including: sandy soil, loam, clay, etc.; or by engineering properties, including: coarse-grained soil, organic soil, fine-grained soil, etc.
[0068] In some embodiments of this application, the environmental driving data within the region may further include media property parameters within the region, such as the geotechnical properties of the region (including the coastal ecotone and inland areas). Here, these geotechnical properties include, but are not limited to:
[0069] 1. Porosity n: Characterizes the ratio of pore volume to total volume in soil and rock mass within a region. For example, if the soil and rock material type in the region is sand, the porosity is usually 0.25-0.40; if the soil and rock material type in the region is fine sand / silt, the porosity is usually 0.30-0.45; if the soil and rock material type in the region is fractured rock, the corresponding porosity is even lower.
[0070] 2. Permeability / Water Conductivity: This can be determined by the hydraulic conductivity coefficient. (Comprehensive parameters considering fluid properties) or inherent permeability (Characteristics of the structural characteristics of the porous medium itself) and and The relationship between them is shown in the following formula (1):
[0071] Formula (1);
[0072] in, For dynamic viscosity, For density, .
[0073] This section further involves the hydraulic transmission coefficient. or inherent penetration rate Anisotropy.
[0074] 3. Effective specific water storage coefficient / specific compression S s Among them, S s What is used to measure is the ability of an aquifer in a region to store or release water under pressure changes.
[0075] 4. Diffusion parameters: Longitudinal diffusion is typically used. and lateral dispersion To represent; among which, Used to characterize the dispersion along the direction of water flow within the region. It is used to characterize the dispersion of a region perpendicular to the direction of water flow and is usually measured on a horizontal plane.
[0076] 5. Diffusion coefficient It measures the rate at which solute molecules migrate from high-concentration to low-concentration regions in a static fluid due to their own thermal motion. Here, it can be further converted into the effective diffusion coefficient after considering the obstruction of porous media. .
[0077] 6. Soil-water properties: Used to describe the water content, water potential energy, and water flow capacity in unsaturated porous media (i.e., when the pores are simultaneously filled with water and air) in inland areas.
[0078] It should be noted that the porosity n, permeability / hydrothermal conductivity, and effective specific water storage coefficient / specific compressibility S are... s Dispersion parameters and diffusion coefficient It is applicable to both land and coastal areas, while the soil and water properties are only applicable to inland areas.
[0079] In some embodiments, step 104 above can be implemented through the following process:
[0080] The first step is to analyze the boundary geometric features in the environment-driven data and construct the region mask that identifies the effective computation area.
[0081] The second step is to extract the spatial coordinate information from the sparsification concentration data and the sparsification velocity data, and then match the spatial coordinate information with the region mask to obtain the matching result.
[0082] Third, based on the matching results, data points located within the effective calculation area are retained in the sparsed concentration data and the sparsed flow rate data, while data points located outside the effective calculation area are removed, to obtain the filtered concentration data and the filtered flow rate data.
[0083] In some embodiments of this application, boundary geometric features in the environment-driven data within the region are parsed to construct a region mask (which is a binary image) that identifies the effective computation region, i.e., the bounding box of the region cropping; wherein, a pixel with a pixel value of 1 in the region mask represents that the pixel is a sub-region that needs to be focused on (retained) based on the environment-driven data, while a pixel with a pixel value of 0 represents that the pixel is a sub-region that does not need to be focused on (deleted) based on the environment-driven data.
[0084] In some embodiments of this application, when determining the region mask, it is necessary to consider not only the environmental driving data within the region, but also the relevant boundary conditions (BC) and the relevant setting parameters of the SUTRA model. That is, in the process of obtaining the region mask corresponding to the environmental driving data within the region, the following relevant setting parameters of the SUTRA model also need to be considered:
[0085] 1. Geometry of the SUTRA model: It includes a 2D vertical profile model and a 3D solid model. The 2D vertical profile model is applicable to coastal areas (seawater intrusion), for example, a 2D vertical profile can be cut perpendicular to the coastline for simulation. The 3D solid model can be used for both coastal and land areas, such as for coastal areas with strong heterogeneity or complex terrain along the coastline, or for a realistic 3D pollution scenario in land areas.
[0086] 2. SUTRA model's 2D or 3D mesh: The size of the mesh cells depends on the problem scale and gradient. For example, for coastal transgression problems, a fine nearshore mesh of 1-10m is commonly used, while for land areas, it can be coarsened to 20-50m.
[0087] 3. Stratigraphy and interfaces: This includes the surface of the earth, the top and bottom surfaces of the water layer / impermeable layer, and the location of the coastline.
[0088] Correspondingly, BC can include the following dimensions:
[0089] 1. Head boundary (can be applied to coastal areas): Its time series of changes with tides (minutes or hours) can be specified in the coastal unit for head mixing boundary conditions / generalized flow boundary (resistance-based transducer boundary).
[0090] 2. Salinity boundary (applicable to coastal areas): This is a specified concentration boundary, such as the typical salinity boundary of seawater being 30-35 g / L. If a flux boundary is used here, the solute mass flux is required.
[0091] 3. Inland boundary (applicable to both coastal and inland areas): commonly uses no-flow (adiabatic) or given inland reference head line.
[0092] 4. Top boundary (applicable to both coastal and inland areas): Its specific parameters include infiltration / rainfall flux (which can be divided by season / event), and if wet / dry variations are taken into account, infiltrate / infiltrate sections can be set, as well as evapotranspiration, which can be deducted from net infiltration.
[0093] 5. Bottom boundary (applicable to both coastal and inland areas): Specifically includes: no flow, discharge and recharge of deep aquifers.
[0094] In some embodiments of this application, spatial coordinate information is extracted from the sparsified concentration data and the sparsified flow rate data, and the spatial coordinate information is matched with the region mask to obtain a first matching sub-result corresponding to the sparsified concentration data and a second matching sub-result corresponding to the sparsified flow rate data. Correspondingly, based on the first matching sub-result, data points located within the effective calculation area (i.e., the area corresponding to the pixel value of 1 mentioned above) are retained in the sparsified concentration data, and data points located outside the effective calculation area (i.e., the area corresponding to the pixel value of 0 mentioned above) are removed to obtain the filtered concentration data. Similarly, based on the second matching sub-result, data points located within the effective calculation area (i.e., the area corresponding to the pixel value of 1 mentioned above) are retained in the sparsified flow rate data, and data points located outside the effective calculation area (i.e., the area corresponding to the pixel value of 0 mentioned above) are removed to obtain the filtered flow rate data.
[0095] In this way, by using environmentally driven data within the region (coastal areas, at least considering tidal force data; terrestrial areas, at least considering soil type data) to generate a regional mask, the environmentally relevant data on sparse concentration and velocity can be tailored, rather than merely focusing on spatial shape. This allows for intelligent tailoring based on environmentally driven data, enabling rapid focusing on target areas with specific environmental significance.
[0096] Step 105: Interpolate and render the filtered concentration data to generate a concentration contour map representing the solute distribution in the region, and perform vector drawing on the filtered flow velocity data to generate a flow velocity vector map representing the direction and velocity of groundwater flow in the region.
[0097] In some embodiments of this application, the step 105 above, "interpolating and rendering the screened concentration data to generate a concentration contour map characterizing the solute distribution within the region," can be achieved through the following process:
[0098] First, concentration observation data points and their spatial coordinates are extracted from the filtered concentration data.
[0099] Secondly, an interpolation grid covering the mask area is constructed, and the concentration observation data points are mapped to the interpolation grid based on the spatial coordinates of the concentration observation data points using the Kriging interpolation algorithm to generate an initial concentration raster surface.
[0100] Then, the initial concentration grid surface is masked and clipped using the region mask to obtain the clipped concentration grid surface.
[0101] Finally, a contour extraction algorithm is used to perform contour tracing and smoothing on the clipped concentration raster surface to generate the concentration contour map.
[0102] In some embodiments of this application, spatial coordinates play a unique role in determining the precise location of each concentration observation data point in geographic space.
[0103] Here, the Kriging interpolation algorithm is an advanced geostatistical interpolation method that provides not only the estimate but also the error (variance) of the estimate.
[0104] In some embodiments of this application, since the interpolation grid adopts a raster data model, the data consists of values defined on regular grid points or grid cells. Therefore, by using a contour extraction algorithm, such as the Marching Squares algorithm, pixels with the same value are extracted from the clipped concentration raster surface to form smooth, vectorized contour lines, thereby obtaining a concentration contour map composed of these contour lines.
[0105] In this way, by using interpolation, masking, and visualization operations, it can be ensured that the final concentration contour map is recalculated based on the data within the regional mask, that is, it realizes the generation of high-quality concentration contour maps limited to the study area from discrete observation points.
[0106] In some embodiments of this application, the step 105 above, "to perform vector plotting on the filtered flow velocity data to generate a flow velocity vector map representing the direction and velocity of groundwater flow in the region," can be achieved through the following process:
[0107] First, based on the spatial coordinates, X-direction velocity component, and Y-direction velocity component of each velocity monitoring data in the filtered velocity data.
[0108] Then, based on the spatial coordinates, X-direction velocity component, and Y-direction velocity component of each velocity monitoring data, a two-dimensional velocity vector field is constructed.
[0109] Finally, the velocity vector diagram corresponding to the two-dimensional velocity vector field is drawn.
[0110] This can be used as a reference. Figure 3 The concentration contour maps and flow velocity vector maps shown are illustrated. Specifically, the trigontourf function can be used to draw these maps, interpolating the node coordinates and concentration values using a triangulated mesh to generate the concentration contour maps for 302. Furthermore, multiple color band schemes (such as viridis or jet) can be supported for the 302 concentration contour maps, which can be set via the cmap parameter.
[0111] Additionally, the quiver function can be used to draw arrows. For example, inputting the X and Y coordinates and velocity components U and V allows for adjusting the arrow length range using the scale parameter, adding a velocity scale using quiverkey, and generating a 301 flow velocity vector diagram by sampling the X / Y grid interval to control the arrow density.
[0112] Here, the components that generate concentration contour maps and flow velocity vector maps can also be integrated into the Canvas control of the main window of a groundwater simulation result visualization analysis system built on Python. In this way, it can also be used to achieve real-time preview of the generated concentration contour maps and flow velocity vector maps.
[0113] In some embodiments of this application, after performing step 105 above, steps A1 and A2 may also be performed:
[0114] Step A1: Receive rendering adjustment instructions for the concentration contour map and the flow velocity vector map through the visualization configuration interface.
[0115] Step A2: Analyze the graphics rendering parameters contained in the rendering adjustment command, and redraw the concentration contour map and the flow velocity vector map in real time.
[0116] The graphics rendering parameters include at least: color chromatogram configuration parameters for defining the mapping relationship between numerical values and colors, scaling factors for controlling the geometric dimensions of the flow rate vector identifier, and aspect ratio parameters for adjusting the scale of the view coordinate axes.
[0117] In some embodiments of this application, input adjustment commands via an interactive interface can be supported, allowing simultaneous adjustment of the concentration isopleth map and the flow velocity vector map, or allowing separate adjustment of the concentration isopleth map and the flow velocity vector map.
[0118] In some embodiments of this application, users can also input a list of polygon coordinates in a text input box, such as... Figure 4 As shown, path objects can be created using matplotlib.patches.PathPatch and applied to the clip_path property of Axes to clip concentration contour maps and flow velocity vector maps.
[0119] In some embodiments of this application, the concentration contour maps and flow velocity vector maps are cropped, offering two modes: a rectangular border automatically generates standard rectangular coordinates, while a custom border allows for input of complex terrain. The cropped image displays only data within a defined area to eliminate interference.
[0120] Correspondingly, this application can also export and save the final concentration contour maps and flow velocity vector maps, and the corresponding application diagrams are as follows: Figure 5As shown, this can be achieved using Matplotlib's `savefig` function. Users can choose between Portable Network Graphics (PNG) or Portable Document Format (PDF), set the resolution to dpi=300, and customize the save path. The system will catch any exceptions and display a Tkinter message box indicating success or failure.
[0121] In some embodiments of this application, the visualization analysis method for groundwater simulation results disclosed in this application can also directly transform the complex and difficult-to-interpret SUTRA model output grid data file into intuitive, accurate, and efficient visualization graphics, namely, an initial contour map representing the solute distribution within the region, and an initial velocity vector map representing the direction and velocity of groundwater flow within the region. Based on this, through downsampling, key feature points are intelligently preserved based on the physical field gradient, avoiding the loss of important information caused by uniform sampling, and ensuring that the obtained intermediate contour maps and intermediate velocity vector maps, even after simplification, still accurately reflect key phenomena such as solute plume edges and high-velocity flow channels. Simultaneously, based on environmentally driven data, the intermediate contour maps and intermediate velocity vector maps are intelligently cropped to quickly focus on target areas with specific environmental significance, thereby obtaining the final concentration contour maps and velocity vector maps. In other words, this application can also first perform visualization operations, and then perform a series of operations on the basis of visualization, such as downsampling and region cropping.
[0122] It should be noted that the execution order of the downsampling and region clipping operations involved in this application can be determined according to actual needs, and this application does not impose any restrictions on this. It is possible to perform downsampling first and then region clipping, or to perform region clipping first and then downsampling.
[0123] The visualization analysis method for groundwater simulation results provided in this application includes the following steps: First, acquiring the grid data file output by the SUTRA model; the grid data file is used to characterize the groundwater flow direction and solute transport process within the region; and using regular expressions to extract the original concentration data and original velocity data corresponding to each time step from the grid data file. Second, calculating the gradient distribution characteristics of the original concentration data and the velocity modulus characteristics of the original velocity data, and performing non-uniform downsampling on the original concentration data and original velocity data based on the calculation results to obtain sparsed concentration data and sparsed velocity data. Then, constructing a regional mask based on the environmental driving data within the region, and using the regional mask to spatially clip the sparsed concentration data and sparsed velocity data to obtain filtered concentration data and filtered velocity data. Finally, interpolating and rendering the filtered concentration data to generate a concentration contour map characterizing the solute distribution within the region, and vector drawing the filtered velocity data to generate a velocity vector map characterizing the groundwater flow direction and velocity within the region. This process involves several steps. First, the grid data file output by the SUTRA model is parsed to extract the original concentration and velocity data. Second, the gradient distribution characteristics of the original concentration data and the velocity modulus characteristics of the original velocity data are calculated. Next, based on the calculation results, non-uniform downsampling is performed on the data. High-density feature points are retained in areas with significant changes in the physical field gradient, while sparsification is applied to areas with gentler changes. This achieves data dimensionality reduction while preserving key features such as solute plume edges and high-speed flow channels. Subsequently, environmentally driven data is introduced to delineate the target region, and the downsampled data is spatially clipped. Finally, based on the spatially clipped data, a concentration contour map representing the solute distribution within the region and a velocity vector map representing the direction and velocity of groundwater flow within the region are automatically generated. This hierarchical data processing scheme solves the problem of key information loss caused by traditional uniform sampling, enabling efficient and accurate visualization of large-scale groundwater simulation results.
[0124] Referring to the above description, the groundwater simulation result visualization analysis method provided in this application embodiment can be run on a groundwater simulation result visualization analysis system based on a Python cross-platform framework. The system's runtime environment configuration includes open-source libraries such as Python 3.8+, NumPy, Pandas, Matplotlib, and chardet, installed via the pip install command. The main program file main4.py contains the aforementioned modules and logic, and can be started using the python main4.py command, or packaged into an .exe file using PyInstaller, and run without a Python environment using the PyInstaller tool, achieving cross-platform deployment, i.e., cross-platform deployment on operating systems such as Windows, macOS, and Linux. Correspondingly, when using the SUTRA model to simulate seawater intrusion scenarios in coastal areas, the execution flow of this groundwater simulation result visualization analysis method is as follows:
[0125] Step 1: Launch the system's internal file import module, and the above-mentioned pop-up will appear. Figure 2 The main window shown. Click the upload button, select the .nod output file and the .ele output file, and the system will automatically parse the encoding and display the path.
[0126] Step 2: Utilize the system's built-in data parsing function to automatically parse the uploaded file. Regular expressions can be used to extract key variable data across multiple time steps and convert it into a structured format to extract the time step data. For example, selecting time step 10 generates a DataFrame containing the coordinates and concentration values of 1000 nodes.
[0127] Step 3: Through the above Figure 4 In the control panel settings: Time step = 9.0, X grid interval = 3.0, Y grid interval = 1.0, minimum arrow length = 0.01, maximum arrow length = 0.05, aspect ratio = 1.2, color ribbon (JET), display dashed lines = Yes, dashed line color = black, etc. Select "rectangular area border" for the border type; the system will automatically fill the coordinates.
[0128] Step 4: Click the "Generate Visualization" button to generate the visualization drawing module. Figure 3 The displayed concentration contour map 302 (showing high concentration areas) and flow velocity vector map 301 (arrows pointing in the flow direction) can internally involve the idea of time series matching to associate the flow velocity data and concentration data corresponding to each time step to obtain the concentration contour map and flow velocity vector map. Furthermore, based on the set parameters, the obtained concentration contour map and flow velocity vector map can be previewed and updated in real time.
[0129] Here, the internal operations may also include steps 103 and 104 mentioned in the above embodiments, namely the corresponding downsampling operation and region clipping based on environment-driven data.
[0130] Step 5: If further adaptive cropping is needed, you can input custom border coordinates using the system's internal region cropping module, such as: [(10, 5), (80, 5), (80, 15), (10, 15)]. Figure 3 The concentration contour map 302 and flow velocity vector map 301 are spatially clipped to limit the analysis scope and focus on the core pollution area.
[0131] Step 6: Confirm the image. The system's internal image export module will then export it as output.png, and the system will display a "Export successful" message. If the coordinates are entered incorrectly, a "Coordinate format does not meet requirements" message will pop up.
[0132] By following the steps above, interactive analysis can be completed without programming, and high-precision images can be generated, namely: concentration contour maps and flow velocity vector maps.
[0133] Furthermore, in step 3, parameters take effect in real time without requiring a system restart; in step 6, if an exception occurs such as file parsing failure, coordinate error, or rendering failure, the system can also provide pop-up prompts with detailed information to facilitate user debugging.
[0134] It should be noted that during the above operations, if an error occurs, the system will also provide error and prompt information. If the input data format is incorrect or the image rendering fails, the system will display detailed error information in a pop-up window to help locate the problem. Common errors include: file parsing failure (incorrect file format, missing columns, or inability to recognize time step information); coordinate errors (border coordinate input format does not meet requirements, such as non-tuple list); rendering failure (empty data or unreasonable parameter settings, such as arrow length being zero).
[0135] Correspondingly, this application also provides a visualization and analysis system for groundwater simulation results based on a Python cross-platform framework. This system may include:
[0136] The file import module is used to obtain the .nod and .ele output files of the SUTRA model uploaded through the graphical user interface, and automatically detect the encoding format of the files (.nod and .ele output files) to avoid parsing errors.
[0137] The data parsing module is used to identify and extract time step data blocks from files using regular expressions, including key variables such as node coordinates, pressure, concentration, and flow velocity vectors, and convert them into Pandas DataFrame structured data for easier subsequent processing.
[0138] The visualization and plotting module is used to generate concentration contour maps and flow velocity vector maps based on the Matplotlib library. It supports parameter adjustments such as color band selection, arrow length adjustment, grid spacing setting, and aspect ratio customization, enabling an intuitive display of solute distribution and flow trends.
[0139] The region cropping module supports user-defined polygonal boundary paths. It uses PathPatch to crop image elements, excludes interfering data outside the region, and provides two modes: rectangular region border and custom border.
[0140] The image export module is used to export the current visualized image (the image output by the region cropping module) to the local machine in high-resolution PNG or PDF format. It supports custom save path and a success message for export.
[0141] The interactive control interface module is used to build control panels based on the Tkinter framework. It provides interactive elements such as sliders, drop-down menus, text input boxes, and checkboxes, enabling real-time adjustment of all parameters and image preview updates.
[0142] Based on the above description, compared with the prior art, the embodiments of this application have the following beneficial effects:
[0143] 1) Simplified post-processing workflow: Automatically parses complex text data without requiring users to manually write scripts or rely on commercial software such as MATLAB, significantly reducing the technical threshold.
[0144] 2) Enhanced interactivity and flexibility: Real-time parameter adjustment and image preview are achieved through the Tkinter graphical interface, supporting custom cropping and multi-variable visualization to meet the needs of complex scenarios.
[0145] 3) Cross-platform and lightweight design: Based on the Python open-source framework, it supports deployment on multiple operating systems, has a small installation package, runs efficiently, and is easy to extend and develop.
[0146] 4) Professional graphics support: Utilizing Matplotlib and Triangulation technology, it ensures the scientific accuracy and high precision of the images, making them suitable for scientific research reports, paper illustrations, and teaching demonstrations.
[0147] 5) Improve efficiency and application value: Fill the gap in visualization tools for the SUTRA model, thereby improving the practicality of groundwater simulation in environmental protection, water resource management and pollution assessment.
[0148] This application can automatically parse the .nod and .ele output files from SUTRA models, providing a cross-platform graphical user interface based on Python, supporting real-time parameter adjustment, region clipping, and high-resolution export. This simplifies the analysis process, lowers the technical threshold, and improves research efficiency and engineering application value. Specifically, it solves problems in the post-processing of existing SUTRA models such as complex data parsing, poor visualization interactivity, insufficient cross-platform compatibility, and reliance on commercial software. It achieves automatic parsing of .nod and .ele output files from SUTRA models, multivariate graphical display, real-time parameter adjustment, and region clipping functions, greatly simplifying the analysis process of groundwater simulation results.
[0149] Based on the same inventive concept, embodiments of this application also provide a visualization and analysis system for groundwater simulation results, see [link to relevant documentation]. Figure 6 As shown, the visualization and analysis system 600 for the groundwater simulation results includes:
[0150] The data acquisition module 601 is used to acquire the grid data file output by the saturated zone-unsaturated zone transport model; the grid data file is used to characterize the groundwater flow and solute transport process within the region.
[0151] The data parsing module 602 is used to extract the raw concentration data and raw flow velocity data corresponding to each time step from the grid data file using regular expressions.
[0152] The non-uniform downsampling module 603 is used to calculate the gradient distribution characteristics of the original concentration data and the flow velocity modulus characteristics of the original flow velocity data, and perform non-uniform downsampling on the original concentration data and the original flow velocity data based on the calculation results to obtain sparsed concentration data and sparsed flow velocity data.
[0153] The region mask construction and clipping module 604 is used to construct a region mask based on the environmental driving data within the region, and to spatially clip the sparsed concentration data and the sparsed flow velocity data using the region mask to obtain the filtered concentration data and the filtered flow velocity data.
[0154] The visualization generation module 605 is used to interpolate and render the filtered concentration data to generate a concentration contour map representing the solute distribution in the region, and to perform vector drawing on the filtered flow velocity data to generate a flow velocity vector map representing the direction and velocity of groundwater flow in the region.
[0155] It should be noted that the description of the above system embodiments is similar to the description of the above method embodiments, and has similar beneficial effects. For technical details not disclosed in the system embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0156] It should be noted that, in the embodiments of this application, if the above-mentioned method for visualizing and analyzing groundwater simulation results is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, or the part that contributes to the related technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of this application are not limited to any specific hardware and software combination.
[0157] Correspondingly, embodiments of this application provide a computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the steps in the visualization analysis method for groundwater simulation results described in any of the above embodiments. Correspondingly, embodiments of this application also provide a computer program product, which, when executed by a processor of an electronic device, is used to implement the steps in the visualization analysis method for groundwater simulation results described in any of the above embodiments.
[0158] Based on the same technical concept, embodiments of this application provide an electronic device for implementing the visualization analysis method for groundwater simulation results described in the above-described method embodiments. For example... Figure 7 As shown, the electronic device 700 includes a memory 710 and a processor 720. The memory 710 stores a computer program that can run on the processor 720. When the processor 720 executes the program, it implements the steps in the visualization analysis method of groundwater simulation results according to any embodiment of this application.
[0159] The memory 710 is configured to store instructions and applications executable by the processor 720, and can also cache data to be processed or already processed by the processor 720 and various modules in the electronic device (e.g., image data, audio data, voice communication data and video communication data), which can be implemented by flash memory or random access memory (RAM).
[0160] The processor 720 executes the program to implement the steps of the visualization analysis method for the groundwater simulation results described above. The processor 720 typically controls the overall operation of the electronic device 700.
[0161] The aforementioned processor can be at least one of the following: Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), Central Processing Unit (CPU), Controller, Microcontroller, and Microprocessor. It is understood that other electronic devices can also implement the functions of the aforementioned processor, and this application does not specifically limit the specific implementation.
[0162] The aforementioned computer storage media / memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc-read-only memory (CD-ROM), etc.; or it can be various electronic devices that include one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
[0163] It should be noted that the descriptions of the storage medium and device embodiments above are similar to the descriptions of the method embodiments above, and have similar beneficial effects. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0164] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above-described processes do not imply a sequential order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the above-described embodiments are merely descriptive and do not represent the superiority or inferiority of the embodiments.
[0165] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0166] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.
[0167] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of the embodiments of this application, depending on actual needs.
[0168] In addition, each functional unit in the various embodiments of this application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.
[0169] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause the device automatic test line to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0170] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0171] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.
[0172] The above description is merely an embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method of visual analysis of groundwater simulation results, characterized in that, include: Obtain the grid data file output by the saturated-unsaturated zone transport model; wherein, the grid data file is used to characterize the groundwater flow and solute transport process within the region; Regular expressions are used to extract the raw concentration data and raw flow velocity data corresponding to each time step from the grid data file; The gradient distribution characteristics of the original concentration data and the velocity modulus characteristics of the original velocity data are calculated respectively. Based on the calculation results, the original concentration data and the original velocity data are non-uniformly downsampled to obtain sparsed concentration data and sparsed velocity data. A region mask is constructed based on the environmental driving data within the region. The region mask is then used to spatially clip the sparsed concentration data and the sparsed flow velocity data to obtain the filtered concentration data and the filtered flow velocity data. The selected concentration data is interpolated and rendered to generate a concentration contour map representing the solute distribution in the region. The selected flow velocity data is then vectorized to generate a flow velocity vector map representing the direction and velocity of groundwater flow in the region.
2. The method of claim 1, wherein, The gradient distribution feature includes: the spatial gradient value of each data point in the original concentration data; the velocity modulus feature includes: the velocity magnitude of each data point in the original velocity data; the step of calculating the gradient distribution feature of the original concentration data and the velocity modulus feature of the original velocity data respectively, and performing non-uniform downsampling on the original concentration data and the original velocity data based on the calculation results to obtain sparsed concentration data and sparsed velocity data includes: Calculate the spatial gradient values of each data point in the original concentration data, and establish a positive correlation between the spatial gradient values and the concentration retention weights to determine the concentration retention weights of each data point in the original concentration data. Based on the preset first number of rendering points and the concentration retention weight, the original concentration data is weighted and sampled to obtain the sparsified concentration data. Calculate the flow velocity magnitude of each data point in the original flow velocity data, and establish a positive correlation between the flow velocity magnitude and the flow velocity retention weight to determine the flow velocity retention weight of each data point in the original flow velocity data; Based on the preset second number of rendering points and the flow rate retention weight, the original flow rate data is weighted and sampled to obtain the sparse flow rate data.
3. The method of claim 1, wherein, The process involves constructing a region mask based on environmental driving data within the region, and then using the region mask to spatially clip the sparsed concentration data and the sparsed flow velocity data to obtain filtered concentration data and filtered flow velocity data, including: Analyze the boundary geometric features in the environment-driven data to construct the region mask that identifies the effective computation area; Extract the spatial coordinate information from the sparsification concentration data and the sparsification velocity data, and perform position matching between the spatial coordinate information and the region mask to obtain the matching result; Based on the matching results, data points located within the effective calculation area are retained in the sparsed concentration data and the sparsed flow rate data, while data points located outside the effective calculation area are removed, to obtain the filtered concentration data and the filtered flow rate data.
4. The method according to claim 3, characterized in that, In the case that the area is a coastal transition zone, the environmental driving data includes at least: tidal dynamic data reflecting the boundary between land and sea; In the case that the region is an inland region, the environmental driving data includes at least: soil type distribution data reflecting the geological permeability boundary.
5. The method of claim 1, wherein, The step of interpolating and rendering the filtered concentration data to generate a concentration contour map representing the solute distribution within the region includes: Extract concentration observation data points and their spatial coordinates from the filtered concentration data; An interpolation grid covering the mask area is constructed, and the concentration observation data points are mapped to the interpolation grid based on the spatial coordinates of the concentration observation data points using the Kriging interpolation algorithm to generate an initial concentration raster surface. The initial concentration grid surface is masked and clipped using the region mask to obtain the clipped concentration grid surface. A contour extraction algorithm is used to perform contour tracing and smoothing on the cropped concentration raster surface to generate the concentration contour map.
6. The method of claim 1, wherein, The step of vector plotting the filtered flow velocity data to generate a flow velocity vector map representing the direction and velocity of groundwater flow in the region includes: Obtain the spatial coordinates, X-direction velocity component, and Y-direction velocity component of each velocity monitoring data in the filtered velocity data; A two-dimensional velocity vector field is constructed based on the spatial coordinates, X-direction velocity component, and Y-direction velocity component of each velocity monitoring data. Draw the velocity vector diagram corresponding to the two-dimensional velocity vector field.
7. The method of claim 1, wherein, The grid data file consists of a node definition file that records node information and a cell definition file that records cell topology relationships; the extraction of raw concentration data and raw velocity data corresponding to each time step from the grid data file using regular expressions includes: A text pattern matching algorithm based on regular expressions is used to identify the header keywords that identify time steps in the node definition file and the unit definition file; Based on the header keywords, locate the data block and parse it to obtain the concentration scalar parameters and flow velocity vector parameters corresponding to each time step; Using a data structuring process, the concentration scalar parameter and the flow velocity vector parameter are converted into a structured two-dimensional data table to construct the original concentration data and the original flow velocity data.
8. The method of claim 1, wherein, After interpolating and rendering the filtered concentration data to generate a concentration contour map representing the solute distribution in the region, and vectorizing the filtered flow velocity data to generate a flow velocity vector map representing the direction and velocity of groundwater flow in the region, the method further includes: Receive rendering adjustment instructions for the concentration contour map and the flow velocity vector map through the visual configuration interface; The graphics rendering parameters contained in the rendering adjustment command are analyzed, and the concentration contour map and the flow velocity vector map are redrawn in real time. The graphics rendering parameters include at least: color chromatogram configuration parameters for defining the mapping relationship between numerical values and colors, scaling factors for controlling the geometric dimensions of the flow rate vector identifier, and aspect ratio parameters for adjusting the scale of the view coordinate axes.
9. A system for visual analysis of groundwater simulation results, characterized in that include: The data acquisition module is used to acquire the grid data file output by the saturated-unsaturated zone transport model; The grid data file is used to characterize the groundwater flow and solute transport processes within the region; The data parsing module is used to extract the raw concentration data and raw flow velocity data corresponding to each time step from the grid data file using regular expressions; The non-uniform downsampling module is used to calculate the gradient distribution characteristics of the original concentration data and the flow velocity modulus characteristics of the original flow velocity data, and perform non-uniform downsampling on the original concentration data and the original flow velocity data based on the calculation results to obtain sparsed concentration data and sparsed flow velocity data. The region mask construction and clipping module is used to construct a region mask based on the environmental driving data within the region, and to spatially clip the sparsed concentration data and the sparsed flow velocity data using the region mask to obtain the filtered concentration data and the filtered flow velocity data. The visualization generation module is used to interpolate and render the filtered concentration data to generate a concentration contour map representing the solute distribution in the region, and to perform vector drawing on the filtered flow velocity data to generate a flow velocity vector map representing the direction and velocity of groundwater flow in the region.