Morphological curing processing method in planar material simulation calculation, electronic equipment and storage medium
By calculating the deformation gradient and rotation matrix, the initial shape matrix is generated, which solves the problem of morphological solidification processing in planar material simulation calculations and improves the stability and accuracy of simulation calculations.
Patent Information
- Application Number
- CN202411154395.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-08-21
AI Technical Summary
In the simulation calculation of flat materials, it is difficult to effectively perform the morphological solidification process, which affects the accuracy and efficiency of the subsequent deformation process.
By obtaining the shape matrix of the grid unit before and after deformation, calculating the deformation gradient, determining the rotation matrix, and generating an initial shape matrix based on the rotation matrix and the shape matrix after deformation, the morphological solidification is achieved.
It realizes the initial shape description after solidification of the flat material shape, ensures the accuracy and efficiency of the subsequent deformation process, and improves the stability and accuracy of simulation calculations.
Smart Images

Figure CN118675672A
Abstract
Description
Technical Field
[0001] The present application relates to the field of simulation computing technology, and in particular to a method for generating a task flow chart, an electronic device and a storage medium. Background Art
[0002] In the process of simulation calculation for planar materials, shape solidification is usually involved, that is, solidifying the current shape of the planar material into the initial shape, so that the subsequent deformation process of the planar material can be carried out based on the initial shape. Therefore, how to perform shape solidification is crucial for the simulation calculation of planar materials. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a morphology solidification processing method, an electronic device and a storage medium in a planar material simulation calculation, so as to solve the problems in the prior art.
[0004] A first aspect of an embodiment of the present application provides a morphology solidification processing method in a plane material simulation calculation, comprising: 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; 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; An initial shape matrix of the grid unit morphology solidification is determined according to the rotation matrix and the deformed shape matrix, so as to describe the initial shape of the grid unit morphology after solidification.
[0005] Preferably, when a shape 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 reversible square matrix; The deformed shape matrix is multiplied by the inverse matrix of the shape matrix before the deformation to generate the deformation gradient.
[0006] Preferably, 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.
[0007] Preferably, 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.
[0008] Preferably, determining the initial shape matrix of the grid unit morphology solidification according to the rotation matrix and the deformed shape matrix specifically includes: The transposed matrix of the rotation matrix is multiplied by the deformed shape matrix, and the inverse matrix of the matrix obtained by the multiplication is used as the initial shape matrix.
[0009] Preferably, determining the rotation matrix according to the deformation gradient specifically includes: generating the rotation matrix by performing polar decomposition on the deformation gradient.
[0010] Preferably, the grid units specifically include triangular grid units.
[0011] Preferably, in the case where the overall grid includes polygonal grid units, the method further comprises: dividing the polygonal grid units into a plurality of triangular grid units, wherein the number of sides of the polygonal grid units is greater than three.
[0012] A second aspect of an embodiment of the present application provides an electronic device, including: Memory for storing computer programs; A processor is used to execute any one of the methods described in the method embodiments of the present application.
[0013] A third aspect of an embodiment of the present application provides a storage medium, including: a program, which, when executed on an electronic device, enables the electronic device to execute any one of the methods in the method embodiments of the present application.
[0014] By adopting the method provided in the embodiment of the present application, when a morphology solidification request is obtained, the deformation gradient of the grid unit is determined according to the shape matrix of the grid unit before deformation and the shape matrix after deformation, and then the rotation matrix is determined according to the deformation gradient. Then, the initial shape matrix of the morphology solidification of the grid unit is determined according to the rotation matrix and the shape matrix after deformation, so as to describe the initial shape of the grid unit after morphology solidification, and then the morphology solidification process is performed. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0016] Figure 1 A schematic diagram of a specific structure of an electronic device provided in one embodiment of the present application; Figure 2 A schematic diagram of the specific structure of the overall grid of the planar material provided in one embodiment of the present application; Figure 3 A schematic diagram of a specific process flow of a morphology solidification processing method in a plane material simulation calculation provided in an embodiment of the present application; Figure 4 A schematic diagram of a grid unit before and after deformation provided in an embodiment of the present application; Figure 5 A schematic diagram of dividing a quadrilateral grid unit into triangular grid units provided in an embodiment of the present application; Figure 6 A schematic diagram of the specific structure of a morphology solidification processing device in a planar material simulation calculation is provided in accordance with an embodiment of the present application. DETAILED DESCRIPTION
[0017] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application. In the description of the present application, terms such as "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance or sequence.
[0018] As mentioned above, in the process of simulation calculation for planar materials, how to solidify the morphology is crucial for the simulation calculation of planar materials.
[0019] Based on this, the embodiments of the present application provide a method, device, electronic device and storage medium for morphology solidification in simulation calculation of planar materials, which can be used for morphology solidification in simulation calculation of planar materials. Figure 1 The electronic device 1 provided in this embodiment is shown, and the electronic device 1 includes: at least one processor 11 and a memory 12, Figure 1 A processor is taken as an example. The processor 11 and the memory 12 may be connected via a bus 10, and the memory 12 stores instructions executable by the processor 11, and the instructions are executed by the processor 11, so that the electronic device 1 can execute all or part of the process of the method in the following embodiment.
[0020] In practical applications, the electronic device 1 can be a user-side electronic device, such as a user's mobile phone, computer, etc. Of course, the electronic device 1 can also be a server-side electronic device, such as a server or server cluster, etc.
[0021] Here, the overall concept of the present application can be briefly described. In the embodiment of the present application, when performing simulation calculation on a planar material, the planar material can be simulated as a whole grid, and the whole grid includes multiple grid units, such as Figure 2 The figure shows an overall grid 2 of a planar material, and the overall grid 2 includes a plurality of grid units 21. The planar material may be specifically a material on a two-dimensional plane. During simulation calculation, the thickness of the material on the two-dimensional plane can be ignored, and the material is only considered as a two-dimensional planar material, and then moved, rotated, twisted, stretched, and other operations are performed. For example, in practical applications, the planar material may generally include various types of cloth, paper, film, gauze, and the like.
[0022] In addition, the shape of the grid unit can be, for example, Figure 2 The triangular grid unit 21 shown may also be a quadrilateral, a pentagon or other shapes, and the shape of the grid unit is not limited here.
[0023] In the process of clothing design or game decoration design, cloth, gauze, etc. are usually used as the plane material for simulation calculation, and the shape solidification is often required in this process. In the method provided in the embodiment of the present application, the plane material is simulated as a Figure 2 The overall grid 2 shown includes a plurality of grid units 21, and the grid units 21 are processed accordingly by the method in the embodiment of the present application, thereby achieving the morphology solidification.
[0024] Based on this inventive concept, the embodiment of the present application provides a morphology solidification processing method in a plane material simulation calculation. The method can be Figure 1 The electronic device 1 shown is used to perform, as Figure 3 The specific flow chart of the method is shown, and the method comprises the following steps: Step S31: Obtain the shape matrix of the grid unit before deformation and the shape matrix after deformation.
[0025] As mentioned above, the grid unit can be a grid unit in the overall grid of the planar material in the simulation calculation, for example, it can be any grid unit in the overall grid of the planar material, or it can be a specified grid unit in the overall grid. For example, each grid unit in the overall grid of the planar material can be used as the grid unit in step S31 according to a preset order, so as to be processed by the method in the embodiment of the present application.
[0026] In the simulation calculation process of planar materials, a coordinate system can usually be constructed, and considering that the deformation of planar materials includes operations such as movement, rotation, twisting, and stretching, the coordinate system is usually a three-dimensional coordinate system. In this way, for each grid unit in the overall grid of the planar material, the coordinates of each vertex in the grid unit can be determined, and then the shape matrix of the grid unit can be calculated based on the coordinates of each vertex in the grid unit.
[0027] It should be further explained that before the plane material is deformed, all the particles on it are basically in the same plane, so the grid cells in the overall grid of the plane material are also in the same plane. At this time, for the convenience of calculation, the grid cells before deformation are usually represented by two-dimensional coordinates because all the vertices in the grid cells are in the same plane. For example, Figure 2 The grid unit 21 marked with a grid has three vertices A, B and C. 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 before deformation, the coordinates of the three vertices A, B and C are all two-dimensional coordinates, such as X A It can be (X a , Y a )、X B It can be (X b , Y b )、X C It can be (X c , Y c ), so that the coordinates of the three vertices A, B and C all ignore the coordinates of the Z axis, thereby reducing the three-dimensional coordinates to two-dimensional coordinates (of course, it can also be considered that the X axis or the Y axis is ignored, and here only the ignoring of the Z axis is used as an example for dimensionality reduction); similarly, for other mesh units before deformation, the coordinates of each of their vertices can be processed in the same way, thereby reducing the dimension of the shape matrix of the mesh unit before deformation.
[0028] After deformation, since the deformation of planar materials includes operations such as movement, rotation, twisting, and stretching, each mesh unit and each vertex of the same unit may not be in the same plane. Therefore, for the deformed mesh unit, the coordinates of each vertex usually need to be represented by three coordinate axes: X-axis, Y-axis, and Z-axis. Therefore, the vertex coordinates of the deformed mesh unit are usually three-dimensional coordinates.
[0029] In addition, for the mesh unit before or after deformation, the coordinates of each vertex of the mesh unit can be obtained first. Of course, the difference is that for the mesh unit before deformation, the coordinates of each vertex are two-dimensional coordinates, while for the mesh unit after deformation, the coordinates of each vertex are three-dimensional coordinates. In this way, after obtaining the coordinates of each vertex of the mesh unit, the shape matrix of the mesh unit can be calculated according to the coordinates of each vertex of the mesh unit. For example, the vectors of each edge of the mesh unit can be calculated according to the coordinates of each vertex, and then the shape matrix of the mesh unit can be generated through the vectors of each edge.
[0030] For example Figure 4 The figure shows a schematic diagram of a grid unit before and after deformation. Before deformation, the coordinates of each vertex of the grid unit are X0, X1 and X2, respectively. At this time, X0, X1 and X2 are all two-dimensional coordinates. Thus, before deformation, according to the coordinates X0, X1 and X2 of each vertex of the grid unit, the vectors of each edge of the grid unit, namely X1-X0, X2-X0 and X2-X1, are calculated. Considering that the vector X2-X1 can be linearly represented by X1-X0 and X2-X0, the vectors X1-X0 and X2-X0 are sufficient to describe the shape information of the grid unit. At this time, the vector X2-X1 can be ignored. Therefore, the shape matrix [X1-X0, X2-X0] of the grid unit before deformation can be generated by the vectors X1-X0, X2-X0 and X2-X1 of each edge. Of course, the shape matrix [X1-X0, X2-X0] of the grid unit before deformation is a 2×2 matrix.
[0031] Similarly, after the mesh unit is deformed, the coordinates of each vertex of the mesh unit are x0, x1 and x2 respectively. As mentioned above, at this time, x0, x1 and x2 are all three-dimensional coordinates. After deformation, according to the coordinates x0, x1 and x2 of each vertex of the mesh unit, the vectors of each edge of the mesh unit are calculated, namely x1-x0, x2-x0 and x2-x1. Of course, the vector x2-x1 can also be ignored. Therefore, the shape matrix [x1-x0, x2-x0] of the mesh unit after deformation can be generated through the vectors x1-x0, x2-x0 and x2-x1 of each edge. Obviously, the shape matrix [x1-x0, x2-x0] of the mesh unit after deformation is a 3×2 matrix.
[0032] That is to say, since before deformation, each grid unit of the overall grid of the planar material is in the same plane, it can be described by two-dimensional coordinates, so the shape matrix of the grid unit before deformation is a low-dimensional matrix. After deformation, each grid unit or even different vertices of the same grid unit may not be in the same plane, so it is necessary to describe it by three-dimensional coordinates, so the shape matrix of the grid unit before deformation is a high-dimensional matrix. For example, in the aforementioned example, the shape matrix of the grid unit 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 unit before deformation is a low-dimensional matrix, and the shape matrix after deformation is a high-dimensional matrix. In other words, the dimension of the shape matrix of the grid unit after deformation is higher than the dimension of the shape matrix before deformation.
[0033] Step S32: when a shape solidification request is obtained, a deformation gradient of the mesh unit is determined according to the shape matrix before and after deformation of the mesh unit.
[0034] After obtaining the shape matrix before and after deformation of the grid unit through the above step S31, it can be monitored whether a shape solidification request is obtained. For example, during the simulation calculation of the planar material, the user usually continuously adjusts the planar material to deform it. After each deformation, the above step S31 can be executed to obtain the shape matrix before and after deformation of the grid unit. After a certain deformation, if the user needs to solidify the current shape of the planar material into an initial shape, for example, the user is relatively satisfied with the current shape of the planar material, so it is necessary to solidify it into an initial shape so that subsequent deformations all start from the initial shape. At this time, the user can input a shape solidification request, such as by triggering the corresponding control in the operation interface to input the shape solidification request. For example, in various types of simulation software, the operation interface is usually provided with a shape solidification control, and the user can input the shape solidification request by triggering the shape solidification control.
[0035] At this time, the electronic device can obtain the shape solidification request, and then execute the step S32, so as to determine the deformation gradient of the grid unit according to the shape matrix before the grid unit is deformed and the shape matrix after the deformation.
[0036] Among them, for the specific implementation method of step S32, in actual applications, when a morphology solidification request is obtained, the inverse matrix of the shape matrix before deformation can be determined first, and the shape matrix before deformation is a square matrix; then the deformed shape matrix is multiplied by the inverse matrix of the shape matrix before deformation to generate the deformation gradient, and the deformation gradient reflects the deformation degree of the grid unit.
[0037] For example, as mentioned above, the grid unit is Figure 4 The shape matrix [X1-X0, X2-X0] of the grid unit before deformation is a 2×2 matrix (i.e., a second-order square matrix). The shape matrix [X1-X0, X2-X0] before deformation can be recorded as D X , so that when a shape solidification request is obtained, the shape matrix D before deformation can be determined X The inverse matrix, that is, D X -1 ; Then the deformed shape matrix, that is, the deformed shape matrix of the grid unit [x1-x0, x2-x0] (denoted as ), multiplied by D X -1 , thereby generating the deformation gradient, that is, the deformation gradient can be calculated by formula 1 as shown below.
[0038]
[0039] In this formula, D X -1 is the inverse matrix of the shape matrix of the grid unit before deformation; is the shape matrix of the grid unit after deformation; F is the deformation gradient.
[0040] Step S33: Determine a rotation matrix according to the deformation gradient.
[0041] Among them, the rotation matrix is used to characterize the position change of the grid unit before and after deformation, including spatial rotation, translation, etc. Therefore, the rotation matrix can change the change in spatial position of the grid unit caused by spatial rotation and translation, but the position change will not change the shape of the grid unit, that is, it will not cause deformation of the grid unit.
[0042] In the specific implementation of step S33, the deformation gradient may be polar decomposed to generate the rotation matrix. For example, according to the polar decomposition theorem, the deformation gradient may be polar decomposed by formula 2 shown below to obtain the rotation matrix.
[0043]
[0044] In Formula 2, F is the deformation gradient; R is the rotation matrix; S is the in-plane deformation matrix. The in-plane deformation S reflects the part that needs to be reset during the process of morphology solidification.
[0045] That is, after the deformation gradient is obtained through the above step S32, in step S33, the deformation gradient can be polar decomposed according to the polar decomposition theorem through formula 2 to obtain the rotation matrix R.
[0046] According to the above step S32, since the deformation gradient F= D X -1 , so the deformation gradient includes the shape before deformation (reflected in D X -1 to the deformed form (reflected in ), the spatial rotation and in-plane deformation experienced by the grid unit, so the deformation gradient F contains information about the spatial rotation and in-plane deformation. The information about the spatial rotation reflects the change in the position of the grid unit, while the information about the in-plane deformation reflects the deformation of the grid unit. The information about the spatial rotation and in-plane deformation corresponds to the rotation matrix R and the in-plane deformation matrix S obtained by polar decomposition, respectively. Therefore, in the embodiment, the rotation matrix R is generated by performing polar decomposition on the deformation gradient F.
[0047] Step S34: determining the initial shape matrix of the grid unit morphology solidification according to the rotation matrix and the deformed shape matrix.
[0048] After the rotation matrix is obtained through the above step S33, in step S34, the initial shape matrix of the grid unit morphology solidification can be determined according to the rotation matrix and the deformed shape matrix. For example, the initial shape matrix can be calculated by formula 3 as shown below.
[0049]
[0050] In Formula 3, is the transposed matrix of the rotation matrix R; is the shape matrix of the grid unit after deformation; is the initial shape matrix of the grid unit solidified. That is, the transposed matrix of the rotation matrix R is multiplied by the deformed shape matrix to generate the initial shape matrix , of course, you can also ( ) -1 As the initial shape matrix, because the two can be converted into each other.
[0051] That is, the transpose of the rotation matrix can be , multiplied by the deformed shape matrix , so that the matrix obtained by multiplication As the initial shape matrix of the grid unit solidification, the inverse matrix of the matrix obtained by multiplication ( ) -1 , as the initial shape matrix for solidifying the grid unit morphology.
[0052] Thus, through the method provided in the embodiment of the present application, in the simulation calculation process of the planar material, if the planar material is deformed and the shape is solidified after the deformation, so that the current shape of the planar material is solidified into the initial shape, accordingly, the initial shape matrix can be obtained through the method provided in the embodiment of the present application. The initial shape matrix is used as the basic parameter of the initial state after the shape solidification, and can be used to describe the initial shape of the grid unit after the shape solidification. In this way, in the subsequent deformation process, when the deformation is performed based on the initial shape, the new deformation gradient can be further calculated based on the initial shape matrix, such as the new deformation gradient F= ( ) -1 ,in,( ) -1 is the initial shape matrix, In the subsequent deformation process, the deformed shape matrix of the mesh unit after deformation can be obtained according to the coordinates of each vertex of the mesh unit in the above manner. , which will not be explained here.
[0053] Therefore, through the method provided in the embodiment of the present application, in the process of simulation calculation of the planar material, if the morphology is solidified, the initial shape matrix of each grid unit morphology solidification can be obtained respectively through the method provided in the present application, so as to serve as the basic parameters of the initial state of each grid unit morphology after solidification, and are respectively used to describe the initial shape of the corresponding grid unit morphology after solidification, and in the subsequent deformation process, the corresponding deformation gradient F can be calculated according to the shape matrix of the grid unit after deformation and the initial shape matrix of the grid unit.
[0054] By adopting the method provided in the embodiment of the present application, when a morphology solidification request is obtained, the deformation gradient of the grid unit is determined according to the shape matrix of the grid unit before deformation and the shape matrix after deformation, and then the rotation matrix is determined according to the deformation gradient. Then, the initial shape matrix of the morphology solidification of the grid unit is determined according to the rotation matrix and the shape matrix after deformation, so as to describe the initial shape of the grid unit after morphology solidification, and then the morphology solidification process is performed.
[0055] It should be further explained that the above-mentioned steps S31 to S34 are mainly for triangular grid units. That is to say, when the grid units are triangular grid units, they can be directly processed through steps S31 to S34 to finally obtain the initial shape matrix with the grid unit morphology solidified.
[0056] At this time, when the overall grid of the planar material includes polygonal grid units, the polygonal grid units can be divided into multiple triangular grid units, wherein the number of sides of the polygonal grid units is greater than 3, for example, the polygonal grid units can be quadrilateral grid units, pentagonal grid units, etc.
[0057] For example, if the grid unit is a quadrilateral, the quadrilateral grid unit may be further divided into two triangular grid units, so that steps S31 to S34 in the embodiment of the present application are performed for the triangular grid unit, for example: Figure 5 The grid unit M shown is a quadrilateral, which can usually be divided into two triangular grid units M1 and M2; in addition, when the grid unit is a pentagon, the pentagonal grid unit can be further divided into three triangular grid units; similarly, when the grid unit is other shapes, the grid unit can be divided into multiple triangular grid units, and then steps S31 to S34 in the embodiment of the present application are executed for the triangular grid unit.
[0058] Of course, if the grid unit is a quadrilateral grid unit, another processing method may be to obtain the shape matrix of the grid unit before deformation and the shape matrix of the grid unit after deformation through the above-mentioned step S31. For example, as mentioned above, the shape matrix of the grid unit before deformation [Y1-Y0, Y2-Y0, Y3-X1] is a 2×3-dimensional matrix. The shape matrix of the grid unit after deformation [y1-y0, y2-y0, y3-y1] is a 3×3-dimensional matrix. In this way, in the above-mentioned step S32, since the shape matrix of the grid unit before deformation is not a square matrix, but the shape matrix after deformation is a square matrix, the specific implementation method of step S32 may be, when a morphological solidification request is obtained, the inverse matrix of the deformed shape matrix may be determined first, and the deformed shape matrix is a square matrix at this time; then the shape matrix before deformation is multiplied by the inverse matrix of the deformed shape matrix to generate the deformation gradient, that is, F=D X -1 After the deformation gradient F is obtained, the subsequent steps S33 and S34 are further performed.
[0059] Based on the same inventive concept as the method for generating a task flow chart provided in the embodiment of the present application, the embodiment of the present application also provides a morphology solidification processing device in a plane material simulation calculation. For any unclear points in the embodiment of the device, please refer to the corresponding content of the method embodiment. Figure 6 FIG. 5 is a schematic diagram of a specific structure of the device 50, which includes a deformation gradient determining unit 501, a rotation matrix determining unit 502, and an initial shape matrix determining unit 503, wherein: A deformation gradient determination unit 501 is used to determine the deformation gradient of the mesh unit according to the shape matrix before and after deformation of the mesh unit when a morphology solidification request is obtained; wherein the mesh unit is specifically a mesh unit in the overall mesh of the plane material in the simulation calculation; A rotation matrix determining unit 502, configured to determine 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; The initial shape matrix determining unit 503 is used to determine the initial shape matrix of the grid unit morphology solidification according to the rotation matrix and the deformed shape matrix, so as to describe the initial shape of the grid unit morphology after solidification.
[0060] The device 50 provided in the embodiment of the present application is adopted. Since the device 50 adopts the same inventive concept as the method provided in the embodiment of the present application, on the premise that the method can solve the technical problem, the device 50 can also solve the technical problem, which will not be repeated here.
[0061] In addition, in actual applications, the technical effects achieved by combining the device 50 with specific software and hardware, cloud technology, etc. are also within the scope of protection of the present application. For example, different units in the device 50 are arranged in different nodes in the distributed cluster in a distributed cluster manner, thereby improving efficiency.
[0062] Wherein, when a morphology solidification request is obtained, determining the deformation gradient of the grid unit according to the shape matrix before and after deformation of the grid unit may specifically include: 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; The deformed shape matrix is multiplied by the inverse matrix of the shape matrix before the deformation to generate the deformation gradient.
[0063] The device 50 may further include a first generating unit for obtaining the coordinates of each vertex of the grid unit before deformation, wherein the coordinates are two-dimensional coordinates; calculating the vectors of each edge of the grid unit before deformation according to the coordinates of each vertex; and generating a shape matrix of the grid unit before deformation through the vectors of each edge of the grid unit before deformation.
[0064] The device 50 may further include a second generation unit for obtaining the 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 grid unit after deformation according to the coordinates of each vertex; and generating a shape matrix of the grid unit after deformation through the vectors of each edge of the grid unit after deformation.
[0065] Among them, determining the initial shape matrix of the grid unit morphology solidification based on the rotation matrix and the deformed shape matrix can specifically include: multiplying the transposed matrix of the rotation matrix by the deformed shape matrix, and using the inverse matrix of the matrix obtained by the multiplication as the initial shape matrix.
[0066] The step of determining the rotation matrix according to the deformation gradient may specifically include: generating the rotation matrix by performing polar decomposition on the deformation gradient.
[0067] The grid units specifically include triangular grid units.
[0068] Wherein, in the case where the overall grid includes polygonal grid units, the device 50 may further include: a division unit, for dividing the polygonal grid units into a plurality of triangular grid units, wherein the number of sides of the polygonal grid units is greater than 3.
[0069] The embodiment of the present invention further provides a storage medium, including: a program, when it is run on an electronic device, the electronic device can execute all or part of the process of the method in the above embodiment. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (Flash Memory), a hard disk (HDD) or a solid-state drive (SSD). The storage medium can also include a combination of the above types of memory.
[0070] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all 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 the grid unit is deformed; wherein the grid unit is specifically a grid unit in the overall grid of the plane material in the simulation calculation; 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; An initial shape matrix of the grid unit morphology solidification is determined according to the rotation matrix and the deformed shape matrix, so as to describe the initial shape of the grid unit morphology after solidification.
2. The method according to claim 1, characterized in that 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; The deformed shape matrix is multiplied by the inverse matrix of the shape matrix before the deformation to generate the deformation gradient.
3. 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.
4. 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.
5. The method according to claim 1, characterized in that Determining an initial shape matrix for solidifying the grid unit morphology according to the rotation matrix and the deformed shape matrix specifically includes: The transposed matrix of the rotation matrix is multiplied by the deformed shape matrix, and the inverse matrix of the matrix obtained by the multiplication is used as the initial shape matrix.
6. The method according to claim 1, characterized in that Determining a rotation matrix according to the deformation gradient specifically includes: generating the rotation matrix by performing polar decomposition on the deformation gradient.
7. The method according to claim 1, characterized in that The grid units specifically include triangular grid units.
8. The method according to claim 1 or 7, 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.
9. 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 8.
10. 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 8.
Citation Information
Patent Citations
Multi-view registration method based on K-means and normal distribution transformation
CN113256693A
Hyperelastic body semi-implicit iterative simulation method based on near-field dynamics
CN116187147A
Cloth static deformation prediction method based on triangular mesh
CN116401723A
Cloth simulation method and device, electronic equipment, medium and product
CN118313177A
Simulation method of flexible body, electronic equipment, storage medium and computer program product
CN118395751A
