Design Methodology of Data Structure and Interactive Function Architecture for Finite Element Analysis Unit Library

CN120124381BActive Publication Date: 2026-08-14NINGXIA UNIVERSITY
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-06
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0005]有鉴于此,有必要提供一种有限元分析单元库数据结构与交互功能架构的设计方法,用以解决现有技术中存在的由于现有网格划分策略与单元类型设置不兼容以及各类开发集成不规范,架构设计不完善的技术问题

Benefits of technology

[0016]本发明的有益效果是:本发明提出的有限元分析单元库数据结构与交互功能架构的设计方法,通过基于有限状态机设计模式构建交互功能数据类图,有效加强了用户涉及的操作逻辑。并且,通过设置交互功能数据类图包括单元类型设置对话框类,可通过单元类型设置对话框类构建交互对话框,提升交互性能。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120124381B_ABST
    Figure CN120124381B_ABST
Patent Text Reader

Abstract

This invention provides a design method for the data structure and interactive functional architecture of a finite element analysis unit library, comprising: constructing an interactive functional data class diagram including a unit type setting dialog box class and a unit library abstract class; constructing a unit library data structure; the unit library data structure includes a unit library abstract class, a unit family abstract class, and a topology type, wherein the unit library abstract class implements a collection of finite element calculation units of different orders and shapes; constructing a development template for unit functions; the development template includes a finite element basic class and a general abstract interface; constructing a data structure for the unit family abstract class; the data structure is a combination of the unit family abstract class, the finite element class, the unit setting component class, and the unit setting information class. At the user level, this invention provides a mesh type setting interactive function with a good user experience; at the development level, it provides a standardized unit development template, and through the design of the unit family data structure, it provides an architectural foundation for interactive operations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of finite element simulation technology, specifically to a design method for a finite element analysis unit library data structure and interactive functional architecture. Background Technology

[0002] Finite Element Analysis (FEA), as a mainstream CAE technology, is widely favored for its powerful analytical capabilities regarding complex structures and material behavior. The element library is a core component of finite element software, carrying general functions and advanced algorithms, and is crucial for ensuring the accuracy, reliability, and efficiency of calculation results. However, the development of domestically produced finite element software still faces a series of pressing problems that need to be addressed: Compatibility between mesh generation strategy and element type settings: Although mesh generation strategy and element type settings should be independent from a configuration perspective, they are inherently linked at the data level. The lack of an effective correlation mechanism often leads to incompatibility between the two, thus affecting the accuracy of simulation results and computational efficiency.

[0003] The lack of standardized development and integration guidelines for unit modules: Current unit development lacks systematic standardized guidelines, which not only hinders interface reuse but also leads to redundant development and increases maintenance difficulty. Furthermore, the absence of unified data structure and architecture design standards further reduces the efficiency of unit integration and may cause compatibility issues between developed units and different modules.

[0004] In view of the above problems, there is an urgent need for a design methodology for the data structure and interactive functional architecture of a finite element analysis unit library. This methodology aims to address the incompatibility between meshing strategies and unit type settings in the existing unit development process, as well as the lack of standardization in various development integrations and the imperfect architecture design. By providing interface components with good interactive logic, this approach facilitates the standardized data structure design for standardized unit development by developers, and the integration of the setting functional architecture between the two. This enables standardized development and efficient integration of computational units, while simultaneously improving the user experience of setting unit types and enhancing the efficiency and accuracy of related setting operations. Summary of the Invention

[0005] In view of this, it is necessary to provide a design method for the data structure and interactive functional architecture of the finite element analysis unit library, so as to solve the technical problems existing in the prior art, such as incompatibility between existing meshing strategies and unit type settings, as well as various non-standard development and integration, and imperfect architecture design.

[0006] On the one hand, in order to solve the above-mentioned technical problems, this invention provides a design method for the data structure and interactive functional architecture of a finite element analysis unit library, including: An interactive function data class diagram is constructed based on the finite state machine design pattern; the interactive function data class diagram includes a unit type setting dialog class and a unit library abstract class that is composed of the unit type setting dialog class; A unit library data structure is constructed; the unit library data structure includes the unit library abstract class, a unit family abstract class that is composed of the unit library abstract class, a topology type that is associated with the unit library abstract class, a specific topology type unit library class that inherits from the unit library abstract class, and a specific unit family class that inherits from the unit library abstract class, wherein the specific unit family class and the specific topology type unit library class are composed of each other; the unit library abstract class is used to implement a collection of finite element calculation units of different orders and shapes; A development template for building unit functions; the development template includes a finite element base class and a general abstract interface that is a composition of the finite element base class; Construct the data structure of the unit family abstract class; the data structure is a combination of the unit family abstract class, the finite element element class, the element setting component class, and the element setting information class.

[0007] In one possible implementation, the cell type setting dialog class is designed with a cell family list bar. The cell library abstract class includes a list of available cell families corresponding to geometric objects of a determined topology type. Cell family objects from the list of available cell families are added to the cell family list bar based on the init_widget_via_element_lib() method in the cell type setting dialog class and the get_element_families() method in the cell library abstract class.

[0008] In one possible implementation, the interactive function data class diagram further includes a unit setting component class and a unit setting information class, and the unit type setting dialog class depends on the unit type setting dialog class of the unit setting component class and the unit setting information class. Then the method further includes: Based on the init_stacked_widget() and generate_tab_widget() methods in the unit type setting dialog class, a component object is generated, so that after selecting different unit family abstract classes in the unit type setting dialog class, the unit setting component in the unit setting component class is updated in real time.

[0009] In one possible implementation, the interactive function data class diagram further includes a unit type basic state abstract class designed based on the finite state machine design pattern, a unit type control class that is composed of the unit type basic state abstract class, a unit type setting class that inherits from the unit type basic state abstract class, a unit type area selection state class, and a geometric unit type class that is associated with the unit setting component class. The unit type setting dialog box class is composed of the unit type setting state class, and the unit setting information class is associated with the geometric unit type class.

