ANSA secondary development-based material database development method

By developing Python-based material database plug-in in ANSA software, the problem of inconsistent material libraries and cumbersome operations in CAE analysis is solved, unified management and efficient query of material cards are realized, and the efficiency of analysis modeling and report writing is improved.

CN120215897APending Publication Date: 2025-06-27SUZHOU AOJIE AUTOMOBILE IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411966434.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

The prior art lacks a unified material library and efficient material card management in CAE analysis, resulting in cumbersome operation, prone to errors, and inconvenient material parameters to check.

Method used

Design a material database development method based on ANSA secondary development. By building an ANSA plug-in with GUI interactive dialog box, using Python language and ANSA software API instructions, it realizes unified management of material cards and efficient query of parameters.

Benefits of technology

It realizes unified management of material cards, reduces the time for inquiry of modeling and importing materials and material information, improves the efficiency of analysis and modeling and report writing, and improves the operability and ease of use of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120215897A_ABST
    Figure CN120215897A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of material data development, in particular to a material database development method based on ANSA secondary development. An ANSA plug-in overlapped with a GUI interactive dialog box is adopted, ANSA secondary development based on a python language is adopted, and the method comprises the following steps that according to material types, a UI interface material retrieval list is developed; developing a UI interface parameter title and an editable textbox list according to the material parameter content; importing a material card into the development UI interface into an ANSA software button; according to the material types and the parameters, creating an Excel file used by the plug-in for obtaining the material information; creating material cards and performing classified storage; and developing corresponding execution programs displayed by the buttons and the textboxes. The method has the beneficial effects that the Python script program modeling is compiled based on the ANSA, the secondary development technology of the ANSA is fully utilized, the unification of material cards used by different engineers is ensured, meanwhile, the modeling import material and material information query time is shortened, and the analysis modeling and report compiling efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of material data development, and particularly to a method for developing a material database based on secondary development of ANSA. Background Art

[0002] ANSA is a professional CAE preprocessing software, mainly used for mesh generation and calculation model construction in finite element analysis, with characteristics such as mesh and geometry correlation matching, component management, a first-level menu system, and support for multiple solvers. Due to its high efficiency, flexibility, and powerful functions, ANSA is widely used in the CAE field, especially in the automotive industry. For CAE analysis, mesh division and construction of the solution model can be carried out with the help of ANSA software. When constructing the solution model, it is necessary to locate the material card position and import it into the software. If there are many materials, the operation will be cumbersome. Moreover, there is no unified material library, and there are differences in the material cards imported by different modelers, which are prone to errors. In addition, when writing reports and judging whether a part fails, it is necessary to compare material parameters. Currently, it is not convenient to directly view and obtain information such as material yield stress and failure strength. Therefore, creating a material standard database and associating it with ANSA software is very important.

[0003] As a mature finite element analysis software, the open secondary development function of ANSA provides the possibility to solve this problem. ANSA is developed by Python software and supports Python as the secondary development language. Python is a popular high-level programming language, known for its object orientation and simplicity. Therefore, developing a simple and efficient ANSA secondary development material database based on the Python language has important practical value and practical significance. After consulting the existing literature and materials, no mature development method for the material database plug-in based on ANSA secondary development has been found.

[0004] Therefore, it is necessary to design a method for developing a material database based on ANSA secondary development to solve the above problems. Summary of the Invention

[0005] The object of the present invention is to provide a method for developing a material database based on ANSA secondary development to overcome the above-mentioned deficiencies existing in the current prior art.

[0006] In order to achieve the above object, the present invention adopts the following technical solutions: A method for developing a material database based on ANSA secondary development, which adopts an ANSA plug-in that overlaps the GUI interactive dialog box, and is based on ANSA secondary development using the python language, including the following contents: 1) Develop a UI interface material retrieval list according to the material type; 2) Develop a list of parameter titles and editable text boxes for the UI interface according to the material parameter content. The specific parameter titles for the UI interface are set according to the content of interest in the material parameters.

[0007] 3) Import the developed UI interface into the ANSA software button for the material card, import the material card into the ANSA software Database library, determine the model to be used, and then import it into the model through the ANSA software. 4) Create an Excel file for the plug-in to obtain material information according to the material type and parameters. The content in the text boxes corresponding to the parameter titles of the UI interface is obtained correspondingly from the Excel file. 5) Create and classify and save material cards. Specifically, create a separate material card for each material, and classify and save the material cards according to the major material categories to which they belong, and they are editable. 6) Develop the corresponding execution programs for the display of each button and text box. Write the execution programs based on the Python language combined with the ANSA software API instructions to implement the corresponding functions of each button and the function of obtaining and displaying information from the Excel in the text box.

