Tunnel structure response cloud picture visualization method based on Three.js

By combining finite element software and Three.js, the vertex coordinates of the tunnel displacement are extracted and three-dimensionally visualized on the Web, which solves the problem of cross-platform cloud image display and enables intuitive attention and convenient viewing of the tunnel structural response.

CN118536196AActive Publication Date: 2024-08-23HUAZHONG UNIV OF SCI & TECH
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202410677927.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-29
Publication Date
2024-08-23
Estimated Expiration
2044-05-29

AI Technical Summary

Technical Problem

It is difficult to achieve cross-platform three-dimensional visualization of tunnel structure response clouds with existing technology. Especially in the case of fault displacement, the visual display of finite element software is not convenient for cross-platform display and cannot directly focus on the displacement of the tunnel.

Method used

Combining the finite element software and the Three.js front-end 3D engine, the finite element model of the tunnel is established, the coordinates of each vertex in the tunnel displacement process are extracted, and the 3D visualization of the tunnel structure response cloud diagram is realized on the web platform, using the gltf format model And the traverse function of Three.js traverses the model, obtains and processes vertex coordinates, and amplifies the displacement data to achieve a color gradient effect.

Benefits of technology

It realizes cross-platform three-dimensional visualization of the tunnel structure response cloud map, lowers the threshold for cloud map viewing, does not require downloading any software, improves viewing efficiency and convenience, and allows intuitive attention to the tunnel's displacement under faults.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118536196A
    Figure CN118536196A
Patent Text Reader

Abstract

The invention provides a tunnel structure response cloud picture visualization method based on Three.js. Comprising the following steps: establishing a finite element model of a target tunnel by utilizing a tunnel design drawing, and performing tunnel structure response numerical simulation to obtain a gltf-format grid model of a tunnel secondary lining; traversing the tunnel second lining gltf format model through Three.js to extract each vertex coordinate in the tunnel dislocation displacement process; according to the coordinates of all the vertexes in the tunnel dislocation displacement process, a tunnel transverse displacement result corresponding to the tunnel dislocation displacement in finite element simulation is obtained; and the Three.js realizes three-dimensional visualization of a tunnel structure response cloud picture on a Web end platform according to a tunnel transverse displacement result. According to the method provided by the invention, the cross-platform tunnel structure response cloud picture visualization is realized, and the structural response of the tunnel in the construction and operation process can be more conveniently and intuitively concerned.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of tunnel cloud image visualization, and in particular to a tunnel structure response cloud image visualization method based on Three.js. Background Art

[0002] Studies have shown that active fault movement can cause great damage to tunnel structures, especially some highly active faults with a wide range of influence, which have a great impact on tunnel construction and operation and maintenance. Therefore, it is necessary to increase attention to the response of tunnel structures under fault movement and improve tunnel control and prevention measures from multiple perspectives, dimensions and platforms.

[0003] According to the actual engineering background, finite element software can be used to establish a tunnel entity model, so as to perform finite element simulation analysis on the tunnel structure and obtain the simulation results of the tunnel structure response (including stress, strain, displacement, etc.). However, the visualization of finite element results often relies on the corresponding finite element software, and it is difficult to achieve cross-platform cloud map visualization. The front-end web page rendering only needs to be based on the browser to achieve efficient and fast three-dimensional visualization functions, but the simple model visualization lacks data support and cannot directly focus on the displacement of the tunnel under the fault.

[0004] Therefore, how to realize three-dimensional visualization of tunnel structure response cloud map across platforms has become an urgent problem that needs to be solved. Summary of the invention

[0005] The present invention provides a tunnel structure response cloud map visualization method based on Three.js, which combines finite element analysis with a front-end three-dimensional engine, solving the problem that cross-platform cloud map visualization is difficult to achieve.

[0006] A tunnel structure response cloud map visualization method based on Three.js, comprising:

[0007] Step 1: Obtain tunnel design drawings;

[0008] Step 2: Establish a finite element model of the target tunnel according to the tunnel design drawings, and use the finite element model to perform finite element simulation of tunnel displacement to obtain a gltf format mesh model of the tunnel secondary lining;

[0009] Step 3: traverse the tunnel second lining gltf format model through Three.js to extract the coordinates of each vertex during the tunnel displacement process;

[0010] Step 4: according to the coordinates of each vertex in the tunnel displacement process, obtaining the tunnel lateral displacement result corresponding to the tunnel displacement in the finite element simulation;

