A cross-platform continuous numerical simulation method

By generating animation files on the source platform and performing data reconstruction, the problem of incompatibility of simulation results between different platforms is solved, cross-platform numerical simulation and result analysis are realized, and the simulation results are made using data files in finite element or finite difference formats. Readable on the target platform.

CN114201895BActive Publication Date: 2024-09-27TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111410556.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-25
Publication Date
2024-09-27
Estimated Expiration
2041-11-25

AI Technical Summary

Technical Problem

The discrete models and intermediate simulation results between different platforms in the existing technology are incompatible and difficult to convert, resulting in the inability to continue numerical simulation or in-depth analysis of the simulation data on the target platform.

Method used

By generating animation files of simulation results on the source platform, sectioning along the x, y or z axis direction, extracting cross-section pictures and performing preprocessing and data reconstruction, establishing the corresponding relationship between pixels and simulation result values, and converting them into finite elements or a data file in finite difference format, making it readable on the target platform.

Benefits of technology

Platform portability of numerical simulation results across platforms is achieved, allowing numerical simulation and result analysis to continue on the target platform, giving full play to the advantages of each platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114201895B
    Figure CN114201895B
Patent Text Reader

Abstract

The present invention discloses a cross-platform continuous numerical simulation method. Firstly, the post-processing function of the source numerical simulation platform is used to output the numerical simulation result as an animation file composed of a series of cross sections along the x, y or z direction. Then, the cross-sectional cloud map images of the series of numerical simulation results are extracted from the animation file. Then, the series of cloud map images are color-repaired, especially for the blurring, distortion and noise of the images caused by compression and other processing. Finally, the pixel color values ​​and the numerical simulation result values ​​corresponding to the color map in the image are read to establish a corresponding relationship between the color value and the simulation result value. According to the corresponding relationship, the cross-sectional cloud map of the series of simulation results is reversely converted into a discrete model and a simulation result data file according to the format of the target numerical simulation platform as the discrete model and initial conditions of the target platform, thereby realizing the integration from the source platform to the target platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of numerical simulation, and in particular to a cross-platform continuous numerical simulation method. Background Art

[0002] Numerical simulation is a commonly used method in design, mechanism research and optimization. Each numerical simulation platform has an independent discrete model and simulation result data format, a unique simulation module, and certain functional limitations. Therefore, simulation often requires the integration of multiple simulation platforms to perform cross-platform simulation in order to give full play to the advantages and unique functions of different simulation platforms.

[0003] In the prior art, discrete models and intermediate simulation results between different platforms are often incompatible and difficult to convert. Moreover, the data format of numerical simulation results of many simulation software is not public, there is no interface, and the model and calculation result data cannot be read. In this case, the source data of the simulation data cannot be obtained, and cross-platform simulation cannot be continued.

[0004] Purpose of the Invention

[0005] The purpose of the present invention is to address the deficiencies in the prior art and to provide a cross-platform continuous simulation method so as to achieve platform portability of simulation results based on cross-sectional animation expression, and to achieve reverse conversion from animation files of simulation results of the source platform to simulation result data files readable by the target platform, so as to continue numerical simulation on the target platform or conduct in-depth analysis of the results. Summary of the invention

[0006] The present invention provides a cross-platform continuous simulation method, comprising the following steps:

[0007] Step 1, generating a cloud map animation based on the simulation results of the source simulation platform, specifically: for a source numerical simulation platform that does not disclose simulation results and data results, the simulation result of a certain physical quantity of the source numerical simulation platform at a certain moment is cut along the x, y or z axis direction in its post-processing module, and the changes of the cut section result cloud map are saved as an animation file;