[0008] Preferably, the material retrieval list of the UI interface is set with hierarchical levels respectively. Specifically, the material retrieval list of the UI interface adopts the method of clicking on the first-level list to expand and obtain the second-level list, and clicking on the second-level list to expand the third-level list and so on.

[0009] Preferably, the corresponding list of editable text boxes corresponds one by one to the previous parameter titles and is used to display the detailed content of the parameter list.

[0010] Preferably, there are also two buttons, "Import Material to Model" and "Import Material to Material Database". The former directly imports the material card into the model to participate in the modeling calculation. The latter imports the material card into the ANSA software Database library, determines the model to be used, and then imports it into the model through the ANSA software.

[0011] Preferably, the Excel file for obtaining material information is created according to the material type and parameters and includes various information labels.

[0012] Preferably, all the development contents described in steps 1-6 will finally be encapsulated into a Class class, and the plug-in is started by creating an instance of the class.

[0013] The beneficial effects of the present invention are as follows: This technical solution models by writing a Python script program based on ANSA, makes full use of the secondary development technology of ANSA, and realizes the goal of integrating the standard material library into the ANSA software through an interactive interface, ensuring the uniformity of material cards used by different engineers. At the same time, it reduces the time for importing materials and querying material information during modeling, and improves the efficiency of analysis modeling and report writing. In addition, the present invention has strong operability. When the material library is updated, only the Excel table for obtaining material parameters needs to be modified, and the program does not need to be modified. Non-developers can also operate. Through encapsulating the program and interacting through a human-machine interface, the present invention is easier for CAE beginners to master and use. Without being very familiar with material card parameters, CAE beginners can also quickly achieve efficient import of material cards and parameter viewing. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 It is a schematic block diagram of the development process of a method for developing a material database based on ANSA secondary development of the present invention; Figure 2 It is a human-machine interaction interface of a method for developing a material database based on ANSA secondary development of the present invention; DETAILED DESCRIPTION OF THE EMBODIMENTS

[0015] Referring to Figures 1 to 2 , a method for developing a material database based on ANSA secondary development adopts an ANSA plug-in that lapped a GUI interactive dialog box, and is based on the secondary development of ANSA using the Python language, including the following contents: 1) Develop a material retrieval list for the UI interface according to the material types; 2) Develop a list of parameter titles and editable text boxes for the UI interface according to the material parameter contents. Specifically, the parameter titles of the UI interface are set according to the contents concerned by the material parameters.

[0016] 3) Import the above-developed UI interface into the button for importing material cards into the ANSA software, import the material cards into the ANSA software Database library, determine that the model is to be used, and then import it into the model through the ANSA software; 4) Create an Excel file used by the plug-in to obtain material information according to the material types and parameters. The content in the text boxes corresponding to the parameter titles of the UI interface is obtained correspondingly from the Excel file; 5) Create and classify and save material cards. Specifically, create a separate material card for each material, and classify and save the material cards according to the major material categories to which they belong, and they are editable; 6) Develop the corresponding execution programs for the display of each button and text box. Write the execution programs based on the Python language combined with the ANSA software API instructions to implement the corresponding functions of each button and the function of obtaining and displaying information from the Excel in the text box.

[0017] The material retrieval list of the UI interface is set in a hierarchical manner step by step. Specifically, the material retrieval list of the UI interface adopts the method of clicking on the first-level list to expand and obtain the second-level list. The first-level list is the major material categories, including steel, aluminum alloy, plastic, etc.; the second-level list is the specific material grades included under the major material categories, such as DC01, 6061-T4, etc. The parameter titles of the UI interface are set according to the content concerned by the material parameters, including material type, density, modulus, Poisson's ratio, yield strength, failure stress, reference standard, source of stress-strain curve, etc., and can be added, deleted, and changed. The corresponding editable text box list corresponds one by one with the previous parameter titles and is used to display the detailed content of the parameter list. The button for importing the material card into the ANSA software on the UI interface includes two buttons: "Import Material into Model" and "Import Material into Material Database". The former directly imports the material card into the model to participate in the modeling calculation. The latter imports the material card into the ANSA software Database library, determines that the model will use it, and then imports it into the model through the ANSA software. The Excel file used to obtain the material information is created according to the material types and parameters. The Excel file includes content such as serial number, writing method, material type, material card, solver, whether there is a stress-strain curve, σ-ε curve, density, elastic modulus, Poisson's ratio, yield strength, failure strength, failure plastic strain, material import address, reference standard, source of stress-strain curve, material ID number, etc. The content in the text box corresponding to the parameter title of the UI interface is obtained correspondingly from the Excel file. The creation of the material card refers to creating a separate material card for each material, with the format of.inp. The card contains information such as material name, density, Poisson's ratio, modulus, stress-strain curve, etc., and can be directly used for Abaqus / Optistruct solution. The material cards are classified and saved according to the major material categories to which they belong and are editable. The development of the corresponding execution programs for the display of each button and text box refers to writing the execution programs based on the Python language combined with the ANSA software API instructions to implement the corresponding functions of each button and the function of obtaining and displaying information from the Excel in the text box.