[0010] In one possible implementation, the specific topology type unit library class includes a three-dimensional solid topology type unit library class, a two-dimensional shell topology type unit library class, and a three-dimensional shell topology type unit library class, and the specific unit family class includes a plane stress unit family class and a plane strain unit family class.

[0011] In one possible implementation, the unit library data structure further includes a unit library factory class, which is a composition of the unit library abstract class.

[0012] In one possible implementation, the general abstract interface includes the Jacobian abstract interface, the type function abstract interface, the numerical integral abstract class, and the topological shape behavior abstract class.

[0013] In one possible implementation, the development template further includes a finite element basic abstract class, a finite element node class that inherits from the finite element basic abstract class, an element geometric feature type that is associated with the finite element basic class, an element setting information class that is associated with the finite element class, and a topological shape behavior abstract class that is associated with the finite element class, wherein the finite element basic class inherits from the finite element basic abstract class.

[0014] In one possible implementation, when the element type is a plane stress element, the data class diagram of the plane stress element includes a plane element abstract class inherited from the finite element element class, a two-dimensional shell behavior class inherited from the topological behavior abstract class, a three-node plane element class, a four-node plane element class, a six-node plane element class, and an eight-node plane element class inherited from the plane element abstract class, as well as a three-node plane stress element class inherited from the three-node plane element class, a four-node plane stress element class inherited from the four-node plane element class, a six-node plane stress element class inherited from the six-node plane element class, and an eight-node plane stress element class inherited from the eight-node plane element class. The three-node plane stress element class, the four-node plane stress element class, the six-node plane stress element class, and the eight-node plane stress element class are in a composition relationship with the plane stress behavior class.

[0015] In one possible implementation, when the element type is a plane stress element, the element family is a plane stress element family. The data structure further includes a plane stress element family class that inherits from the element family abstract class. The element setting component class includes three-node plane stress element setting component classes, four-node plane stress element setting component classes, six-node plane stress element setting component classes, and eight-node plane stress element setting component classes that are combined with the plane stress element family class. The element setting information class includes three-node plane stress element setting information classes, four-node plane stress element setting information classes, six-node plane stress element setting information classes, and eight-node plane stress element setting information classes that are combined with the plane stress element family class.

[0016] The beneficial effects of this invention are as follows: The design method for the finite element analysis unit library data structure and interactive function architecture proposed in this invention effectively strengthens the user-involved operational logic by constructing an interactive function data class diagram based on the finite state machine design pattern. Furthermore, by including a unit type setting dialog class in the interactive function data class diagram, interactive dialog boxes can be constructed through this class, improving interactive performance.

[0017] Furthermore, by setting up an abstract class for unit families and establishing a composition relationship between the abstract class for unit families and the abstract class for unit libraries, this invention provides a method for setting up basic units based on unit families rather than specific units as in the prior art during interactive functions. This avoids dependence on setting up a single specific unit and overcomes the problem of incompatibility between grid partitioning strategies and unit type settings.

[0018] Furthermore, this invention provides a standardized unit development template at the development level by constructing a unit function development template. Through a modular architecture and standardized interfaces, discrete unit functions are encapsulated into pluggable algorithm components, supporting the efficient integration of multi-physics coupling, complex assembly analysis, and novel units, effectively improving the development efficiency of units and the integration efficiency of unit libraries. On this basis, through the data structure design of the unit family abstract class, a unit type interaction setting function architecture design with good scalability and maintainability is realized, providing an architectural foundation for interactive operations. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1A schematic flowchart illustrating an embodiment of the design of the data structure and interactive functional architecture of the finite element analysis unit library provided by the present invention; Figure 2 A schematic diagram of an embodiment of the interactive function data class diagram provided by the present invention; Figure 3 A schematic diagram of an embodiment of the unit library data structure provided by the present invention; Figure 4 A schematic diagram illustrating a specific design embodiment of the unit functional architecture provided by the present invention; Figure 5 A schematic diagram of an embodiment of the planar stress element based on the development template design provided by the present invention; Figure 6 A schematic diagram of the specific implementation structure of the plane stress element based on the data structure of the unit family abstract class provided by the present invention. Detailed Implementation

[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0022] It should be understood that the illustrative drawings are not drawn to scale. The flowcharts used in this invention illustrate operations implemented according to some embodiments of the invention. It should be understood that the operations in the flowcharts may be implemented out of order, and steps without logical contextual relationships may be reversed or performed simultaneously. Furthermore, those skilled in the art, guided by the content of this invention, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor systems and / or microcontroller systems.

[0023] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0024] This invention provides a design method for the data structure and interactive functional architecture of a finite element analysis unit library, which will be described below.

[0025] Based on the finite element theory, it is known that the geometric mesh needs to be converted into an analytical model containing computational unit objects: the original geometric data is replaced by mesh data, and finite element computational units are bound to each unit, ultimately constructing a numerical computation system that satisfies the discretization of the governing equations.

[0026] Therefore, the purpose of the design method for the finite element analysis element library data structure and interactive functional architecture proposed in this embodiment of the invention is to achieve the goal of assigning computational units to geometric units by setting the element library data structure and interactive functional architecture, thereby achieving the final mesh generation. In other words, this embodiment of the invention is a part of the design method for the mesh generation module in a finite element simulation software construction system.

[0027] It should be understood that the units in the unit library in the embodiments of the present invention refer to computational units. The purpose of computational units is to assign finite element unit objects to geometric meshes in order to construct the relevant matrices of the governing equations of your analysis problem.

[0028] Figure 1 This is a schematic flowchart of an embodiment of the design method for the data structure and interactive functional architecture of the finite element analysis unit library provided by the present invention. Figure 2 This is a schematic diagram of an embodiment of the interactive function data class diagram provided by the present invention. Figure 3 This is a schematic diagram of an embodiment of the unit library data structure provided by the present invention, as shown below. Figures 1-3 As shown, the design method for the data structure and interactive functional architecture of the finite element analysis unit library includes: S101. Construct an interactive function data class diagram based on the finite state machine design pattern; the interactive function data class diagram includes a unit type setting dialog class and a unit library abstract class that is a composition of the unit type setting dialog class.

