Interactive material setting module design method, simulation software construction method and device
By designing an interactive material setting module using a combinatorial pattern, the problem of rigid data structures and functional architectures in domestic CAE software was solved, achieving scalability and maintainability of the module, while improving user experience and modeling efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NINGXIA UNIVERSITY
- Filing Date
- 2025-01-09
- Publication Date
- 2026-06-09
Smart Images

Figure CN120012191B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of finite element simulation technology, specifically to an interactive material setting module design method, simulation software construction method, and apparatus. Background Technology
[0002] In the context of rapid development in science and engineering, finite element simulation software (CAE) is increasingly important as a core tool for design and analysis. The interactive finite element modeling and simulation process mainly includes two core steps: model building and simulation analysis. The model building stage involves user interaction to create geometric representations, configure material properties, and perform mesh generation. Among these, accurate configuration of material properties is crucial to ensuring the reliability of the simulation, and the material setting module plays an indispensable role in this process. However, in the current development of domestic CAE software, especially in the architectural design of the material setting module, several key issues exist:
[0003] Data structure limitations: Existing material-related data structures fail to adequately account for the addition of new material types or complex material properties in the future, thus limiting the system's scalability.
[0004] Rigid functional architecture: The material setting module usually adopts a fixed functional architecture, which makes it difficult to flexibly adapt to the specific needs of different types of materials and cross-sectional properties, increasing the difficulty of development and making later maintenance complicated.
[0005] Inadequate user experience: The material setting module lacks intuitiveness and convenience, requiring users to frequently switch interfaces or even manually input a large number of parameters, increasing operational complexity and making it prone to errors.
[0006] In view of the above problems, there is an urgent need for an interactive material setting module design method, simulation software construction method, and apparatus, aiming to solve the problems of imperfections in existing data structure and functional architecture design. By providing a clear and concise data framework, development complexity and long-term maintenance costs can be reduced, while enhancing the intuitiveness of data interaction in the user interface, significantly improving the efficiency of modeling and simulation and the user experience. Summary of the Invention
[0007] In view of this, it is necessary to provide an interactive material setting module design method, simulation software construction method and device to solve the scalability and maintainability problems at the software development level caused by the limitations of data structure and rigid functional architecture in the existing technology, while improving the user interactive modeling experience.
[0008] On the one hand, in order to solve the above-mentioned technical problems, the present invention provides an interactive material setting module design method, including:
[0009] The class diagrams for material data structure, cross-section data structure, and cross-section assignment data structure are determined based on the combination pattern.
[0010] An interactive material functional architecture is constructed based on the aforementioned material data structure class diagram; the interactive material functional architecture includes a material creation dialog window;
[0011] An interactive section functional architecture is constructed based on the aforementioned section data structure class diagram; the interactive section functional architecture includes a section creation dialog window;
[0012] An interactive section assignment function architecture is constructed based on the aforementioned section assignment data structure class diagram; the interactive section assignment function architecture includes a section assignment editing dialog window;
[0013] The section creation dialog window includes a material creation function button for calling the material creation dialog window, and the section assignment and editing dialog window includes a section creation button for calling the section creation dialog window.
[0014] In one possible implementation, the material data structure class diagram is determined based on a compositional pattern, including:
[0015] Based on the composite pattern, a material container class inherits from an abstract container class and a material node class inherits from an abstract model node class; the material container class and the material node class have an aggregation relationship; the material container class is used to manage the material node class, and the material node class is used to create material objects;
[0016] A material behavior class is designed based on the material node class, and the material behavior class and the material node class have an aggregation relationship; the material behavior class is used to provide material behavior attributes and abstract method interfaces related to material behavior.
[0017] Based on the requirements, multiple concrete material behavior classes are designed that inherit from the aforementioned material behavior class;
[0018] The specific categories of material behavior include elastic behavior and data-driven behavior. The elastic behavior category includes isotropic behavior and anisotropic behavior, and the data-driven behavior category includes material gene-driven behavior and structural gene-driven behavior.
[0019] In one possible implementation, determining the material data structure class diagram based on the combinatorial pattern also includes:
[0020] The material behavior factory class is designed based on the factory pattern and corresponds to the specific material behavior class; the relationship between the material behavior factory class and the specific material behavior class is an aggregation relationship.
[0021] An enumeration class based on material type manages the object matching operations in the material behavior factory class.
[0022] In one possible implementation, the cross-sectional data structure class diagram is determined based on the composite pattern, including:
[0023] Based on the composite pattern, a section container class inherits from an abstract container class and a section node class inherits from an abstract model node class; the section container class and the section node class have an aggregation relationship, the section container class is used to manage the section node class, and the section node class is used to create section objects;
[0024] Design a cross-section category class and a cross-section type class that are composite with the cross-section node class; the cross-section category class is used to describe the topological type of the object to be assigned to the cross-section, and the cross-section type class is used to describe the material distribution characteristics of the cross-section.
[0025] Design a cross-section category information class that is a combination of the cross-section category class and a cross-section type information class that is a combination of the cross-section type class; the cross-section category information class is used to record the attributes and data required to describe the topology type of the object to be assigned, and the cross-section type information class is used to record the attributes and data required to describe the material distribution characteristics of the cross-section;
[0026] Based on the requirements, multiple concrete classes of cross-section categories are designed that inherit from the cross-section category class, multiple concrete classes of cross-section types are designed that inherit from the cross-section type class, multiple concrete classes of cross-section category information are designed that inherit from the cross-section category information class, and multiple concrete classes of cross-section type information are designed that inherit from the cross-section type information class.
[0027] In one possible implementation, the class diagram of the section assignment data structure is determined based on the composite pattern, including:
[0028] Based on the composite pattern, a section assignment container class inherits from an abstract container class and a section assignment node class inherits from an abstract model node class; the section assignment container class and the section assignment node class have an aggregation relationship; the section assignment container class is used to manage the section assignment node class, and the section assignment node class is used to create objects when assigning sections to geometric models;
[0029] Design a cross-section assignment information class and a shape collection class. The relationship between the cross-section node class, the shape collection class and the cross-section assignment information class is an aggregation relationship, and the relationship between the cross-section assignment information class and the cross-section assignment node class is a composition relationship.
[0030] The design inherits from the cross-section assignment information class, which includes multiple specific cross-section assignment information classes. The specific cross-section assignment information classes include shell cross-section assignment information class and solid cross-section assignment information class.
[0031] In one possible implementation, the construction of an interactive material functional architecture based on the material data structure class diagram includes:
[0032] Identify the common and different operations for different materials;
[0033] The material creation dialog window is constructed based on the common operations, and the material behavior attribute component is constructed based on the difference operations; the material behavior attribute component and the material creation dialog window are in a combined relationship.
[0034] The design inherits from the data-driven behavior attribute component and the elastic material behavior attribute component of the aforementioned material behavior attribute component;
[0035] Create a data-driven behavior factory class and a flexible behavior factory class. The data-driven behavior attribute component depends on the data-driven behavior factory class, and the flexible material behavior attribute component depends on the flexible behavior factory class.
[0036] In one possible implementation, the specific class of the cross-section category includes a shell cross-section category class and a solid cross-section category class; the specific class of the cross-section category information includes a shell cross-section category information class and a solid cross-section information class; the specific class of the cross-section type includes a homogeneous cross-section type class and a composite cross-section type class; and the cross-section type information class includes a homogeneous cross-section information class and a composite cross-section information class.
[0037] The construction of the interactive cross-section functional architecture based on the cross-section data structure class diagram includes:
[0038] Create a section creation dialog window and a section editing base dialog window that is grouped with the section creation dialog window; the section creation dialog window is used to match the corresponding section type based on the input section key properties, and to call the section editing base dialog window based on the section type;
[0039] Construct a section category generator and a section type generator that are combined with the basic dialog window for section editing; the section category generator is used to generate section topology categories, and the section type generator is used to generate section types;
[0040] The design inherits from the shell section category generator and the solid section category generator of the section category generator, as well as the homogeneous section type generator and the composite section type generator of the section type generator;
[0041] The design inherits from the solid homogeneous section category generator and the solid composite section category generator of the solid section category generator, as well as the shell composite section type generator and the solid composite section type generator of the composite section type generator.
[0042] A shell composite section editing dialog window is created based on the shell composite section type generator and the shell section category generator, inheriting from the section editing base dialog window. A shell homogeneous section editing dialog window is created based on the shell section category generator and the homogeneous section type generator, inheriting from the section editing base dialog window. A solid homogeneous section editing dialog window is created based on the solid homogeneous section category generator and the homogeneous section type generator, inheriting from the section editing base dialog window. A solid composite section editing dialog window is created based on the solid composite section category generator and the solid composite section type generator, inheriting from the section editing base dialog window.
[0043] In one possible implementation, the construction of the interactive cross-section assignment function architecture based on the cross-section assignment data structure class diagram includes:
[0044] Create a section assignment editing dialog window that is a composition relationship with the section assignment creation class;
[0045] The design inherits from the shell section assignment and editing dialog window and the solid section assignment and editing dialog window.
[0046] On the other hand, the present invention also provides a method for constructing simulation software, comprising:
[0047] A material setting module is constructed based on an interactive material setting module design method;
[0048] The interactive material setting module design method is any of the interactive material setting module design methods described in the above possible implementations.
[0049] On the other hand, the present invention also provides an interactive material setting module design device, which includes:
[0050] The data structure class diagram determination unit is used to determine the material data structure class diagram, the cross-section data structure class diagram, and the cross-section assignment data structure class diagram based on the combination pattern;
[0051] An interactive material functional architecture construction unit is used to construct an interactive material functional architecture based on the material data structure class diagram; the interactive material functional architecture includes a material creation dialog window;
[0052] An interactive section functional architecture construction unit is used to construct an interactive section functional architecture based on the section data structure class diagram; the interactive section functional architecture includes a section creation dialog window;
[0053] An interactive section assignment function architecture construction unit is used to construct an interactive section assignment function architecture based on the section assignment data structure class diagram; the interactive section assignment function architecture includes a section assignment editing dialog window;
[0054] The functional architecture integration unit is used to reserve a material creation function button in the section creation dialog window for calling the material creation dialog window, and to reserve a section creation button in the section assignment and editing dialog window for calling the section creation dialog window.
[0055] The beneficial effects of this invention are as follows: The interactive material setting module design method provided by this invention decouples materials, sections, and section assignments in the material setting module by determining the material data structure class diagram, section data structure class diagram, and section assignment data structure class diagram based on a combination pattern, thus providing clear data support for the introduction of new material types. Furthermore, based on the material data structure class diagram, section data structure class diagram, and section assignment data structure class diagram, interactive material functional architecture, interactive section functional architecture, and interactive section assignment functional architecture are constructed respectively, providing clear functional architecture support for the introduction of new material types. This effectively ensures the scalability and maintainability of the module while improving its development efficiency. Simultaneously, the interactive architecture provides users with a good interactive experience.
[0056] Furthermore, this invention achieves automatic switching of dialog windows by reserving a material creation function button in the section creation dialog window for calling the material creation dialog window, and reserving a section creation button in the section assignment and editing dialog window for calling the section creation dialog window. This eliminates the need for frequent manual switching of the interface and reduces additional operational problems caused by misoperation during the material and section creation process, further reducing operational complexity and improving the efficiency of modeling and simulation as well as the user experience. Attached Figure Description
[0057] 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.
[0058] Figure 1 A schematic flowchart of an embodiment of the interactive material setting module design method provided by the present invention;
[0059] Figure 2 For the present invention Figure 1 A flowchart illustrating an embodiment of determining the material data structure class diagram in S101;
[0060] Figure 3 A schematic diagram of an embodiment of the material data structure class diagram provided by the present invention;
[0061] Figure 4 For the present invention Figure 1 A flowchart illustrating an embodiment of determining the cross-sectional data structure class diagram in S101;
[0062] Figure 5 A schematic diagram of an embodiment of the cross-sectional data structure class diagram provided by the present invention;
[0063] Figure 6 For the present invention Figure 1 A flowchart illustrating an embodiment of the class diagram for determining the cross-section assignment data structure in S101;
[0064] Figure 7 A schematic diagram of an embodiment of the cross-section assignment data structure class diagram provided by the present invention;
[0065] Figure 8 For the present invention Figure 1 A schematic diagram of an embodiment of S102;
[0066] Figure 9 A schematic diagram of an embodiment of the interactive material functional architecture provided by the present invention;
[0067] Figure 10 For the present invention Figure 1 A schematic diagram of an embodiment of S103;
[0068] Figure 11 A schematic diagram of an embodiment of the interactive section functional architecture provided by the present invention;
[0069] Figure 12 For the present invention Figure 1 A schematic diagram of an embodiment of S104;
[0070] Figure 13 A schematic diagram of an embodiment of the interactive section assignment function architecture provided by the present invention;
[0071] Figure 14 A schematic diagram of an embodiment of the interactive material setting module design device provided by the present invention. Detailed Implementation
[0072] 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.
[0073] 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.
[0074] 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.
[0075] This invention provides an interactive material setting module design method, a simulation software construction method, and an apparatus, which are applied to finite element simulation software. These will be described in detail below.
[0076] Before introducing the embodiments, it should be noted that the interactive material setting module design method and simulation software construction method in the embodiments of the present invention can be implemented in electronic devices such as desktop computers, laptops, tablet computers, and laptop computers. Any of the above electronic devices stores a program compiled by the interactive material setting module design method and simulation software construction method. When any of the above electronic devices is started, the program is called, and then the interactive material setting module design method and simulation software construction method are implemented.
[0077] Figure 1 A schematic flowchart of an embodiment of the interactive material setting module design method provided by the present invention is shown below. Figure 1 As shown, the design method for the interactive material setting module includes:
[0078] S101. Determine the material data structure class diagram, cross-section data structure class diagram, and cross-section assignment data structure class diagram based on the combination pattern;
[0079] S102. Construct an interactive material functional architecture based on the material data structure class diagram; the interactive material functional architecture includes a material creation dialog window.
[0080] S103. Construct an interactive section functional architecture based on the section data structure class diagram; the interactive section functional architecture includes a section creation dialog window;
[0081] S104. Construct an interactive section assignment function architecture based on the section assignment data structure class diagram; the interactive section assignment function architecture includes a section assignment editing dialog window;
[0082] S105. Reserve a material creation function button in the section creation dialog window to call the material creation dialog window, and reserve a section creation button in the section assignment editing dialog window to call the section creation dialog window.
[0083] In this embodiment of the invention, the material setting module is divided into three parts: material design, cross-section, and cross-section assignment, thus clearly defining the functions of the material setting module. Based on this, the various functions are then integrated and optimized at the architectural level to obtain the final design architecture of the interactive material setting module, ensuring the accuracy and rationality of the generated design architecture.
[0084] Among them, the material data structure class diagram, the section data structure class diagram, and the section assignment data structure class diagram serve as design guidelines for the material data structure, section data structure, and section assignment data structure.
[0085] It should be understood that the Composite pattern is a mature design pattern, and will not be elaborated upon here.
[0086] Compared with existing technologies, the interactive material setting module design method provided in this invention decouples materials, sections, and section assignments in the material setting module by determining the material data structure class diagram, section data structure class diagram, and section assignment data structure class diagram based on a combination pattern. This provides explicit data support for the introduction of new material types. Furthermore, based on the material data structure class diagram, section data structure class diagram, and section assignment data structure class diagram, interactive material functional architecture, interactive section functional architecture, and interactive section assignment functional architecture are constructed respectively, providing explicit functional architecture support for the introduction of new material types. This effectively ensures the scalability and maintainability of the module while improving its development efficiency. Simultaneously, the interactive architecture provides users with a superior interactive experience.
[0087] Furthermore, in this embodiment of the invention, by reserving a material creation function button in the section creation dialog window for calling the material creation dialog window, and reserving a section creation button in the section assignment and editing dialog window for calling the section creation dialog window, the dialog window can be automatically switched, eliminating the need for frequent manual switching of the interface. This also reduces additional operational problems caused by errors in the process of creating materials and sections, further reducing operational complexity and improving the efficiency of modeling and simulation as well as the user experience.
[0088] In some embodiments of the present invention, such as Figure 2 As shown, the step S101 of determining the material data structure class diagram based on the combination mode includes:
[0089] S201. Design a material container class that inherits from an abstract container class and a material node class that inherits from an abstract model node class based on the composite pattern; the material container class and the material node class have an aggregation relationship; the material container class is used to manage the material node classes, and the material node classes are used to create material objects;
[0090] S202. Design a material behavior class based on the material node class. The material behavior class and the material node class have an aggregation relationship. The material behavior class is used to provide material behavior attributes and abstract method interfaces related to material behavior.
[0091] S203. Design multiple concrete material behavior classes that inherit from the material behavior class based on requirements.
[0092] Among them, the specific categories of material behavior include elastic behavior and data-driven behavior. Elastic behavior includes isotropic behavior and anisotropic behavior, while data-driven behavior includes material gene-driven behavior and structural gene-driven behavior.
[0093] In this invention, material parameters do not need to be set in the data-driven behavior class. Besides considering typical elastic behavior classes with constitutive models, this embodiment also incorporates data-driven non-constitutive model material types into the data structure design, improving the comprehensiveness of material data and further enhancing the development efficiency of the interactive material setting module.
[0094] The main difference between material gene-driven and structural gene-driven behavioral classes lies in the element types and data types used. Material gene-driven classes are typically based on solid elements, using conventional stress-strain data. For planar problems, each constitutive data point corresponds to 3 stress components and 3 strain components; for spatial problems, each constitutive data point corresponds to 6 stress components and 6 strain components. The core idea of material gene-driven classes is to match the stress-strain state at the integration point of solid elements that best satisfies the equilibrium equations and deformation compatibility constraints from a large amount of stress-strain constitutive data. Structural gene-driven classes are typically based on structural elements (typically beam, plate, and shell elements), using generalized stress-strain data (such as axial force, axial strain, bending moment, curvature, etc.). Taking a thin-walled beam structure as an example, each constitutive data point in the structural gene corresponds to 1 pair of axial force and axial strain data, 2 pairs of bending moment and curvature data, and 1 pair of torque and torsional data; the same applies to thin-walled plate and shell structures; for medium-thickness beam, plate, and shell structures, shear force and shear strain data at the cross-section should be further considered. The core idea of structural gene-driven approaches is to match the generalized stress-strain state that best satisfies the equilibrium and deformation compatibility constraints at the integration point of the structural element from a large amount of generalized stress-strain data.
[0095] To generate the corresponding concrete classes of material behaviors in a reasonable and convenient way, the factory pattern is introduced. That is, the process of determining the material data structure class diagram based on the composite pattern in step S101 also includes:
[0096] The design is based on the factory pattern and includes a material behavior factory class corresponding to the concrete material behavior class; the relationship between the material behavior factory class and the concrete material behavior class is an aggregation relationship.
[0097] An enumeration class based on material type manages object matching operations in a material behavior factory class.
[0098] The Factory pattern provides a way to create objects without specifying the concrete class to be created. By using the Factory pattern, the object creation logic can be encapsulated in a factory class, instead of directly instantiating objects in client code, which improves code maintainability and extensibility.
[0099] In a specific embodiment of the present invention, the material data structure class diagram is as follows: Figure 3As shown, the Material container class `Materials` and the Material node class `Material` form an aggregation relationship. Within `Material`, the MaterialBehavior class is designed to provide material behavior attributes and abstract method interfaces related to material behavior. Based on different actual material types, different specific material behavior data can be inherited from `MaterialBehavior`, such as `ElasticBehavior` representing linear materials. In addition to the abstract method interface, `MaterialBehavior` also provides common methods for subclasses, such as the `generate_d_mat()` method.
[0100] It should be noted that: such as Figure 3 As shown, the elastic behavior class `ElasticBehavior` and the data-driven behavior class `DataDrivenBehavior` have aggregation relationships with the elastic behavior information classes `ElasticBehaviorInfo` and `DataDrivenBehaviorInfo`, respectively. That is, the elastic behavior class "owns" the elastic behavior information class, and the data-driven behavior class "owns" the data-driven behavior information class. The elastic behavior information classes `ElasticBehaviorInfo` and `DataDrivenBehaviorInfo` record the behavioral data of specific materials.
[0101] In some embodiments of the present invention, such as Figure 4 As shown, the class diagram for determining the cross-sectional data structure based on the combination pattern in step S101 includes:
[0102] S401. Based on the composite pattern, design a section container class that inherits from an abstract container class and a section node class that inherits from an abstract model node class; the section container class and the section node class have an aggregation relationship, the section container class is used to manage the section node classes, and the section node classes are used to create section objects;
[0103] S402. The design and section node classes are composite section category classes and section type classes; the section category class is used to describe the topological type of the object to be assigned to the section, and the section type class is used to describe the material distribution characteristics of the section;
[0104] S403, a section category information class that is a combination of the design and section category classes, and a section type information class that is a combination of the section type class; the section category information class is used to record the attributes and data required to describe the topology type of the object to be assigned, and the section type information class is used to record the attributes and data required to describe the material distribution characteristics of the section.
[0105] S404. Based on requirements, design multiple concrete classes of cross-section categories that inherit from the cross-section category class, multiple concrete classes of cross-section types that inherit from the cross-section type class, multiple concrete classes of cross-section category information that inherit from the cross-section category information class, and multiple concrete classes of cross-section type information that inherit from the cross-section type information class.
[0106] In a specific embodiment of the present invention, the cross-sectional data structure class diagram is as follows: Figure 5 As shown, a section container class `Sections` and a section node class `Section` are designed based on the composite pattern, forming an aggregation relationship. `Sections` manages different section node data and provides access methods; while `Section` corresponds to the individual section objects created by the user.
[0107] The Section class forms a composition relationship with both the SectionCategory and SectionType classes. SectionCategory describes the topological type (solid, shell, etc.) of the object to which the section is to be assigned, and records the necessary attributes and data through the SectionCategoryInfo class. SectionType describes the material distribution characteristics of the section (homogeneous, composite, etc.), and records the necessary attributes and data through the SectionTypeInfo class. Therefore, SectionTypeInfo forms an aggregation relationship with the Material class.
[0108] SectionCategory can be inherited into specific subclasses as needed, such as the ShellSectionCategory class for shell sections and the SolidSectionCategory class for solid sections. These subclasses each have corresponding section category information classes, such as ShellSectionCategoryInfo for shell sections and SolidSectionCategoryInfo for solid sections. The SectionCategory subclass and its corresponding SectionCategoryInfo subclass are used to provide operations related to the section topology type and topology-related attribute information, respectively. For example, for shell sections and solid sections, the matrices used to obtain the governing equations of the finite element model require different processing. This necessitates different implementations in the subclasses using the abstract interface provided by SectionCategory to meet the simulation calculation requirements after the finite element model is constructed.
[0109] SectionType can be inherited into specific subclasses as needed, such as the homogeneous section type class HomogeneousSectionType and the composite section type class CompositeSectionType. Each subclass has its own corresponding section type information class, such as the homogeneous section information class HomogeneousSectionTypeInfo and the composite section information class CompositeSectionTypeInfo. When calculating the equivalent material properties on a specific section for materials with different homogeneity, targeted calculation operations are required. Therefore, the operation methods provided by SectionType and the section type attribute data provided by SectionTypeInfo are needed.
[0110] In some embodiments of the present invention, such as Figure 6 As shown, the class diagram of the data structure for determining the cross-section assignment based on the combination pattern in step S101 includes:
[0111] S601. Based on the composite pattern, design a section assignment container class that inherits from the abstract container class and a section assignment node class that inherits from the abstract model node class; the section assignment container class and the section assignment node class have an aggregation relationship; the section assignment container class is used to manage the section assignment node class, and the section assignment node class is used to create objects when assigning sections to the geometric model;
[0112] S602. The relationship between the design section assignment information class and the shape collection class, the section node class, the shape combination class and the section assignment information class is an aggregation relationship, and the relationship between the section assignment information class and the section assignment node class is a composition relationship.
[0113] S603. Design multiple concrete classes of cross-section assignment information that inherit from the cross-section assignment information class; the concrete classes of cross-section assignment information include shell cross-section assignment information class and solid cross-section assignment information class.
[0114] In a specific embodiment of the present invention, the cross-section assignment data structure class diagram determined based on the above steps is as follows: Figure 7 As shown, the section container class `SectionAssignments` and the section assignment node class `SectionAssignment` are designed based on the composite pattern, forming an aggregation relationship. `SectionAssignments` manages different section node data and provides access methods; while `SectionAssignment` corresponds to the object created when a user assigns a section to a specific geometry.
[0115] The SectionAssignment needs to be associated with both the Section node class and the IShape geometry class to describe their binding relationship. Therefore, a SectionAssignmentInfo class is designed to form a composition relationship with SectionAssignment. Considering that a Section may be assigned to multiple geometry classes simultaneously, a ShapeGroup class is designed as a collection representation of IShapes. SectionAssignmentInfo, as an information recording class, forms aggregation relationships with both Section and ShapeGroup.
[0116] It is important to note that SectionAssignmentInfo only provides common attributes. In the specific process of assigning values to sections, it is necessary to design subclasses that inherit from SectionAssignmentInfo, such as ShellSectionAssignmentInfo (shell section assignment information class) and SolidSectionAssignmentInfo (solid section assignment information class). Different assignment information will affect the section information calculation results when constructing finite element models with different topological geometries.
[0117] In some embodiments of the present invention, such as Figure 8 As shown, step S102 includes:
[0118] S801. Determine the common and differential operations for different material settings; construct a material creation dialog window based on the common operations, and construct a material behavior attribute component based on the differential operations; the material behavior attribute component and the material creation dialog window are in a combined relationship.
[0119] S802, Design data-driven behavioral attribute components and elastic material behavioral attribute components that inherit from material behavioral attribute components;
[0120] S803. Create a data-driven behavior factory class and a flexible behavior factory class. Data-driven behavior attribute components depend on the data-driven behavior factory class, and flexible material behavior attribute components depend on the flexible behavior factory class.
[0121] In a specific embodiment of the present invention, the interactive material functional architecture is as follows: Figure 9As shown, considering that different materials share common operations in their settings, with differences only in some specific parameter settings; the same material may have multiple material behavior settings. A "Dialog-Widget" interface architecture (i.e., the material creation dialog window and the material behavior attribute widget) is designed. The material creation dialog window standardizes common operations, while the material behavior attribute widget provides the differentiated settings. When different MaterialBehavior objects need to be set, only the corresponding widget needs to be developed and integrated into the dialog box, allowing the material behavior parameters to be set within the same dialog box. For example, to create and set flexible material behavior objects, the material creation dialog window provides options for flexible material behavior attributes for the user to select, and a corresponding flexible material behavior attribute widget, QmyElasticPropertyWidget, is designed for it. When the user selects this material behavior type, the QmyElasticPropertyWidget object will pop up in the widget area of the material creation dialog window, allowing the user to further set and edit the relevant material behavior parameters.
[0122] It's important to note that specific widgets are dependent on their corresponding MaterialBehavior creation factories, thus enabling the successful creation of different material behaviors. For example, the data-driven material behavior property widget QmyDataDrivenPropertyWidget depends on the data-driven behavior factory class DataDrivenBehaviorFactory. Only through the factory class's generation methods can the widget extract user settings and complete the creation of the corresponding material behavior object.
[0123] It should be understood that the cross-section creation process includes two steps. The first step is to create a cross-section object, during which the topology type and material distribution method of the cross-section need to be selected. The second step is to set the relevant parameters of the cross-section object. In setting the cross-section, two types of information need to be considered: the cross-section topology and the material distribution type. These two types of information must be combined to form a specific cross-section type. Based on this, in some embodiments of the present invention, such as... Figure 10 As shown, step S103 includes:
[0124] S1001, the section creation dialog window and the section editing basic dialog window which are grouped together with the section creation dialog window; the section creation dialog window is used to match the corresponding section type based on the input section key properties, and to call the section editing basic dialog window based on the section type;
[0125] S1002, The basic dialog window for building and editing sections is a section category generator and a section type generator for combining relationships; the section category generator is used to generate section topology categories, and the section type generator is used to generate section types;
[0126] S1003. Design a shell section category generator and a solid section category generator that are inherited from the section category generator, as well as a homogeneous section type generator and a composite section type generator that are inherited from the section type generator.
[0127] S1004. Design a solid homogeneous section category generator and a solid composite section category generator that inherit from the solid section category generator, as well as a shell composite section type generator and a solid composite section type generator that inherit from the composite section type generator.
[0128] S1005. Create a shell composite section editing dialog window that inherits from the basic section editing dialog window based on the shell composite section type generator and the shell section category generator; create a shell homogeneous section editing dialog window that inherits from the basic section editing dialog window based on the shell section category generator and the homogeneous section type generator; create a solid homogeneous section editing dialog window that inherits from the basic section editing dialog window based on the solid homogeneous section category generator and the homogeneous section type generator; and create a solid composite section editing dialog window that inherits from the basic section editing dialog window based on the solid composite section category generator and the solid composite section type generator.
[0129] In a specific embodiment of the present invention, the interactive section functional architecture is as follows: Figure 11 As shown, this embodiment of the invention designs a section creation dialog window, QmyGenerateSectionDialog, and a section editing base dialog window, QmyEditBaseSectionDialog. In QmyGenerateSectionDialog, the user selects the key properties of the section to be created, and the system matches the corresponding section type based on the user's selection, thus popping up the corresponding section editing dialog window. For example, if the user intends to create a shell composite material section and selects the Shell and Composite options in QmyGenerateSectionDialog, the system will pop up the shell composite section editing dialog window, QmyEditShellCompositeDialog.
[0130] In setting up a section, two types of information need to be considered: the section topology category (SectionCategory) and the material distribution type (SectionType). Common SectionCategories include shells and solids, while common SectionTypes include homogeneous and composite materials. These two types of information must be combined to form a specific section type, such as a homogeneous shell section or a composite solid section. To enable the creation of all combinations of SectionCategory and SectionType while maximizing code reusability, a dialog window for creating different specific section types was designed, and a Generator mechanism was introduced within it.
[0131] Based on the above design, the generators can be divided into two categories: SectionCategoryGenerator and SectionTypeGenerator. These two types of generators form a combined relationship with the section editing dialog window; that is, each specific section editing dialog window contains both types of generators. For example, the solid homogeneous section editing dialog window QmyEditSolidHomogeneousDialog contains the solid homogeneous section category generator SolidHomogeneousSectionCategoryGenerator and the homogeneous section type generator HomogeneousSectionTypeGenerator, and enters the corresponding generation process after the user completes the parameter settings and clicks the confirmation button.
[0132] In comparison, the ShellSectionCategoryGenerator and HomogeneousSectionTypeGenerator are relatively simple and can therefore be directly used in their respective section editing dialog windows. However, the SolidSectionCategoryGenerator and CompositeSectionTypeGenerator are more complex and require inheritance to implement some abstract functions before they can be used in the section editing dialog window.
[0133] In some embodiments of the present invention, such as Figure 12 As shown, step S104 includes:
[0134] S1201, Create and assign sections: Create a section assignment editing dialog box with a composition relationship;
[0135] S1202. Design the shell section assignment editing dialog window and the solid section assignment editing dialog window, which are inherited from the section assignment editing dialog window.
[0136] It should be understood that the section assignment process can be designed as two steps: the first step is to select a geometric object, and the second step is to select a section with a matching topology type and assign it a geometric shape.
[0137] During the section assignment process, it's necessary to determine whether the section's topology type matches the geometry's topology type. If they don't match, an error will occur, and the section cannot be assigned to that geometry. For example, a solid geometry object cannot be assigned a shell section. Furthermore, different topology types of geometry require different section parameters. Therefore, different section assignment boundary dialog windows were designed to both check the topology type matching condition during assignment and provide users with different parameter setting interfaces.
[0138] In a specific embodiment of the present invention, the interactive section assignment function architecture is as follows: Figure 13 As shown, the `GenerateSectionAssignment` class for creating section assignments and the `QmyEditBaseAssignmentDialog` dialog for editing section assignments are composed of each other. The `QmyEditShellAssignmentDialog` dialog for editing shell section assignments and the `QmyEditSolidAssignmentDialog` dialog for editing solid section assignments inherit from the `QmyEditBaseAssignmentDialog` dialog for editing section assignments.
[0139] It should be noted that a visual effect change of the geometric shape during the section assignment process can also be designed based on a finite state machine, which facilitates intuitive visual judgment by users when assigning sections. When the geometric shape is not assigned a section, it appears white; when it is assigned a section, it appears green.
[0140] This invention also provides a method for constructing simulation software, comprising:
[0141] A material setting module is constructed based on an interactive material setting module design method;
[0142] The interactive material setting module design method is the interactive material setting module design method in any of the above embodiments.
[0143] The simulation software construction method also includes a basic geometry modeling module, a mesh generation module, etc., which will not be elaborated here.
[0144] To better implement the interactive material setting module design method in the embodiments of the present invention, based on the interactive material setting module design method, the embodiments of the present invention also provide an interactive material setting module design device, such as... Figure 14 As shown, the interactive material setting module design device 1400 includes:
[0145] The data structure class diagram determination unit 1401 is used to determine the material data structure class diagram, the cross section data structure class diagram, and the cross section assignment data structure class diagram based on the combination mode;
[0146] The interactive material functional architecture building unit 1402 is used to build an interactive material functional architecture based on the material data structure class diagram; the interactive material functional architecture includes a material creation dialog window.
[0147] The interactive section functional architecture building unit 1403 is used to build an interactive section functional architecture based on the section data structure class diagram; the interactive section functional architecture includes a section creation dialog window.
[0148] Interactive section assignment function architecture building unit 1404 is used to build the interactive section assignment function architecture based on the section assignment data structure class diagram; the interactive section assignment function architecture includes a section assignment editing dialog window;
[0149] The functional architecture integration unit 1405 is used to reserve a material creation function button in the section creation dialog window for calling the material creation dialog window, and to reserve a section creation button in the section assignment editing dialog window for calling the section creation dialog window.
[0150] The interactive material setting module design device 1400 provided in the above embodiments can realize the technical solutions described in the above interactive material setting module design method embodiments. The specific implementation principles of each module or unit can be found in the corresponding content in the above interactive material setting module design method embodiments, and will not be repeated here.
[0151] 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.
[0152] The above provides a detailed description of the interactive material setting module design method, simulation software construction method, and apparatus provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present 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 the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A design method for an interactive material setting module, characterized in that, include: The class diagrams for material data structure, cross-section data structure, and cross-section assignment data structure are determined based on the combination pattern. An interactive material functional architecture is constructed based on the aforementioned material data structure class diagram; the interactive material functional architecture includes a material creation dialog window; An interactive section functional architecture is constructed based on the aforementioned section data structure class diagram; the interactive section functional architecture includes a section creation dialog window; An interactive section assignment function architecture is constructed based on the aforementioned section assignment data structure class diagram; the interactive section assignment function architecture includes a section assignment editing dialog window; The section creation dialog window reserves a material creation function button for calling the material creation dialog window, and the section assignment and editing dialog window reserves a section creation button for calling the section creation dialog window; The material data structure class diagram is determined based on the combination pattern, including: Based on the composite pattern, a material container class inherits from an abstract container class and a material node class inherits from an abstract model node class; the material container class and the material node class have an aggregation relationship; the material container class is used to manage the material node class, and the material node class is used to create material objects; A material behavior class is designed based on the material node class, and the material behavior class and the material node class have an aggregation relationship; the material behavior class is used to provide material behavior attributes and abstract method interfaces related to material behavior. Based on the requirements, multiple concrete material behavior classes are designed that inherit from the aforementioned material behavior class; The specific categories of material behavior include elastic behavior and data-driven behavior. The elastic behavior category includes isotropic behavior and anisotropic behavior, and the data-driven behavior category includes material gene-driven behavior and structural gene-driven behavior.
2. The interactive material setting module design method according to claim 1, characterized in that, Determining the material data structure class diagram based on the combination pattern also includes: The material behavior factory class is designed based on the factory pattern and corresponds to the specific material behavior class; the relationship between the material behavior factory class and the specific material behavior class is an aggregation relationship. An enumeration class based on material type manages the object matching operations in the material behavior factory class.
3. The interactive material setting module design method according to claim 1, characterized in that, The class diagram of the cross-sectional data structure is determined based on the combination pattern, including: Based on the composite pattern, a section container class inherits from an abstract container class and a section node class inherits from an abstract model node class; the section container class and the section node class have an aggregation relationship, the section container class is used to manage the section node class, and the section node class is used to create section objects; Design a cross-section category class and a cross-section type class that are composite with the cross-section node class; the cross-section category class is used to describe the topological type of the object to be assigned to the cross-section, and the cross-section type class is used to describe the material distribution characteristics of the cross-section. Design a cross-section category information class that is a combination of the cross-section category class and a cross-section type information class that is a combination of the cross-section type class; the cross-section category information class is used to record the attributes and data required to describe the topology type of the object to be assigned, and the cross-section type information class is used to record the attributes and data required to describe the material distribution characteristics of the cross-section; Based on the requirements, multiple concrete classes of cross-section categories are designed that inherit from the cross-section category class, multiple concrete classes of cross-section types are designed that inherit from the cross-section type class, multiple concrete classes of cross-section category information are designed that inherit from the cross-section category information class, and multiple concrete classes of cross-section type information are designed that inherit from the cross-section type information class.
4. The interactive material setting module design method according to claim 3, characterized in that, The class diagram of the data structure for cross-section assignment is determined based on the combination pattern, including: Based on the composite pattern, a section assignment container class inherits from an abstract container class and a section assignment node class inherits from an abstract model node class; the section assignment container class and the section assignment node class have an aggregation relationship; the section assignment container class is used to manage the section assignment node class, and the section assignment node class is used to create objects when assigning sections to geometric models; Design a cross-section assignment information class and a shape collection class. The relationship between the cross-section node class, the shape collection class and the cross-section assignment information class is an aggregation relationship, and the relationship between the cross-section assignment information class and the cross-section assignment node class is a composition relationship. The design inherits from the cross-section assignment information class, which includes multiple specific cross-section assignment information classes. The specific cross-section assignment information classes include shell cross-section assignment information class and solid cross-section assignment information class.
5. The interactive material setting module design method according to claim 1, characterized in that, The construction of an interactive material functional architecture based on the material data structure class diagram includes: Identify the common and different operations for different materials; The material creation dialog window is constructed based on the common operations, and the material behavior attribute component is constructed based on the difference operations; the material behavior attribute component and the material creation dialog window are in a combined relationship. The design inherits from the data-driven behavior attribute component and the elastic material behavior attribute component of the aforementioned material behavior attribute component; Create a data-driven behavior factory class and a flexible behavior factory class. The data-driven behavior attribute component depends on the data-driven behavior factory class, and the flexible material behavior attribute component depends on the flexible behavior factory class.
6. The interactive material setting module design method according to claim 3, characterized in that, The specific classes of the cross-section categories include shell cross-section category class and solid cross-section category class; the specific classes of cross-section category information include shell cross-section category information class and solid cross-section information class; the specific classes of cross-section types include homogeneous cross-section type class and composite cross-section type class; and the specific classes of cross-section type information class include homogeneous cross-section information class and composite cross-section information class. The construction of the interactive cross-section functional architecture based on the cross-section data structure class diagram includes: Create a section creation dialog window and a section editing base dialog window that is grouped with the section creation dialog window; the section creation dialog window is used to match the corresponding section type based on the input section key properties, and to call the section editing base dialog window based on the section type; Construct a section category generator and a section type generator that are combined with the basic dialog window for section editing; the section category generator is used to generate section topology categories, and the section type generator is used to generate section types; The design inherits from the shell section category generator and the solid section category generator of the section category generator, as well as the homogeneous section type generator and the composite section type generator of the section type generator; The design inherits from the solid homogeneous section category generator and the solid composite section category generator of the solid section category generator, as well as the shell composite section type generator and the solid composite section type generator of the composite section type generator. A shell composite section editing dialog window is created based on the shell composite section type generator and the shell section category generator, inheriting from the section editing base dialog window. A shell homogeneous section editing dialog window is created based on the shell section category generator and the homogeneous section type generator, inheriting from the section editing base dialog window. A solid homogeneous section editing dialog window is created based on the solid homogeneous section category generator and the homogeneous section type generator, inheriting from the section editing base dialog window. A solid composite section editing dialog window is created based on the solid composite section category generator and the solid composite section type generator, inheriting from the section editing base dialog window.
7. The interactive material setting module design method according to claim 4, characterized in that, The interactive cross-section assignment function architecture constructed based on the cross-section assignment data structure class diagram includes: Create a section assignment editing dialog window that is a composition relationship with the section assignment creation class; The design inherits from the shell section assignment and editing dialog window and the solid section assignment and editing dialog window.
8. A method for constructing simulation software, characterized in that, include: A material setting module is constructed based on an interactive material setting module design method; The interactive material setting module design method is the interactive material setting module design method according to any one of claims 1-7.
9. An interactive material setting module design device, characterized in that, include: The data structure class diagram determination unit is used to determine the material data structure class diagram, the cross-section data structure class diagram, and the cross-section assignment data structure class diagram based on the combination pattern; An interactive material functional architecture construction unit is used to construct an interactive material functional architecture based on the material data structure class diagram; the interactive material functional architecture includes a material creation dialog window; An interactive section functional architecture construction unit is used to construct an interactive section functional architecture based on the section data structure class diagram; the interactive section functional architecture includes a section creation dialog window; An interactive section assignment function architecture construction unit is used to construct an interactive section assignment function architecture based on the section assignment data structure class diagram; the interactive section assignment function architecture includes a section assignment editing dialog window; The functional architecture integration unit is used to reserve a material creation function button in the section creation dialog window for calling the material creation dialog window, and to reserve a section creation button in the section assignment and editing dialog window for calling the section creation dialog window; The material data structure class diagram is determined based on the combination pattern, including: Based on the composite pattern, a material container class inherits from an abstract container class and a material node class inherits from an abstract model node class; the material container class and the material node class have an aggregation relationship; the material container class is used to manage the material node class, and the material node class is used to create material objects; A material behavior class is designed based on the material node class, and the material behavior class and the material node class have an aggregation relationship; the material behavior class is used to provide material behavior attributes and abstract method interfaces related to material behavior. Based on the requirements, multiple concrete material behavior classes are designed that inherit from the aforementioned material behavior class; The specific categories of material behavior include elastic behavior and data-driven behavior. The elastic behavior category includes isotropic behavior and anisotropic behavior, and the data-driven behavior category includes material gene-driven behavior and structural gene-driven behavior.