[0008] Step 2, extracting each cross-sectional image in the animation, i.e., reading the animation file described in step 1, and extracting a series of cross-sectional cloud images of numerical simulation results; recording image information in finite element format, corresponding each pixel to a hexahedral unit, i.e., the four nodes of each pixel and the four nodes of the corresponding pixels of the adjacent slice image together form a hexahedral unit, and its eight nodes (i, j, k), (i+1, j, k), (i+1, j+1, k), (i, j+1, k), (i+1, j, k+1), (i+1, j, k+1), (i+1, j+1, k+1), (i, j+1, k+1) constitute 8 vertices of the hexahedron, wherein i, j, k refer to the coordinate values ​​corresponding to the x, y, and z axes in the three-dimensional coordinate system respectively; the simulation result value of the hexahedral unit is obtained by corresponding to the color value of the pixel;

[0009] Step 3: Preprocess the extracted images. Specifically, if the image quality is poor or there are text or other obstructions in some places, remove the interference in the image and repair the image. Perform denoising and other preprocessing for the image blurring and noise caused by image compression. Judge the color value of each pixel and its adjacent pixels, identify isolated pixels or protruding pixels, and modify their color values ​​to the background color to eliminate burrs in the image.

[0010] Step 4: Extract the three-dimensional model of the image and reconstruct the data.

[0011] Preferably, in step 1, the sectioning is performed in a direction perpendicular to the coordinate axis of the arc surface, and the sectioning step length δ is 1 / 10-1 / 3 of the thinnest part of the workpiece; the number of animation frames n of the animation is l / δ, wherein l is the maximum length of the workpiece along the sectioning direction, and the resolution of the image in the animation is l / δ of the maximum length l of the workpiece parallel to the sectioning section; a fixed color scale is selected, the maximum value of the color scale corresponds to the maximum value of the simulation result, and the minimum value of the color scale corresponds to the minimum value of the simulation result; the color scale selects a continuous color scale, and a color that is clearly distinguished from the background color, the length direction of the color scale area fills more than 70% of the entire image, and the displayed section of the section is parallel to the display window.

[0012] Optionally, in step 2, a hexahedron is split into five tetrahedrons for representation, and simulation result values ​​of the split five tetrahedrons are simulation result values ​​of corresponding pixels.

[0013] Preferably, step 4 further comprises the following sub-steps:

[0014] Step S41, read the color bar colormap in the extracted image, and establish the corresponding relationship between the color value and the numerical simulation result value as shown in formula (1):

[0015] C[i±b][j±b][k±b]=tc[m] (1),

[0016] Among them, C is the numerical simulation result query array, C[i][j][k] is the numerical simulation result corresponding to the ijk pixel level, tc[m] is the simulation result value, the variation range of i, j, k is 0-255, m is the number of color levels, b is a constant with a value range of 0-10, which is used to allow a small fluctuation in the color range to avoid the situation where some colors cannot find matching colors;

[0017] Step S42: read the series of sliced ​​images, and convert the RGB color channel value of each pixel of each image into the numerical simulation result value of the current pixel according to the corresponding relationship between the pixel color value and the numerical simulation result value, as shown in formula (2):

[0018] t[i][j][k]=C[i][j][k] (2),

[0019] Among them, i, j, and k are the pixels corresponding to the pixel width, height number, and slice number, respectively;

[0020] Step S43: If the color of the color bar does not completely match the workpiece simulation result, and the color values ​​of the three channels of each color bar fluctuate, first establish a corresponding relationship between the pixel and the result value as shown in formula (3):

[0021] M[i][j]=tc[m] (3),

[0022] In the formula Rm, Gm, Bm are the color values ​​of the RGB channels of the m-level color scale, a is a constant, ranging from 0.1 to 0.3, and c is a constant value, ranging from 1 to 10;

[0023] Next, the ratio of the three RGB channel values ​​is used to match the numerical simulation results and the color values. The simulation result value corresponding to a certain pixel is shown in formula (4):

[0024] t[i][j][k]=M[p][q] (4),

[0025] In the formula, i, j, and k are the pixels corresponding to the pixel width, height number, and slice number, respectively;

[0026]

[0027] Preferably, the recording format of the data file output after data reconstruction in step 4 adopts a finite difference format or a finite element format; when the finite difference format is adopted, one pixel corresponds to one grid, and the grid numbers i, j, and k are the width, height, and slice numbers of the pixel respectively; the numerical simulation result value of the grid is the simulation result value obtained by pixel color conversion. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 This is a schematic diagram of one pixel corresponding to one hexahedral unit when recording in finite element format.