[0029] Among them, a specific unit library can be designed based on the unit library abstract class, and the unit library includes multiple unit families.

[0030] S102. Construct the unit library data structure; the unit library data structure includes a unit library abstract class, a unit family abstract class that is a composition of the unit library abstract class, a topology type that is associated with the unit library abstract class, a specific topology type unit library class that inherits from the unit library abstract class, and a specific unit family class that inherits from the unit library abstract class. The specific unit family class and the specific topology type unit library class are a composition of each other; the unit library abstract class is used to implement a collection of finite element calculation units of different orders and shapes.

[0031] Finite element analysis (FEM) cells can be adaptively configured according to different analysis objectives. For example, for plane stress problems, FEM cells can include plane stress elements; for plane strain problems, FEM cells can include plane strain elements; for three-dimensional problems, solid elements can be used; and for plate and shell problems, shell elements can be used. Furthermore, in addition to the above-mentioned solid mechanics fields, different FEM cells can be configured according to thermal, electromagnetic, and fluid mechanics fields.

[0032] For example, based on the element library abstract class, specific plane stress element families can be designed. The plane stress element family includes triangular plane stress elements and quadrilateral plane stress elements, etc. When selecting calculation elements, users do not need to select triangular plane stress elements and quadrilateral plane stress elements, but can select the corresponding plane stress element family, which contains plane stress elements of different orders and shapes. This reduces the possibility of misoperation and improves the accuracy of simulation results and computational efficiency.

[0033] S103, Development template for building unit functions; The development template includes a finite element base class and a general abstract interface that is a composition of the finite element base class; S104. Construct the data structure of the unit family abstract class; the data structure includes the unit family abstract class, finite element unit class, unit setting component class, and unit setting information class as a combination relationship.

[0034] The unit family abstract class serves two main purposes: firstly, it manages the individual units it contains; secondly, it provides a mapping between the unit family and the interactive interface settings. To achieve the former, a combination relationship between the unit family abstract class and the finite element unit class is designed, clearly defining the list of finite element units within the unit family. To achieve the latter, it is necessary to introduce relevant setting components for the interactive interface and consider user settings information, constructing its association with specific units. Therefore, the unit family abstract class is designed to be combined with both the unit setting component class and the unit setting information class. These combination relationships are implemented using a key-value pair data structure, managing related combination information through different attributes. By setting combination relationships between the unit family abstract class and the finite element unit class, unit setting component class, and unit setting information class, when switching between different unit groups within the unit family abstract class, the corresponding components and information items in the unit setting component class and unit setting information class can be switched accordingly, improving the user's interactive experience in setting unit types and enhancing the efficiency and accuracy of related setting operations.

[0035] It should be understood that the architecture design method for the load and boundary condition transformation function in the embodiments of the present invention can be implemented in electronic devices such as desktop computers, laptops, tablet computers, and laptops. Any of the above electronic devices stores a program compiled by the design method of the finite element analysis unit library data structure and interactive function architecture. When any of the above electronic devices is started, the program is called, and then the architecture design method for the load and boundary condition transformation function is implemented.

[0036] Compared with existing technologies, the design method for the finite element analysis unit library data structure and interactive function architecture proposed in this invention effectively enhances the user-involved operational logic by constructing an interactive function data class diagram based on the finite state machine design pattern. Furthermore, by including a unit type setting dialog class in the interactive function data class diagram, interactive dialog boxes can be constructed using this class, improving interactive performance.

[0037] Furthermore, by setting an abstract class for unit families and establishing a composition relationship between the abstract class for unit families and the abstract class for unit libraries, this embodiment of the invention provides a method for setting the basic unit based on unit families rather than specific units as in the prior art during interactive functions. This avoids the dependence on setting a single specific unit and overcomes the problem of incompatibility between grid partitioning strategies and unit type settings.

[0038] Furthermore, this embodiment of the invention provides a standardized unit development template at the development level by constructing a unit function development template. Through a modular architecture and standardized interfaces, discrete unit functions are encapsulated into pluggable algorithm components, supporting multi-physics coupling, complex assembly analysis, and efficient integration of novel units, effectively improving the development efficiency of units and the integration efficiency of unit libraries. On this basis, through the data structure design of the unit family abstract class, a unit type interaction setting function architecture design with good scalability and maintainability is realized, providing an architectural foundation for interactive operations.

[0039] In some embodiments of the present invention, the design principle of the interactive function data class diagram is as follows: To construct the interactive data class diagram, two key settings in the grid partitioning module need to be clarified: grid partitioning strategy selection and cell type setting. Although the grid partitioning strategy and cell type assigner should be independent from a configuration logic perspective, they are implicitly coupled through grid topology data. Therefore, it is necessary to clarify the relationship between the two and avoid the impact of user operations on grid partitioning and cell settings by optimizing the interactive operation logic, and design a general operation strategy.

[0040] The meshing module offers users a choice of meshing strategy: whether to use tetrahedral or hexahedral elements. Because hexahedral elements have a regular shape, they can better simulate changes in stress, strain, and other field variables in physical phenomena. Therefore, with the same number of nodes, they typically provide more accurate results than tetrahedral elements, resulting in a more stable solution process and reducing the likelihood of numerical oscillations or divergence. Tetrahedral elements are suitable for any complex geometry, especially irregular or highly distorted regions that are difficult to mesh with hexahedral elements. Furthermore, automated mesh generation algorithms for tetrahedral elements are relatively mature and can complete the meshing of complex models in a short time.

[0041] However, sometimes due to complex geometry, limitations of the mesh generator, and other reasons, it is impossible to implement the user-planned partitioning strategy for the region to be analyzed. The system needs to be designed to address this problem, requiring not only data structure design but also functional architecture design.