[0011] Step 5: Three.js realizes the three-dimensional visualization of the tunnel structure response cloud map on the Web platform according to the tunnel lateral displacement results.

[0012] Furthermore, in the tunnel structure response cloud map visualization method based on Three.js as described above, the step 2 includes:

[0013] Step 21: using the finite element model to simulate the tunnel structure response under fault displacement;

[0014] Step 22: According to the response, use the Mesh module of the finite element model to export the obj format mesh model of the tunnel secondary lining through the Export function;

[0015] Step 23: Import the bj format mesh model of the second tunnel lining into the Three.js editor, and use the obj2gltf tool to convert the obj format mesh model into a gltf format mesh model.

[0016] Furthermore, in the tunnel structure response cloud map visualization method based on Three.js as described above, step three includes:

[0017] The gltf format grid model is traversed through the traverse function of Three.js to obtain the coordinates of each vertex in the process of tunnel displacement.

[0018] Furthermore, in the tunnel structure response cloud map visualization method based on Three.js as described above, step 4 includes:

[0019] Step 41: Processing the coordinates of each vertex in the tunnel displacement process into Excel data;

[0020] Step 42: Run the python code in the finite element software to read the tunnel lateral displacement results corresponding to the Excel data; the tunnel lateral displacement results include: the coordinates of each vertex of the model and the lateral displacement determined according to the coordinates of each vertex.

[0021] Furthermore, in the tunnel structure response cloud map visualization method based on Three.js as described above, in step 42, the tunnel lateral displacement result includes: model vertex coordinates of 1 to 20 frames and lateral displacement determined according to the model vertex coordinates of 1 to 20 frames.

[0022] Furthermore, in the tunnel structure response cloud map visualization method based on Three.js as described above, step five includes:

[0023] Step 51: converting the tunnel lateral displacement result into an array file in json format, and using the $.getJSON function in Three.js to read the json file to obtain the tunnel displacement data of the tunnel lateral displacement result in Three.js;

[0024] Step 52: After the tunnel displacement data in the Three.js is magnified several times, the magnified tunnel displacement data is used to realize the three-dimensional visualization of the tunnel structure response cloud map on the Web platform.

[0025] Further, in the tunnel structure response cloud map visualization method based on Three.js as described above, step 52 includes:

[0026] Step 521: Generate a tunnel geometry in Three.js using the amplified tunnel displacement data; and perform normalization processing on the tunnel displacement data using the tunnel displacement data in Three.js to obtain a normalized result.

[0027] Step 522: According to different materials of the tunnel geometric bodies, the normalization results are used to perform color gradients on the tunnel geometric bodies of different materials, so as to achieve three-dimensional visualization of the tunnel structure response cloud map on the Web platform.

[0028] Furthermore, in the above-mentioned tunnel structure response cloud map visualization method based on Three.js, the normalization processing of the amplified tunnel displacement data in step 521 includes:

[0029] Use lut.setMax to set the maximum displacement value and lut.setMin to set the minimum displacement value to complete the change of the tunnel displacement data value from 0 to 1.

[0030] Further, in the tunnel structure response cloud map visualization method based on Three.js as described above, step 522 includes:

[0031] According to the normalization result, the vertex colors of the tunnel geometric body are gradually changed with different values;

[0032] Mesh is used to render the gradient colors of tunnel geometries according to different materials, and finally three-dimensional visualization of the color gradient of the tunnel structure is realized on the Web platform according to different materials and displacement results.

[0033] The tunnel structure response cloud map visualization method based on Three.js provided by the present invention extracts the coordinates of each vertex in the tunnel displacement process through Three.js; and according to the coordinates of each vertex in the tunnel displacement process, finally realizes the three-dimensional visualization of the tunnel structure response cloud map on the Web platform, which has the advantages of both finite element and Web page, can realize cross-platform display of stress and displacement cloud maps, and enriches the content of the tunnel management and control platform. Moreover, there is no need to download any software and plug-ins, and the method provided by the present invention improves the efficiency of viewing cloud maps, takes less time, and is simple and convenient. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0035] Figure 1 A flow chart of a tunnel structure response cloud map visualization method based on Three.js provided by the present invention;

[0036] Figure 2 The visualization effect of the tunnel secondary lining displacement cloud map provided by the embodiment of the present invention;