[0029] Figure 2 It is a schematic diagram of the effect of cross-platform conversion example in an embodiment of the present invention. DETAILED DESCRIPTION

[0030] The cross-platform continuous numerical simulation method described in the present invention is described in detail below with reference to the accompanying drawings. It should be stated that the description and specific embodiments here are only used to exemplarily illustrate the ideas and principles of the present invention. The described embodiments are only part of the embodiments of the present invention and only show part of the functions, not all of the functions. They should not be regarded as limiting the scope of protection of the present invention. Any modifications and substitutions that do not deviate from the soul and purpose of the present invention fall within the scope of the present invention.

[0031] A cross-platform continuous simulation method according to the present invention comprises the following steps:

[0032] Step 1, based on the simulation result cloud map animation of the source simulation platform, specifically: for the source numerical simulation platform that does not disclose the simulation results and data results, the simulation result of a certain physical quantity of the source numerical simulation platform at a certain moment is cut along the x, y or z axis direction in its post-processing module, and the changes in the section result cloud map are saved as an animation file; the coordinate axis direction perpendicular to the arc surface is selected for cutting, and the cutting step δ is 1 / 10-1 / 3 of the thinnest part of the workpiece; the number of animation frames of the animation n=l / δ, where l is the maximum length of the workpiece along the cutting direction, and the resolution of the image in the animation is l / δ of the maximum length l of the workpiece parallel to the cutting section direction; a fixed color scale is selected, the maximum value of the color scale corresponds to the maximum value of the simulation result, and the minimum value of the color scale corresponds to the minimum value of the simulation result; the color scale selects a continuous color scale, and a color that is clearly distinguished from the background color, the length direction of the color scale area fills more than 70% of the entire image, and the display section of the cut is parallel to the display window.

[0033] Step 2: Extracting each cross-section image in the animation, that is, reading the animation file described in step 1, and extracting a series of cross-section cloud images of numerical simulation results; using finite element format to record image information, corresponding each pixel to a hexahedral unit, such as Figure 1As shown. That is, the four nodes of each pixel and the four nodes of the corresponding pixels of the adjacent slice image together form a hexahedral unit, and its eight nodes (I,j,k), (i+1,j,k), (i+1,j+1,k), (I,j+1,k), (i,j,k+1), (i+1,j,k+1), (i+1,j+1,k+1), (I,j+1,k+1) constitute the eight vertices of the hexahedron, where i, j, k refer to the coordinate values ​​corresponding to the x, y, and z axes in the three-dimensional coordinate system respectively; the simulation result value of the hexahedral unit is obtained by corresponding to the color value of the pixel;

[0034] Step 3: Preprocess the extracted images. Specifically, if the image quality is poor or there are text or other obstructions in some places, remove the interference in the image and repair the image. Perform denoising and other preprocessing for the image blurring and noise caused by image compression. Judge the color value of each pixel and its adjacent pixels, identify isolated pixels or protruding pixels, and modify their color values ​​to the background color to eliminate burrs in the image.

[0035] Step 4: Extract the 3D model of the image and reconstruct the data, which specifically includes the following sub-steps:

[0036] Sub-step S41, read the color bar colormap in the extracted image, and establish the corresponding relationship between the color value and the numerical simulation result value as shown in formula (1):

[0037] C[i±b][j±b][k±b]=tc[m] (1),

[0038] Among them, C is the numerical simulation result query array, C[i][j][k] is the numerical simulation result corresponding to the ijk pixel level, tc[m] is the simulation result value, the variation range of i, j, k is 0-255, m is the number of color levels, b is a constant with a value range of 0-10, which is used to allow a small fluctuation in the color range to avoid the situation where some colors cannot find matching colors;

[0039] Sub-step S42, read the series of sliced ​​images, and convert the RGB color channel value of each pixel of each image into the numerical simulation result value of the current pixel according to the corresponding relationship between the pixel color value and the numerical simulation result value, as shown in formula (2):