[0042] In terms of data structure, geometric content is managed through Part, PartFeature, and IShape, allowing meshing operations to be performed on different geometric objects. The advantage of this approach is that a complex geometry, without any processing, might only be memorized using tetrahedral elements. However, based on this data structure design, Boolean operations provided by the geometry modeling modules can be used to perform geometric operations such as partitioning the Part.

[0043] A complex geometric IShape object is decomposed into multiple independently operable but data-related geometric IShape objects. Before the user sets the meshing strategy, the finite element simulation system first iterates through the IShape list objects in the Part object to be configured. On one hand, it detects the topology to determine the appropriate meshing strategy based on the complexity of the geometry. For example, simple shapes can be meshed using hexahedral elements, while complex shapes can only be meshed using tetrahedral elements or a mixture of different shape elements. On the other hand, following the processing order from advanced algorithms to basic stable algorithms, the mesh generator is invoked in the system background to perform meshing preprocessing on each IShape object, confirming the available meshing operations.

[0044] Based on the above two aspects, after the user selects the object to be set as the grid partitioning strategy, a dialog box will pop up to activate the corresponding strategy settings, allowing the user to select and set the grid partitioning strategy.

[0045] As can be seen from the above design, the available meshing strategies for geometric objects depend on the complexity of the geometry itself, as well as the built-in functions and algorithms of the connected mesh generator. Therefore, providing users with the aforementioned functional support can assist them in setting reasonable and effective meshing strategies during the meshing process.

[0046] After determining the mesh generation strategy, the resulting mesh will have two possible outcomes: 1. The mesh contains only one type of element, such as triangular elements in a two-dimensional planar problem and hexahedral elements in a three-dimensional spatial problem. 2. The mesh contains elements with various geometric shapes, presenting a mixed form. For example, in a complex 3D problem, hexahedral elements are used to achieve structured meshing in most areas, while tetrahedral elements are used to achieve meshing in areas with significant geometric changes.

[0047] Regardless of the meshing result, the resulting geometric mesh faces the challenge of defining the element type. While the geometry has been divided into a mesh of elements, this only represents a geometric division and lacks mathematical discretization. Therefore, guided by finite element theory, computational elements are introduced to construct an analytical model suitable for numerical simulation. Compared to the interactive model built during the modeling process, the analytical model uses mesh data instead of geometric data as its foundation, assigning each element a finite element computational element object to construct the relevant matrices of the governing equations for the problem to be analyzed.

[0048] This process involves the question of how to assign computational unit objects to corresponding elements in the mesh. The connection between the two lies in having the same basic geometric properties, including nodes and element shape. In practice, two issues need to be addressed: what type of element the user intends to use, and how to ensure that the computational unit set by the user matches the elements in the mesh generation result. The former is confirmed by the user through interactive settings, while the latter's correspondence is not automatically satisfied and needs to be implemented through data structure and functional architecture design. For example, the user intends to use hexahedral elements for mesh generation, but the complex geometry dictates that only tetrahedral elements can be used. In this case, the computational unit set by the user does not match the geometric element obtained from the mesh generation, and the finite element computational unit cannot be assigned to the geometric mesh. Similarly, if the user wants to use eight-node quadrilateral elements, but the mesh generation result is a four-node quadrilateral element mesh, although both are elements of the same shape, the different number of nodes reflects different element orders, and the computational unit attributes still cannot be assigned to the geometric element.

[0049] Therefore, a setting mechanism is needed to ensure a stable matching of computational and geometric mesh elements for different meshing strategies. To this end, an abstract class for a cell library is designed, which is a composite class with the cell type setting dialog box. This class uses cell families from the cell library, rather than specific cells, as the basic unit for setting. Based on this, users can set the cell type and related attribute parameters, thus avoiding dependence on setting a single specific cell. For example, in this way, users no longer need to choose between triangular and quadrilateral plane stress elements; instead, they can choose a plane stress element family that includes plane stress elements of different orders and shapes.

[0050] Based on the above-mentioned operational mechanism, two further aspects need to be considered: From the user's perspective, different cell families have different parameters and characteristics. How can we ensure that users can easily and accurately set the relevant parameters for specific cells after selecting a cell family? From the developer's perspective, when developing unit families and specific units within them, how should interactive settings be provided to users while ensuring the scalability and maintainability of related functional modules?

[0051] Therefore, the interface architecture for interactive settings was designed. On one hand, a functional architecture for unit type settings was designed based on the finite state machine design pattern, effectively strengthening the user's operational logic. On the other hand, a unit family list bar was designed in the unit type settings dialog class QmyEditElementTypeDialog to display all unit families in the unit library. Updated unit family settings components and basic unit option components were also designed. After the user selects different unit families, each setting component is updated in real time, allowing the user to set the required unit type-related parameters. The specific interactive function data class diagram is as follows: Figure 2 As shown.

[0052] A functional architecture for setting unit types was designed based on the finite state machine design pattern. The entire process is dominated by the unit type control class ElemTypeControl, which is composed of the unit type base state abstract class ElemTypeBaseState. The unit type setting process involves two steps, implemented by the unit type region selection state class ElemTypeRegionSelectionState (inherited from ElemTypeBaseState) and the unit type setting state class ElemTypeEditState. The former is responsible for collecting the geometric shape object selected by the user for unit type setting as the setting region, while the latter provides the unit type setting function based on the setting region.

[0053] In ElemTypeEditState, a dialog box is needed to provide users with interactive cell type settings, namely the cell type setting dialog class QmyEditElementTypeDialog. This state requires two main settings: first, selecting the specific cell family to be used in the analysis; and second, setting the specific cell parameters for the selected cell family. To achieve the former, a cell family list bar is designed in QmyEditElementTypeDialog, bound to the cell library abstract class ElementLib, forming a composition relationship. Under the design of the cell development template, all cell families in the cell library are displayed in the cell family list bar. To achieve the latter, a corresponding parameter setting component needs to be designed in QmyEditElementTypeDialog.