[0018] The specific implementation case is as follows: Step 1: Write a Python script program to generate an interactive material retrieval list through the "BCPopupMenuCreate" API function. At the end, use conditional judgment statements to prevent the same material from being retrieved and displayed repeatedly. Step 2: Write a Python script program to generate a parameter title list through the "BCLabelCreate" API function and an editable text box list through the "BCLineEditCreate" API function. Step 3: Write a Python script program to generate an "Import Material Card" button through the "BCPushButtonCreate" API function. Step 4: Create an Excel file for obtaining material information and write a Python script program to open and read the content of the Excel file through the "XlsxOpen" API function. Step 5: Create a separate material card for each material in the.inp format. The card contains information such as material name, density, Poisson's ratio, modulus, stress-strain curve, etc., and can be directly used for Abaqus / Optistruct solution. The material cards are classified and saved according to the major material categories and are editable. Step 6: Write a Python script program to customize functions to implement the functions of each button and the editing and display of text boxes. The following figure shows the custom script function inputMat_toModel corresponding to the "Import Material Card" button. Step 7: As Figure 2 shown, to facilitate the subsequent call of this plugin by other programs and management, encapsulate the entire program into a Class class, and start the plugin by creating an instance of the class. The interface after opening the plugin is as follows.

[0019] The advantages of the present invention are as follows. This technical solution is based on writing a Python script program for modeling using ANSA, making full use of the secondary development technology of ANSA. Through the interactive interface, the goal of integrating the standard material library into the ANSA software is achieved, ensuring the uniformity of the use of material cards by different engineers. At the same time, it reduces the time for modeling to import materials and query material information, improving the efficiency of analysis modeling and report writing. In addition, the present invention has strong operability. When the material library is updated, only the Excel table for obtaining material parameters needs to be modified, without modifying the program, and non-developers can also operate. By encapsulating the program and interacting through the human-machine interface, the present invention is easier for CAE beginners to master and use. Without being very familiar with the material card parameters, CAE beginners can quickly achieve efficient import of material cards and parameter viewing.

[0020] The above are only the preferred specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, according to the technical solution and inventive concept of the present invention, making equivalent substitutions or changes, shall be covered by the protection scope of the present invention.

Claims

1. A material database development method based on ANSA secondary development, characterized by: The ANSA plug-in with the GUI interactive dialog box is a secondary development of ANSA based on the Python language, including the following: 1) Develop a UI interface material search list based on material types; 2) Develop UI interface parameter titles and editable text box lists based on the material parameter content. The specific UI interface parameter titles are set according to the content of the material parameters; 3) Import the material card into the ANSA software button on the above developed UI interface, import the material card into the ANSA software Database, confirm that the model is to be used, and then import it into the model through the ANSA software; 4) Create an Excel file for the plug-in to obtain material information based on the material type and parameters. The text box content corresponding to the parameter title of the UI interface is obtained from the Excel file; 5) Create material cards and save them by category. Specifically, create a separate material card for each material. Material cards are saved by category according to the material category they belong to and can be edited; 6) Develop corresponding execution programs for each button and text box display. Write execution programs based on Python language and ANSA software API instructions to realize the corresponding functions of each button, as well as the function of the text box to obtain and display information from Excel.

2. The material database development method based on ANSA secondary development according to claim 1 is characterized in that: The UI interface material search list is arranged in a hierarchical manner. Specifically, the UI interface material search list adopts a method of expanding a first-level list by clicking on it to obtain a second-level list, and expanding a third-level list by clicking on the second-level list, and so on.

3. The material database development method based on ANSA secondary development according to claim 1 is characterized in that: The corresponding editable text box list corresponds one-to-one with the previous parameter title and is used to display the detailed contents of the parameter list.

4. The material database development method based on ANSA secondary development according to claim 1 is characterized in that: It also includes two control modules: importing materials into the model and importing materials into the Material Database. The former is to directly import the material card into the model to participate in the modeling calculation, and the latter is to import the material card into the ANSA software Database, determine the model to be used, and then import it into the model through the ANSA software.

5. The material database development method based on ANSA secondary development according to claim 1 is characterized in that: The Excel file used to obtain material information is created according to material types and parameters, and includes various information labels.

6. The material database development method based on ANSA secondary development according to claim 1 is characterized in that: The various development contents described in steps 1-6 will eventually be encapsulated as a Class class, and the plug-in will be started by creating an instance of the class.