[0037] Figure 3 The visualization effect of the tunnel secondary lining displacement cloud map under different frame numbers provided by the embodiment of the present invention;

[0038] Figure 4 This is the visualization effect of the lateral displacement of the second lining of the tunnel provided by the embodiment of the present invention after being magnified ten times. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0040] The calculation results of finite element software are generally presented through tables, pictures, and screenshots after analysis and processing. The method for cloud maps is to take screenshots. In addition, if other people want to view the cloud maps on the finite element software, they must download the corresponding finite element software, and then they need calculation files in cae, odb and other formats to view the complete finite element project, and issues such as versions need to be considered. Therefore, it is very inconvenient to use finite element software to realize cloud map visualization. The purpose of the present invention is to put all the finite element models and model result cloud maps in, and only a browser is needed on the computer to view the cloud map of the structure. Therefore, the present invention maps the cloud map effect in the finite element software to the Three.js platform through a series of operations, so that the cloud map effect of the structure can be observed on the web page without opening the finite element software, and the cross-platform visualization of the cloud map from the finite element software to the web page is realized, thereby reducing the threshold for viewing the cloud map.

[0041] Figure 1 The flowchart of the tunnel structure response cloud map visualization method based on Three.js provided by the present invention is as follows: Figure 1 As shown, the method includes:

[0042] Step 1: Obtain tunnel design drawings.

[0043] Specifically, the tunnel design drawings include data such as tunnel cross sections, longitudinal sections, and lining structure cross sections. The data provided by the tunnel design drawings can be used to establish a tunnel finite element model. The embodiment of the present invention uses Abaqus software to establish a finite element model of the target tunnel.

[0044] Step 2: Establish a finite element model of the target tunnel according to the tunnel design drawings, and use the finite element model to perform finite element simulation of tunnel displacement to obtain a gltf format mesh model of the tunnel secondary lining.

[0045] Specifically, the finite element model of the target tunnel is established using Abaqus software, and the model is used to simulate the tunnel structure response under fault displacement. Since the exported model in the finite element software Abaqus is only a mesh model in obj format, and the purpose of the present invention is to display the effect of tunnel displacement on the Web platform through Three.js, it is first necessary to convert the obj format mesh model of the tunnel secondary lining into a gltf format network model as an intermediate transition. The specific conversion method is:

[0046] The obj format mesh model of the second tunnel lining is imported into the Three.js editor. At this time, the model vertices are displayed as 0. Since the model needs to be colored according to the vertices of the model later, that is, the vertices are assigned colors, and each vertex corresponds to a different color, thereby achieving a color gradient effect, the model needs to be converted into a geometric model with vertices. The present invention uses the obj2gltf tool to convert the obj format mesh model of the second tunnel lining into the gltf format. At this time, the model vertex information is displayed normally instead of being 0.

[0047] In addition, the embodiment of the present invention only exports the network model of the second lining of the tunnel. On the one hand, this is to simplify the workload. On the other hand, this is because the embodiment of the present invention focuses on studying whether the lateral displacement of the second tunnel under fault dislocation meets the requirements of the specification. Therefore, what is finally exported is the gltf format grid model of the second lining of the tunnel.

[0048] Step 3: Use Three.js to traverse the tunnel second lining gltf format model to extract the coordinates of each vertex during the tunnel displacement process.

[0049] Specifically, the converted tunnel secondary lining gltf format model is imported into Three.js, and the traverse function is used to traverse the model to extract the coordinates of each vertex in the process of tunnel displacement.

[0050] Step 4: According to the coordinates of each vertex in the tunnel displacement process, the tunnel lateral displacement result corresponding to the tunnel displacement in the finite element simulation is obtained.

[0051] Specifically, the lateral displacement results of the tunnel in the finite element simulation corresponding to the coordinates of each vertex in the above-mentioned tunnel displacement process are extracted based on the python code.

[0052] The specific process of extraction is:

[0053] First, the coordinates of each vertex in the tunnel displacement process are processed into Excel data; then, Python code is run in the finite element software to read the tunnel lateral displacement results corresponding to the Excel data; the tunnel lateral displacement results include: the coordinates of each vertex of the model and the lateral displacement determined according to the coordinates of each vertex.

[0054] Furthermore, the python code extracts the lateral displacement corresponding to the model vertex coordinates of frames 1 to 20.