[0040] t[i][j][k]=C[i][j][k] (2), where i, j, and k are the pixels corresponding to the pixel width, height number, and slice number, respectively;

[0041] Sub-step S43: If the color of the color bar does not completely match the workpiece simulation result, and the color values ​​of the three channels of each color bar fluctuate, first establish the corresponding relationship between the pixel and the result value as shown in formula (3):

[0042] M[i][j]=tc[m] (3),

[0043] In the formula Rm, Gm, Bm are the RGB color values ​​of the m-level color code, a is a constant with a value of 0.1-0.3, and c is a constant value with a value of 1-10;

[0044] Next, the ratio of the three RGB channel values ​​is used to match the numerical simulation results and the color values. The simulation result value corresponding to a certain pixel is shown in formula (4):

[0045] t[i][j][k]=M[p][q] (4), where i, j, and k are the pixels corresponding to the pixel width, height number, and slice number, respectively;

[0046]

[0047] The recording format of the output data file after data reconstruction adopts the finite difference format or the finite element format; when the finite difference format is adopted, one pixel corresponds to one grid, and the grid numbers i, j, and k are the width, height, and slice numbers of the pixel respectively; the numerical simulation result value of the grid is the simulation result value obtained by pixel color conversion.

[0048] The method of the present invention is further described below using an example.

[0049] Example

[0050] The experiment selected the wheel hub casting and used the FT-STAR numerical simulation software to obtain the results. The temperature field of the casting at a certain moment in the solidification process was sectioned along the z-axis and output as an animation. The sectioning step was 1 / 100 of the actual height of the workpiece.

[0051] Read the animation, convert the file into a series of images, and perform color restoration on the series of images to remove isolated points and protruding points. The comparison chart is as follows:

[0052] Read the color map in the image and establish the corresponding relationship between the color value and the numerical simulation result value C[i±b][j±b][k±b]=tc[m], where ij k ranges from 0 to 255, m is the number of color levels, and b is a constant with a value of 10.

[0053] Read a series of sliced ​​images, and convert the RGB color channel value of each pixel of each image into the numerical simulation result value of the current pixel according to the correspondence between the pixel color value and the numerical simulation result value, t[i][j][k]=C[i][j][k], i, j, k are the pixels corresponding to the pixel width, height number and slice number respectively.

[0054] The record format of the output data file adopts the finite difference format. When the finite difference format is adopted, one pixel corresponds to one grid, and the grid numbers i, j, and k are the width, height, and slice numbers of the pixel respectively. The numerical simulation result value of the grid is the simulation result value obtained by pixel color conversion.

[0055] File 1 is used as the discrete model file of the target numerical simulation platform, and file 2 is used as the initial condition for another simulation platform to continue calculation.

[0056] Figure 2 is a schematic diagram of the effect after conversion in this embodiment, wherein Figure 2 (a) is the extracted animation slice image; Figure 2 (b) is the restored effect of the animated slice image extracted from (b); Figure 2 (c) is the output finite difference data result display.

[0057] Compared with the prior art, the present invention has the following beneficial effects:

[0058] The animation file of the simulation results on the source numerical simulation platform can be converted into discrete models and initial condition inputs in the format of the target numerical simulation platform, realizing cross-platform numerical simulation, giving full play to the advantages and special functions of each platform, and facilitating the integration of multiple numerical simulation platforms.

Claims