[0054] To bind the cell setting widget to the selected cell family and enhance the flexibility and extensibility of QmyEditElementTypeDialog, an updatable cell family setting widget class QmyElementSettingWidget and cell basic options widgets were designed. A mapping relationship was established between the cell family options in the cell family list bar and the updatable widgets in the dialog box. This allows users to update the relevant widgets to those associated with the current cell family when selecting different cell families, enabling users to set the required cell type parameters. This allows users to switch between different cell family setting widgets through interaction with the cell family list bar.

[0055] The cell family settings widget is related to the specific cell settings within a cell family. The available options vary depending on the selected cell family, and the specific settings are determined by the cell selected by the user in the cell family list. Therefore, developers need to determine the required settings parameters for each cell during the cell development process, including but not limited to the cell's integration method, hourglass control, and cell type, and add these parameters to the cell family settings widget class `QmyElementSettingWidget`. Furthermore, the updatable cell family settings widget also includes a cell description section, which briefly describes the cell's name, attributes, and key states based on the user's options and settings.

[0056] The `QmyElementSettingWidget` widget class is associated with the `GeoElementType` class of the specific element, allowing developers to predefine parameters such as integration methods, hourglass control, and shape function orders in the element development template. This widget encapsulates user input parameters through an `ElementSettingInfo` object, providing data support for the subsequent creation of computational element objects. During interaction, the dialog box also includes a dynamically updated element description bar, displaying metadata such as the name, topology type, and key attributes of the current element family in real time. `QmyEditElementTypeDialog` creates the corresponding element setting information object `ElementSettingInfo` by obtaining user input, used for the final creation of the specific computational element and the setting of related attributes. In other words, `QmyEditElementTypeDialog` depends on `QmyElementSettingWidget` and `ElementSettingInfo`.

[0057] In the above design, the object used to manage the list of element families is the element library, which forms a composition relationship with QmyEditElementTypeDialog. A specific element library provides a clear list of available element families for geometric objects with a defined topology. To enable interactive settings for users, this element family list needs to be bound to the element family list bar in the element type settings dialog box. Therefore, an initialization function method `init_widget_via_element_lib()` is designed in QmyEditElementTypeDialog for the element family list bar. This method takes a specific element library object inherited from ElemetLib as input parameters, calls the `get_element_families()` method of ElemetLib to obtain the list of available element families contained in that specific element library object, and adds the element family objects in that list to the element family list bar in QmyEditElementTypeDialog. This establishes the association between the element library and QmyEditElementTypeDialog and provides interactive settings functionality for users.

[0058] In addition, the `init_stacked_widget()` method is designed in `QmyEditElementTypeDialog`. Its input parameter is a concrete element family object that inherits from the element family abstract class `ElementFamily`. This method calls various methods and properties of `ElementFamily` to obtain element setting information and calls its own `generate_tab_widget()` method to generate a widget object, enabling real-time updates of element setting widgets when different `ElementFamily` objects are selected in `QmyEditElementTypeDialog`. Specifically, when the user selects different element families, the `init_stacked_sidget()` method triggers an interface update. This method receives a concrete element family object that inherits from `ElementFamily`, calls `generate_tab_widget()` to generate the corresponding parameter setting widget, and enables dynamic switching of updatable widgets such as `QmyElementSettingWidget`.

[0059] This not only provides users with a better user experience for grid type setting interaction, improving the efficiency and accuracy of grid type setting, but also provides developers with a cell type interaction setting function architecture with good scalability and maintainability, effectively improving cell family development and integration efficiency.

[0060] In specific embodiments of the present invention, such as Figure 3 As shown, the specific topology type unit library classes include three-dimensional solid topology type unit library classes, two-dimensional shell topology type unit library classes, and three-dimensional shell topology type unit library classes. The specific unit family classes include plane stress unit family classes and plane strain unit family classes.

[0061] It should be noted that: specific topology type element library classes may also include other element library classes besides the three types mentioned above. Similarly, specific element family classes may also include solid families, shell families, etc., in addition to plane stress families and plane strain families, which will not be elaborated here.

[0062] Furthermore, to achieve decoupling between the design and use of the computing unit, in specific embodiments of the present invention, such as... Figure 3 As shown, the cell library data structure also includes the cell library factory class ElementLibFactory, which is a composition of the cell library abstract class. This design encapsulates the instantiation process of cell library objects within the factory class, allowing the system to extend to new topology type cell libraries simply by adding a specific cell library class and registering it with the factory, without modifying existing calling logic, significantly enhancing the maintainability of the architecture.

[0063] Specifically, the available element families differ depending on the geometric object's topology. For example, the plane stress element family and the plane strain element family can only be used for shell topology objects, not solid topology objects. Therefore, ElementLib is associated with the topology type TopoType. Furthermore, multiple element families are available for a given topology object, and users need to select the specific element family based on the analysis type and other factors. Therefore, ElementLib includes an attribute `elem_families` that lists element families, forming a composition relationship with the element family abstract class `ElementFamily`, and provides methods such as `get_element_families()` to provide the element families in the library.

[0064] For geometric objects of different topological types, specific topological element library classes inheriting from ElementLib are developed. These classes explicitly define which element families are included in their element family list attribute and implement abstract method interfaces such as get_default_element_family(). Examples include the 3D solid topological element library class Solid3dElementLib, the 2D shell topological element library class Shell2dElementLib, and the 3D shell topological element library class Shell3dElementLib. Taking Shell2dElementLib as an example, this element library can provide plane stress elements for plane stress problem analysis of 2D shell objects. Therefore, Shell2dElementLib and the plane stress element family class PlaneStressElements form a composition relationship. PlaneStressElements, as a specific element family class, inherits from the element family abstract class ElementFamily.