[0055] Since in the finite element simulation, the finite element software simulates a process of the tunnel structure from a normal initial state to a damaged state, there is also a series of processes before it is completely destroyed. The present invention can display multiple corresponding cloud map results on the Web platform by extracting the lateral displacement corresponding to the model vertex coordinates of 1 to 20 frames.

[0056] Step 5: Three.js realizes the three-dimensional visualization of the tunnel structure response cloud map on the Web platform according to the tunnel lateral displacement results.

[0057] This step specifically includes the following steps:

[0058] Firstly, the tunnel lateral displacement result is converted into an array file in json format, and the $.getJSON function in Three.js is used to read the json file to obtain the tunnel displacement data of the tunnel lateral displacement result in Three.js; then, the tunnel displacement data in Three.js is amplified several times, and the amplified tunnel displacement data is used to realize the three-dimensional visualization of the tunnel structure response cloud map on the Web platform.

[0059] Specifically, in order to quickly and conveniently read data and improve the code running efficiency, the embodiment of the present invention first stores the extracted tunnel model vertex coordinates and their corresponding displacement data as array files in json format, and uses the $.getJSON function in Three.js to read the json file to obtain the tunnel displacement data of the tunnel lateral displacement result in Three.js. Then, the tunnel lateral displacement data is multiplied by 10 times and stored as a new array, and added to the X coordinate of the tunnel model separately, and a new model is generated according to the changed coordinates to display the lateral displacement of the tunnel; finally, the amplified tunnel displacement data is used to realize the three-dimensional visualization of the tunnel structure response cloud map on the Web platform.

[0060] The following is a detailed description of how to achieve three-dimensional visualization of the tunnel structure response cloud map:

[0061] First, the amplified tunnel displacement data is used to generate a tunnel geometry in Three.js; at the same time, the tunnel displacement data in Three.js is used to normalize the tunnel displacement data, and according to the normalization result, the vertex color of the tunnel geometry is gradually changed with different values; then, according to the tunnel geometry of different materials, the gradient color of the tunnel geometry is rendered using Mesh, and finally the three-dimensional visualization of the tunnel structure with color gradient according to different materials and displacement results is realized on the Web platform.

[0062] Specifically, the lateral displacement of the secondary lining of the tunnel is the displacement in the X direction of the model. Since the original displacement is very small, it is difficult to observe the displacement result without amplification. Therefore, the present invention multiplies the tunnel lateral displacement result by 10 times and stores it as a new array, which is added to the X coordinate of the tunnel model separately, and a new model is generated according to the changed coordinates to display the lateral displacement of the tunnel.

[0063] Then create a geometry in Three.js, assign the read vertex data to the geometry through the BufferAttribute attribute, and generate a tunnel geometry. Then, use the lut function to normalize the tunnel displacement data so that the tunnel vertex color changes gradually with different displacement values. The specific normalization method is: use lut.setMax to set the maximum displacement value and lut.setMin to set the minimum displacement value to complete the change of the tunnel displacement data value from 0 to 1. Finally, assign the processed vertex color to the tunnel geometry, set the material object for the geometry, and use Mesh to render the tunnel vertex color to form a tunnel displacement cloud map effect.

[0064] Since the geometry material will not change the color itself, but it will optimize the display of the cloud effect, and different materials will show different effects, such as reflection effect, brightness increase / decrease, and making the color level more distinct, etc. Some geometry materials cannot render the vertex color of the model, so you need to set a material that can assign color to the vertex, and then use Mesh to render the tunnel vertex color to form a tunnel displacement cloud effect.

[0065] The method provided by the present invention realizes the visualization of tunnel structure response cloud charts across platforms, which can more conveniently and intuitively focus on the structural response of the tunnel during construction and operation.

[0066] Figure 2 The visualization effect of the tunnel secondary lining displacement cloud map displayed on the front-end web page. Figure 2 It can be seen that it is consistent with the results in the finite element method. Figure 3 This is the displacement cloud map of the second lining of the tunnel under different frame numbers. When displaying different frame numbers, you only need to extract the corresponding data and change the maximum and minimum values ​​of the displacement set by the LUT function. Figure 4 This is a visualization effect diagram of the lateral displacement of the second lining of the tunnel of the present invention after being magnified ten times, as shown in Figure 4 As shown in the figure, the lateral displacement of the tunnel is visualized after being magnified ten times. Since the original displacement is small and the deformation is not intuitive enough, the displacement of the tunnel can be clearly observed after the displacement is magnified ten times.

