Grasshopper-based structure stress field visualization method and system
Through the Grasshopper-based structural stress field visualization method, the problem of difficulty in autonomous adjustment of stress field visualization in the prior art and data cannot be called directly is solved, and the autonomous adjustment of stress field and data matching is realized, design efficiency is improved, and effective auxiliary role is provided for printing path design.
Patent Information
- Application Number
- CN202510037256.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-05-09
AI Technical Summary
In the prior art, the visual display of the stress field of the printing structure is difficult to adjust independently according to the printing path design requirements, and data calls cannot be directly implemented.
A structural stress field visualization method based on Grasshopper is provided, which is implemented through the Grasshopper plug-in, including establishing a two-dimensional plane model, grid cell division, matching unit nodes and grid center points, calculating main stress and directional angles, and expressing them using directed line segments to achieve autonomous adjustment of stress field and data matching.
The autonomous adjustment of the stress field and data matching are realized, the design efficiency is improved, and an effective auxiliary role is provided for the printing path design based on stress flow guidance.
Smart Images

Figure CN119962197A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of stress state visualization, and in particular to a structural stress field visualization method and system based on Grasshopper. Background Art
[0002] At present, concrete 3D printed components are mostly used in auxiliary structures such as municipal landscapes and decoration projects, and are rarely used as main load-bearing structures. The main reason is that the mechanical properties of concrete 3D printed structures are still difficult to meet engineering requirements. For the relatively mature path planning algorithms that have been proposed, such as Zigzag, Hilbert, Contour, etc., which focus more on molding accuracy and printing efficiency, there is a lack of consideration for the mechanical properties of printed components, and there is a high possibility that mechanically weak areas will appear in the main load-bearing parts.
[0003] Therefore, related technologies for improving the mechanical properties of components by optimizing the printing path have gradually emerged. For example, Li Shuaishuai of Suzhou Tongyi 3D Printing Technology Co., Ltd. disclosed a 3D printing continuous fiber reinforcement path planning method based on the principal stress trajectory in Chinese Patent 202110972007.X, and Xu Wenpeng of Henan University of Technology disclosed a stress-based 3D printing continuity path planning method in Chinese Patent 202211577183.4. Considering that the 3D printing process has the characteristics of accumulating into layers and stacking layer by layer, the various mechanical properties weak areas inside the molded structure are mainly distributed at the interface between the printed layers and the contact interface between the printed strips in the layer. The generation of structural weak areas leads to the anisotropy of the mechanical properties of the 3D printed products, which makes the force differences in different directions significant, thereby affecting the force performance of the final molded components in certain directions.
[0004] Before adopting the 3D printing path design method based on the characteristics of structural stress distribution, it is necessary to conduct a mechanical analysis of the printed structure model to obtain the characteristics of the structural stress distribution used to guide the path design. Currently, the commonly used numerical simulation software for obtaining structural stress distribution information includes ABAQUS, ANSYS, etc. Conventional finite element analysis software such as ABAQUS is difficult to adjust the visualization of the printed structure stress field according to the requirements of the printing path design, and there is a problem of difficulty in directly implementing data calls across software with Rhino and Grasshopper, the mainstream software for 3D printing structure model design and path planning.
[0005] Therefore, there is currently a lack of a method for visualizing the stress field of printed components that can match the subsequent printing path design. Summary of the invention
[0006] The purpose of the present invention is to overcome the problem in the prior art that the visualization display of the stress field of the printed structure is difficult to adjust autonomously according to the requirements of the printing path design and that data cannot be directly called. A structural stress field visualization method and system based on Grasshopper are provided. For the stress data required for the printing path design, autonomous adjustment of the structural stress visualization information display based on Grasshopper is realized, specifically, the size and direction information of the representative stress of the target printing point under different stress fields is provided, so as to guide the relevant 3D printing path design based on the characteristics of the structural stress distribution, and effectively improve the design efficiency.
[0007] In order to achieve the above-mentioned object of the invention, the present invention provides the following technical solutions:
[0008] A structural stress field visualization method based on Grasshopper is implemented by a Grasshopper plug-in. The visualization method comprises the following steps:
[0009] S1. Establish a two-dimensional plane model of the printed component that requires stress field visualization, divide the two-dimensional plane model into grid units and obtain the grid center point;
[0010] Obtain unit node coordinate information and unit node stress data of the printed component;
[0011] S2, matching the unit node with the grid center point to obtain the stress data of the grid center point;
[0012] S3. Calculate the principal stress and principal stress direction angle of each grid center point according to the stress data of the grid center point;
[0013] S4. Based on the principal stress information that needs to be expressed, the principal stress and principal stress direction angle of the grid center point are used to express it with directed line segments at the grid center point to visualize the stress field of the printed component. The directed line segments are set in a way that the arrow points to the principal stress direction and the length of the line segment represents the magnitude of the principal stress.
[0014] In the above technical scheme, the present invention first obtains the grid center point, unit node coordinate information and unit node stress data. The grid center point on the two-dimensional plane model is the point where the required stress state is visualized. The stress data of the grid center point represents the stress state of the grid. Then, according to the stress data of the grid center point, the magnitude of the principal stress and the direction angle corresponding to the principal stress are calculated. When the principal stress information to be expressed is determined, the principal stress and the principal stress direction angle calculated above are used to express the principal stress at the position of the grid center point with a directed line segment. The principal stress direction angle data represents the principal stress direction, forming an arrow direction, and the principal stress magnitude data forms the length of the line segment, which is made into a directed line segment. The construction of the directed line segment can clearly characterize the relative magnitude and direction of the stress / macroscopic force flow direction, thereby realizing stress field visualization for different needs and different expression effects.
[0015] Through the above technical scheme, the construction of directed line segments can clearly characterize the relative magnitude and direction of stress, realize the visualization expression of the principal stress information including the magnitude and direction of principal stress in the stress field of printed components, provide effective data for the printing path design method based on stress flow guidance, and play an effective auxiliary role.
[0016] As a preferred solution of the present invention, in the process of dividing the grid units of the two-dimensional plane model, the two-dimensional plane model of the printed component is divided into grid units according to the layer shape and the printing range.
[0017] Furthermore, the size of the grid unit is determined according to the width range of the print strip extruded by the print head of the printing device; for a two-dimensional plane model with a regular shape, it is divided into rectangular grid units, and for an irregular two-dimensional plane model, it is first divided into a plurality of regular curved quadrilaterals that are convenient for relatively uniform grid unit division according to the shape characteristics of the two-dimensional plane model, and then the curved quadrilaterals are divided into grid units according to appropriate unit sizes. The above technical solution takes into account the unit division of regular and irregular two-dimensional plane models, is applicable to different 3D printing components, and improves the applicability of the method of the present invention.
[0018] As a preferred solution of the present invention, the unit node coordinate information and unit node stress data of the printed component are obtained by existing numerical calculation methods, specifically implemented by software such as Abaqus and Matlab; the unit node here is an integration point or a unit center point.
[0019] As a preferred solution of the present invention, when matching the unit node with the grid center point, the unit node coordinate information and the grid center point position are judged. When the grid center point is a unit node, the principal stress data of the unit node is used as the stress state of the grid center point for calculation; when the grid center point is not a unit node, the principal stress data of the unit node closest to the grid center point is selected as the stress state of the grid center point for calculation. Because for irregular shaped two-dimensional plane models, considering the use of numerical methods to calculate the internal stress state of the printed component structure, the unit size of the model grid unit division is usually smaller than the printing strip width adapted to the cement-based material 3D printing port, that is, the model grid unit division density used for numerical analysis is usually greater than the grid unit division density in the path design, so the unit node closest to the grid center point can be screened, and the principal stress data of the nearest unit node is used as the stress state of the grid center point for calculation, wherein the grid center point is the target printing point for subsequent printing path design.
[0020] As a preferred embodiment of the present invention, the principal stress information is at least one of principal tensile stress, principal compressive stress, and absolute maximum principal stress information. In step S4, it is necessary to determine the principal stress information required to be expressed by the stress field to form a principal tensile stress field, a principal compressive stress field, and an absolute maximum principal stress field. Different types of principal stress information reflected in different stress fields can guide the printing path design.
[0021] Furthermore, the visualization of the principal tensile stress field is represented by the maximum principal stress σ at the center of the grid. max The visualization of the principal compressive stress field is represented by the minimum principal stress σ at the center of the grid. min The absolute maximum principal stress field is composed of directed line segments of max and the minimum principal stress σ min The principal stress σ with the larger absolute value among the two max(Abs) The corresponding directed line segments are composed of the maximum principal stress σ max The visualization expression of the principal tensile stress field of the structure as the expression object can clearly observe the main parts of the structure that bear the tensile force, with the minimum principal stress σ min The visualization expression of the principal compressive stress field of the structure as the expression object can clearly observe the main parts of the structure that bear pressure, the absolute maximum principal stress σ max(Abs) The visualization of the principal stress field of the object can clearly observe the distribution of the absolute maximum principal stress borne by the structure and guide the design of the printing path.
[0022] Furthermore, the maximum principal stress and the minimum principal stress are calculated as follows:
[0023]
[0024]
[0025] Where σ max is the maximum principal stress, σ min is the minimum principal stress, σ x is the normal stress in the x direction, σ y is the normal stress in the y direction, τ xy is the shear stress on the xy plane;
[0026] The calculation formula for the principal stress direction angle is:
[0027]
[0028] Where α 0 is the principal stress direction angle.
[0029] As a preferred embodiment of the present invention, when σ x >σ y When the direction angle α 0 Corresponding to the maximum principal stress σ max direction, (α 0 +π / 2) corresponds to the minimum principal stress σ min direction; when σ x <σ y When the direction angle α 0 Corresponding to the minimum principal stress σ min direction, (α 0 +π / 2) corresponds to the maximum principal stress σ max direction.
[0030] As a preferred solution of the present invention, in the Grasshopper environment, parameter input is realized through the Panel, and the Absolute, Smaller Than, Addition, Integer Division, Multiplication, and Subtraction operators are used in combination to realize the output of the final confirmed direction angle.
[0031] As a preferred solution of the present invention, the method for realizing the visual expression of the magnitude and direction of the principal stress is:
[0032] S41, adjust the arrow scale representing the magnitude of the principal stress, convert the principal stress value to be represented into a vector through the Unit X operator, and use the vector and the Number Slider operator as input parameters of Multiplication;
[0033] S42, using the input parameters in S41 as input parameters of the Rotate operator Vector, using Unit Z as input parameter of the Rotate operator Axis, and using the direction angle as input parameter of the Rotate operator Angle, to realize visualization vector construction;
[0034] S43, connect the output terminal Vector of the Rotate operator in S42 to the Vector terminal of the Vector Display Ex operator, use the center point of the grid as the input parameter of the Vector Display Ex operator Point, and the Colour Swatch operator as the input parameter of the Vector Display Ex operator Colour, and realize the visualization expression of the corresponding principal stress magnitude and direction at each grid center point through the Vector Display Ex operator. Based on Grasshopper, the present invention provides the direction angle matching process of the principal tensile stress field and the principal compressive stress field, as well as the principal stress screening and direction angle matching process of the absolute maximum principal stress field, which can provide effective data for the printing path design based on stress flow guidance.
[0035] The present invention also provides a structural stress field visualization system based on Grasshopper, comprising at least one processor and a memory communicatively connected to the at least one processor; the memory stores instructions that can be executed by the at least one processor, characterized in that the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned structural stress field visualization method based on Grasshopper.
[0036] Compared with the prior art, the present invention has the following beneficial effects:
[0037] 1. The present invention provides a structural stress field visualization method based on Grasshopper. The grid center point, unit node coordinate information and unit node stress data are first obtained. The grid center point on the two-dimensional plane model is the point for visualization of the required stress state. The stress data of the grid center point represents the stress state of the grid. Then, according to the stress data of the grid center point, the principal stress magnitude and the principal stress direction angle are calculated; and according to the principal stress information to be expressed, directed line segments are used to express it at the position of the grid center point. The construction of directed line segments can clearly characterize the relative magnitude of stress and the direction of macroscopic force flow, thereby realizing stress field visualization for different needs and different expression effects, providing effective data for the printing path design method based on stress flow guidance, and producing an effective auxiliary effect.
[0038] 2. The present invention proposes a structural stress field visualization method based on Grasshopper. In order to further promote and apply cement-based material 3D printing technology in the field of civil engineering and meet the requirements of 3D printed structures for improving mechanical properties, it is necessary to visualize the stress distribution of the structure during the printing path design process.
[0039] 3. The present invention realizes stress field visualization based on Grasshopper. For the stress field visualization of irregular shapes, it further realizes the approximate stress state data matching and stress field visualization of the target printing point, and expands the guidance scope of path design. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is a schematic diagram of the process of the structural stress field visualization method based on Grasshopper of the present invention;
[0041] Figure 2 is a schematic diagram of a stress unit body in Example 1;
[0042] Figure 3 Schematic diagram of the direction angle of the principal stress unit in Example 1;
[0043] Figure 4 Selecting the internal structure of the battery pack for the direction angle of the principal tensile stress in Example 1;
[0044] Figure 5 Selecting the internal structure of the battery pack for the direction angle of the principal compressive stress in Example 1;
[0045] Figure 6 A flow chart for visualizing the absolute maximum principal stress field in Example 1;
[0046] Figure 7 Selecting the internal structure of the battery pack to achieve the absolute maximum principal stress and direction angle in Example 1;
[0047] Figure 8 A schematic diagram of the center point of the prism grid in Example 2;
[0048] Fig. 9 Schematic diagram of the center point and unit node of the prism grid in Example 2;
[0049] Fig.10 This is a visualization diagram of the principal tensile stress field of the prism in Example 2 (only the center point of the grid is displayed as needed);
[0050] Fig.11 It is a visualization expression diagram of the principal tensile stress field of the prism in Example 2 (displaying stress information of all known data points as required);
[0051] Fig.12This is a schematic diagram of a grid unit after the topology optimization road panel is divided in Example 3;
[0052] Fig.13 A schematic diagram of the center points and unit nodes of the topologically optimized road panel grid in Example 3;
[0053] Fig.14 A schematic diagram of the nearest point for screening and matching the target printing point in Example 3;
[0054] Fig.15 A visualization diagram of the absolute maximum principal stress of the topologically optimized road panel in Example 3 (displaying the stress magnitude and direction of the grid center point);
[0055] Fig.16 It is a visualization expression diagram of the absolute maximum principal stress of the topology optimized road panel in Example 3 (showing the direction of macroscopic force flow);
[0056] Fig.17 This is a visualization diagram of the absolute maximum principal stress field of the topology optimized road panel in Example 3 (displaying stress information of all known data points as needed). DETAILED DESCRIPTION
[0057] In order to more clearly describe the invention purpose, technical scheme and technical effect advantages in the specific implementation case of the present invention, the scheme in the specific embodiment will be described in detail in combination with the drawings of the specification of the present invention. The specific technical scheme involved in the following specific embodiments is only for a clear and complete description of the innovative technical scheme of the present invention. It is only a part of the specific implementation scheme that can be adopted by the present invention, not all embodiments, and should not be understood as a limitation on the innovative scheme of the present invention. Any scheme adopting the same inventive concept of the present invention should be included in the protection scope of the present invention.
[0058] Secondly, the description of the drawings in the specific embodiments of the present invention is only for the convenience of technical personnel to understand the solution of the present invention. The partial details in the drawings are for the convenience of clearly presenting the technical solution. It should not be considered that all technical features in the drawings must be included in the specific implementation cases, and the detailed features in the drawings should not be identified as additional limitations on the innovative technical solution of the present invention. The components in the various embodiments described and shown in the drawings can be combined and arranged according to different configurations, and these changes in combination and arrangement should be identified as part of the entire embodiment of the innovative solution of the present invention and included in the scope of protection of the present invention.
[0059] Example 1
[0060] like Figure 1As shown, this embodiment provides a structural stress field visualization method based on Grasshopper, which is implemented by a Grasshopper plug-in. The visualization method includes the following steps:
[0061] S1. Establish a two-dimensional plane model of the printed component that requires stress field visualization, divide the two-dimensional plane model into grid units and obtain the grid center point;
[0062] Obtain unit node coordinate information and unit node stress data of the printed component;
[0063] S2, matching the unit node with the grid center point to obtain the stress data of the grid center point;
[0064] S3. Calculate the principal stress and principal stress direction angle of each grid center point according to the stress data of the grid center point;
[0065] S4. Based on the principal stress information that needs to be expressed, the principal stress and principal stress direction angle of the grid center point are used to express it with directed line segments at the grid center point to visualize the stress field of the printed component. The directed line segments are set in a way that the arrow points to the principal stress direction and the length of the line segment represents the magnitude of the principal stress.
[0066] It should be noted that the printed component in this embodiment is a component of equal cross section, that is, the contours of the two-dimensional plane model obtained along the molding direction are exactly the same. The printing path is designed for the printing layer, and then different layers of the printing layer are printed according to the designed printing path to obtain the printed component.
[0067] In step S1, a two-dimensional plane model of a structure requiring stress field visualization is established based on Rhino or Grasshopper, and meshing and center point determination are performed. In the process of mesh unit division, the size of the mesh unit is determined according to the width range of the print strip extruded by the print head of the printing device; for regular-shaped printed layers, they are divided into rectangular mesh units, and for irregular printed layers, they are first divided into a plurality of regular curved quadrilaterals that are convenient for relatively uniform mesh unit division according to the shape characteristics of the printed layers, and then the curved quadrilaterals are divided into mesh units according to the appropriate unit size.
[0068] The visualization of stress field requires data support. This method uses the stress state information of a large number of points inside the structure, such as unit nodes or center points, calculated by numerical methods as the data source for visualization of the structural stress field (including but not limited to numerical methods, as long as there is a stress data source).
[0069] In step S2, the model position in the numerical method is mapped in the coordinate system of the Rhino and Grasshopper platforms to clarify the corresponding relationship between the unit nodes in the same model in the two softwares, so as to facilitate the subsequent screening and matching of the stress information of the grid center point. When matching the unit node with the grid center point, the judgment is made based on the unit node coordinate information and the position of the grid center point. When the position of the grid center point is a unit node, the principal stress data of the unit node is used as the stress state of the grid center point for calculation; when the position of the grid center point is not a unit node, the principal stress data of the unit node closest to the grid center point is selected as the stress state of the grid center point for calculation.
[0070] In step S3, the principal stress and direction angle of the plane stress state are calculated as follows: In general, when the normal stress and shear stress on a certain surface of the stress unit body are both zero, it is a plane stress state, and the stress unit body ( Figure 2 (a)) can be simplified to Figure 2 (b) The maximum principal stress (first principal stress) σ in the plane stress state analysis problem max and the minimum principal stress (second principal stress) σ min The calculation formula is as follows:
[0071]
[0072] Where σ max is the maximum principal stress, σ min is the minimum principal stress, σ x is the normal stress in the x direction, σ y is the normal stress in the y direction, τ xy is the shear stress in the xy plane.
[0073] like Figure 3 As shown, α 0 and (α 0 +π / 2) represents the principal stress direction angle, and its calculation formula is as follows:
[0074]
[0075] When σ x >σ y When the direction angle α 0 Corresponding to the maximum principal stress σ max direction, (α 0 +π / 2) corresponds to the minimum principal stress σ min direction; when σ x <σ y When the direction angle α 0 Corresponding to the minimum principal stress σ min direction, (α 0 +π / 2) corresponds to the maximum principal stress σmax The two principal stress direction angles correspond to the directions of the maximum principal stress and the minimum principal stress respectively. After calculation, it is necessary to judge the corresponding relationship based on the results.
[0076] In step S4, the distribution of the desired visualized stress field is obtained by plane stress state analysis method, and the principal stress is calculated and screened according to the requirements of stress field visualization, and the principal stress information is at least one of principal tensile stress, principal compressive stress, and absolute maximum principal stress information. The visualization expression of the principal tensile stress field is represented by the maximum principal stress σ at the center of the grid. max The visualization of the principal compressive stress field is represented by the minimum principal stress σ at the center of the grid. min The absolute maximum principal stress field is composed of directed line segments of max and the minimum principal stress σ min The principal stress σ with the larger absolute value among the two max(Abs) The corresponding directed line segments.
[0077] For the visualization of the principal tensile stress field and the principal compressive stress field, it is necessary to use the above comparison σ x , σ y to match the maximum principal stress σ max and the minimum principal stress σ min For the visualization of the absolute maximum principal stress field, in addition to the above operations of matching the principal stress direction angle, it is also necessary to compare the maximum principal stress σ max and the minimum principal stress σ min The absolute value of the principal stress with the largest absolute value is selected as the expression object of the stress field. x >σ y When the direction angle α 0 Corresponding to the maximum principal stress σ max direction, (α 0 +π / 2) corresponds to the minimum principal stress σ min direction; when σ x <σ y When the direction angle α 0 Corresponding to the minimum principal stress σ min direction, (α 0 +π / 2) corresponds to the maximum principal stress σ max The process step of "direction" is based on Grasshopper to determine the direction angle corresponding to each point, that is, according to the calculation result σ x , σ y , σ max , σ min , α 0 , automatically complete, and determine the direction angles of the principal tensile stress and principal compressive stress at each grid center point.
[0078] The method for determining the direction angle of the principal tensile stress is to use the Panel operator to input the σ obtained by numerical method or other methods. x , σ y Parameters and σ calculated by the above formula max , σ min , α 0 Parameters, respectively obtain σ through the Absolute operator x , σ y , σ max , σ min The absolute value of σ is compared using the Smaller Than operator. x , σ y The absolute value of σ max , σ min The absolute value of the output terminal is connected to the input terminal of the Addition operator to add the two. At this time, the output parameter is "2" representing "|σ x |<|σ y |" and "|σ max |<|σ min |”, the output parameter is “1”, which means “|σ x |<|σ y |" or "|σ max |<|σ min |”, the output parameter is “0”, which means “|σ x |<|σ y |” and “|σ max |<|σ min |” are not satisfied, connect the Addition output terminal to the Integer Division, Multiplication, and Subtraction operators in series, and input the subtraction operator as the minuend, so that “|σ x |<|σ y |" and "|σ max |<|σ min |” from “2” to “0”, then connect the output of the Subtraction component to the Multiplication component, set the built-in parameter of the other input to π / 2, and connect the output to the α input of the Panel component. 0 The parameter is used as the input of the Addition operator, and the output parameter is the principal tensile stress σ at all calculation points. max The corresponding direction angle is determined and calculated. The specific battery connection method is as follows Figure 4 shown.
[0079] The method for determining the direction angle of the principal compressive stress is to use the Panel operator to input σ obtained by numerical method or other methods. x , σ y Parameters and σ calculated by the above formula max , σ min , α 0 Parameters, using the Absolute operator to obtain σ x , σ y , σ max , σ min The absolute value of σ is compared using the Smaller Than operator. x , σ y The absolute value of σ max , σ min The absolute value of the output terminal is connected to the input terminal of the Addition operator to add the two. At this time, the output parameter is "2" representing "|σ x |<|σ y |” and “|σ max |<|σ min |”, the output parameter is “1”, which means “|σ x |<|σ y |" or "|σ max |<|σ min |”, the output parameter is “0”, which means “|σ x |<|σ y |” and “|σ max |<|σ min |” are not satisfied, connect the Addition output terminal to the Integer Division, Multiplication, and Subtraction operators in series, and input the output terminal to the Subtraction operator as the minuend, connect the output terminal to the Addition operator, and set the built-in parameter of the other input terminal to 1 to realize parameter conversion in different situations, that is, “|σ x |<|σ y |” and “|σ max |<|σ min |” and “|σ x |<|σ y |” and “|σ max |<|σ min |” are not satisfied, the output parameters are all “1”, “|σ x |<|σ y |" or "|σ max |<|σ min|”, and then connect the output of the Addition operator to the Multiplication operator, set the built-in parameter of the other input to π / 2, and connect the output to the α input of the Panel operator. 0 The parameter is used as the input of the Addition operator, and the output parameter is the principal compressive stress σ at all calculation points. min The corresponding direction angle is determined and calculated. The specific battery connection method is as follows Figure 5 shown.
[0080] Among them, the visualization of the absolute maximum principal stress field needs to be constructed by comparing the maximum principal stress σ max and the minimum principal stress σ min The absolute value of the principal stress with the largest absolute value and the corresponding direction angle are selected as the expression object of the stress field. The specific process is as follows: Figure 6 As shown. The specific method for determining the direction angle corresponding to the absolute maximum principal stress is: use the Panel operator to input σ obtained by numerical method or other methods respectively. x , σ y Parameters and σ calculated by the above formula max , σ min , α 0 Parameters, using the Absolute operator to obtain σ max , σ min The absolute value of σ is compared using the Smaller Than operator. max , σ min The absolute value of σ x , σ y The output terminal is connected to the input terminal of the Addition operator to add the two. At this time, the output parameter is "2" representing "σ x <σ y " and "|σ max |<|σ min |", the output parameter is "1" means "σ x <σ y " or "|σ max |<|σ min |", the output parameter is "0" means "σ x <σ y ” and “|σ max |<|σ min |” are not satisfied, connect the Addition output terminal to the Integer Division, Multiplication, and Subtraction operators in series, and input the subtraction operator as the minuend, so that “σ x <σy " and "|σ max |<|σ min |” from “2” to “0”, then connect the output of the Subtraction component to the Multiplication component, set the built-in parameter of the other input to π / 2, and connect the output to the α input of the Panel component. 0 The parameter is used as the input of the Addition operator, and the output parameter is the absolute maximum principal stress σ of all calculation points. max(Abs) The corresponding direction angle is determined and calculated. The specific battery connection method is as follows Figure 7 shown.
[0081] According to the needs of stress field visualization, the arrow points to the direction of the principal stress and the length of the line segment represents the magnitude of the principal stress. The coordinate position of the center point of the grid in step S1 is matched and presented in real time in Rhino to visualize the stress field of the printed component and realize the visualization of the stress field of the magnitude and direction of the principal stress.
[0082] The method for visualizing the magnitude and direction of the principal stress is as follows:
[0083] S41. Adjust the arrow scale representing the magnitude of the principal stress. First, convert the principal stress value to be represented into a vector through the Unit X operator, and use the vector and the Number Slider operator as input parameters of Multiplication.
[0084] S42, using the input parameters in S41 as input parameters of the Rotate operator Vector, Unit Z as input parameters of the Rotate operator Axis, and using the direction angle calculated in step S3 as input parameters of the Rotate operator Angle, to achieve visualization vector construction;
[0085] S43. Connect the output terminal Vector of the Rotate operator in S42 to the Vector terminal of the Vector Display Ex operator, use the grid center point in step S1 as the input parameter of the Vector Display Ex operator Point, and the Colour Swatch operator as the input parameter of the Vector Display Ex operator Colour. Through the VectorDisplay Ex operator, the corresponding principal stress size and direction are visualized at each grid center point, and the display ratio, color and other visualization information can be adjusted independently.
[0086] Example 2
[0087] This embodiment takes the stress field visualization of a 150mm×150mm×550mm prism under a four-point bending loading condition with a regular shape as an example, and uses the method of Embodiment 1 for visualization.
[0088] The two-dimensional plane model (XY plane) of the prism printing layer is established based on Rhino and Grasshopper. The plane design domain size of the printing layer path design is 150mm×550mm. The 3D printing of the prism considers the printing strip width of 30mm±2mm, so the plane design domain of the printing layer is gridded according to 5×19, and the center points are obtained and numbered. The numbering is as follows: Figure 8 As shown, each center point is the point where the desired stress state is visualized.
[0089] Numerical simulation analysis is performed through ABAQUS. When the finite element is divided, the number of units set for each edge corresponds to the multiple of the mesh division in step S1. In this embodiment, it is 10×10×38 (corresponding to 150mm×150mm to 550mm edges respectively), and the Z direction is set to represent the molding direction. The node number, coordinates and corresponding stress data of the printed layer unit that need to realize the stress field visualization in Grasshopper software in the finite element analysis results are recorded (this method mainly considers the visualization expression of the stress field of the plane (XY plane) where the printed layer is located, so only σ is required x , σ y and τ xy Since the center point of the grid unit in step S1 corresponds to the unit node in the finite element analysis, the center point number and the unit node number are matched, and the corresponding node stress data is the principal stress information corresponding to the center point in the stress field. The number matching is as follows: Fig. 9 shown.
[0090] According to the stress data of the center point of the grid, calculate the maximum principal stress σ of each point max and the minimum principal stress σ min Size and corresponding direction angle.
[0091] According to the requirements of stress field visualization, the principal stress information to be expressed is visualized. This embodiment takes the visualization of the principal tensile stress field as an example. The arrow points to the principal stress direction and the line segment length is expressed as a directed line segment of the principal stress magnitude. The coordinate position of the grid center point in step S1 is matched to realize the visualization of the stress field of the principal tensile stress magnitude and direction. Only the principal tensile stress field of the grid center point is displayed. Fig.10 , showing the principal tensile stress field of all known data points Fig.11 In practical applications, according to the requirements of stress flow-guided printing path design, different types of force flow visualization information reflected by the required stress field can be selected as the basis for path design.
[0092] After selecting the stress field information that needs to be visualized according to the printing path design requirements, the implementation method for the numerical display of the azimuth angle is as follows: the grid center point in step one, the azimuth angle calculated in step three, the required font size (which can be input through the Number Slider operator) and the color (which can be input through the Colour Swatch operator) are respectively used as the input parameters of the Location, Text, Size and Colour terminals of the Text Tag 3D operator to realize the numerical display of the azimuth angle at each point.
[0093] Example 3
[0094] This embodiment takes the visualization of the stress field of the half-width cross-section model of the topologically optimized road slab as an example, and uses the method of Embodiment 1 for visualization. The two-dimensional plane model of the printed component is an irregular shape. First, it is divided into a plurality of regular curved quadrilaterals that are convenient for relatively uniform grid unit division according to the shape characteristics of the printed layer. Then, the curved quadrilaterals are divided into grid units according to the appropriate unit size. Taking the printing resolution of 25mm±5mm as an example, the grid division side length range is set to 20-30mm. The model size and the grid unit after division are as follows: Fig.12 shown.
[0095] Map the model positions and unit nodes in the numerical method to the coordinate system of the Rhino and Grasshopper platforms ( Fig.13 The green points in the figure clarify the corresponding relationship between the nodes of the same model in the two software, which is convenient for the subsequent screening and matching of the stress information of the center point of the grid.
[0096] The distribution of the required visualized stress field is obtained by plane stress state analysis method, and the maximum principal stress σ is calculated for each grid center point. max and the minimum principal stress σ min The magnitude and corresponding direction angle are calculated. This example is the visualization of the absolute maximum principal stress field, which is determined by the maximum principal stress σ max and the minimum principal stress σ min For the visualization of the principal stress field with the largest absolute value, in addition to the above operations for matching the direction angles of the principal stresses, it is also necessary to compare the maximum principal stress σ max and the minimum principal stress σ min The absolute value of σ is used to select the principal stress with the largest absolute value as the expression object of the stress field. The specific process steps are implemented based on Grasshopper, that is, according to the calculation result σ x , σ y , σ max , σ min, α 0 , automatically complete, determine the direction angle of the principal tensile stress at each point. Specifically, the parameter input is realized through the Panel, and the Absolute, Smaller Than, Addition, Integer Division, Multiplication, and Subtraction operators are combined to realize the output of the final confirmed direction angle. The detailed steps are as follows: the method for determining the direction angle corresponding to the absolute maximum principal stress in Example 1, which serves as the data source for the visualization of the absolute maximum principal stress and the direction angle.
[0097] Since this example is an irregular model, it is necessary to further filter and match the closest point of the target printing point, and use the principal stress data of the closest point as the stress state of the target printing point for calculation. The screening and matching process is implemented based on Grasshopper, specifically: input the grid edge line to the Geometry end of the Area operator through Curve, and the Centroid output is the target printing point set, which is used as the Point input end of the Closest Point operator. The Closest Point end outputs the closest point of the target printing point in sequence, and the CP Index outputs the sequence number of the closest point of each target printing point in the data list in sequence, which is the corresponding sequence number of the stress data to be expressed later in the list, such as Fig.14 , the green point in the figure is the nearest point selected to match the target printing point.
[0098] According to the needs of stress field visualization, the principal stress information that needs to be expressed is visualized. The arrow points to the principal stress direction, and the length of the line segment is expressed as a directed line segment. The coordinate position of the target printing point is matched to realize the visualization of the absolute maximum principal stress magnitude and the principal stress direction angle.
[0099] For the construction of directed line segments in the visualization of stress fields, two expressions can be selected according to the needs. One is to use the absolute value of the displayed principal stress as the length of the directed line segment in proportion. This expression can observe the main stress-bearing parts according to the length of the line segment under the premise of reflecting the direction of force flow, and then compare the magnitude of forces at different parts. The absolute maximum principal stress field is as follows: Fig.15 shown.
[0100] The other method is to use unit vectors of equal length to express the direction of the principal stress. Although it cannot reflect the relative magnitude of the principal stress at each point, it can more intuitively and clearly express the direction of the macroscopic force flow and guide the design of the printing path. The absolute maximum principal stress field is as follows: Fig.16 shown.
[0101] The two stress field visualization expressions complement each other and can be changed according to design and usage requirements. When the stress information of all known data points is displayed, the absolute maximum principal stress field of the topology optimized road panel is as follows: Fig.17 shown.
[0102] Example 4
[0103] This embodiment provides a printing path design method based on stress flow guidance. The design method determines at least two printing path segments. The design method includes the following steps:
[0104] Step S1, dividing the printed layer of the printed component into grid units, and taking the geometric centroid of each unit as the target printing point; determining the principal stress data of all the target printing points according to the stress field of the printed component determined in Example 1;
[0105] Step S2, selecting a target printing point as the printing starting point, taking the printing starting point as the current printing point, taking the adjacent grid cells of the cell where the current printing point is located as the neighborhood, calculating the directional deflection coefficients of all target printing points in the neighborhood of the current printing point according to the principal stress data, and selecting the target printing point with the smallest directional deflection coefficient in the neighborhood as the second printing point;
[0106] Step S3, taking the second printing point as the current printing point, calculating the directional deflection coefficients of all target printing points in the neighborhood of the current printing point, and selecting the target printing point with the smallest directional deflection coefficient in the neighborhood as the third printing point;
[0107] Step S4, repeating step S3 until there is no target printing point in the neighborhood of the current printing point, obtaining m printing points, connecting the determined printing starting point, the second printing point, the third printing point, ..., the mth printing point to form a printing path segment as the first printing path segment;
[0108] For the remaining target printing points in the printing layer that are not involved in the generation of the printing path segments, a new target printing point is selected near the starting point or the end point of the first printing path segment as the printing starting point, and steps S2 to S4 are repeated until there is no candidate target printing point in the neighborhood of the current printing point, or the existing candidate target printing point and the path segment of the current printing point overlap with the formed printing path segment, then the printing point search is stopped, and the second printing path segment, ..., the nth printing path segment are determined, and the number of the determined printing path segments is n, where n is an integer ≥ 2, that is, there are two or more printing path segments;
[0109] Step S5: Connect the determined at least two printing path segments according to the endpoints of the printing path segments that are adjacent to each other, and obtain the printing path of the printing component under the condition that the number of printing paths is minimized.
[0110] Example 5
[0111] This embodiment provides a structural stress field visualization system based on Grasshopper, including at least one processor and a memory communicatively connected to the at least one processor; the memory stores instructions that can be executed by the at least one processor, characterized in that the instructions are executed by the at least one processor so that the at least one processor can execute the structural stress field visualization method based on Grasshopper of Example 1.
[0112] For those skilled in the art, when understanding the solutions described in the specific embodiments of the present invention, they can refer to the conventional technical manuals in the field. At the same time, for the places where the above-mentioned terms appear, they can make appropriate understandings or adjustments for reference, and deduce the implementation of the same or similar technical solutions without paying any creative work.
[0113] The above embodiments describe only the basic principles, main features and / or advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and the invention content of the specification only describe the principles or specific cases of the present invention. Without departing from the essence of the innovative idea of the present invention, the innovative scheme of the present invention may be subject to various changes and improvements, and these changes and improvements all fall within the scope of protection required by the present invention.
Claims
1. A structural stress field visualization method based on Grasshopper, implemented by a Grasshopper plug-in, characterized in that: The visualization method comprises the following steps: S1. Establish a two-dimensional plane model of the printed component that requires stress field visualization, divide the two-dimensional plane model into grid units and obtain the grid center point; Obtain unit node coordinate information and unit node stress data of the printed component; S2, matching the unit node with the grid center point to obtain the stress data of the grid center point; S3. Calculate the principal stress and principal stress direction angle of each grid center point according to the stress data of the grid center point; S4. Based on the principal stress information that needs to be expressed, the principal stress and principal stress direction angle of the grid center point are used to express it with directed line segments at the grid center point to visualize the stress field of the printed component. The directed line segments are set in a way that the arrow points to the principal stress direction and the length of the line segment represents the magnitude of the principal stress.
2. The structural stress field visualization method based on Grasshopper according to claim 1, characterized in that: In the process of dividing the grid units of the two-dimensional plane model, the two-dimensional plane model of the printed component is divided into grid units according to the layer shape and the printing range.
3. The structural stress field visualization method based on Grasshopper according to claim 2, characterized in that: The size of the grid unit is determined according to the width range of the print bar extruded by the print head of the printing device; for a two-dimensional plane model with a regular shape, it is divided into rectangular grid units, and for an irregular two-dimensional plane model, it is first divided into a plurality of regular curved quadrilaterals according to the shape characteristics of the two-dimensional plane model, which are convenient for relatively uniform grid unit division, and then the curved quadrilaterals are divided into grid units according to the appropriate unit size.
4. The structural stress field visualization method based on Grasshopper according to claim 1, characterized in that: When matching the unit node with the grid center point, the unit node coordinate information and the grid center point position are judged. When the grid center point is a unit node, the principal stress data of the unit node is used as the stress state of the grid center point for calculation; when the grid center point is not a unit node, the principal stress data of the unit node closest to the grid center point is selected as the stress state of the grid center point for calculation.
5. The structural stress field visualization method based on Grasshopper according to any one of claims 1 to 4, characterized in that: The principal stress information is at least one of principal tensile stress, principal compressive stress, and absolute maximum principal stress information.
6. The structural stress field visualization method based on Grasshopper according to claim 5, characterized in that: The visualization of the principal tensile stress field is represented by the maximum principal stress σ at the center of the grid max The visualization of the principal compressive stress field is represented by the minimum principal stress σ at the center of the grid. min The absolute maximum principal stress field is composed of directed line segments of max and the minimum principal stress σ min It consists of the directed line segment corresponding to the principal stress with the larger absolute value among the two.
7. The structural stress field visualization method based on Grasshopper according to claim 6, characterized in that: The calculation formulas for the maximum principal stress and the minimum principal stress are as follows: Where σ max is the maximum principal stress, σ min is the minimum principal stress, σ x is the normal stress in the x direction, σ y is the normal stress in the y direction, τ xy is the shear stress on the xy plane; The calculation formula for the principal stress direction angle is: Where α0 is the principal stress direction angle.
8. The structural stress field visualization method based on Grasshopper according to claim 7, characterized in that: When σ x >σ y When α0 corresponds to the maximum principal stress σ max direction, α0+π / 2 corresponds to the minimum principal stress σ min direction; when σ x <σ y When α0 corresponds to the minimum principal stress σ min direction, α0+π / 2 corresponds to the maximum principal stress σ max direction.
9. The structural stress field visualization method based on Grasshopper according to any one of claims 1 to 4, characterized in that: The realization method of visual expression of principal stress magnitude and direction is: S41, adjust the arrow scale representing the magnitude of the principal stress, convert the principal stress value to be represented into a vector through the Unit X operator, and use the vector and the Number Slider operator as input parameters of Multiplication; S42, using the input parameters in S41 as input parameters of the Rotate operator Vector, using Unit Z as input parameter of the Rotate operator Axis, and using the direction angle as input parameter of the Rotate operator Angle, to realize visualization vector construction; S43. Connect the output terminal Vector of the Rotate operator in S42 to the Vector terminal of the Vector Display Ex operator, use the center point of the grid as the input parameter Point of the Vector Display Ex operator, and use the Colour Swatch operator as the input parameter Colour of the Vector Display Ex operator, and realize the visualization expression of the corresponding principal stress size and direction at each grid center point through the Vector Display Ex operator.
10. A structural stress field visualization system based on Grasshopper, comprising at least one processor and a memory connected to the at least one processor in communication; the memory stores instructions that can be executed by the at least one processor, characterized in that: The instructions are executed by at least one processor so that the at least one processor can execute the structural stress field visualization method based on Grasshopper according to any one of claims 1 to 9.
Citation Information
Patent Citations
3D printing continuous fiber reinforcement path planning method based on principal stress trajectory
CN113752560A
3D printing continuity path planning method based on stress
CN116039088A