Refined three-dimensional terrain modeling method capable of being used for finite element calculation
Through the extraction and transformation of CAD two-dimensional topographic drawing information, the interpolation function and parameterized surface are constructed using AutoCAD and Matlab software, the complexity and computing efficiency of three-dimensional topographic model construction in the existing technology are solved, and efficient three-dimensional topographic modeling and finite element numerical simulation are realized.
Patent Information
- Application Number
- CN202411762365.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-04-11
AI Technical Summary
The complexity and computational efficiency problems in the construction of refined three-dimensional topographic models in the prior art lead to reduced local accuracy, changing stress distribution and impacts on boundary conditions.
By extracting and converting CAD two-dimensional topographic drawing information, using AutoCAD and Matlab software, an interpolation function is constructed and parameterized surfaces are established to realize the transformation of two-dimensional drawings to three-dimensional refined topographic geometric models.
It provides an efficient and feasible refined three-dimensional terrain modeling method, without the need for complex geometric model processing, realizes the integrated construction of three-dimensional terrain models in the engineering area, and is suitable for finite element numerical simulation.
Smart Images

Figure CN119810347A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of finite element numerical simulation of civil and hydraulic engineering, and in particular, relates to a refined three-dimensional terrain modeling method that can be used for finite element calculation. Background Art
[0002] Refined 3D terrain modeling can capture the tiny details of the terrain, including terrain undulations, geomorphic features, etc., to achieve high-precision terrain reproduction. This high precision is crucial for numerical simulation of civil and water conservancy projects, which often involve complex terrain areas such as slopes and canyons. Refined 3D terrain modeling can help designers accurately construct design objects in a virtual environment, reduce design errors, and improve design accuracy. It supports complex terrain analysis, such as slope analysis, watershed analysis, terrain profile analysis, etc., providing an important basis for research and application in related engineering fields, and is also the basis for finite element numerical simulation.
[0003] However, considering the complexity of building a refined three-dimensional model and its impact on computational efficiency, engineers and technicians often choose to simplify the three-dimensional terrain model, which also results in reduced local accuracy, changes in stress distribution, and impact on boundary conditions. With the continuous development of cloud computing and high-performance computing technology, model complexity and computational complexity are no longer constraints on computational efficiency, and building a refined three-dimensional terrain model has become a trend in the development of finite element numerical simulation technology. Therefore, it is necessary to propose a convenient and feasible refined three-dimensional terrain modeling technology method that can realize the transformation of traditional CAD terrain drawing information into a three-dimensional terrain model, so that engineers and technicians can carry out more refined numerical simulation research. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a refined three-dimensional terrain modeling method that can be used for finite element calculations. By extracting and converting CAD two-dimensional terrain drawing information, the conversion of two-dimensional drawings into three-dimensional refined terrain geometric models is realized, providing an efficient and convenient geometric modeling method for engineering and technical personnel to carry out three-dimensional finite element numerical simulation of related engineering areas.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is: a refined three-dimensional terrain modeling method that can be used for finite element calculation, comprising the following steps: Step 1: Use AutoCAD to pre-process the topographic drawing information of the project area; Step 2: Use AutoCAD to extract point cloud data from the pre-processed drawing information; Step 3: Use Matlab associated finite element analysis software to construct an interpolation function and establish a parameterized surface based on the interpolation function.
[0006] In a preferred solution, the preprocessing of the topographic drawing information of the project area by using AutoCAD comprises the following steps: S101. Open the topographic drawing in AutoCAD and determine the topographic range within the engineering analysis area; S102, querying the elevation data information of each contour line within the terrain range, if there are contour lines without elevation data, supplementing the elevation information of each contour line in the area; S103. Query the line type characteristics of the contour lines, and modify the line type of each contour line in the project area to a polyline.
[0007] In a preferred solution, in step S103, if the contour line type is a spline curve, the spline curve is converted into a polyline using a decomposition command of the CAD software.
[0008] In a preferred solution, the point cloud data extraction from the pre-processed drawing information using AutoCAD comprises the following steps: S201, data extraction: extracting point cloud data of terrain contour lines; S202. Output the data information extracted in step S201 in .xls format.
[0009] In a preferred solution, in step S201, data extraction includes the following steps: 1) Select data source: Select the corresponding regional terrain contour point cloud data as the data source according to the project analysis area; 2) Select the data object in the data source: select the straight line as the object to extract data; 3) Extract the endpoint coordinates of the straight line to form the point cloud data of the terrain contour line.
[0010] In a preferred embodiment, the step three comprises the following steps: S301, reading the .xls format data file output in step S202 through Matlab software, outputting the x, y, and z coordinates of the engineering area, the maximum and minimum values of the x and y coordinates are used to clarify the boundary points of the engineering area on the xy plane, and the z coordinate represents the elevation of each data point, and outputting the data file as a .txt format file; S302, Matlab software associated with finite element analysis software; S303, in Matlab software, setting an interpolation function of the point cloud data, using the interpolation function to interpolate the elevation data z between each point cloud, and obtaining an interpolation function expression; S304: construct a parameterized surface of the interpolation function, set the tolerance and the maximum number of interpolation points, and obtain a refined three-dimensional terrain model.
[0011] In the preferred solution, in step S303, x , y The coordinate data are the independent variables Var1 and Var2, and the elevation data of each data point is expressed as a function related to the independent variables Var1 and Var2 to obtain an interpolation function.
[0012] In a preferred solution, step S303 includes the following steps: 1) The radial basis function is used to interpolate the elevation data z between each point cloud. The expression is: (1); Where: w is the weight of the radial basis function; p =( x p , y p ) is the center selected in the two-dimensional plane point cloud data; d is from xy The radial distance from any other point in the plane to the center is, represents radial basis function; 2) In a limited number N sums over different centers with different weights and optionally adds a linear polynomial with weights , thus obtaining the expression of the radial basis interpolation function: (2); Where: q 0, q 1, q 2 is a polynomial The weight coefficient of .
[0013] In a preferred embodiment, for the limited number N The point cloud data with different centers and different weights are solved by linear equations, and the smooth surface is interpolated by radial basis function. The linear equations are expressed as follows: (3); Where: EA represents the elevation data of the center point of point cloud interpolation; … Respectively represent the first group of centers to the N Group-centered x Coordinates and y coordinate; … Respectively represent the first group of centers to the N The weights of the radial basis functions corresponding to the group centers; … Respectively represent 1 to NThe elevation of a point cloud data center.
[0014] In a preferred solution, the radial basis function is a thin plate spline function, and the expression is: (4).
[0015] The present invention provides a refined three-dimensional terrain modeling method that can be used for finite element calculation, which has the following beneficial effects: 1. The present invention provides an efficient and feasible method for refined three-dimensional terrain modeling, which does not require complex geometric model processing. By extracting and processing point cloud data, the integrated construction of the three-dimensional terrain model in the engineering area is realized.
[0016] 2. The refined three-dimensional terrain modeling method provided by the present invention is highly operational, can construct a parametric terrain geometry model according to engineering technical requirements, can be output to finite element analysis software in a variety of three-dimensional image format files, and has good correlation and compatibility. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The present invention will be further described below in conjunction with the accompanying drawings and embodiments: Figure 1 It is an implementation flow chart of a refined three-dimensional terrain modeling method that can be used for finite element calculations provided by an embodiment of the present invention; Figure 2 A CAD topographic drawing provided by an embodiment of the present invention can be used in a refined three-dimensional terrain modeling method for finite element calculation; Figure 3 It is a refined three-dimensional terrain surface geometric model that can be used in a refined three-dimensional terrain modeling method for finite element calculation provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0019] This embodiment aims at three-dimensional modeling of the terrain on both sides of a river channel of a water conservancy project, and the process of using the technical method of the present invention is as follows: Figure 1 shown.
[0020] A refined three-dimensional terrain modeling method that can be used for finite element calculation includes the following steps: S1. Open the topographic drawing in AutoCAD and determine the terrain range within the engineering analysis area.
[0021] Specifically, a river terrain contour drawing in dwg format file is opened based on AutoCAD, and the relevant graphic features outside the project area are cleared to obtain the following: Figure 2 Topographic contour drawing shown.
[0022] S2. Query the elevation data information of each contour line within the terrain range. After querying the elevation data information of each contour line within the terrain range, if there are contour lines without elevation data, supplement the elevation information of each contour line in the area. Specifically, select the "Properties" option in AutoCAD to supplement the elevation information of each contour line in the area in the elevation column.
[0023] right Figure 2 Carry out characteristic query on the contour lines in the drawing and supplement the elevation information of each contour line in the area.
[0024] S3. Check the contour line type characteristics and modify the contour line type of each contour line in the project area to a polyline. If the contour line type is a spline curve, decompose it into a polyline. Specifically, use the "decompose" command in the CAD editor interface to convert it into a polyline.
[0025] Query Figure 2 Change the contour line type of the drawing and modify the contour line type of each contour line in the project area to a polyline to facilitate the acquisition of point cloud information on the contour line.
[0026] S4. Data extraction: Extract the point cloud data of terrain contour lines. Select the Extract Data option through the annotation option of the AutoCAD tool.
[0027] The following steps are involved: S401, select data source: select the corresponding regional terrain contour point cloud data as the data source according to the project analysis area.
[0028] S402. Select a data object in the data source: select a straight line as the object for extracting data, which is also the graphic object after the contour line is processed into a polyline.
[0029] S403, extract the endpoint coordinates of the straight line to form the point cloud data of the terrain contour line. Here, you need to select the point cloud data of each point cloud data. x , y , z Three-dimensional coordinates.
[0030] S5. The data information extracted in step S4 is output in .xls format and saved in the Matlab working directory folder.
[0031] S6. Read the .xls format data file output in step S5 through Matlab software. Specifically, open the Matlab program and use the "readtable" command to read the .xls format data file saved in S5, and the reading directory is the current working directory.
[0032] Output the x, y, and z coordinates of the project area. The maximum and minimum values of the x and y coordinates are used to clarify the boundary points of the project area on the xy plane, and the z coordinate represents the elevation of each data point. In this embodiment, the maximum and minimum values of x are 528.23 and -782.42, respectively, and the maximum and minimum values of y are 893.49 and -445.56, respectively, indicating the specific boundary range of the project area on the xy plane.
[0033] Output the data file as a .txt file. Specifically, use the "writematrix" command to output the data file as a .txt file.
[0034] S7. Matlab software is associated with finite element analysis software. In the present embodiment, the finite element analysis software is COMSOL software, which is developed based on Matlab programming language, has strong expansion and development functions, and has good data transmission compatibility.
[0035] In the Matlab program, the "model.open" command is used to associate the COMSOL finite element analysis software, the format of which is a .mph file, which is used for the engineering three-dimensional finite element simulation in this embodiment.
[0036] S8. In Matlab software, an interpolation function of the point cloud data is set, and the elevation data z between each point cloud is interpolated using the interpolation function to obtain an interpolation function expression.
[0037] make x , y The coordinate data are the independent variables Var1 and Var2, and the elevation data of each data point is expressed as a function related to the independent variables Var1 and Var2 to obtain an interpolation function.
[0038] In the Matlab program, the interpolation function of the point cloud data is set by the command "model.func.create('Ele', 'Interpolation')": let the x and y coordinate data be the independent variables s1 and s2 respectively, and the elevation data z of each data point be the function related to the independent variables s1 and s2, and the function name is recorded as Ele, that is, Ele= f (s1, s2).
[0039] The specific steps include: S801, use radial basis function to interpolate the elevation data z between each point cloud, the expression is: ; Where: w is the weight of the radial basis function; p =( x p , y p ) is the center selected in the two-dimensional plane point cloud data; d is from xy The radial distance from any other point in the plane to the center is, represents radial basis function. A radial basis function (RBF) generally refers to an arbitrary function defined based on the distance to a certain point. In this embodiment, the radial basis function uses a thin plate spline function, which is smooth everywhere and can be infinitely differentiated. Its expression is: .
[0040] S802: Summing over a finite number N of different centers with different weights, and selectively adding a linear polynomial with weights , thus obtaining the expression of the radial basis interpolation function: ; Where: q 0, q 1, q 2 is a polynomial The weight coefficient of .
[0041] For a limited number N The point cloud data is solved by a linear equation system, and a smooth surface is obtained by interpolation using radial basis functions. The linear equation system is expressed as follows: ; Where: EA represents the elevation data of the center point of point cloud interpolation; … Respectively represent the first group center to the Nth group center x Coordinates and y coordinate; … Respectively represent the weights of the radial basis functions corresponding to the first group of centers to the Nth group of centers; Represents the radial basis function corresponding to the center point; … Respectively represent 1 to N The elevation of a point cloud data center.
[0042] When solving the above linear equations, a mesh is required at all points. A free tetrahedral mesh is applied to the point cloud data boundary box, and then the COMSOL steady-state solver is used to solve it, thereby obtaining an interpolated surface function, which can draw a smooth surface of the point cloud data elevation.
[0043] With enough center points, the sum of a set of basis functions can be used to represent a complex single-valued function. When using thin plate spline basis functions, the function is smooth everywhere and can be infinitely differentiated. Thus, a finite set of center point positions is obtained. p 1, p 2, and their corresponding known heights z i , a linear system of equations can be constructed. The smooth interpolation function can be obtained by calculating the sum of the weighted radial basis functions at any other point in the xy plane.
[0044] S9. Construct a parameterized surface of the interpolation function, i.e., a refined three-dimensional terrain model, and set the tolerance and the maximum number of interpolation points. The independent variables Var1 and Var2 need to input their respective maximum and minimum values to determine the xy plane range of the constructed surface. In addition, the expressions of the x, y, and z coordinates are input as Var1, Var2, and Ele(Var1, Var2), respectively.
[0045] In the Matlab program, the parameterized surface of the interpolation function is constructed by the command "model.component.geom.create('ps1', 'ParametricSurface')", and the tolerance is set to 0.01 and the maximum number of interpolation points is set to 100. The smaller the tolerance or the larger the maximum number of interpolation points, the finer the constructed three-dimensional model. Finally, the refined three-dimensional terrain surface geometric model established in this embodiment is as follows: Figure 3 As shown in the figure, the terrain model is consistent with the current status of the project and can be further simulated and analyzed in finite element numerical simulation software.
[0046] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A refined three-dimensional terrain modeling method that can be used for finite element calculation, characterized in that: The following steps are involved: Step 1: Use AutoCAD to pre-process the topographic drawing information of the project area; Step 2: Use AutoCAD to extract point cloud data from the pre-processed drawing information; Step 3: Use Matlab associated finite element analysis software to construct an interpolation function and establish a parameterized surface based on the interpolation function.
2. A refined three-dimensional terrain modeling method that can be used for finite element calculation according to claim 1, characterized in that: The method of preprocessing the topographic drawing information of the project area by using AutoCAD includes the following steps: S101. Open the topographic drawing in AutoCAD and determine the topographic range within the engineering analysis area; S102, querying the elevation data information of each contour line within the terrain range, if there are contour lines without elevation data, supplementing the elevation information of each contour line in the area; S103. Query the line type characteristics of the contour lines, and modify the line type of each contour line in the project area to a polyline.
3. The refined three-dimensional terrain modeling method applicable to finite element calculation according to claim 2, characterized in that: In step S103, if the contour line type is a spline curve, the spline curve is converted into a polyline using a decomposition command of the CAD software.
4. The refined three-dimensional terrain modeling method applicable to finite element calculation according to claim 2, characterized in that: The method of extracting point cloud data from pre-processed drawing information using AutoCAD includes the following steps: S201, data extraction: extracting point cloud data of terrain contour lines; S202. Output the data information extracted in step S201 in .xls format.
5. The refined three-dimensional terrain modeling method applicable to finite element calculation according to claim 4, characterized in that: In step S201, data extraction includes the following steps: 1) Select data source: Select the corresponding regional terrain contour point cloud data as the data source according to the project analysis area; 2) Select the data object in the data source: select the straight line as the object to extract data; 3) Extract the endpoint coordinates of the straight line to form the point cloud data of the terrain contour line.
6. The refined three-dimensional terrain modeling method applicable to finite element calculation according to claim 4, characterized in that: The step three includes the following steps: S301, reading the .xls format data file output in step S202 through Matlab software, outputting the x, y, and z coordinates of the engineering area, the maximum and minimum values of the x and y coordinates are used to clarify the boundary points of the engineering area on the xy plane, and the z coordinate represents the elevation of each data point, and outputting the data file as a .txt format file; S302, Matlab software associated with finite element analysis software; S303, in Matlab software, setting an interpolation function of the point cloud data, using the interpolation function to interpolate the elevation data z between each point cloud, and obtaining an interpolation function expression; S304: construct a parameterized surface of the interpolation function, set the tolerance and the maximum number of interpolation points, and obtain a refined three-dimensional terrain model.
7. The refined three-dimensional terrain modeling method applicable to finite element calculation according to claim 6, characterized in that: In step S303, x , y The coordinate data are the independent variables Var1 and Var2, and the elevation data of each data point is expressed as a function related to the independent variables Var1 and Var2 to obtain an interpolation function.
8. The refined three-dimensional terrain modeling method applicable to finite element calculation according to claim 6, characterized in that: The step S303 includes the following steps: 1) Use radial basis function to interpolate the elevation data z between each point cloud. The expression is: (1); Where: w is the weight of the radial basis function; p =( x p , y p ) is the center selected in the two-dimensional plane point cloud data; d is from xy The radial distance from any other point in the plane to the center is, represents radial basis function; 2) In a limited number N sums over different centers with different weights and optionally adds a linear polynomial with weights , thus obtaining the expression of the radial basis interpolation function: (2); Where: q 0, q 1, q 2 is a polynomial The weight coefficient of .
9. The refined three-dimensional terrain modeling method applicable to finite element calculation according to claim 8, characterized in that: For the limited number N The point cloud data with different centers and different weights are solved by linear equations, and the smooth surface is interpolated by radial basis function. The linear equations are expressed as follows: (3); Where: EA Represents the elevation data of the center point of the point cloud interpolation; … Respectively represent the first group center to the N Group-centered x Coordinates and y coordinate; … Respectively represent the first group of centers to the N The weights of the radial basis functions corresponding to the group centers; … Respectively represent 1 to N The elevation of a point cloud data center.
10. The refined three-dimensional terrain modeling method applicable to finite element calculation according to claim 8, characterized in that: The radial basis function uses a thin plate spline function, and the expression is: (4)。
Citation Information
Patent Citations
Digitalization generating method for microscopic road surface morphology
CN106096149A
Side slope point cloud curved surface reconstruction and deformation information extracting method
CN106504327A
Side slope three-dimensional finite element mesh generation method under complex geological condition
CN107886573A
Method for building three-dimensional terrain finite element model
CN108520097A
A three-dimensional geologic body modeling method based on three-dimensional laser point cloud data
CN109816788A