[0067] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A tunnel structure response cloud map visualization method based on Three.js, characterized in that: include: Step 1: Obtain tunnel design drawings; Step 2: Establish a finite element model of the target tunnel according to the tunnel design drawings, and use the finite element model to perform finite element simulation of tunnel displacement to obtain a gltf format mesh model of the tunnel secondary lining; Step 3: traverse the tunnel second lining gltf format model through Three.js to extract the coordinates of each vertex during the tunnel displacement process; Step 4: according to the coordinates of each vertex in the tunnel displacement process, obtaining the tunnel lateral displacement result corresponding to the tunnel displacement in the finite element simulation; Step 5: Three.js realizes the three-dimensional visualization of the tunnel structure response cloud map on the Web platform according to the tunnel lateral displacement results.

2. The tunnel structure response cloud map visualization method based on Three.js according to claim 1, characterized in that: The second step comprises: Step 21: using the finite element model to simulate the tunnel structure response under fault displacement; Step 22: According to the response, the mesh module of the finite element model is used to export the mesh model of the tunnel secondary lining in obj format through the Export function; Step 23: Import the bj format mesh model of the second tunnel lining into the Three.js editor, and use the obj2gltf tool to convert the obj format mesh model into a gltf format mesh model.

3. The tunnel structure response cloud map visualization method based on Three.js according to claim 1, characterized in that: The step three comprises: The gltf format grid model is traversed through the traverse function of Three.js to obtain the coordinates of each vertex in the process of tunnel displacement.

4. The tunnel structure response cloud map visualization method based on Three.js according to claim 1, characterized in that: The fourth step comprises: Step 41: Processing the coordinates of each vertex in the tunnel displacement process into Excel data; Step 42: Run the python code in the finite element software to read the tunnel lateral displacement results corresponding to the Excel data; the tunnel lateral displacement results include: the coordinates of each vertex of the model and the lateral displacement determined according to the coordinates of each vertex.

5. The tunnel structure response cloud map visualization method based on Three.js according to claim 4 is characterized in that: In step 42, the tunnel lateral displacement result includes: model vertex coordinates of frames 1 to 20 and lateral displacement determined according to the model vertex coordinates of frames 1 to 20.

6. The tunnel structure response cloud map visualization method based on Three.js according to claim 1, characterized in that: The step five comprises: Step 51: converting the tunnel lateral displacement result into an array file in json format, and using the $.getJSON function in Three.js to read the json file to obtain the tunnel displacement data of the tunnel lateral displacement result in Three.js; Step 52: After the tunnel displacement data in the Three.js is magnified several times, the magnified tunnel displacement data is used to realize the three-dimensional visualization of the tunnel structure response cloud map on the Web platform.

7. The tunnel structure response cloud map visualization method based on Three.js according to claim 6 is characterized in that: The step 52 comprises: Step 521: Generate a tunnel geometry in Three.js using the amplified tunnel displacement data; and perform normalization processing on the tunnel displacement data using the tunnel displacement data in Three.js to obtain a normalized result. Step 522: According to different materials of the tunnel geometric bodies, the normalization results are used to perform color gradients on the tunnel geometric bodies of different materials, so as to achieve three-dimensional visualization of the tunnel structure response cloud map on the Web platform.

8. The tunnel structure response cloud map visualization method based on Three.js according to claim 7 is characterized in that: The step 521 of normalizing the amplified tunnel displacement data includes: Use lut.setMax to set the maximum displacement value and lut.setMin to set the minimum displacement value to complete the change of the tunnel displacement data value from 0 to 1.

9. The tunnel structure response cloud map visualization method based on Three.js according to claim 7, characterized in that: The step 522 includes: According to the normalization result, the vertex colors of the tunnel geometric body are gradually changed with different values; Mesh is used to render the gradient colors of tunnel geometries according to different materials, and finally three-dimensional visualization of the color gradient of the tunnel structure is realized on the Web platform according to different materials and displacement results.

Citation Information

Patent Citations

  • Concurrent processing method and system based on parametric simulation

    CN110765663A

  • BIM-based steel structure complex construction process belt stress visual analysis method

    CN112182706A

  • Tunnel WEB monitoring visualization display technology based on BIM model

    CN114818086A

  • Tunnel construction intelligent management system based on BIM and WEB

    CN115544611A

  • Cross-platform three-dimensional visualization method, computing device and storage medium

    CN117454034A