[0065] In some embodiments of the present invention, for the development template design of unit functions, the finite element stiffness matrix calculation based on the principle of virtual work generally requires two steps: first, calculating the unit stiffness matrix within the unit, i.e., constructing and integrating the geometric matrix through unit behavior objects; second, assembling the unit stiffness matrix into the overall stiffness matrix. The latter is the process of unit assembly using an assembler, involving processing techniques such as confirming the numbering of the nodal degrees of freedom of different units, which is not the focus of the embodiments of the present invention. The embodiments of the present invention tend to focus on the former, which is directly related to the design of the unit functional architecture.

[0066] The calculation of the element stiffness matrix includes the geometric matrix. and elasticity matrix Geometric matrix The product of strain-related partial differential operators and shape function matrices is determined by geometric equations. These geometric equations depend on the spatial dimension of the analysis problem and are independent of the specific element type. Therefore, they can be designed as a dimension-dependent element behavior object, forming a composition relationship with the finite element calculation element base class object, namely the TopoShapeBehavior class. This class, in combination with the finite element calculation element base class, provides a unified interface for geometric matrix calculation for problems of different dimensions by defining spatial dimension attributes and geometric equation implementation methods.

[0067] It needs to be clarified that the elasticity matrix Determined by the material, the material setting module provides relevant interface designs, constructing the elasticity matrix corresponding to the material properties determined by the MaterialBehavior class and the Section class. .

[0068] Taking linear elastic materials as an example, the base class ElasticBehavior provides the generate_d_mat() method to generate matrices. For specific linear elastic material behaviors, a corresponding specific linear elastic behavior class is designed by inheriting from the base class ElasticBehavior, and the generate_d_mat() method is further improved within it to implement the elasticity matrix. The calculation of specific elements is then performed. For example, for isotropic materials, the `IsotropicElasticBehavior` class is designed, and the elasticity matrix is ​​generated based on `generate_d_mat()`. For orthotropic materials, an OrthotropicElalsticBehavior class is designed, and the elasticity matrix is ​​generated based on generate_d_mat(). .

[0069] In the computation unit, the computation result of the above matrix is ​​obtained by calling the self-designed process_d_mat() method and then calling the generate_d_mat() method of the cross-section Section object.

[0070] In general CAE systems, the geometric shapes processed are often more complex. Therefore, it is necessary to introduce parametric elements to expand the universality of the spatial shape of the elements, transforming irregularly shaped elements in the global spatial coordinate system into regularly shaped elements in the local natural coordinate system. This requires coordinate transformation in three aspects: global spatial coordinate... with local natural coordinates The transformation of global spatial coordinates, the partial derivative operator Transformation with respect to partial derivative operators of local natural coordinates The coordinate transformation in the integration domain. These three transformation functions need to be incorporated into the design of relevant functions in specific unit development. That is, abstract interfaces for functions of type `type`, Jacobian interfaces, etc., are required.

[0071] Based on this, the specific design of the unit functional architecture is as follows: Figure 4 As shown. The base class is the finite element fundamental abstract class FEMBase, which provides the basic attributes required by nodes and elements, such as local and global numbers. Based on this, the finite element node class FEMNode and the finite element fundamental class FEMElementBase can be inherited. FEMNode contains finite element node information and related calling methods, such as coordinate values ​​and degree-of-freedom labels; FEMElementBase, as the fundamental class of the finite element, not only has a list of FEMNode objects that make up the element, but also covers the attributes and methods commonly used in finite element modeling and analysis, as well as abstract interfaces including: The ShapeFuncInterface provides abstract method interfaces related to shape functions required in the construction of finite element analysis models, such as the generate_shape_function() method interface for generating shape function matrices, the generate_dn_lcoord() method interface for obtaining the partial derivative matrix of shape functions with respect to local natural coordinates, and the get_order() method interface for providing the order of shape functions.

[0072] The Jacobian Interface provides abstract method interfaces related to coordinate transformation required in the construction of finite element analysis models, such as the generate_jacobian() method interface for generating the Jacobian matrix and the generate_dn_gcoord() method interface for obtaining the partial derivative matrix of shape functions with respect to the global spatial coordinates.

[0073] The numerical integration abstract class Quadrature provides integration point information required for numerical integration during the construction of finite element analysis models.

[0074] Based on the aforementioned main interface objects, FEMElementBase includes general methods required for constructing finite element analysis models, such as the get_gcoord_via_lcoord() method for converting local natural coordinates to global spatial coordinates. Furthermore, FEMElementBase includes attributes related to the element geometric feature type ElementGeoFeatureType for conversion between the element and the visualization model mesh during post-processing.

[0075] Building upon FEMElementBase, responsibilities are further refined, and the finite element class FEMElement is designed. As mentioned earlier, in structural static simulation analysis, it is necessary to consider some behaviors determined by the topological shape. Therefore, the topological shape behavior abstract class TopoShapeBehavior is designed to combine with FEMElement, enabling flexible combination and extension of the relevant attributes of the element geometric equation through the combination pattern. Furthermore, by introducing the element setting information class ElementSettingInfo into FEMElement through aggregation relationships, the direct association between user settings and element attributes is achieved, clarifying the parameter settings during key method calls in the use of the finite element.

[0076] In addition, if additional computational functions are required, the element interfaces can be further enriched. For example, for the analysis of large deformation problems, geometric nonlinearity can be considered based on the updated Lagrangian scheme. This involves iterative calculations that consider configuration updates (i.e., coordinate updates on mesh nodes), calculations of Cauchy stress under the current configuration, and calculations of internal force-related terms resulting from displacement increments. Therefore, additional abstract method interfaces are needed to meet the computational call requirements during the FEMModel construction process for large deformation problems. Examples include coordinate update method interfaces, Cauchy stress calculation and vector generation method interfaces, and internal force term calculation method interfaces.

