Morphological curing processing method, electronic device and storage medium in planar material simulation calculation
By calculating the deformation gradient, rotation matrix and initial shape matrix of grid elements, the problem of morphological solidification in plane material simulation calculation is solved, and a stable initial morphological description is achieved, which improves the accuracy and reliability of simulation calculations.
Patent Information
- Application Number
- CN202411154395.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2044-08-21
AI Technical Summary
In the simulation and calculation process of planar materials, how to effectively cure the morphology to ensure that the calculation is based on the initial morphology during subsequent deformation.
By obtaining the shape matrix before and after deformation of the grid element, the deformation gradient is determined, and the rotation matrix and the initial shape matrix are then calculated to describe the initial shape of the morphological solidification of the grid element.
The morphological curing process in the simulation calculation of planar materials is realized, ensuring that the calculation is based on the stable initial shape during subsequent deformation, and improving the accuracy and reliability of simulation calculations.
Smart Images

Figure CN118675672B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of simulation computing technology, and more particularly, to a method for generating a task flow chart, an electronic device, and a storage medium. Background Art
[0002] In the process of simulating and calculating planar materials, morphological curing is usually involved, that is, the current morphology of the planar material is cured into the initial morphology, so that in the subsequent deformation process of the planar material, it can be based on this initial morphology. Therefore, how to perform morphological curing is crucial for the simulation calculation of planar materials. Summary of the Invention
[0003] The purpose of the embodiments of this application is to provide a method for morphological curing processing, an electronic device, and a storage medium in the simulation calculation of planar materials to solve the problems in the prior art.
[0004] The first aspect of the embodiments of this application provides a method for morphological curing processing in the simulation calculation of planar materials, including:
[0005] When a morphological curing request is obtained, determine the deformation gradient of the grid cell according to the shape matrix before deformation and the shape matrix after deformation of the grid cell; wherein, the grid cell is specifically a grid cell in the overall grid of the planar material in the simulation calculation;
[0006] Determine the rotation matrix according to the deformation gradient, where the rotation matrix is used to characterize the position change of the grid cell before and after deformation;
[0007] Determine the initial shape matrix for morphological curing of the grid cell according to the rotation matrix and the shape matrix after deformation, so as to describe the initial morphology of the grid cell after morphological curing.
[0008] Preferably, when a morphological curing request is obtained, determining the deformation gradient of the grid cell according to the shape matrix before deformation and the shape matrix after deformation of the grid cell specifically includes:
[0009] When a morphological curing request is obtained, determine the inverse matrix of the shape matrix before deformation, where the shape matrix before deformation is an invertible square matrix;
[0010] Multiply the shape matrix after deformation by the inverse matrix of the shape matrix before deformation to generate the deformation gradient.
[0011] Preferably, the method further includes:
[0012] Obtain the coordinates of each vertex of the grid cell before deformation, and the coordinates are two-dimensional coordinates;
[0013] Calculate the vectors of each side of the grid cell before deformation according to the coordinates of each vertex described above;
[0014] Generate the shape matrix of the grid cell before deformation through the vectors of each side of the grid cell before deformation.
[0015] Preferably, the method further includes:
[0016] Obtain the coordinates of each vertex of the grid cell after deformation, and the coordinates are three-dimensional coordinates;
[0017] Calculate the vectors of each side of the grid cell after deformation according to the coordinates of each vertex described above;
[0018] Generate the shape matrix of the grid cell after deformation through the vectors of each side of the grid cell after deformation.
[0019] Preferably, determining the initial shape matrix for solidifying the form of the grid cell according to the rotation matrix and the shape matrix after deformation specifically includes:
[0020] Multiply the transpose matrix of the rotation matrix by the shape matrix after deformation, and use the inverse matrix of the obtained matrix as the initial shape matrix.
[0021] Preferably, determining the rotation matrix according to the deformation gradient specifically includes: generating the rotation matrix by performing polar decomposition on the deformation gradient.
[0022] Preferably, the grid cell specifically includes a triangular grid cell.
[0023] Preferably, in the case where the overall grid includes polygon grid cells, the method further includes: dividing the polygon grid cells into multiple triangular grid cells, where the number of sides of the polygon grid cells is greater than 3.
[0024] The second aspect of the embodiments of the present application provides an electronic device, including:
[0025] A memory for storing a computer program;
[0026] A processor for executing the method described in any one of the method embodiments of the present application.
[0027] The third aspect of the embodiments of the present application provides a storage medium, including: a program, when it runs on an electronic device, enables the electronic device to execute the method described in any one of the method embodiments of the present application.
[0028] When the method provided by the embodiment of the present application is adopted, in the case of obtaining a morphological curing request, the deformation gradient of the grid unit is determined according to the shape matrix before deformation and the shape matrix after deformation of the grid unit, then the rotation matrix is determined according to the deformation gradient, and then the initial shape matrix of the morphological curing of the grid unit is determined according to the rotation matrix and the shape matrix after deformation, so as to be used to describe the initial morphology after the morphological curing of the grid unit, and then the morphological curing process is carried out. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required to be used in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0030] Figure 1 Specific structural schematic diagram of an electronic device provided by an embodiment of the present application;
[0031] Figure 2 Specific structural schematic diagram of the overall grid of a planar material provided by an embodiment of the present application;
[0032] Figure 3 Specific flow schematic diagram of the morphological curing process in the simulation calculation of a planar material provided by an embodiment of the present application;
[0033] Figure 4 Schematic diagram of before and after deformation of a grid unit provided by an embodiment of the present application;
[0034] Figure 5 Schematic diagram of dividing a quadrilateral grid unit into triangular grid units provided by an embodiment of the present application;
[0035] Figure 6 Specific structural schematic diagram of the morphological curing processing device in the simulation calculation of a planar material provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0036] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In the description of the present application, terms such as "first", "second", and "third" are only used for distinguishing descriptions, and cannot be understood as indicating or implying relative importance or sequence.
[0037] As mentioned above, in the process of simulating and calculating a planar material, how to perform morphological curing is crucial for the simulation calculation of the planar material.
[0038] Based on this, the embodiments of the present application provide a method, an apparatus, an electronic device, and a storage medium for morphological solidification processing in planar material simulation calculations, which can be used for morphological solidification in planar material simulation calculations. As Figure 1 Shown in the figure is an electronic device 1 provided in this embodiment. The electronic device 1 includes: at least one processor 11 and a memory 12, Figure 1 Taking one processor as an example. Among them, the processor 11 and the memory 12 can be connected through a bus 10. The memory 12 stores instructions executable by the processor 11. When the instructions are executed by the processor 11, the electronic device 1 can execute all or part of the processes of the methods in the following embodiments.
[0039] In practical applications, the electronic device 1 can be an electronic device at the user end, such as the user's mobile phone, computer, etc. Of course, the electronic device 1 can also be an electronic device at the server end, such as a server or a server cluster at the server end.
[0040] Here, a simple description of the overall concept of the present application can be given first. In the embodiments of the present application, when performing simulation calculations on planar materials, the planar materials can be simulated as a whole grid from the overall perspective. The whole grid includes multiple grid cells. For example, as Figure 2 Shown in the figure is the overall grid 2 of the planar material. The overall grid 2 includes multiple grid cells 21. Among them, the planar material can specifically be a material on a two-dimensional plane. When performing simulation calculations on such a material on a two-dimensional plane, its thickness can be ignored, and only considering it as a two-dimensional planar material, and then operations such as moving, rotating, twisting, and stretching can be performed. For example, in practical applications, the planar material usually can include various types of fabrics, papers, films, tulles, etc.
[0041] In addition, for the shape of the grid cell, for example, it can be a triangular grid cell 21 as Figure 2 shown in the figure, or it can be a quadrilateral, a pentagon, or other shapes. Here, the shape of the grid cell is not limited.
[0042] In the process of clothing design or game decoration design, fabrics, tulles, etc. are usually used as the planar materials for simulation calculations. In this process, morphological solidification is often required. And in the method provided in the embodiments of the present application, the planar material is exactly simulated as an overall grid 2 as Figure 2 shown in the figure. The overall grid 2 includes multiple grid cells 21. Then, through the method in the embodiments of the present application, corresponding processing is performed on the grid cells 21, thereby realizing the morphological solidification.
[0043] Based on this inventive concept, the embodiments of the present application provide a method for morphological solidification processing in planar material simulation calculations. This method can be performed by Figure 1executed by the electronic device 1 shown, as Figure 3 The following is a schematic diagram of the specific process of this method, which includes the following steps:
[0044] Step S31: Obtain the shape matrix of the grid cell before deformation and the shape matrix after deformation.
[0045] As mentioned above, the grid cell can be a grid cell in the overall grid of the planar material in simulation calculations. For example, it can be any grid cell in the overall grid of the planar material, or it can be a specified grid cell in the overall grid. For example, each grid cell in the overall grid of the planar material can be used as the grid cell in step S31 in a preset order, so as to be processed by the method in the embodiments of the present application.
[0046] During the simulation calculation of the planar material, a coordinate system is usually constructed. And considering that the deformation of the planar material includes operations such as movement, rotation, distortion, and stretching, this coordinate system is usually a three-dimensional coordinate system. In this way, for each grid cell in the overall grid of the planar material, the coordinates of each vertex in the grid cell can be determined, and then the shape matrix of the grid cell can be calculated according to the coordinates of each vertex in the grid cell.
[0047] It should be further noted that before the planar material undergoes deformation, each mass point on it is basically in the same plane. Therefore, the grid cells in the overall grid of the planar material are also in the same plane. At this time, for the convenience of calculation, usually for the grid cell before deformation, since each vertex in the grid cell is in the same plane at this time, it is only represented by two-dimensional coordinates. For example, as Figure 2 shown in the grid cell 21 marked with a grid, the three vertices of the grid cell 21 are A, B, and C respectively. At this time, the coordinates of the three vertices A, B, and C can be obtained, which are X A , X B and X C . At this time, since it is before deformation, the coordinates of the three vertices A, B, and C are all two-dimensional coordinates. For example, X A can be (X a , Y a ), X B can be (X b , Y b ), X C can be (X c , Y c), so that the coordinates of the three vertices A, B, and C all ignore the Z-axis coordinate, thus reducing the three-dimensional coordinates to two-dimensional coordinates (of course, it is also possible to ignore the X-axis or the Y-axis. Here, only the case of reducing the dimension by ignoring the Z-axis is taken as an example); similarly, for other mesh elements before deformation, the coordinates of their respective vertices can also be processed in the same way, so as to reduce the dimension of the shape matrix of the mesh element before deformation.
[0048] After deformation, since the deformation of the planar material includes operations such as translation, rotation, distortion, and stretching, each mesh element and each vertex of the same element may not be in the same plane. Therefore, for the deformed mesh element, the coordinates of its respective vertices usually need to be represented by the three coordinate axes of the X-axis, Y-axis, and Z-axis. Therefore, the vertex coordinates of the deformed mesh element are usually three-dimensional coordinates.
[0049] In addition, for the mesh element before or after deformation, the coordinates of each vertex of the mesh element can be obtained first. Of course, the difference is that for the mesh element before deformation, the coordinates of its respective vertices are two-dimensional coordinates, while for the mesh element after deformation, the coordinates of its respective vertices are three-dimensional coordinates. After obtaining the coordinates of each vertex of the mesh element in this way, the shape matrix of the mesh element can be calculated according to the coordinates of each vertex of the mesh element. For example, the vectors of each side of the mesh element can be calculated according to the coordinates of each vertex, and then the shape matrix of the mesh element can be generated through the vectors of each side.
[0050] For example Figure 4 The figure shows the schematic diagrams of a certain mesh element before and after deformation. Before deformation, the coordinates of each vertex of the mesh element are X 0 、X 1 and X 2 , at this time, X 0 、X 1 and X 2 are all two-dimensional coordinates; in this way, for before deformation, according to the coordinates X 0 、X 1 and X 2 of each vertex of the mesh element, the vectors of each side of the mesh element are calculated, that is, X 1 -X 0 、X 2 -X 0 and X 2 -X 1 , among which, considering that the vector X 2 -X 1 can be linearly represented by X 1 -X 0 and X 2 -X 0 , so the vector X1 -X 0 、X 2 -X 0 are sufficient to describe the shape information of the grid cell. At this time, the vector X can be ignored. 2 -X 1 , so the vector X of each side can be used 1 -X 0 、X 2 -X 0 and X 2 -X 1 , thereby generating the shape matrix of the grid cell before deformation [X 1 -X 0 , X 2 -X 0 . Of course, the shape matrix of the grid cell before deformation [X 1 -X 0 , X 2 -X 0 is a 2×2 matrix.
[0051] Similarly, after the deformation of the grid cell, the coordinates of each vertex of the grid cell are x 0 、x 1 and x 2 , as described above, at this time x 0 、x 1 and x 2 are all three-dimensional coordinates. After deformation, according to the coordinates x 0 、x 1 and x 2 of each vertex of the grid cell, calculate the vectors of each side of the grid cell, that is, x 1 -x 0 、x 2 -x 0 and x 2 -x 1 , of course, the vector x 2 -x 1 can also be ignored. Therefore, the vectors x 1 -x 0 、x 2 -x 0 and x 2 -x 1 can be used to generate the shape matrix of the grid cell after deformation [x 1 -x 0 , x 2 -x 0 . Obviously, the shape matrix of the grid cell after deformation [x 1 -x 0 , x 2 -x 0It is a 3×2 matrix.
[0052] That is to say, since before deformation, each grid cell of the overall grid of the planar material is within the same plane, it can be described by two-dimensional coordinates. Therefore, the shape matrix of the grid cell before deformation is a low-dimensional matrix. After deformation, different vertices of each grid cell or even the same grid cell may not be within the same plane, so it needs to be described by three-dimensional coordinates. Therefore, the shape matrix of the grid cell after deformation is a high-dimensional matrix. For example, in the aforementioned example, the shape matrix of the grid cell before deformation is a 2×2 matrix, and the shape matrix after deformation is a 3×2 matrix. Therefore, relatively speaking, the shape matrix of the grid cell before deformation is a low-dimensional matrix, and the shape matrix after deformation is a high-dimensional matrix. That is to say, the dimension of the shape matrix of the grid cell after deformation is higher than the dimension of the shape matrix before deformation.
[0053] Step S32: When a morphology solidification request is obtained, determine the deformation gradient of the grid cell according to the shape matrix of the grid cell before deformation and the shape matrix after deformation.
[0054] After obtaining the shape matrix of the grid cell before deformation and the shape matrix after deformation through the above step S31, it is possible to monitor whether a morphology solidification request is obtained. For example, during the simulation calculation of the planar material by the user, the planar material is usually continuously adjusted to make it deform. After each deformation, the above step S31 can be executed to obtain the shape matrix of the grid cell before deformation and the shape matrix after deformation. When, after a certain deformation, if the user needs to solidify the current morphology of the planar material as the initial morphology, for example, the user is relatively satisfied with the current morphology of the planar material, so it needs to be solidified as the initial morphology so that subsequent deformations all start from this initial morphology. At this time, the user can input a morphology solidification request, for example, by triggering a corresponding control in the operation interface to input this morphology solidification request. For example, in various simulation software, its operation interface usually has a morphology solidification control, and the user can input this morphology solidification request by triggering this morphology solidification control.
[0055] At this time, the electronic device can obtain this morphology solidification request, and then execute this step S32 to determine the deformation gradient of the grid cell according to the shape matrix of the grid cell before deformation and the shape matrix after deformation.
[0056] Among them, for the specific implementation method of this step S32, in practical applications, when a morphology solidification request is obtained, the inverse matrix of the shape matrix before deformation can be determined first. At this time, the shape matrix before deformation is a square matrix; then multiply the shape matrix after deformation by the inverse matrix of the shape matrix before deformation to generate this deformation gradient. At this time, this deformation gradient reflects the degree of deformation of the grid cell.
[0057] For example, as described above, the grid cell is a triangle as shown in Figure 4 . At this time, the shape matrix of the grid cell before deformation is [X 1 -X 0 , X 2 -X 0 , which is a 2×2 matrix (i.e., a second-order square matrix). The shape matrix [X 1 -X 0 , X 2 -X 0 before deformation can be denoted as D X . Thus, in the case of obtaining a morphological solidification request, the inverse matrix of the shape matrix D X before deformation can be determined, that is, D X -1 ; then multiply the shape matrix after deformation, that is, the shape matrix of the grid cell after deformation [x 1 -x 0 , x 2 -x 0 (denoted as ) by D X -1 to generate the deformation gradient, that is, the deformation gradient can be calculated through Formula 1 shown below.
[0058]
[0059] In Formula 1, D X -1 is the inverse matrix of the shape matrix of the grid cell before deformation; is the shape matrix of the grid cell after deformation; F is the deformation gradient.
[0060] Step S33: Determine the rotation matrix according to the deformation gradient.
[0061] Among them, the rotation matrix is used to represent the position change of the grid cell before and after deformation, including spatial rotation, translation, etc. Therefore, the rotation matrix can change the spatial position change of the grid cell caused by spatial rotation, translation, etc., but this position change will not change the shape of the grid cell, that is, it will not cause the deformation of the grid cell.
[0062] Among them, for the specific implementation method of this step S33, the deformation gradient can be subjected to polar decomposition to generate the rotation matrix. For example, according to the polar decomposition theorem, the deformation gradient can be subjected to polar decomposition through Formula 2 shown below to obtain the rotation matrix.
[0063]
[0064] In the second formula, F is the deformation gradient; R is the rotation matrix; S is the in-plane deformation matrix, and the in-plane deformation S reflects the part that needs to be reset during the process of morphological solidification.
[0065] That is to say, after obtaining the deformation gradient through the above step S32, in this step S33, according to the polar decomposition theorem, the deformation gradient can be polar decomposed through this second formula to obtain the rotation matrix R.
[0066] Among them, according to the above step S32, since the deformation gradient F = D X -1 , therefore, the deformation gradient includes the spatial rotation and in-plane deformation experienced by the grid cell from the pre-deformation morphology (reflected in D X -1 ) to the post-deformation morphology (reflected in ). Therefore, the deformation gradient F contains information on both spatial rotation and in-plane deformation. The information on the spatial rotation part reflects the change in the position of the grid cell, while the information on the in-plane deformation part reflects the deformation of the grid cell. And the information on the spatial rotation and in-plane deformation exactly corresponds to the rotation matrix R and the in-plane deformation matrix S obtained by polar decomposition respectively. Therefore, in the present embodiment, the rotation matrix R is generated by polar decomposing the deformation gradient F.
[0067] Step S34: Determine the initial shape matrix of the morphological solidification of the grid cell according to the rotation matrix and the deformed shape matrix.
[0068] After obtaining the rotation matrix through the above step S33, in this step S34, the initial shape matrix of the morphological solidification of the grid cell can be determined according to the rotation matrix and the deformed shape matrix. For example, the initial shape matrix can be calculated through the following formula three.
[0069]
[0070] In the third formula, is the transpose matrix of the rotation matrix R; is the deformed shape matrix of the grid cell; is the initial shape matrix of the morphological solidification of the grid cell. That is to say, the transpose matrix of the rotation matrix R is multiplied by the deformed shape matrix to generate the initial shape matrix , and of course, ( ) -1 can also be used as the initial shape matrix because the two can be converted to each other.
[0071] That is to say, the transpose matrix of the rotation matrix can be multiplied by the deformed shape matrix , so that the resulting matrix is used as the initial shape matrix for the morphological solidification of this grid cell. Or the inverse matrix of the resulting matrix ( ) -1 can be used as the initial shape matrix for the morphological solidification of this grid cell.
[0072] In this way, through the method provided by the embodiments of the present application, during the simulation calculation of the planar material, if the planar material is deformed and morphological solidification is performed after the deformation, the current morphology of the planar material is solidified into the initial morphology. Correspondingly, through the method provided by the embodiments of the present application, the initial shape matrix can be obtained. This initial shape matrix, as the basic parameter of the initial state after morphological solidification, can be used to describe the initial morphology after the morphological solidification of this grid cell. In subsequent deformation processes, when deforming based on this initial morphology, a new deformation gradient can be further calculated based on this initial shape matrix. For example, the new deformation gradient F = ( ) -1 , where ( ) -1 is the initial shape matrix, is the shape matrix after deformation of this grid cell during subsequent deformation processes, and this can be obtained according to the coordinates of each vertex of this grid cell in the above-mentioned manner, which will not be elaborated here.
[0073] Therefore, through the method provided by the embodiments of the present application, during the simulation calculation of the planar material, if morphological solidification is performed, at this time, through the method provided by the present application, the initial shape matrices for the morphological solidification of each grid cell can be obtained respectively, so as to be used as the basic parameters of the initial states after the morphological solidification of each grid cell, respectively used to describe the initial morphologies after the morphological solidification of the corresponding grid cells, and during subsequent deformation processes, the corresponding deformation gradient F can be calculated according to the shape matrix after deformation of the grid cell and this initial shape matrix of this grid cell.
[0074] By using the method provided by the embodiments of the present application, in the case of obtaining a morphological solidification request, according to the shape matrix before deformation and the shape matrix after deformation of the grid cell, the deformation gradient of this grid cell is determined, then the rotation matrix is determined according to this deformation gradient, and then according to the rotation matrix and the shape matrix after deformation, the initial shape matrix for the morphological solidification of this grid cell is determined, so as to be used to describe the initial morphology after the morphological solidification of this grid cell, and further, the processing of morphological solidification is performed.
[0075] It should be further noted that the above steps S31 to S34 are mainly for triangular mesh cells. That is to say, in the case where the mesh cell is a triangular mesh cell, the steps S31 to S34 can be directly used for processing, so as to finally obtain the initial shape matrix with the mesh cell shape solidified.
[0076] At this time, in the case where the overall mesh of the planar material includes polygonal mesh cells, the polygonal mesh cells can be divided into multiple triangular mesh cells, where the number of sides of the polygonal mesh cell is greater than 3. For example, the polygonal mesh cell can be a quadrilateral mesh cell, a pentagonal mesh cell, etc.
[0077] For example, if the mesh cell is a quadrilateral, the quadrilateral mesh cell can be further divided into 2 triangular mesh cells. Then, for the triangular mesh cells, the steps S31 to S34 in the embodiments of the present application are executed. For example, Figure 5 as shown in the quadrilateral mesh cell M, usually the quadrilateral mesh cell M can be divided into 2 triangular mesh cells M1 and M2; in addition, in the case where the mesh cell is a pentagon, the pentagonal mesh cell can be further divided into 3 triangular mesh cells; similarly, in the case where the mesh cell is of other shapes, the mesh cell can be divided into multiple triangular mesh cells, and then for the triangular mesh cells, the steps S31 to S34 in the embodiments of the present application are executed.
[0078] Of course, if the mesh cell is a quadrilateral mesh cell, another processing method can be to obtain the shape matrix before the mesh cell deformation and the shape matrix after the mesh cell deformation through the above step S31. For example, as mentioned above, the shape matrix [Y 1 -Y 0 、Y 2 -Y 0 、Y 3 -X 1 before the mesh cell deformation is a 2×3-dimensional matrix. The shape matrix [y 1 -y 0 、y 2 -y 0 、y 3 -y 1, which is a 3×3 matrix. Thus, in the above step S32, since the shape matrix of the grid cell before deformation is not a square matrix, while the shape matrix after deformation is a square matrix, the specific implementation manner of this step S32 can be that, when a morphological solidification request is obtained, the inverse matrix of the shape matrix after deformation can be determined first, and at this time, the shape matrix after deformation is a square matrix; then multiply the shape matrix before deformation by the inverse matrix of the shape matrix after deformation to generate the deformation gradient, that is, F = D X -1 . After obtaining the deformation gradient F in this way, the subsequent steps S33 and S34 are further executed.
[0079] Based on the same inventive concept as the method for generating a task flow chart provided in the embodiments of the present application, the embodiments of the present application also provide a morphological solidification processing device in plane material simulation calculation. For the embodiments of this device, if there are unclear points, the corresponding content of the method embodiments can be referred to. As Figure 6 shown in the specific structural schematic diagram of the device 50, the device 50 includes a deformation gradient determination unit 501, a rotation matrix determination unit 502, and an initial shape matrix determination unit 503, where:
[0080] The deformation gradient determination unit 501 is configured to determine the deformation gradient of the grid cell according to the shape matrix of the grid cell before deformation and the shape matrix after deformation when a morphological solidification request is obtained; wherein, the grid cell is specifically a grid cell in the overall grid of the plane material in simulation calculation;
[0081] The rotation matrix determination unit 502 is configured to determine a rotation matrix according to the deformation gradient, where the rotation matrix is used to represent the position change of the grid cell before and after deformation;
[0082] The initial shape matrix determination unit 503 is configured to determine the initial shape matrix of the morphological solidification of the grid cell according to the rotation matrix and the shape matrix after deformation, so as to describe the initial form of the grid cell after morphological solidification.
[0083] By using the device 50 provided in the embodiments of the present application, since the device 50 adopts the same inventive concept as the method provided in the embodiments of the present application, on the premise that the method can solve technical problems, the device 50 can also solve technical problems, and details are not described herein again.
[0084] In addition, in practical applications, the technical effects obtained by combining the device 50 with specific software and hardware, cloud technology, etc. are also within the protection scope of the present application. For example, by adopting a distributed cluster method, different units in the device 50 are arranged in different nodes in the distributed cluster to improve efficiency, etc.
[0085] Wherein, when a morphological solidification request is obtained, determining the deformation gradient of the grid cell according to the shape matrix before deformation and the shape matrix after deformation of the grid cell may specifically include:
[0086] When a morphological solidification request is obtained, determining the inverse matrix of the shape matrix before deformation, wherein the shape matrix before deformation is a square matrix;
[0087] Multiplying the shape matrix after deformation by the inverse matrix of the shape matrix before deformation to generate the deformation gradient.
[0088] Wherein, the device 50 may further include a first generation unit, configured to obtain the coordinates of each vertex of the grid cell before deformation, the coordinates being two-dimensional coordinates; calculate the vectors of each side of the grid cell before deformation according to the coordinates of each vertex; and generate the shape matrix of the grid cell before deformation through the vectors of each side of the grid cell before deformation.
[0089] Wherein, the device 50 may further include a second generation unit, configured to obtain the coordinates of each vertex of the grid cell after deformation, the coordinates being three-dimensional coordinates; calculate the vectors of each side of the grid cell after deformation according to the coordinates of each vertex; and generate the shape matrix of the grid cell after deformation through the vectors of each side of the grid cell after deformation.
[0090] Wherein, determining the initial shape matrix for morphological solidification of the grid cell according to the rotation matrix and the shape matrix after deformation may specifically include: multiplying the transpose matrix of the rotation matrix by the shape matrix after deformation, and taking the inverse matrix of the multiplied matrix as the initial shape matrix.
[0091] Wherein, determining the rotation matrix according to the deformation gradient may specifically include: performing polar decomposition on the deformation gradient to generate the rotation matrix.
[0092] Wherein, the grid cell specifically includes a triangular grid cell.
[0093] Wherein, when the overall grid includes polygon grid cells, the device 50 may further include: a division unit, configured to divide the polygon grid cells into multiple triangular grid cells, wherein the number of sides of the polygon grid cells is greater than 3.
[0094] An embodiment of the present invention also provides a storage medium, including: a program, when it runs on an electronic device, enabling the electronic device to execute all or part of the processes of the methods in the above embodiments. Among them, the storage medium can be a disk, an optical disc, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (abbreviation: HDD), or a solid-state drive (SSD), etc. The storage medium can also include a combination of the above types of memories.
[0095] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A morphology solidification processing method in a plane material simulation calculation, characterized in that: include: When a morphology solidification request is obtained, a deformation gradient of the grid unit is determined according to a shape matrix before and after deformation of the grid unit; wherein the grid unit is specifically a grid unit in the overall grid of the plane material in the simulation calculation; Wherein, when a morphology solidification request is obtained, the deformation gradient of the grid unit is determined according to the shape matrix before and after the deformation of the grid unit, specifically including: In the case of obtaining a morphology solidification request, determining an inverse matrix of a shape matrix before deformation, wherein the shape matrix before deformation is a square matrix; Multiplying the deformed shape matrix by the inverse matrix of the shape matrix before deformation to generate the deformation gradient; Determining a rotation matrix according to the deformation gradient, wherein the rotation matrix is used to characterize the position change of the grid unit before and after deformation; wherein determining the rotation matrix according to the deformation gradient specifically includes: generating the rotation matrix by performing polar decomposition on the deformation gradient; According to the rotation matrix and the deformed shape matrix, an initial shape matrix of the grid unit form solidification is determined to describe the initial shape of the grid unit form after solidification; wherein, according to the rotation matrix and the deformed shape matrix, the initial shape matrix of the grid unit form solidification is determined, specifically comprising: multiplying the transposed matrix of the rotation matrix by the deformed shape matrix, and taking the inverse matrix of the matrix obtained by the multiplication as the initial shape matrix; The initial shape matrix is calculated using the following formula: = in, is the transposed matrix of the rotation matrix R; is the shape matrix of the grid unit after deformation; The initial shape matrix solidified for the mesh unit morphology.
2. The method according to claim 1, characterized in that The method further comprises: Obtaining coordinates of each vertex of the mesh unit before deformation, wherein the coordinates are two-dimensional coordinates; Calculating the vectors of the edges of the mesh unit before deformation according to the coordinates of the vertices; A shape matrix of the grid unit before deformation is generated by using the vectors of the edges of the grid unit before deformation.
3. The method according to claim 1, characterized in that: The method further comprises: Obtaining coordinates of each vertex of the grid unit after deformation, wherein the coordinates are three-dimensional coordinates; Calculating the vectors of each edge of the mesh unit after deformation according to the coordinates of each vertex; The shape matrix of the deformed grid unit is generated through the vectors of each edge of the deformed grid unit.
4. The method according to claim 1, characterized in that The grid units specifically include triangular grid units.
5. The method according to claim 1 or 4, characterized in that: In the case where the overall mesh includes polygonal mesh units, the method further includes: dividing the polygonal mesh units into a plurality of triangular mesh units, wherein the number of sides of the polygonal mesh units is greater than three.
6. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the method according to any one of claims 1 to 5.
7. A storage medium, characterized in that: The invention comprises: a program, which, when running on an electronic device, enables the electronic device to execute the method as claimed in any one of claims 1 to 5.
Citation Information
Patent Citations
Hyperelastic body semi-implicit iterative simulation method based on near-field dynamics
CN116187147A
Cloth static deformation prediction method based on triangular mesh
CN116401723A