Transmission housing assembly sealing and strength calculation method and storage medium
By combining Python and ANSYS, custom function functions and graphical user interfaces, the problems of high repeatability, poor adaptability and low accuracy of transmission housing strength and sealing evaluation are solved, and the rapid and accurate evaluation of transmission housing assembly is achieved, improving the accuracy and analysis efficiency of calculation results.
Patent Information
- Application Number
- CN202411860229.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-04-22
AI Technical Summary
In the prior art, the strength and sealing evaluation of the transmission housing have problems such as high repeatability, poor adaptability and low accuracy, which is difficult to meet the rapid demands of project development.
By customizing functional functions in the Python development environment, building a graphical user interface, and combining ANSYS software, the sealing and strength calculation methods of the transmission housing assembly are realized, including grid data processing, material assignment, connection relationship definition, analysis setting and load constraint application.
It realizes rapid and accurate evaluation of the transmission housing assembly, improves the accuracy and analysis efficiency of the calculation results, and is suitable for efficient simulation of the same type of housing.
Smart Images

Figure CN119862697A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of simulation calculation, and in particular designs a transmission case assembly seal, a strength calculation method and a storage medium. Background Art
[0002] The transmission housing should have sufficient strength to resist the bearing force from the internal transmission system and the impact force from the external vehicle body. The structural design of the transmission housing bearing seat has formed a standardized design within the enterprise, but the strength of the housing suspension position and the assembly sealing performance must be checked due to the differences in the transmission suspension structure mounted on the frame and the torque of the whole vehicle.
[0003] Traditional simulation methods involve a lot of repetitive GUI click operations, which are time-consuming and laborious, and it is difficult to meet the needs of project development nodes. In addition, the adaptability of the same type of projects is poor, and the native functions of general finite element software are not sufficient to meet specific analysis needs. In addition, due to the different capabilities of CAE personnel, it is difficult to obtain accurate stress results, especially in the case of shell stress concentration, which makes the evaluation results vary from person to person.
[0004] Based on this, technical personnel in this field urgently need a strength simulation method for a transmission housing, which can quickly and accurately complete the evaluation of the strength and sealing of the housing. Summary of the invention
[0005] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a transmission housing assembly sealing and strength calculation method and storage medium, which is simple and fast to operate, has good adaptability to the same type of housing, and can effectively improve the accuracy of the calculation results and shorten the simulation cycle.
[0006] In order to achieve the above object, the technical solution adopted by the present invention is: a transmission housing assembly sealing and strength calculation method, comprising the following steps:
[0007] S1. Customize various functions based on the Python development environment, set up file menus and graphical user interfaces, and complete program packaging;
[0008] S2, define the ANSYS software solver file path, set the default working path, and generate the software startup and working path initialization script code;
[0009] S3, obtain the complete mesh data of the transmission housing assembly and the geometric model file path of the sub-model analysis, and generate a script for importing the sub-model into the SCDM model;
[0010] S4. Build the analysis system in ANSYS and the data transmission between the analysis systems, establish the properties of the material information of each component in the transmission housing assembly, and generate the ANSYS project management script;
[0011] S5. Analyze the sealing of the transmission housing assembly, assign materials, connection relationships, analyze settings, apply load constraints, and compile sealing result output codes to generate a mechanical sealing analysis script;
[0012] S6. Modify the seal analysis script, delete the bearing load, and generate a strength analysis script for the complete Mechanical model under a coarse grid;
[0013] S7. Based on the strength analysis results of the complete model under the coarse grid, the displacement of the cutting boundary under each load step is imported to generate the strength analysis script of the Mechanical sub-model;
[0014] S8. Call the ANSYS project management file to generate an ANSYS batch script to calculate the sealing and strength of the transmission housing assembly.
[0015] The method further comprises
[0016] S9. Result evaluation, including reading result data and result cloud map, and using PyAnsys to view the results in real time in 3D.
[0017] The method further comprises
[0018] S10. Output the report, automatically fill in the data and pictures according to the pre-specified report template, and complete the output of the report.
[0019] The various types of self-defined functions in step S1 include functions used in pre-processing, solving and post-processing and general file operation functions;
[0020] The file menu is configured to include functions such as new analysis project, save, solver settings, working directory, etc.
[0021] The constructed graphical user interface includes the main interface of the program, model import interface, strength analysis interface, sealing analysis interface, result evaluation, etc.;
[0022] Through customized function functions, they are bound to the buttons on each graphical user interface to realize the button execution function.
[0023] The complete mesh model in step S3 should include meshes such as the transmission surface, clutch housing, transmission housing, bearing bracket, oil pan, suspension bracket and bolts. The surface groups of each unit are defined as a set according to the specified naming format in the third-party mesh generation software;
[0024] The sub-model geometry model needs to be in the same coordinate space as the complete mesh model, and the distance between the cut sub-model boundary and the area of interest must be greater than 50 mm;
[0025] In the complete mesh model, the basic unit size of the clutch housing and the transmission housing is in the range of 5-8 mm, the mesh of the joint surface can be controlled in the range of 3-4 mm, and the housing is meshed using tetrahedral units with intermediate nodes.
[0026] In step S4, the material properties of the parts can be defined in linear elastic and elastoplastic models according to the analysis requirements; the linear elastic data include density, elastic modulus, and Poisson's ratio; the plastic constitutive model can select an isotropic hardening model or a kinematic hardening model according to the requirements, and define its properties;
[0027] After the material properties are defined, they will be automatically saved in the custom material database to facilitate the next analysis call;
[0028] Material name and its related mechanical parameters. Through the custom functions Mat_Create() and Creat_wbjn(), the variables on the material definition interface are associated with the material definition code in the ANSYS project management file to complete the assignment of parameters in the material definition.
[0029] The ANSYS project management script consists of five functional codes: saving and path specification of ANSYS analysis files, creating a new analysis system, creating a new material, calling model import scripts and ANSYS Mechanical analysis scripts.
[0030] In step S5, the material assignment refers to querying the component name through a traversal operation, and after finding the corresponding component name, assigning the material name to the corresponding component;
[0031] The connection relationship includes two types: friction contact and binding contact. The two types of contact include the definition of contact pair name, contact object, contact parameters and contact initial state;
[0032] For different parts contact parts, the contact quantity, friction coefficient, contact algorithm, detection radius, contact interface adjustment method and offset are set separately;
[0033] For the contact between bolts and threaded holes, set the binding contact algorithm and detection radius;
[0034] The analysis settings can define the maximum and minimum substeps, initial substeps, geometric nonlinearity, output result type, output frequency and number of solution cores in the bolt preload condition and shell load condition;
[0035] The load constraint application includes the load action position, magnitude and direction; the constraint includes 6 degrees of freedom of all nodes on the end face of the deformation surface.
[0036] In step S6, the Mechanical analysis script generated in S5 is copied, renamed, and modified to delete the code and post-processing code related to the bearing load, and generate a strength analysis script for the complete Mechanical model under the coarse grid.
[0037] In step S7, the parts in the sub-model are assigned materials, the coordinate system is defined, the mesh is divided, the connection relationship is established, the analysis is set, the load constraints are applied, and the strength results are output;
[0038] The material assignment, coordinate system definition and analysis settings are the same as S5;
[0039] The mesh division includes the mesh division method and the control of mesh size; wherein, the shell mesh division method adopts tetrahedral units of point intermediate nodes; the shell mesh size control includes overall mesh size control and local mesh size control; the local mesh size control requires the calculation of mesh encryption position coordinates.
[0040] A storage medium stores at least one instruction, which is loaded and executed by a processor to implement the method.
[0041] The advantages of the present invention are: 1. The present invention takes into account the elastic-plasticity of the material and utilizes the insensitivity of deformation to the grid, and uses the boundary displacement in the coarse grid result as a constraint condition in the sub-model, thereby achieving high-precision prediction of the strength of the transmission housing assembly and ensuring accurate stress and plastic strain.
[0042] 2. The present invention realizes two-way data interaction between the parameters of the built program interface and various scripts of ANSYS based on Python language, and embeds standardized analysis process. Users only need to select or input the required parameters on the program interface, which will be automatically transferred to various scripts. The operation is simple, which effectively lowers the threshold of finite element analysis, avoids repeated operations in traditional methods, and improves analysis efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The following is a brief description of the contents expressed in the drawings of the present invention and the symbols in the drawings:
[0044] Figure 1 It is a schematic diagram of the process of the present invention;
[0045] Figure 2 Define a flow chart for the material of the present invention;
[0046] Figure 3 It is the main interface of the program of the present invention. DETAILED DESCRIPTION
[0047] The specific implementation of the present invention will be further explained in detail below by describing the optimal embodiment with reference to the accompanying drawings.
[0048] The main purpose of the present invention is to provide a transmission housing strength and sealing calculation method and storage medium based on ANSYS secondary development, which is simple and fast to operate, has good adaptability to the same type of housings, and can effectively improve the accuracy of calculation results and shorten the simulation cycle.
[0049] The present invention discloses a transmission housing strength and sealing calculation method and storage medium based on ANSYS secondary development, which includes the following:
[0050] (S1) Customize various functions based on the Python development environment, set up file menus and graphical user interfaces, and use Pyinstaller to package the program.
[0051] (S2) Define the ANSYS software solver file specification, set the default working path, and generate the software solver and working path initialization script code. The ANSYS_solver() function compiled by Python can allow the user to select the ANSYS solver file and complete the solver specification. By compiling the ANSYS_workpath() function, it can be determined whether the path specified by the user contains a Chinese path, and the determination is made, which plays a role in setting the working path when the software is running, as the path for storing simulation calculation files, result output files, and temporary files.
[0052] (S3) Obtain the complete mesh data of the transmission housing assembly and the geometric model file path of the sub-model analysis, and generate a script for importing the sub-model into the SCDM model. By clicking the selection button on the sub-model CAD model path on the graphical interface, the Import_CAD() function compiled in python is executed. Its function is that the user selects a transmission housing model file through the file, and after the selection is successful, the CAD model path is displayed in the text box to complete the import of the geometric model in the sub-model analysis. Then click the Create Script button on the right to execute the Create_SCDM_Script() function, which is used to write the geometric file path in the Import_CAD() function into the geometric model script with the extension .py, and complete the change and creation of the geometric model script content for calling in the calculation.
[0053] (S4) Build the analysis system in ANSYS and the data transmission between the analysis systems, establish the properties of the material information of each component in the transmission housing assembly, and generate the ANSYS project management script. The project management script is specifically used to automate the operations of each module of the ANSYS analysis project, including the creation of the analysis project, the definition of material parameters, the opening of the Mechanical module, the solution and the project saving process.
[0054] By clicking the trigger button to create a script, the compiled Create_wbjnScript() function is automatically called. This function is used to read the parameters on the sealing setting and strength setting interfaces, and assign the parameter values to the corresponding sealing project management script and strength project management script with the extension .wbjn, thereby completing the creation of the sealing and strength scripts. This project script has the functions of saving project files, creating new materials, importing model files, and building finite element models.
[0055] (S5) Analyze the sealing of the transmission housing assembly, perform material assignment, connection relationship, analysis setting, load constraint application, and sealing result output, and compile codes to generate a Mechanical sealing analysis script.
[0056] (S6) Modify the seal analysis script, delete the bearing load, and generate a strength analysis script for the complete Mechanical model under the coarse grid.
[0057] (S7) Based on the strength analysis results of the complete model under the coarse grid, the displacement of the cutting boundary under each load step is imported to generate a strength analysis script for the Mechanical sub-model.
[0058] (S8) Calling the ANSYS project management script to generate the ANSYS batch script to calculate the sealing and strength of the transmission housing assembly. During this process, the progress log and convergence information can be viewed in real time and the task can be terminated.
[0059] The compiled Sumbit_sealtask() and Submit_strengthtask() functions are used to check whether there are project management scripts necessary for calculation in the working directory, which plays a role in checking the integrity of the simulation input file; in addition, the function can automatically fill in the solver file path in S2 and the project management script file in S4 in the batch file and automatically start the background simulation calculation to perform the sealing analysis and strength analysis tasks; finally, the solution information and progress of the simulation calculation process are monitored so that users can understand the calculation accuracy and calculation information in real time. The above functions can be used to automatically fill in the solver file path in S2 and the project management script file in S4 in the batch file to realize the solution function of the simulation task.
[0060] (S9) Result evaluation, including reading result data and result cloud charts, can use PyAnsys to view the results in real time in 3D. PyAnsys is a collection of Python-based open source libraries and tools provided by Ansys for interacting with and extending Ansys software. It allows users to operate Ansys core functions, such as result extraction, in a Python environment, thus providing flexible scripted workflow support for engineers, researchers, and developers.
[0061] (S10) Output the report, automatically fill in the data and pictures according to the pre-specified report template, and complete the output of the report.
[0062] (S11) A storage medium having a computer-readable program stored therein, wherein the computer-readable program, when called, can execute a transmission housing sealing and strength calculation method based on ANSYS secondary development described in the present invention.
[0063] in:
[0064] In step S1, the various functional functions mainly include functions used in pre-processing, solving and post-processing and general file operation functions.
[0065] The file menu mainly includes functions such as creating and saving analysis projects, solving device settings, and working directory.
[0066] The graphical user interface mainly includes the main interface of the program, the model import interface, the strength analysis interface, the sealing analysis interface, the result evaluation, etc.
[0067] Furthermore, the button execution function is realized by binding with the buttons on each graphical user interface through the customized function function.
[0068] In step S3, in order to ensure the integrity of the load transfer path in the transmission housing assembly, the complete mesh model should include meshes such as the transmission surface, clutch housing, transmission housing, bearing bracket, oil pan, suspension bracket and bolts. To facilitate the subsequent definition of contact, load and constraint objects, it is necessary to define the collection of each unit face group in the third-party mesh generation software according to the specified naming format.
[0069] The sub-model geometry model needs to be in the same coordinate space as the complete mesh model, and the distance between the cut sub-model boundary and the area of interest must be greater than 50 mm.
[0070] Furthermore, the basic unit size of the clutch housing and the transmission housing in the complete mesh model is in the range of 5-8 mm, the mesh of the joint surface can be controlled in the range of 3-4 mm, and the housing is meshed using tetrahedral units with intermediate nodes.
[0071] In step S4, the material properties of the parts can be defined in linear elastic and elastoplastic models according to the analysis requirements. The linear elastic data includes density, elastic modulus, and Poisson's ratio; the plastic constitutive model can select an isotropic hardening model or a kinematic hardening model according to user requirements, and define its properties. After the material properties are defined, they will be automatically saved in the custom material database to facilitate the material call for the next analysis.
[0072] Furthermore, the material name and its related mechanical parameters are associated with the variables on the material definition interface through the custom functions Mat_create() and Create_wbjnScript() to the material definition code in the ANSYS project management script file, thus completing the assignment of parameters in the material definition.
[0073] Furthermore, the ANSYS project management script consists of five functional codes, including the saving and path specification of ANSYS analysis files, the creation of new analysis systems, the creation of new materials, the calling of model import scripts, and the ANSYS Mechanical analysis scripts.
[0074] Saving and path specification of ANSYS analysis files: It is mainly used to save the simulation file .wbpj and store the simulation file in the working path in step S2.
[0075] New Analysis System: Used to create the analysis type of the simulation project. This analysis type includes functions such as new material creation, model import, simulation settings, solution and result evaluation, and connects data transfer and sharing between analysis systems.
[0076] New material creation: mainly passes the GUI parameters to the script and defines the material parameters.
[0077] Call model import script: used to open the model import interface of the software and execute the model import script to complete the import function of the geometric model.
[0078] ANSYS Mechanical analysis script: used to open the Mechanical interface for analysis. It can automatically execute analysis scripts with the extension .py to complete the functions of material assignment, establishment of local coordinate system, creation of contact relationship, simulation parameter setting, constraint and load application, and result output in simulation calculation. There are three analysis scripts, namely the sealing analysis script and two strength analysis scripts. One of the strength analysis scripts is the strength analysis script of the complete model, and the other is the strength analysis script of the sub-model. The calculation results obtained by the strength analysis script of the complete model can provide the constraint information of the cutting boundary for the subsequent sub-model strength analysis script.
[0079] In step S5, the material assignment refers to querying the component name through a traversal operation, and after finding the corresponding part name, assigning the material name to the corresponding part.
[0080] Connection relationships include two types: friction contact and binding contact. The two types of contact mainly include the definition of contact pair name, contact object, contact parameters and initial contact state.
[0081] Furthermore, for different parts contact positions, the contact quantity, friction coefficient, contact algorithm, detection radius, contact interface adjustment method and offset can be set individually.
[0082] Furthermore, for the contact between the bolt and the threaded hole, the binding contact algorithm and the detection radius can be set.
[0083] The analysis settings described above can define the maximum and minimum substeps, initial substeps, geometric nonlinearity, output result type, output frequency and number of solution cores in the bolt preload condition and the shell load condition.
[0084] The load constraint application includes the load action position, magnitude and direction; the constraint includes 6 degrees of freedom of all nodes on the end face of the deformation surface.
[0085] Further loads include suspension loads and bearing loads. For suspension loads, the center coordinates of the loading coordinate system need to be calculated to ensure that the loading position is consistent with the suspension point position of the vehicle. For bearing loads, the vehicle coordinate system needs to be transformed, rotated, and other operations are performed to ensure that the loading coordinate system is consistent with the externally output load coordinate system.
[0086] The sealing result output is specifically as follows: adding the friction contact pair between the clutch housing and the transmission housing joint surface in the post-processing, using the contact tool to extract the corresponding opening volume cloud map and slip volume cloud map under the bolt preload condition and the housing load condition. The cloud map is traversed and output to the specified folder under the working path through the custom function Write_sealimage().
[0087] The Mechanical sealing analysis script is a parameterized analysis script that can be recognized by Mechanical after combining the specified codes according to a certain logic and associating them with the sealing analysis setting interface. The code refers to the functional code in S5 for material assignment, local coordinate system creation, connection relationship creation, analysis setting, constraint load application, solution and sealing result output, and is combined according to the finite element model construction principle in simulation.
[0088] In step S6, the Mechanical analysis script generated in S5 is copied, renamed, and modified to delete the code and post-processing code related to the bearing load, and generate a strength analysis script for the complete Mechanical model under the coarse grid.
[0089] In step S7, the parts in the sub-model analysis are assigned materials, the coordinate system is defined, the mesh is divided, the connection relationship is set, the analysis is set, the load constraints are applied, and the strength results are output.
[0090] The sub-model analysis is a common method in finite element analysis, which is used to perform more detailed simulation analysis on the area of interest without significantly increasing the computational cost. It obtains boundary conditions on the overall model and applies them to a more refined local model, thereby reducing the demand for computing resources while ensuring accuracy.
[0091] The material assignment, coordinate system definition and analysis settings are the same as those of S5.
[0092] The mesh division includes the mesh division method and the control of mesh size. Among them, the shell mesh division method adopts the tetrahedral unit of the point middle node; the shell mesh size control includes the overall mesh size control and the local mesh size control. Furthermore, the local mesh size control needs to calculate the mesh encryption position coordinate point, and take the coordinate point as the center to perform local mesh encryption on the reinforcement ribs near the shell suspension boss in the specified spherical area.
[0093] The connection relationship only needs to define the contact relationship between the suspension bracket and the shell, wherein the parameters of the friction contact and the binding contact remain the same as S5.
[0094] The load constraint is applied based on the strength analysis results of the complete model under the coarse grid, and the results are transferred to the sub-model analysis. The displacement of the cutting boundary under each load step in the complete model under the coarse grid is mapped to the cutting boundary by cutting boundary displacement as a constraint in the sub-model analysis; the definition of the load remains the same as S5.
[0095] The strength result output is specifically: the Mise stress cloud map, plastic strain cloud map and principal stress cloud map of the clutch housing and the transmission housing under the bolt preload condition and the housing load condition in the added post-processing.
[0096] Furthermore, after defining the viewing angle and display format of the result cloud map through the custom function Write_strengthimage(), the result cloud map under each working condition is traversed and output to the specified folder under the working path to complete the extraction of the result cloud map.
[0097] Furthermore, the maximum values in various cloud diagrams under the shell load conditions are output through self-written code, and saved in the text under the working path in the specified format to complete the extraction of result data.
[0098] In step S8, after the calculation task is submitted, the ANSYS batch script will open the ANSYSFW.exe file in the background of the program, and automatically execute the ANSYS project script files in S4 in sequence to complete pre-processing, solving and post-processing.
[0099] Furthermore, after submitting the computing task, the program interface will prompt the user in the form of a progress bar and a process log, displaying the execution process information of the computing task.
[0100] Furthermore, after submitting the calculation task, when the process log is in the process of solving the calculation, the solution information in the temporary path created by ANSYS can be viewed; when the process log is in the process of solving the calculation, the formal solution information created by ANSYS can be viewed, and the user can judge whether the calculation is normal based on the warning and error information in the solution information.
[0101] Furthermore, after submitting a computing task, if the user finds abnormal conditions such as parameter setting errors, the computing task can be terminated and the process log can be cleared.
[0102] The simulation calculation method provided in this embodiment includes:
[0103] Step 1: Prepare ANSYS project management script. According to the analysis requirements, first prepare the ANSYS file to specify the file name, save path and unit selection code; then prepare the external data import code, specify the path and name of the finite element model of the transmission housing assembly that has been divided into meshes; then build the sealing analysis system, the strength analysis system based on the sub-model, and the data sharing and transmission between the analysis systems; secondly, prepare the material definition code, and use the for loop traversal and if statement to determine the nonlinear and constitutive model selection of the material, and then assign values to its parameters. Finally, prepare the calling geometry model script and the calling mechanical analysis code. These two pieces of code are the inherent formats of the general finite element software ANSYS for model import and calling mechanical scripts. Users only need to define the file locations used in these two scripts. Combine and debug the above codes, parameterize the variables that interact with the graphical user interface, and assign the data in the text box of the developed graphical interface to the variables in the script through various customized functions to realize data conversion. Use the custom Write_wbjnScript() function to output the code to the specified file name under the specified working path, with the extension .wbjn file, to generate the ANSYS project management script.
[0104] Step 2: Compile the Mechanical analysis script for seal and coarse grid strength analysis. First, query the component names through the for traversal operation to complete the assignment of part material codes; then compile the connection relationship codes between the parts. The connection relationships include two types: friction contact and binding contact. In the two types of contact, it is necessary to define the contact pair name, contact object, contact parameters and initial contact state. For different parts of the contact, the number of contacts, friction coefficient, contact algorithm, detection radius, adjustment method and offset of the contact interface can be set separately. For the contact between the bolt and the threaded hole, the binding contact algorithm and detection radius can be set. Then compile the analysis setting script. The transmission housing assembly analysis includes bolt preload conditions and housing load conditions. The initial substep, maximum and minimum substeps, geometric nonlinearity, output result type, output frequency and number of solution cores are defined in these two load steps. Secondly, compile the housing assembly load constraint application code. By identifying the end face of the transmission face with the custom collection name Fixed EngineSurf, the 6 degrees of freedom of all nodes on its end face are constrained. The load includes three elements: the position, size and direction of action. The types of loads include suspension loads and bearing loads. The suspension load needs to calculate the center coordinates of the loading coordinate system to ensure that the loading position is consistent with the position of the vehicle suspension point. The bearing load reference coordinate system needs to transform and rotate the vehicle coordinate system to ensure that the loading coordinate system is consistent with the external output load coordinate system. In the strength analysis script in the coarse grid, only the code about the bearing load needs to be deleted, and the remaining load parts are consistent with the sealing analysis script; in addition, the solution code is compiled; finally, the result output code is compiled. In the sealing analysis script, add the friction contact pair between the clutch housing and the transmission housing joint surface, and the corresponding opening volume cloud map and slip volume cloud map under the bolt preload condition and the housing load condition. The cloud map is traversed and output to the specified folder under the working path through the custom function Write_sealimage(). The above code refers to the code about material assignment, connection relationship, analysis setting, constraint load, strength result output code and sealing result output. The code is combined and debugged, and the variables that interact with the graphical user interface are parameterized, that is, the data in the text boxes in the graphical interface of the developed strength setting and sealing setting are assigned to the variables in the script through various customized functions to realize data conversion. Generate the sealing analysis script and the coarse grid strength analysis script, and their extension is .py file.
[0105] Step 3: Prepare the SCDM script of the sub-model. Because the model is relatively complex, the finite element model is created by importing external data, and the variable model path that interacts with the model import graphical user interface is parameterized, that is, the data imported into the model text box is assigned to the variables in the script through the custom Import_CAD() function. Use the self-written Create_wbjnScript() function to output the code to the specified file name under the specified working path, and its extension is .py file to generate the SCDM script of the sub-model. Among them, external data refers to the geometry file in the mesh file or general format.
[0106] Step 4: Prepare the Mechanical strength analysis script of the sub-model. This script is mostly the same as the coarse mesh strength analysis script in step 2. After copying and renaming the coarse mesh strength script, edit it. Add meshing control code, including the control of meshing method and mesh size. The shell meshing method uses tetrahedral units with point intermediate nodes; the shell mesh size control includes overall mesh size control and local mesh size control. Regarding local mesh size control, it is necessary to calculate the mesh encryption position coordinate point, and with the coordinate point as the center, perform local mesh encryption on the reinforcement ribs near the shell suspension mounting hole in the specified spherical area; delete the existing connection relationship, and only define the contact between the suspension bracket and the shell. The friction contact and binding contact parameters are consistent with the coarse mesh analysis script. Secondly, delete the original variable surface fixed constraint code and add the cutting boundary import code. The constraint is based on the strength analysis results of the complete model under the coarse mesh, and its results are transferred to the sub-model analysis. The displacement of the cutting boundary under each load step in the complete model under the coarse mesh is mapped to the cutting boundary by the cutting boundary displacement method as the constraint in the sub-model analysis. Finally, add the mise stress cloud map, plastic strain cloud map and principal stress cloud map of the clutch housing and transmission housing under the bolt preload condition and the housing load condition in the post-processing. After using the custom Write_strengthimage() function to define the view angle and display format of the result cloud map, the stress, strain and principal stress cloud maps under each condition are output to the specified folder under the working path by traversing to complete the extraction function of the result cloud map. The maximum value of each type of cloud map under each load condition of the shell is output through the self-compiled code Result_strengthdata(), and it is saved in the text under the working path in the specified format to complete the extraction of the result data. The variables that interact with the graphical user interface for strength parameter setting are parameterized, that is, the text box data on the graphical user interface for strength parameter setting is assigned to the variables in the script through the custom Create_strengthScrip() function to generate the Mechanical strength analysis script of the sub-model, and its extension is .py file.
[0107] Step 5, prepare the batch file for sealing analysis and strength analysis. The script contains the Ansys solver file path, batch mode and ANSYS project management script path. The compiled Sumbit_sealtask() and Submit_strengthtask() functions are used to check whether there are project management scripts necessary for calculation in the working directory, which plays a role in checking the integrity of the simulation input file; in addition, the function can automatically fill in the solver file path in S2 and the project management script file in S4 in the batch file and automatically start the background simulation calculation to perform the sealing analysis and strength analysis tasks; finally, the solution information and progress of the simulation calculation process are monitored to provide users with real-time understanding of the calculation accuracy and calculation information.
[0108] Furthermore, after completing the script development of the above-mentioned full process, it is necessary to establish a graphical user interface to realize the interaction between simulation parameters and scripts and complete the automated simulation analysis. The boot menu built mainly includes menu functions such as creating, saving, solving, and working directory settings for analysis projects. The graphical user interface includes the main interface, model import interface, strength analysis interface, sealing analysis interface, and result evaluation. By using the custom function function to associate with the text boxes and buttons of the graphical user interface, after setting the parameters, one-click operation can realize the simulation analysis of the strength and sealing of the transmission assembly throughout the process. The core of the entire automated analysis process is to use the ANSYS Workbench script development function, and then build a parameter transfer bridge between the two based on the custom function function in Python. Specifically:
[0109] The interface is mainly built using Python and PyQT. First, an interface is created through MainWindow, and controls such as boot menu, label control, text box, button, check box, group box and progress bar are added to this interface. The window title name is defined through setWindowTitle(), external pictures are imported through setPixmap(), and the text box display content is set through setText(). The graphical user interface interacts with the script parameters through custom functions. After the functional test is completed, the program can be packaged and released by using Pyinstaller. In an embodiment of the present invention, the following functional modules are created:
[0110] 1. Boot menu function
[0111] First, the software setting boot menu was created, which mainly includes the creation, saving, solver setting, work path, etc. of the analysis project, and the menu function is realized by binding with the custom function. For example, in the solver setting menu, the .connect() function of the solver setting menu is used to connect the custom ANSYS_solver() function, and an if judgment statement is created to determine whether the user has successfully selected the solver execution file. If the selection is canceled, the "Solver was not successfully selected, please reselect" dialog box will pop up. This function is used to implement the specification of the ansys solver file path; such as the work path setting menu, the .clicked() function of the work path setting menu is used to connect the custom ANSYS_workpath() function. The if statement can also be used to determine whether the work path setting is successful, which is used to specify the storage path of the simulation file.
[0112] 2. Model import
[0113] Create a new MainWindows window, define the window title as "Model Import", create labels, text boxes and buttons in the window, rename them, connect the custom Import_CAD() function through .clicked(), which is used to select the model file to realize the function of importing the shell model, and display the selected model in the text box through the .setText() function.
[0114] 3. Material definition
[0115] Create a new MainWindows window, define the window title as "Material Definition and Assignment", create a tab control in the window, and create two tabs named "Material Definition" and "Material Assignment". In the Material Definition tab, create labels and text boxes named Material Name, Density, Elastic Modulus, Poisson's Ratio, Yield Strength, and Shear Modulus. Create material nonlinearity and plasticity model selection check boxes and prompt labels; create new material and delete material buttons, and connect custom Mat_create() and Mat_delete() through the .clicked function. Use the if function to determine the nonlinearity and plasticity model of the material. When the material is successfully created, a prompt "Material creation is completed and stored in the database" will pop up. Use the for function to traverse the deleted materials in the database, and use the if function to determine whether the material is nonlinear. After the material is deleted, a prompt "Material has been successfully deleted" will pop up; in the Material Assignment tab, add labels named clutch housing, transmission housing, suspension bracket, and bolt, add a drop-down combo box control, and connect the custom Mat_load() function through the .clicked function. Create a "Generate Project Management Script" button in the MainWindown window and connect the custom Write_wbjnScript() through the .clicked function.
[0116] The main functions of each function are as follows: Mat_create() and Mat_delete(): used to create and delete material functions; Mat_load(): used to load the material database; Write_wbjnScript(): used to automatically generate project scripts for sealing and strength analysis based on the text information on the parameter setting graphical interface.
[0117] 4. Strength analysis
[0118] Create a new MainWindows window, define the window title as "Shell Assembly Strength Analysis", create a tab control in the window, and establish 6 tabs named "Coordinate System Definition", "Meshing", "Connection Relationship Definition", "Analysis Settings", "Load Constraints" and "Solution Information". In the coordinate system definition tab, create labels named "Shell Suspension Coordinate System", "Variable Shell Suspension Coordinate System" and 6 "Mesh Encryption Position Coordinate System" and numerical text boxes in three directions of the space coordinate system; in the mesh division tab, add labels and text boxes named "Overall Mesh Size", "Spherical Area Radius" and "Local Mesh Size"; in the connection relationship definition tab, create 2 group boxes of "Friction Contact" and "Bound Contact", and in the friction contact group box, create labels, text boxes and drop-down combo boxes named "Contact Number", "Friction Coefficient", "Contact Algorithm", "Detection Radius", "Contact Interface Adjustment Method" and "Offset" for different connection parts. In the Binding Contact group box, create "Contact Algorithm" and "Detection Radius" labels, text boxes and drop-down combo boxes; in the Analysis Settings tab, add a label and check box named "Whether to consider geometric nonlinearity", add labels and text boxes named "Initial Load Steps", "Minimum Load Steps", "Maximum Load Steps", "Number of Calculation Cores" and "Result Output Frequency"; in the Load Constraint tab, add labels and text boxes named "Shell Suspension Load" and "Transmission Suspension Load", and import the load application diagram through setPixmap(); in the Solution Information tab, add two group boxes named "Process Log" and "Solution Information" and a progress bar, add a button named "View Solution Information", a multi-line text box and a check box in the Solution Information group box, and connect the custom So The lve_strengthMessagefile() function uses if statements and check boxes to determine whether to read the ANSYS calculation file in the temporary folder with the extension .out, or to read the solved ANSYS calculation file. If the file does not exist, a prompt "ANSYS calculation file does not exist" will pop up; in the "Process Log" group box, add multiple lines of text; in the MainWindown window, create buttons named "Generate Strength Analysis Script", "Submit Calculation" and "Abort Calculation", and the button function connects the custom Create_mechanicalScript() function, Submit_strengthtask() function, and Stop_strengthtask() function through the .clicked function.
[0119] The main functions of each function are as follows: Solve_strengthMessagefile(): used to load the solution information in the strength calculation process, so as to understand the convergence and progress of the strength simulation calculation; Create_strengthScript(): used to generate a strength analysis script; Submit_strengthtask(): used to execute the batch file generated for strength calculation to perform strength simulation calculation; Stop_strengthtask(): used to end the current strength simulation calculation.
[0120] 5. Sealing analysis
[0121] Create a new MainWindows window, define the window title as "Shell Assembly Seal Analysis", create a tab control in the window, and establish five tabs named "Coordinate System Definition", "Connection Relationship Definition", "Analysis Settings", "Load Constraint Definition" and "Solution Information". In the coordinate system definition tab, create labels named "Shell Suspension Coordinate System", "Variable Shell Suspension Coordinate System" and 8 "Bearing Hole Coordinate System" and numerical text boxes in three directions of the space coordinate system; in the connection relationship definition tab, create two group boxes of "Friction Contact" and "Bound Contact". In the friction contact group box, create labels, text boxes and drop-down combo boxes named "Contact Number", "Friction Coefficient", "Contact Algorithm", "Detection Radius", "Contact Interface Adjustment Method" and "Offset" for different connection parts. In the bound contact group box, create "Contact algorithm" and "Detection radius" labels, text boxes and drop-down combo boxes; in the analysis settings tab, add a label and check box named "Whether to consider geometric nonlinearity", add labels and text boxes named "Initial load steps", "Minimum load steps", "Maximum load steps", "Number of calculation cores" and "Result output frequency"; in the load constraint tab, add labels and text boxes named "Shell suspension load", "Transmission suspension load" and 8 "Bearing load" labels and text boxes, and import the load application diagram through setPixmap(); in the solution information tab, add two group boxes named "Process log" and "Solution information" and a progress bar, and in the solution information group box, add a button named "View solution information", a multi-line text box and a check box, and through .cl icked function to connect to the custom Solve_sealMessagefile() function, use if statements and check boxes to determine whether to read the ANSYS calculation file in the temporary folder with the extension .out, or read the solved ANSYS calculation file. If the file does not exist, a prompt "ANSYS calculation file does not exist" will pop up; in the "Process Log" group box, add multiple lines of text; create buttons named "Generate Sealing Analysis Script", "Submit Calculation" and "Abort Calculation" in the MainWindown window, and the button functions are connected to the custom Create_sealScript() function, Submit_sealtask() function, and Stop_sealtask() through the .clicked function.
[0122] The main functions of each function are as follows: Solve_sealMessagefile(): used to load the solution information in the sealing calculation process to facilitate understanding of the convergence and progress of the sealing simulation calculation; Create_sealScript: used to generate a sealing analysis script; Submit_sealtask(): used to execute the generated batch file of the sealing calculation to perform the sealing simulation calculation; Stop_sealtask(): used to end the current sealing simulation calculation.
[0123] 6. Result evaluation
[0124] Create a new MainWindows window, define the window title as "Result Evaluation", create a tab control in the window, and establish two tabs named "Sealing Evaluation" and "Strength Evaluation". In the Sealing Evaluation, add a group box named "Cloud View", add labels and drop-down combo boxes named "View Cloud Type" and "Working Condition Selection" in the group box, add a button named "Confirm" and a label to display the cloud; in the Strength Evaluation tab, add two group boxes named "Result Data Display Area (Stress: MPa)" and "Result Cloud Display Area". In the Result Data Display Area (Stress: MPa) group box, add labels and text boxes of "Part Name", "Material Name", "Allowable Stress", "Mise Stress", "Plastic Strain" and "Principal Stress", and add a button named "Read Data"; in the "Result Cloud Display Area" group box, add labels and drop-down combo boxes named "View Cloud Type" and "Working Condition Selection", and add buttons named "Confirm" and "View 3D Results". The button function is connected to the custom ReadResultCoutour_Seal() function, ReadResultData_strength() function, ReadResultCoutour_Strength() function and Show3D_strength() function through the .clicked function. Create a button named "Generate Report" in the MainWindown window, and the button function is connected to the custom Write_report() function through the .clicked function.
[0125] The main functions of each function are as follows: ReadResultCoutour_Seal(): used to read the opening distribution cloud map in the sealing analysis results; ReadResultData_strength(): used to read the maximum stress, maximum plastic strain, and maximum principal stress data of the specified component in the strength analysis; ReadResultCoutour_Strength(): used to read various stress cloud maps and plastic strain cloud maps in the strength analysis; Show3D_strength() function: can electrophoresis Pyansys to display dynamic cloud maps of simulation calculation result files; Write_report(): can automatically generate reports based on the compiled simulation template.
[0126] Through the above process, the present invention makes the data transmission between user parameters and ANSYS more convenient and efficient, and provides a standardized workflow.
[0127] Obviously, the specific implementation of the present invention is not limited to the above-mentioned methods. As long as various non-substantial improvements are made using the method concept and technical solution of the present invention, they are all within the protection scope of the present invention.
Claims
1. The transmission housing assembly sealing and strength calculation method is characterized by: The steps include: S1. Customize various functions based on the Python development environment, set up file menus and graphical user interfaces, and complete program packaging; S2, define the ANSYS software solver file path, set the default working path, and generate the software startup and working path initialization script code; S3, obtain the complete mesh data of the transmission housing assembly and the geometric model file path of the sub-model analysis, and generate a script for importing the sub-model into the SCDM model; S4. Build the analysis system in ANSYS and the data transmission between the analysis systems, establish the properties of the material information of each component in the transmission housing assembly, and generate the ANSYS project management script; S5. Analyze the sealing of the transmission housing assembly, assign materials, connection relationships, analyze settings, apply load constraints, and compile sealing result output codes to generate a mechanical sealing analysis script; S6. Modify the seal analysis script, delete the bearing load, and generate a strength analysis script for the complete Mechanical model under a coarse grid; S7. Based on the strength analysis results of the complete model under the coarse grid, the displacement of the cutting boundary under each load step is imported to generate the strength analysis script of the Mechanical sub-model; S8. Call the ANSYS project management file to generate an ANSYS batch script to calculate the sealing and strength of the transmission housing assembly.
2. A transmission housing assembly sealing and strength calculation method as claimed in claim 1, characterized in that: The method further comprises S9. Result evaluation, including reading result data and result cloud map, and using PyAnsys to view the results in real time in 3D.
3. A transmission housing assembly sealing and strength calculation method as claimed in claim 2, characterized in that: The method further comprises S10. Output the report, automatically fill in the data and pictures according to the pre-specified report template, and complete the output of the report.
4. A transmission housing assembly sealing and strength calculation method as claimed in any one of claims 1 to 3, characterized in that: The various types of self-defined functions in step S1 include functions used in pre-processing, solving and post-processing and general file operation functions; The file menu is configured to include functions such as creating, saving, solving, and working directory of analysis projects; The constructed graphical user interface includes the main interface of the program, model import interface, strength analysis interface, sealing analysis interface, result evaluation, etc.; Through customized function functions, they are bound to the buttons on each graphical user interface to realize the button execution function.
5. A transmission housing assembly sealing and strength calculation method as claimed in any one of claims 1 to 3, characterized in that: The complete mesh model in step S3 should include meshes such as the transmission surface, clutch housing, transmission housing, bearing bracket, oil pan, suspension bracket and bolts. The surface groups of each unit are defined as a set according to the specified naming format in the third-party mesh generation software; The sub-model geometry model needs to be in the same coordinate space as the complete mesh model, and the distance between the cut sub-model boundary and the area of interest must be greater than 50 mm; In the complete mesh model, the basic unit size of the clutch housing and the transmission housing is in the range of 5-8 mm, the mesh of the joint surface can be controlled in the range of 3-4 mm, and the housing is meshed using tetrahedral units with intermediate nodes.
6. A transmission housing assembly sealing and strength calculation method as claimed in any one of claims 1 to 3, characterized in that: In step S4, the material properties of the parts can be defined in linear elastic and elastoplastic models according to the analysis requirements; the linear elastic data include density, elastic modulus, and Poisson's ratio; the plastic constitutive model can select an isotropic hardening model or a kinematic hardening model according to the requirements, and define its properties; After the material properties are defined, they will be automatically saved in the custom material database to facilitate the next analysis call; Material name and its related mechanical parameters. Through the custom functions Mat_Create() and Creat_wbjn(), the variables on the material definition interface are associated with the material definition code in the ANSYS project management file to complete the assignment of parameters in the material definition. The ANSYS project management script consists of five functional codes: saving and path specification of ANSYS analysis files, creating a new analysis system, creating a new material, calling model import scripts and ANSYS Mechanical analysis scripts.
7. A transmission housing assembly sealing and strength calculation method as claimed in any one of claims 1 to 3, characterized in that: In step S5, the material assignment refers to querying the component name through a traversal operation, and after finding the corresponding component name, assigning the material name to the corresponding component; The connection relationship includes two types: friction contact and binding contact. The two types of contact include the definition of contact pair name, contact object, contact parameters and contact initial state; For different parts contact parts, the contact quantity, friction coefficient, contact algorithm, detection radius, contact interface adjustment method and offset are set separately; For the contact between bolts and threaded holes, set the binding contact algorithm and detection radius; The analysis settings can define the maximum and minimum substeps, initial substeps, geometric nonlinearity, output result type, output frequency and number of solution cores in the bolt preload condition and shell load condition; The load constraint application includes the load action position, magnitude and direction; the constraint includes 6 degrees of freedom of all nodes of the deformation surface end face.
8. A transmission housing assembly sealing and strength calculation method as claimed in any one of claims 1 to 3, characterized in that: In step S6, the Mechanical analysis script generated in S5 is copied, renamed, and modified to delete the code and post-processing code related to the bearing load, and generate a strength analysis script for the complete Mechanical model under the coarse grid.
9. A transmission housing assembly sealing and strength calculation method as claimed in any one of claims 1 to 3, characterized in that: In step S7, the parts in the sub-model are assigned materials, the coordinate system is defined, the mesh is divided, the connection relationship is established, the analysis is set, the load constraints are applied, and the strength results are output; The material assignment, coordinate system definition and analysis settings are the same as those in S5; The mesh division includes the mesh division method and the control of mesh size; wherein, the shell mesh division method adopts tetrahedral units of point intermediate nodes; the shell mesh size control includes overall mesh size control and local mesh size control; the local mesh size control requires the calculation of mesh encryption position coordinates.
10. A storage medium, characterized in that: The storage medium stores at least one instruction, and the instruction is loaded and executed by the processor to implement the method according to any one of claims 1 to 9.
Citation Information
Cited By
Round or spherical part layout system convergence judgment method, electronic equipment and storage medium
CN120974561A