[0077] The embodiments of the present invention, through the design of modular interfaces, enable seamless integration into the existing computing framework when adding new unit types, requiring only inheritance of the base class and implementation of specific interfaces, thereby improving the framework's scalability and maintainability.

[0078] It is worth noting that, for different problems, when constructing a finite element analysis model, elements with different characteristics are developed based on theoretical analysis to achieve the goals of reducing computational degrees of freedom, improving computational efficiency, or increasing computational accuracy.

[0079] For example, consider an object whose length is much greater than its cross-sectional dimensions, and which is constrained in its length direction, preventing free expansion or contraction. In this case, the problem can be simplified to a plane strain problem. Solving such problems involves constructing a two-dimensional model and using plane strain elements for discretization and computational analysis, effectively improving computational efficiency.

[0080] For example, consider a thin plate whose thickness is much smaller than the other two dimensions, and the load acts on the plate surface, causing the stress to exist mainly within the plate surface and not through the thickness direction. Under these conditions, the problem can be simplified to a plane stress problem. Solving this type of problem can be done by constructing a two-dimensional model and using plane stress elements for discretization and computational analysis, effectively improving computational efficiency.

[0081] Therefore, it is evident that the elements corresponding to these two types of problems require targeted design. In this embodiment of the invention, they are respectively named PlaneStressElements and PlaneStrainElements. Since they share many common characteristics, a class with common properties and methods can be designed as a base class, upon which specific subclasses of plane stress elements and plane strain elements can be developed to implement additional element behaviors.

[0082] Guided by the element development template, specific elements can be developed. Here, we take the plane stress element as an example to describe in detail the structural design of a specific element subclass, such as... Figure 5 As shown: For specific analytical problems, corresponding subclasses inheriting from the finite element class FEMElement are designed. Since the analysis of plane stress problems may involve planar elements of different shapes and with different numbers of nodes, and these elements share common properties and methods, an abstract planar element class CPElement, inheriting from FEMElement, is designed as the base class for each planar element. This CPElement forms a composition relationship with the two-dimensional shell behavior class Shell2dBehavior, which inherits from the abstract topological shape behavior class TopoShapeBehavior. In CPElement, common properties such as element dimension, number of degrees of freedom at element nodes, and element degree of freedom identifier are defined. It also implements abstract method interfaces, such as the generate_n_mat() method for calculating the shape matrix, which calls the generate_shape_function() method of its own shape function property object ShapeFuncInterface and performs further processing of the two-dimensional element to obtain the shape function matrix; and another method for handling constitutive elasticity matrices. The `process_d_mat()` method takes a cross-section `Section` object as input and calls its `generate_d_mat()` function to generate the corresponding material. The matrix also additionally calls the plane_bhv attribute added to CPElement, corresponding to the plane stress behavior (PlaneStressBehavior) or plane strain behavior (PlaneStrainBehavior) object. A matrix processing method is proposed to achieve constitutive relation processing based on the simplification of plane problem theory.

[0083] Based on CPElement, the influence of the number of nodes is considered first, and subclasses CP3 (three-node planar element class), CP4 (four-node planar element class), CP6 (six-node planar element class), and CP8 (eight-node planar element class) are designed. In each specific subclass, not only are their key composite attributes clearly defined, including the Jacobian interface attribute (JacobianInterface object), the ShapeFuncInterface interface attribute (ShapeFuncInterface object), and the Quadrature numerical integration attribute (Quadrature object), but also the abstract method interfaces in FEMElement are implemented. For example, for the four-node planar element class CP4, in the configure() method, its Jacobian interface attribute is defined as the two-dimensional rectangle-related Jacobian object JacobianRectangle2d, its ShapeFuncLagrange2d4Nodes as the two-dimensional Lagrange four-node shape function object, and its numerical integration attribute as the two-dimensional Gaussian integral GaussQuadrature2d; and methods such as generate_tkel_on_gp() and generate_tkenl_on_gp() are implemented to calculate specific matrix elements such as the element stiffness matrix at the Gaussian integration points.

[0084] Subsequently, by adding a plane stress behavior PlaneStressBehavior to the specific planar element, a plane stress element class that inherits from the planar element class can be obtained, including the three-node plane stress element class CPS3, the four-node plane stress element class CPS4, the six-node plane stress element class CPS6, and the eight-node plane stress element class CPS8.

[0085] In some embodiments of the present invention, when the element type is a plane stress element, such as Figure 6As shown, the specific implementation structure of the data structure based on the element family abstract class is as follows: First, the plane stress element family PlaneStressElements is obtained by inheriting from ElementFamily. The specific key-value pairs of each attribute in the above combination relationship need to be explicitly defined in the constructor function. For key-value pairs related to FEMElement, the GeoElementType and ElementOrder enumeration objects are used as variables to implement a one-to-one mapping between different geometric shapes and different order combinations and CPS3, CPS4, CPS6, and CPS8. Using a similar mapping method, key-value pairs related to QmyElementSettingWidget and ElementSettingInfo are constructed, respectively implementing the mapping of specific element setting components QmyCPS3Widget, QmyCPS4Widget, QmyCPS6Widget, and QmyCPS8Widget, as well as the mapping of specific element setting information CPS3SettingInfo, CPS4SettingInfo, CPS6SettingInfo, and CPS8SettingInfo.

[0086] Based on the above design, users can complete the initial selection of calculation elements by selecting the corresponding element settings in the element type setting dialog box QmyEditElementTypeDialog. For example, for plane stress elements, if the user selects to use first-order elements, the element setting widgets presented in QmyEditElementTypeDialog will be QmyCPS3Widget and QmyCPS4Widget. Users can switch between the two and enter relevant parameter settings in the interface. Based on the user's settings, CPS3SettingInfo and CPS4SettingInfo objects can be generated to construct CPS3 and CPS4 elements. Subsequently, based on the above selection and the mesh generation results, the system automatically assigns CPS3 or CPS4 to the corresponding specific geometric elements in the mesh, thereby ultimately achieving the purpose of converting the geometric elements in the mesh into plane stress CPS3 and CPS4 elements, providing key data model support for constructing the finite element analysis model.