1. A cross-platform continuous simulation method, characterized in that: The following steps are involved: Step 1: Generate a cloud animation of the simulation results based on the source simulation platform, specifically: for a source numerical simulation platform that does not disclose simulation results and data results, slice the simulation results of a certain physical quantity of the source numerical simulation platform at a certain moment along the x, y, or z axis in its post-processing module, and save the changes in the cross-section result cloud as an animation file; Step 2: Extracting each cross-sectional image in the animation, i.e., reading the animation file in step 1 and extracting a series of cross-sectional cloud images of the numerical simulation results; The image information is recorded in a finite element format, and each pixel corresponds to a hexahedral unit. That is, the four nodes of each pixel and the four nodes of the corresponding pixels of the adjacent slice image together form a hexahedral unit, and its eight nodes (i,j,k), (i+1,j,k), (i+1,j+1,k), (i,j+1,k), (i,j,k+1), (i+1,j,k+1), (i+1,j+1,k+1), (i,j+1,k+1) constitute the eight vertices of the hexahedron, where i, j, and k refer to the coordinate values ​​corresponding to the x, y, and z axes in the three-dimensional coordinate system, respectively; the simulation result value of the hexahedral unit is obtained by corresponding to the color value of the pixel; Step 3: Preprocess the extracted image. Specifically, if the image quality is poor or there are text or other obstructions in some places, remove the interference in the image and repair the image. De-noising preprocessing is performed to eliminate image blur and noise caused by image compression. The color value of each pixel is judged relative to the adjacent pixels. Isolated pixels or protruding pixels are identified and their color values ​​are modified to the background color to eliminate burrs in the image. Step 4: Extract the three-dimensional model of the image and reconstruct the data; Step 4 further includes the following sub-steps: Sub-step S41, read the color map of the extracted image, and establish the corresponding relationship between the color value and the numerical simulation result value as shown in formula (1): C[i±b][j±b][k±b]=tc[m] (1), Where C[i][j][k] is the numerical simulation result value corresponding to the ijk pixel level, tc[m] is the simulation result value, i, j, k ranges from 0 to 255, m is the number of color levels, b is a constant with a value range of 0 to 10, which is used to allow small fluctuations in the color range to avoid the situation where some colors cannot find matching colors; Sub-step S42: read the series of slice images, and convert the RGB color channel value of each pixel of each image into the numerical simulation result value of the current pixel according to the corresponding relationship between the pixel color value and the numerical simulation result value, as shown in formula (2): t[i][j][k]=C[i][j][k] (2), Among them, i, j, and k are the pixels corresponding to the pixel width, height number, and slice number respectively; Sub-step S43: If the color of the color bar does not completely match the workpiece simulation result, and the color values ​​of the three channels of each color bar fluctuate, first establish the corresponding relationship between the pixel and the result value as shown in formula (3): M[i][j]=tc[m] (3), In the formula Rm, Gm, and Bm are the RGB color values ​​of the m-level color scale, a is a constant with a value of 0.1-0.3, and c is a constant value with a value of 1-10; Next, the ratio of the three RGB channel values ​​is used to match the numerical simulation results with the color values. The simulation result value corresponding to a certain pixel is shown in formula (4): t[i][j][k]=M[p][q] (4), Where i, j, and k are the pixels corresponding to the pixel width, height number, and slice number, respectively; The record format of the output data file after data reconstruction in step 4 adopts the finite difference format or the finite element format; when the finite difference format is adopted, one pixel corresponds to one grid, and the grid numbers i, j, and k are the width, height, and slice numbers of the pixel respectively; the numerical simulation result value of the grid is the simulation result value obtained by pixel color conversion.

2. The cross-platform continuous simulation method according to claim 1, characterized in that: In step 1, the sectioning is performed in a direction perpendicular to the coordinate axis of the arc surface, and the sectioning step length δ is 1 / 10-1 / 3 of the thinnest part of the workpiece; the number of animation frames n=l / δ, where l is the maximum length of the workpiece along the sectioning direction, and the resolution of the image in the animation is l / δ of the maximum length l of the workpiece parallel to the sectioning section; a fixed color scale is selected, the maximum value of the color scale corresponds to the maximum value of the simulation result, and the minimum value of the color scale corresponds to the minimum value of the simulation result; the color scale is a continuous color scale, and the color is clearly distinguishable from the background color, the length direction of the color scale area fills more than 70% of the entire image, and the displayed section of the section is parallel to the display window.

3. The cross-platform continuous simulation method according to claim 2, characterized in that: In step 2, a hexahedron is split into five tetrahedrons for representation, and the simulation result values ​​of the five split tetrahedrons are the simulation result values ​​of the corresponding pixels.