[0087] In summary, the design method for the data structure and interactive functional architecture of the finite element analysis unit library proposed in this invention decouples the mesh generation strategy and the element type allocator, constructs a dynamic strategy pre-screening and parameter constraint mechanism, and effectively coordinates the collaborative definition of geometric topology and element attributes. Based on the factory pattern and abstract interface design, the unit library achieves flexible expansion of multiple topology types (solid / shell). Combined with the parameterized element calculation framework (shape function, Jacobian matrix, integration rule standardization) and layered material model, it supports efficient numerical modeling of complex geometric mappings and multi-material scenarios.

[0088] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.), and the computer program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.

[0089] The above provides a detailed description of the design method for the data structure and interactive functional architecture of a finite element analysis unit library provided by this invention. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.

Claims

1. A design method for the data structure and interactive functional architecture of a finite element analysis unit library, characterized in that, include: An interactive function data class diagram is constructed based on the finite state machine design pattern; the interactive function data class diagram includes a unit type setting dialog class and a unit library abstract class that is composed of the unit type setting dialog class; A unit library data structure is constructed; the unit library data structure includes the unit library abstract class, a unit family abstract class that is composed of the unit library abstract class, a topology type that is associated with the unit library abstract class, a specific topology type unit library class that inherits from the unit library abstract class, and a specific unit family class that inherits from the unit library abstract class, wherein the specific unit family class and the specific topology type unit library class are composed of each other; the unit library abstract class is used to implement a collection of finite element calculation units of different orders and shapes; A development template for building unit functions; the development template includes a finite element base class and a general abstract interface that is composed of the finite element base class; Construct the data structure of the unit family abstract class; the data structure is a combination of the unit family abstract class, the finite element element class, the element setting component class, and the element setting information class. The interactive function data class diagram also includes a unit setting component class and a unit setting information class. Since the unit type setting dialog box class depends on the unit setting component class and the unit setting information class, the method further includes: Based on the init_stacked_widget() and generate_tab_widget() methods in the unit type setting dialog class, a component object is generated, so that after selecting different unit family abstract classes in the unit type setting dialog class, the unit setting component in the unit setting component class is updated in real time.

2. The design method for the data structure and interactive functional architecture of the finite element analysis unit library according to claim 1, characterized in that, The element type setting dialog class includes an element family list. The element library abstract class includes a list of available element families corresponding to geometric objects of a defined topology type. The element family objects in the list of available element families are added to the element family list based on the init_widget_via_element_lib() method in the element type setting dialog class and the get_element_families() method in the element library abstract class.

3. The design method for the data structure and interactive functional architecture of the finite element analysis unit library according to claim 1, characterized in that, The interactive function data class diagram also includes a basic state abstract class for unit types designed based on the finite state machine design pattern, a unit type control class that is composed of the basic state abstract class for unit types, a unit type setting class that inherits from the basic state abstract class for unit types, a unit type area selection state class, and a geometric unit type class that is associated with the unit setting component class. The unit type setting dialog box class is composed of the unit type setting state class, and the unit setting information class is associated with the geometric unit type class.

4. The design method for the data structure and interactive functional architecture of the finite element analysis unit library according to claim 1, characterized in that, The specific topology type unit library class includes a three-dimensional solid topology type unit library class, a two-dimensional shell topology type unit library class, and a three-dimensional shell topology type unit library class. The specific unit family class includes a plane stress unit family class and a plane strain unit family class.

5. The design method for the data structure and interactive functional architecture of the finite element analysis unit library according to claim 1, characterized in that, The unit library data structure also includes a unit library factory class, which is a composition of the unit library abstract class.

6. The design method for the data structure and interactive functional architecture of the finite element analysis unit library according to claim 1, characterized in that, The general abstract interfaces include the Jacobi abstract interface, the type function abstract interface, the numerical integral abstract class, and the topological shape behavior abstract class.

7. The design method for the data structure and interactive functional architecture of the finite element analysis unit library according to claim 1, characterized in that, The development template also includes a finite element basic abstract class, a finite element node class that inherits from the finite element basic abstract class, an element geometric feature type that is associated with the finite element basic class, an element setting information class that is associated with the finite element class, and a topological shape behavior abstract class that is associated with the finite element class. The finite element basic class inherits from the finite element basic abstract class.

8. The design method for the data structure and interactive functional architecture of the finite element analysis unit library according to claim 7, characterized in that, When the element type is a plane stress element, the data class diagram of the plane stress element includes a plane element abstract class inherited from the finite element element class, a two-dimensional shell behavior class inherited from the topological behavior abstract class, a three-node plane element class, a four-node plane element class, a six-node plane element class, and an eight-node plane element class inherited from the plane element abstract class, as well as a three-node plane stress element class inherited from the three-node plane element class, a four-node plane stress element class inherited from the four-node plane element class, a six-node plane stress element class inherited from the six-node plane element class, and an eight-node plane stress element class inherited from the eight-node plane element class. The three-node plane stress element class, four-node plane stress element class, six-node plane stress element class, and eight-node plane stress element class are combined with the plane stress behavior class.

9. The design method for the data structure and interactive functional architecture of the finite element analysis unit library according to claim 8, characterized in that, When the element type is a plane stress element, the element family is a plane stress element family. The data structure also includes a plane stress element family class that inherits from the element family abstract class. The element setting component class includes three-node plane stress element setting component class, four-node plane stress element setting component class, six-node plane stress element setting component class, and eight-node plane stress element setting component class that are combined with the plane stress element family class. The element setting information class includes three-node plane stress element setting information class, four-node plane stress element setting information class, six-node plane stress element setting information class, and eight-node plane stress element setting information class that are combined with the plane stress element family class.

Citation Information

Patent Citations

  • Construction method and device of underlying model data structure

    CN118607318A