Waveform shaper optimization method and constant strain rate test method for solid brittle materials
Through machine learning and ABAQUS simulation technology, an optimal model of the waveform shaper is constructed, which solves the problem of difficulty in achieving stress uniformity and constant strain rate in the traditional Hopkinson rod experiment, improves the efficiency and accuracy of solid brittle material testing, and reduces the cost of testing. Trial costs.
Patent Information
- Application Number
- CN202411161626.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-08-23
AI Technical Summary
In the dynamic mechanical property testing of solid brittle materials, the traditional Hopkinson rod experiment is difficult to ensure stress uniformity and constant strain rate loading, resulting in reduced validity and accuracy of experimental results, and parameter screening of wave shaper materials requires a lot of manual labor Trial and error, consuming time and resources.
Use machine learning technology combined with ABAQUS finite element simulation to construct an optimal model of the waveform shaper. By adjusting Young's modulus, yield strength and load parameters, stress wave-time data is generated, the machine learning model is trained, and the waveform shaper parameters and stress are fitted. The nonlinear relationship between waveforms automatically selects suitable waveform shaper materials.
It realizes the loading of half-sine stress waves in the testing of solid brittle materials, ensuring a constant strain rate of the specimen, reducing the cost of manual trial and error in the testing process, improving the timeliness and success rate of the testing, and simplifying the Hopkinson rod test Automated simulation calculations.
Smart Images

Figure CN118670854B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Hopkinson bar experiments, in particular to a waveform shaper optimization method, and also to a solid brittle material constant strain rate testing method implemented by a waveform shaper optimization model obtained by the waveform shaper optimization method. Background Art
[0002] The Hopkinson bar experiment has been widely used in the study of dynamic mechanical properties of materials such as metals, concrete, rocks, and polymers. However, the conventional split-Hopkinson bar (SHPB) not only has difficulty in ensuring dynamic stress balance during loading, but also has difficulty in meeting the prerequisite of constant strain rate when measuring brittle materials such as concrete, which greatly reduces the effectiveness and accuracy of the experimental results.
[0003] In the dynamic mechanical property test of solid brittle materials, half-sine stress wave loading can achieve stress uniformity and constant strain rate testing of materials. However, the traditional Hopkinson pressure bar test technology adopts direct loading. The loading stress wave generated by the bullet (impact rod) is approximately rectangular and does not meet the half-sine stress wave waveform. In addition, a part of high-frequency components is superimposed on the wave head. This part of high-frequency components is caused by the direct collision of the bullet with the incident rod. As a result, for solid brittle materials such as concrete and rock, the failure strain is very small, and it is difficult to ensure that the stress uniformity requirement is met before the specimen is destroyed. If the stress wave is generated directly by the bullet hitting the incident rod, the generated loading stress wave has a steeper rising edge. For a period of time before loading or even until the specimen is destroyed, the specimen may still be in a state of uneven stress. In addition, constant strain rate loading is required during the SHPB experiment. It is difficult to ensure the validity and accuracy of the experimental results by using bullets to directly hit the incident rod.
[0004] Waveform shaping technology is an effective method to solve the problems of stress uniformity and constant strain rate loading. By controlling the loading pulse: adjusting the incident wave characteristics such as pulse rising edge time, pulse duration, and pulse amplitude, the high-frequency oscillation generated during the impact process is reduced, and the semi-sine stress wave in the Hopkinson bar is realized, as well as the constant strain rate loading of the sample during the loading process.
[0005] However, although the current academic community has a certain understanding of the influence of traditional pneumatic Hopkinson bar waveform shapers on the incident waveform, the mapping relationship between the shaper material and the modified loading stress wave is still unclear. In field tests, in order to ensure that a better half-sine stress wave is loaded, it is often necessary to manually try a large number of different shapers for testing, which consumes huge manpower, material resources and time costs.
[0006] At the same time, machine learning, as a subset of artificial intelligence, has gradually become one of the important methods for solving data tasks. Machine learning algorithms generally have the ability to autonomously identify data trends and patterns, can process various data in dynamic, large-capacity and complex data environments, detect potential patterns in data and make further predictions, and have great potential in classification and regression problems of high-dimensional features.
[0007] In view of this, it is necessary to use cutting-edge machine learning technology to provide a waveform shaper optimization method for dynamic mechanical testing of solid brittle materials based on the Hopkinson bar test, so as to simply and quickly obtain the desired loaded half-sine stress wave and shaper material, thereby improving the timeliness of the test, reducing the trial and error cost of the test, and improving the success rate of constant strain rate testing of solid brittle materials. Summary of the invention
[0008] In order to solve the problem in the prior art that it is difficult to determine the parameters of a waveform shaper and a lot of trial and error is required in the dynamic mechanical test of solid brittle materials, the present invention provides a waveform shaper optimization method, and also provides a solid brittle material constant strain rate testing method implemented by a waveform shaper optimization model obtained by the waveform shaper optimization method, thereby improving the timeliness of the test, reducing the trial and error cost of the test, and improving the success rate of the solid brittle material constant strain rate test.
[0009] The waveform shaper optimization method of the present invention is used to screen the waveform shaper and the load applied in the Hopkinson bar test system, and the waveform shaper optimization method comprises the following steps:
[0010] S1: Establishing a three-dimensional model of a Hopkinson bar system, and obtaining a model file and a command record file, wherein the three-dimensional model of the Hopkinson bar system includes an impactor, an incident bar of the Hopkinson bar, and a waveform shaper disposed at one end of the incident bar close to the impactor;
[0011] S2: Based on the command record file, a waveform shaper parameter generation model is set, wherein the waveform shaper parameter generation model includes a model parameter setting command, a model calculation command, and a model calculation result reading and saving command;
[0012] S3: Based on the waveform shaper parameter generation model, several parameter combinations of the waveform shaper are set, wherein the parameter combinations include different numerical combinations of three parameters: Young's modulus, yield strength, and load, and the results are calculated and output to obtain stress wave-time data under different parameter combinations as training data sets for subsequent machine learning models;
[0013] S4: Based on the training data set, calculate the stress wave curve index and error to obtain a regular data set file;
[0014] S5: Construct a waveform shaper optimization model, use a regular data set file, train and test, fit the multivariate nonlinear relationship between the waveform shaper parameters and the stress wave waveform, and obtain the final waveform shaper optimization model.
[0015] Furthermore, in step S1, the processing method for obtaining the model file and the command record file is based on the ABAQUS finite element simulation analysis software:
[0016] S101: Create the components of the 3D model of the Hopkinson bar system in ABAQUS software, then set the grid, boundary conditions, and calculation parameters. After saving, the model file in mae format is automatically generated in the local directory of the computer;
[0017] S102: Open the model file in mae format, set the Young's modulus, yield strength, and load of the waveform shaper, perform simulation calculations, save the calculation results, view the stress wave results in ABAQUS software, and save the data in csv format;
[0018] S103: Generate a command record file in rpy format that automatically records the code corresponding to the operation in step S102.
[0019] Further, in step S2, the waveform shaper parameter generation model includes two py format files, and the open model command, set parameter command, simulation calculation command, and save result command are respectively written into the first py format file, and the open result command and save data command are respectively written into the second py format file.
[0020] Furthermore, in step S3, the parameter combination is obtained by setting the value range, sampling interval and sampling number of the Young's modulus and yield strength of the waveform shaper and the load output by the loading device, and according to the value range, sampling interval and sampling number of the three set parameters, a triple loop is set using the for function, and one of the above three parameters is modified in sequence in each cycle to obtain different parameter combinations.
[0021] Furthermore, the method for obtaining the training data set is:
[0022] S301: Acquire different parameter combinations;
[0023] S302: Start a loop, call the first py format file, modify the code line in the file corresponding to the setting parameters and the file name according to the parameters in the loop, and save the file;
[0024] S303: calling ABAQUS software and transferring the first py format file to ABAQUS software, and then checking whether the simulation calculation is completed at a set time interval, and if so, executing step S304;
[0025] S304: Call the second py format file, read the calculation result file, and save the stress wave data. After traversing all parameter combinations, the loop ends.
[0026] Furthermore, in step S4, the method for obtaining the regular data set file is:
[0027] S401: extracting three parameters, namely, Young's modulus, yield strength and load output by a loading device, contained in the file name;
[0028] S402: Calculate three waveform characteristics of curve amplitude, pulse width, and axis position corresponding to each parameter combination;
[0029] S403: The three parameters and three waveform features are taken as a parameter set and saved in a local csv format file. Each parameter set represents a sample and has six data. The data set file is a matrix data containing all sample information.
[0030] Furthermore, in step S5, the method for constructing the waveform shaper optimal model is:
[0031] S501: Select several algorithms, randomly extract several samples to test the algorithms, and obtain algorithms with beneficial performance as model algorithms;
[0032] S502: constructing a waveform shaper optimization model based on the model algorithm, then setting hyperparameters, and performing hyperparameter optimization to obtain a final waveform shaper optimization model;
[0033] S503: Packaging and encapsulating the final waveform shaper optimization model to obtain a portable model file.
[0034] Furthermore, in step S501, the model algorithm adopts an extreme gradient boosting regression algorithm, and the input parameters of the waveform shaper preferred model are: amplitude, pulse width, axis position, and the output parameters are: Young's modulus, yield strength of the waveform shaper and the load output by the loading device.
[0035] The present invention also provides a method for testing the constant strain rate of solid brittle materials using the waveform shaper optimization model obtained by the waveform shaper optimization method. The method comprises the following steps:
[0036] Step 1: Calculate the waveform shaper material: input the waveform characteristics into the waveform shaper optimization model to calculate the corresponding shaper material parameters;
[0037] Step 2, test: prepare a waveform shaper according to the material parameters of the waveform shaper, and install it in a test device to test the dynamic mechanical response of the solid brittle material during loading;
[0038] Step 3. Analyze the results: Calculate the incident wave based on the voltage signal of the Hopkinson bar, and then obtain the stress, strain, and strain rate of the sample. If the material strain rate is not constant, modify the loading stress wave and repeat the above steps until a constant strain rate is obtained.
[0039] Furthermore, in step 2, the material of the waveform shaper is copper, the shape of the prepared copper waveform shaper is coin-shaped, and its Young's modulus and yield strength are obtained by the waveform shaper optimization model.
[0040] Compared with the prior art, the present invention utilizes the advantages of programming language and machine learning technology, can obtain the corresponding shaper material according to the expected loading stress wave of the test, and apply the shaper material to the separated Hopkinson bar test system to study the dynamic mechanical test of solid brittle materials, provide a dedicated solid brittle material dynamic mechanical test scheme for the separated Hopkinson bar test system, provide a mapping relationship between the loading stress wave and the waveform shaper material, and improve the feasibility of constant strain rate testing. The present invention has the following outstanding advantages:
[0041] 1. The present invention integrates programming technology, machine learning technology and numerical simulation technology to propose a means of optimizing waveform shaper materials. The corresponding waveform shaper materials can be calculated according to the stress wave characteristics required by the test, so as to load half-sine stress waves in the dynamic mechanical test of solid brittle materials, thereby achieving a constant strain rate of the tested sample, which greatly reduces the cost of repeated manual trial and error of waveform shaper materials in the traditional test process and improves the test efficiency.
[0042] 2. The present invention uses a large amount of simulation data and machine learning technology to sequentially change the waveform shaper parameters to study the waveform characteristics of the loading stress wave under the waveform shaper with different physical parameters, and quantitatively studies the nonlinear mapping relationship between the waveform shaper material, load and loading stress wave;
[0043] 3. The present invention improves the secondary development method of ABAQUS software by utilizing the rpy format command record file of ABAQUS and automatically modifying it, and using the code command software generated by the software itself, thereby reducing the learning cost of ABAQUS API and realizing a simpler, faster and more efficient automated simulation calculation of the Hopkinson bar test under a variety of complex conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the present invention or the solutions in the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0045] Figure 1 A method flow chart of the preferred method of the present invention;
[0046] Figure 2 A schematic diagram of a three-dimensional model of an embodiment of a Hopkinson bar test system of the present invention;
[0047] Figure 3 for Figure 2 Partial magnification;
[0048] Figure 4 Schematic diagram of impact test results of different materials;
[0049] Figure 5 This is a schematic diagram of the impact test results of copper with different areas;
[0050] Figure 6 This is a schematic diagram of the impact test results of copper with different thicknesses;
[0051] Figure 7 This is a flow chart of a specific construction method of a waveform shaper optimization model of the present invention;
[0052] Figure 8 This is a diagram of the preferred model interface of the waveform shaper of the present invention;
[0053] Fig. 9 This is a schematic diagram of a dynamic mechanical test of solid brittle materials based on a Hopkinson bar test system of the present invention;
[0054] Fig.10 This is a schematic diagram of the principle of dynamic mechanical testing of solid brittle materials studied in the present invention;
[0055] Fig.11 This is a flow chart of the constant strain rate testing method for solid brittle materials of the present invention.
[0056] Reference numerals:
[0057] 1-impact piece, 2-incident rod, 3-waveform shaper, 4-loading device, 5-sample, 6-transmission rod, 7-first resistance strain gauge, 8-second resistance strain gauge. DETAILED DESCRIPTION
[0058] Unless otherwise defined, all technical and scientific terms used in the present invention have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs; the terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention; the terms "including" and "having" and any variations thereof in the specification and claims of the present invention and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present invention or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0059] Reference to "embodiments" in the present invention means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it mutually exclusive, independent, or alternative to other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in the present invention may be combined with other embodiments.
[0060] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings.
[0061] The present invention utilizes the advantages of programming language and machine learning technology, can obtain the corresponding shaper material according to the expected loading stress wave of the test, and apply the shaper material to the separated Hopkinson bar test system to study the dynamic mechanical test of solid brittle materials, provide a dedicated solid brittle material dynamic mechanical test scheme for the separated Hopkinson bar test system, provide a mapping relationship between the loading stress wave and the shaper material, and improve the feasibility of the constant strain rate test. The waveform shaper optimization model of the present invention is used to screen the waveform shaper and the loaded load in the Hopkinson bar test system, thereby improving the timeliness of the test, reducing the trial and error cost of the test, and improving the success rate of the constant strain rate test of solid brittle materials.
[0062] like Figure 1 As shown, the waveform shaper optimization method of the present invention includes the following steps:
[0063] S1: Establish a three-dimensional model of the Hopkinson rod system and obtain the model file and command record file;
[0064] S2: Based on the command record file, a waveform shaper parameter generation model is set, wherein the waveform shaper parameter generation model includes a model parameter setting command, a model calculation command, and a model calculation result reading and saving command;
[0065] S3: Based on the waveform shaper parameter generation model, several parameter combinations of the waveform shaper are set, wherein the parameter combinations include different numerical combinations of three parameters: Young's modulus, yield strength, and load, and the results are calculated and output to obtain stress wave-time data under different parameter combinations as training data sets for subsequent machine learning models;
[0066] S4: Based on the training data set, calculate the stress wave curve index and error to obtain a regular data set file;
[0067] S5: Construct a waveform shaper optimization model, use a regular data set file, train and test, fit the multivariate nonlinear relationship between the waveform shaper parameters and the stress wave waveform, and obtain the final waveform shaper optimization model.
[0068] like Figure 7 As shown, as an embodiment of the present invention, the method of the present invention is implemented based on ABAQUS finite element simulation analysis software (hereinafter referred to as ABAQUS software). The present invention improves the secondary development means of ABAQUS software, and reduces the learning cost of ABAQUS API by using the rpy format command record file of ABAQUS and automatically modifying it, and using the code command software generated by the software itself, thereby realizing a simpler, faster and more efficient automated simulation calculation of the Hopkinson bar test under various complex conditions. The following is a detailed description of the implementation of the present invention.
[0069] Step S1: Establish a three-dimensional model of the Hopkinson bar test system.
[0070] The purpose of this step is to establish a model in ABAQUS software and then perform a series of operations to obtain the mae format model file and the rpy format command record file, where the mae format file is the numerical simulation model used in subsequent steps S2 and S3, and the rpy format file is used to write the py format file in step S2.
[0071] The specific method of obtaining the model file and command record file in this example is:
[0072] S101: Create components in ABAQUS, including impact part 1 (in this case, the impact rod, also called a bullet), incident rod 2, and waveform shaper 3. Set the grid, boundary conditions, etc. After saving, the software will automatically generate a mae format model file in the local directory of the computer.
[0073] In the ABAQUS software interface, select the "Component" module to create components, select the shape and size of each component according to the test requirements, select the "Property" module to manage the material properties of the components, and set the mesh and boundary conditions of the components, as well as the analysis step and amplitude of the calculation in the model database.
[0074] The present invention adopts numerical simulation to select the material and size of the waveform shaper. Some results are as follows: Figure 4-Figure 6 As shown in the figure, the horizontal axis Time is time, and the vertical axis Danymic Stress is dynamic stress. First, a preliminary simulation test was conducted on the waveform stability of traditional stabilizer materials such as copper, aluminum, and tin. Figure 4 It can be seen that copper with high yield strength shows better stability; secondly, the stability of copper materials with different thicknesses and areas is simulated and tested, such as Figure 5 and Figure 6 As shown, the test results show that the larger the copper area, the stronger the stability, while the thickness cannot improve the stability. In summary, the present invention selects copper as the material of the waveform shaper for ease of testing, sets the overall shape of the waveform shaper to be coin-shaped, and according to the simulation results, sets the size of the waveform shaper to 18 mm in diameter and 0.5 mm in thickness.
[0075] S102: Reopen the mae format model file, set the Young's modulus, yield strength of the waveform shaper, and the load output by the loading device, perform simulation calculations, save the calculation results as an odb format file, then view the stress wave results in ABAQUS software, and save the data as a csv format file.
[0076] In the present invention, according to the results of the simulation test in step S101, the yield strength is an important factor affecting the shaping ability, and according to the Johnson-Cook constitutive model, the Young's modulus also affects the shaping ability of the material, and the load output by the loading device directly affects the loading stress wave. Therefore, the present invention uses the Young's modulus and yield strength of the waveform shaper and the load output by the loading device as the parameters to be changed during optimization, and the other parameters are fixed.
[0077] In particular, in field tests, testers need to set the load of the loading device (air gun), which makes the bullet generate speed, and then the bullet hits the incident rod to generate stress waves; while in the simulation model, there is no need to create a loading device, and the same effect can be achieved by directly giving the bullet speed. In order to make the preferred model of the present invention easier to use in field tests, the loads in the preferred model of the present invention all refer to the loads of the loading device, and only in the simulation model, the load is converted into the bullet speed for setting.
[0078] The mae format model file in the present invention only contains the information of each component of the model and will not be changed in the subsequent simulation calculation. Therefore, after step S101 is completed, the model needs to be closed and reopened to avoid the operation of establishing the model in step S101 leaving unnecessary records in the rpy format file.
[0079] After the simulation calculation, ABAQUS software will not output the calculation data by default, but will output an odb format file that records the calculation process information. The odb format is a special format for ABAQUS and needs to be opened using the ABAQUS software itself. In the "Job" module, view the stress wave-time data and save it as a local csv format file.
[0080] Step S103: After performing the operation of step S102, ABAQUS software will automatically generate an rpy format file in the local directory and automatically record the code corresponding to the above operation.
[0081] The rpy format file refers to abaqus.rpy in the software directory. This file is automatically generated by ABAQUS software and records all operations performed by the user in the software in the python programming language. The code in the file can be directly passed to the software to command the software to perform exactly the same operation.
[0082] After the above operations are completed, the python language code corresponding to opening the model, setting parameters, simulating calculations, saving odb format files, reading odb format files, and outputting csv format files in step S102 will be recorded in the rpy format file.
[0083] Step S2: Write a script file in py format for generating the waveform shaper parameter model.
[0084] The purpose of this step is to reconstruct two py format files based on the rpy format file, the first py format file is work.py, work.py is used to command ABAQUS software to calculate and save, and the second py format file is read.py, read.py is used to command the software to save data. As an improvement of the secondary development method of ABAQUS in the present invention, this step uses the rpy format file self-generated by ABAQUS software to write scripts, directly uses the existing code in the rpy format file, and avoids the learning cost of the dedicated module in the ABAQUS API.
[0085] The specific method for generating the script file of the waveform shaper parameter generation model of the present invention is:
[0086] Step S201: According to the operation described in step S102, the code in the rpy format file is decomposed into:
[0087] ①Open the model: openMdb(r'D:\product\ZX_TEST.cae');
[0088] ②Set parameters: mdb.models['Model-1'].materials['ZX'].elastic.setValues, mdb.models['Model-1'].materials['ZX'].plastic.setValues, mdb.models['Model-1'].loads['dynamic'].setValues;
[0089] ③Simulation calculation: mdb.jobs['120000+500+30'].submit(consistencyChecking=OFF);
[0090] ④Save the result: mdb.Job(name='120000+500+30');
[0091] ⑤Open result: o1 = session.openOdb(name='D: / product / cal / 120000+500+30.odb');
[0092] ⑥Save data: session.writeXYReport(fileName='120000+500+30.csv');
[0093] There are six parts in total. Input or pass all the codes including the above six parts into ABAQUS software to command the software to reproduce exactly the same results.
[0094] Step S202: Use Python programming language to write ① open the model, ② set parameters, ③ simulate calculations, and ④ save results into work.py, and write ⑤ open the results and ⑥ save data into read.py according to the needs.
[0095] There is no need to modify the two py format files when writing them, as the parameters and names will be automatically modified in subsequent loops.
[0096] Step 3: Generate a model based on the waveform shaper parameters to generate stress wave-time data under different parameter combinations.
[0097] The purpose of this step is to use Python to repeatedly command ABAQUS software to calculate and output data, and obtain stress wave-time data under all parameter combinations as a training data set for the subsequent machine learning algorithm model. The specific method for generating stress wave-time data under different parameter combinations is:
[0098] Step S301: Setting the Young's modulus and yield strength of the waveform shaper and the value range and sampling interval of the load output by the loading device:
[0099] ① Young's modulus: the value range is 50000~200000MPa, the interval is 10000MPa, and the sampling is 16 times in total;
[0100] ② Yield strength: the value range is 50~1500MPa, the interval is 50MPa, and the sampling is 30 times in total;
[0101] ③ Load: The value range is 0~75MPa, the interval is 5, and the sampling is 15 times in total.
[0102] Use three for functions to establish a triple loop. Modify one of the three parameters in sequence in each loop, and loop 7200 times in total.
[0103] Of course, the value range and sampling times of each parameter in this example can be adjusted according to the number of required parameter combinations.
[0104] Step S302: Start the loop. In each loop, call the local file work.py, use the format function to take values according to the three parameters in the loop, modify the corresponding code lines, and save the file.
[0105] To modify Young's modulus, enter: work_lines
[18] = "mdb.models['Model-1'].materials['ZX'].elastic.setValues(table=(({el}, 0.3),))\n".format(el =elastic).
[0106] Step S303: In each cycle, the subprocess.Popen function is used to call the ABAQUS software, and the modified work.py is passed to the software. Then, the time.sleep function is used to check every 60 seconds whether the rpy file generated by the software contains "RT script done".
[0107] When calling the software, you need to call the launcher.bat file in the software directory. The software page will not be opened after calling, but the software will run automatically in the background after passing the command.
[0108] After passing work.py, the software will calculate. After the calculation is completed, the software will automatically write "RTscript done" in abaqus.rpy. If "RT script done" appears in the rpy file, it means that the calculation has been completed and you can proceed to the next step; if not, wait for 60 seconds again. The time interval is not limited to 60 seconds and can also be set to 45 seconds or other times.
[0109] Step S304: In each cycle, after the calculation is completed, read.py is called and modified to pass it to the ABAQUS software using the subprocess.Popen function. The command software reads the odb calculation result file and saves the stress wave-time relationship data as a local csv format file. The file name is named after the three parameter values in this cycle.
[0110] After traversing a total of 7200 combinations of three parameters, the loop ends.
[0111] Step S4: Process the calculation results to obtain a regular data set file.
[0112] The purpose of this step is to use python to process the S304 output data and calculate the stress wave-time relationship curve characteristics.
[0113] The specific processing method for this example is:
[0114] Step S401: Use re.findall(r'[1-9]+\.?[0-9]*',filenames[num]) to extract the three parameters contained in the file name: Young's modulus, yield strength, and load.
[0115] Step S402: Calculate three waveform features:
[0116] ① Amplitude, defined as the maximum absolute value of the stress wave;
[0117] ② Pulse width: the starting point of the first cycle of the curve is the time point when the absolute value of the stress wave exceeds 1% of the amplitude for the first time. Similarly, the end point is the time point when the absolute value of the stress wave drops below 1% of the amplitude for the first time. The pulse width is the time difference between the starting point and the end point.
[0118] ③ The axis position is defined as the relative position of the amplitude at the time point in the first cycle.
[0119] Step S403: The above three parameters and three waveform features are taken as a parameter set and saved in a local csv format file.
[0120] According to the above results, there are 7200 parameter combinations, so step S304 outputs a total of 7200 csv format files. Step S401 and step S402 will process these 7200 files. Each parameter set represents a sample and has six data. Therefore, the final training data set is a matrix data of 7200 rows and 6 columns, which is saved as 1 csv format file.
[0121] Step S5: construct a machine learning algorithm model to obtain the final waveform shaper optimization model.
[0122] The purpose of this step is to select a suitable algorithm model, use the training data set output in step S403, use Python to build a model, and fit the multivariate nonlinear relationship between the waveform shaper parameters and the stress wave waveform.
[0123] The specific processing process of this example is:
[0124] Step S501: Compare and select algorithms. Observe data features and model tasks, and obtain algorithms with beneficial performance as model algorithms.
[0125] ① The training data set has 6 dimensions, of which 3 waveform features, namely amplitude, pulse width, and axis position, are the features of the model (independent variables), and 3 parameters, namely Young's modulus, yield strength, and load, are the labels of the model (dependent variables), and there is no significant correlation between the features;
[0126] ② The training data set has 7,200 samples, but the samples are independent and have no dependencies in terms of time series or physical information;
[0127] ③The model task is to fit and regress the multivariate nonlinear mapping relationship between three features and three labels, with fewer dimensions and simpler tasks.
[0128] Taking all the above into consideration, this task does not need to consider the field of time series prediction or overly complex architectures such as convolution. Therefore, cutting-edge or classic regression algorithms are selected in the field of machine learning: ① Random Forest, ② eXtreme Gradient Boosting (XGB, also known as XGBoost), ③ Light Gradient Boosting, and ④ CatBoost machine learning algorithm.
[0129] In this example, 2500 samples are randomly selected to test four algorithms. In each algorithm model, the maximum number of iterations is unified to 10000 times and the learning rate is 0.005 to eliminate the influence of hyperparameters in the test comparison. After testing, the fitting speed and prediction accuracy of the four algorithms are relatively close, and it is impossible to select through performance comparison. It is speculated that the reason is that the data dimension is small and the task is simple. Therefore, considering the ease of use, portability, and interpretability, the extreme gradient boosting regression algorithm (XGB Regressor) is preferred because it is simple to use, highly portable, and can use SHAP analysis to explain the model.
[0130] Step S502: Use Python language to construct an XGB regression model as the preferred model of the waveform shaper of the present invention, and perform hyperparameter optimization to improve the fitting speed and prediction accuracy. After XGBoost is installed on the local computer, call XGBoost and set the following hyperparameters:
[0131] ①n_estimator, number of iterations;
[0132] ②max_depth, the depth of the "tree";
[0133] ③min_child_weight, the minimum number of samples of leaf nodes;
[0134] ④gamms, the minimum loss required for leaf node splitting is reduced;
[0135] ⑤subsample, random sampling ratio;
[0136] ⑥colsample_bytree, the ratio of random sampling columns;
[0137] ⑦reg_alpha, L1 regularization parameter;
[0138] ⑧reg_lambdas, L2 regularization parameter;
[0139] ⑨learning_rate, learning rate.
[0140] According to experience, 5 values are set for each of the above 9 hyperparameters, and the GridSearchCV function is used to pass them to the XGBRegressor model. Each time the function is passed, 8 of the hyperparameters are fixed, 1 hyperparameter is traversed, and the optimal solution of the hyperparameter among the 5 values is output. The 9 hyperparameters are traversed in sequence for a total of 45 cycles, and the optimal solution of all hyperparameters is obtained, and the construction and optimization of the XGBRegressor model are completed.
[0141] In the optimization process, in order to consider the prediction accuracy and fitting speed, the R 2As an evaluation indicator of prediction accuracy, when R 2 When it is greater than 0.8, the model accuracy is acceptable, otherwise the hyperparameter combination used in this cycle is discarded; among the combinations whose prediction accuracy meets the conditions, observe their fitting speed and select the best one by comprehensively considering accuracy and speed.
[0142] Using the constructed waveform shaper optimization model, all 7200 samples are trained to obtain the final waveform shaper optimization model, and the model is saved as a local pkl format file.
[0143] Step S503: Use Qt designer to design and develop software to create a window, and use the pickle.load function in the background py format file to call the XGB Regressor model local file and establish a link. Use the PyInstaller tool to package the window ui and background files into a portable exe format model software, or use Windows tools to create a bat format Windows batch file to directly call the window ui and background files. Both packaging methods can realize the model function. Using batch files for packaging can greatly reduce the size of the overall model file and improve portability.
[0144] The interface of the preferred model of the waveform shaper of the present invention is as follows Figure 8 As shown in the figure, in the software interface, the user can input the amplitude, pulse width, and axis position of the waveform according to the expected loading stress wave waveform, click "OK", and the software will input the three waveform features into the trained XGB Regressor model to calculate the corresponding Young's modulus, yield strength, and load.
[0145] like Fig.11 As shown, the present invention also provides a dynamic mechanical testing method for studying solid brittle materials to improve the success rate of constant strain rate loading, comprising the following steps:
[0146] Step 1: Calculate the waveform shaper material: set an ideal half-sine stress wave according to the test requirements, input the waveform characteristics into the waveform shaper optimization software produced by the above optimization method, and calculate the corresponding shaper material parameters;
[0147] Step 2, conduct the test: using the existing test device, including the split Hopkinson bar test device, the supporting computer, the data acquisition and storage system, etc., in conjunction with the waveform shaper material obtained by the above calculation, the loading device launches a bullet to impact the incident bar, generates an ideal half-sine stress wave on the bar and acts on the sample, ensures that the strain rate of the sample is constant, and tests the dynamic mechanical response of the solid brittle material during the loading process;
[0148] Step 3. Analyze the results: Calculate the incident wave based on the voltage signal in the rod, and then calculate the stress, strain, and strain rate of the sample. If the material strain rate is not constant, modify the loading stress wave and repeat the above steps.
[0149] Each step of the present invention is described in detail below:
[0150] Step 1: Calculate the shaper material.
[0151] The experimental requirement of the present invention for the dynamic mechanical test of solid brittle materials is "the strain rate of solid brittle materials is constant during loading", which indirectly leads to the requirement that "the loading stress wave is an ideal semi-sinusoidal shape". Therefore, a semi-sinusoidal waveform is set, and the pulse width and amplitude in its waveform characteristics are determined according to the actual test conditions, and the axis position is 0.5 (that is, the axis is in the center of the period). Input the three waveform characteristics into Figure 8 In the software interface, the required waveform shaper material parameters and loads are calculated.
[0152] Step 2: Conduct the experiment.
[0153] like Fig. 9 As shown, the test device includes a split Hopkinson bar test device, a waveform shaper 3, a solid brittle material sample 5, a data acquisition tool-dynamic strain gauge, and a data storage and processing tool. The split Hopkinson bar test device in this example includes a loading device 4, an impact member 1 disposed on the loading device and impacting the split Hopkinson bar, and also includes an incident rod 2 and a transmission rod 6 respectively disposed on both sides of the solid brittle material sample 5, and the incident rod 2 and the transmission rod 6 constitute a split Hopkinson bar. A first resistance strain gauge 7 is disposed on the incident rod 2, and a second resistance strain gauge 8 is disposed on the transmission rod 6.
[0154] First, prepare the waveform shaper 3. In this example, the waveform shaper 3 is made of red copper and is in the shape of a coin with a diameter of 18 mm and a thickness of 0.5 mm. The Young's modulus and yield strength thereof are configured according to the data obtained in step one.
[0155] Then, according to Fig. 9 As shown in the figure, the various devices and components are assembled, wherein the waveform shaper 3 is placed at the tail end of the incident rod 2. The first resistance strain gauge 7 is pasted on the middle section of the incident rod 2, and the second resistance strain gauge 8 is pasted on the middle section of the transmission rod 6, and a dynamic strain gauge is connected. The middle section strain represents the rod strain, and the size and physical properties of the solid brittle material sample 5 are recorded. The solid brittle material sample 5 is placed in the incident rod 2 and the transmission rod 6.
[0156] Finally, according to the data obtained in step one, the load of the loading device is set, and the equipment is started so that it launches the impact piece 1 to load the incident rod 2 and act on the solid brittle material sample 5. During the loading process, the first resistance strain gauge 7, the second resistance strain gauge 8 and the dynamic strain gauge are used to record the strain and strain rate in the rod.
[0157] Step 3: Analyze the results.
[0158] like Fig.10 As shown, when the incident wave in the rod When reaching interface 1 (the vertical dotted line on the left side of the solid brittle material sample 5, i.e. the junction between the incident rod and the sample), a part of the incident wave passes through the solid brittle material sample 5 to form a transmission wave. , and the other part is reflected as a tensile wave , ignoring the time required for the wave to pass through the sample, the data is calculated by measuring the voltage signal in the rod with the strain gauge. According to the one-dimensional stress wave theory, the strain of the sample is determined , strain rate and stress As shown in formulas (1) to (3):
[0159]
[0160]
[0161] (1)
[0162]
[0163]
[0164] (2)
[0165] (3)
[0166] in C 0 is the elastic wave speed in the rod, L s is the length of the test end of the specimen, S b is the elastic wave speed in the rod, E b is the Young's modulus in the rod, S s is the cross-sectional area of the test end of the specimen, is the stress at the front end of the specimen, is the stress at the rear end of the specimen, is the incident stress, is the reflected stress, is the transmission stress, is the wave velocity at the front end of the sample, is the wave velocity at the rear end of the specimen, is the incident wave velocity, is the reflected wave velocity, is the transmission wave velocity, the front end of the sample refers to the incident rod side of the Hopkinson bar, and the rear end of the sample refers to the transmission rod side of the Hopkinson bar. For time, is the time differential.
[0167] The strain rate of the solid brittle material sample during loading is calculated according to the above formula to determine whether it meets the condition of constant strain rate. If not, it indicates that the half-sine wave set in step 1 is incorrect and needs to be reset and repeated after the above steps.
[0168] It can be seen from the above that compared with the prior art, the present invention has the following outstanding advantages:
[0169] 1. The present invention integrates programming technology, machine learning technology and numerical simulation technology to propose a means of optimizing waveform shaper materials. The corresponding shaper material can be calculated according to the stress wave characteristics required by the test, so as to load a half-sine stress wave in the dynamic mechanical test of solid brittle materials, thereby achieving a constant strain rate of the tested sample, which greatly reduces the cost of repeated manual trial and error of waveform shaper materials in the traditional test process and improves the test efficiency.
[0170] 2. Since the nonlinear mapping relationship between the loading stress wave and the material properties of the shaper is difficult to be summarized artificially, the present invention uses a large amount of simulation data and machine learning technology to change the shaper parameters in sequence, studies the waveform characteristics of the loading stress wave under the waveform shaper with different physical parameters, and quantitatively studies the nonlinear mapping relationship between the waveform shaper material, load and loading stress wave;
[0171] 3. The present invention improves the secondary development method of ABAQUS, reduces the learning cost of ABAQUS API, and realizes simpler, faster and more efficient automated simulation calculation of Hopkinson bar test under various complex conditions.
[0172] The specific implementation modes described above are preferred implementation modes of the present invention, and are not intended to limit the specific implementation scope of the present invention. The scope of the present invention includes but is not limited to the specific implementation modes, and all equivalent changes made according to the present invention are within the protection scope of the present invention.
Claims
1. A waveform shaper optimization method, characterized in that: For screening the waveform shaper and the applied load in the Hopkinson bar test system, the waveform shaper optimization method comprises the following steps: S1: Establishing a three-dimensional model of a Hopkinson bar system, and obtaining a model file and a command record file, wherein the three-dimensional model of the Hopkinson bar system includes an impactor, an incident bar of the Hopkinson bar, and a waveform shaper disposed at one end of the incident bar close to the impactor; S2: Based on the command record file, a waveform shaper parameter generation model is set, wherein the waveform shaper parameter generation model includes a model parameter setting command, a model calculation command, and a model calculation result reading and saving command; S3: Based on the waveform shaper parameter generation model, several parameter combinations of the waveform shaper are set, wherein the parameter combinations include different numerical combinations of three parameters: Young's modulus, yield strength, and load, and the results are calculated and output to obtain stress wave-time data under different parameter combinations as training data sets for subsequent machine learning models; S4: Based on the training data set, calculate the stress wave curve index and error to obtain a regular data set file; S5: Construct a waveform shaper optimization model, use a regular data set file, train and test, fit the multivariate nonlinear relationship between the waveform shaper parameters and the stress wave waveform, and obtain the final waveform shaper optimization model.
2. The waveform shaper optimization method according to claim 1, characterized in that: In step S1, the processing method for obtaining the model file and the command record file is based on the ABAQUS finite element simulation analysis software: S101: Create the components of the 3D model of the Hopkinson bar system in ABAQUS software, then set the grid, boundary conditions, and calculation parameters. After saving, the model file in mae format is automatically generated in the local directory of the computer; S102: Open the model file in mae format, set the Young's modulus, yield strength, and load of the waveform shaper, perform simulation calculations, save the calculation results, view the stress wave results in ABAQUS software, and save the data in csv format; S103: Generate a command record file in rpy format that automatically records the code corresponding to the operation in step S102.
3. The waveform shaper optimization method according to claim 2, characterized in that: In step S2, the waveform shaper parameter generation model includes two py format files, and the open model command, set parameter command, simulation calculation command, and save result command are written into the first py format file respectively, and the open result command and save data command are written into the second py format file respectively.
4. The waveform shaper optimization method according to claim 3, characterized in that: In step S3, the parameter combination is obtained by setting the value range, sampling interval and sampling number of the Young's modulus and yield strength of the waveform shaper and the load output by the loading device, and using the for function to set a triple loop according to the value range, sampling interval and sampling number of the three set parameters, and modifying one of the above three parameters in sequence in each cycle to obtain different parameter combinations.
5. The waveform shaper optimization method according to claim 4, characterized in that: The method for obtaining the training data set is: S301: Acquire different parameter combinations; S302: Start a loop, call the first py format file, modify the code line in the file corresponding to the setting parameters and the file name according to the parameters in the loop, and save the file; S303: calling ABAQUS software and transferring the first py format file to ABAQUS software, and then checking whether the simulation calculation is completed at a set time interval, and if so, executing step S304; S304: Call the second py format file, read the calculation result file, and save the stress wave data. After traversing all parameter combinations, the loop ends.
6. The waveform shaper optimization method according to claim 5, characterized in that: In step S4, the method for obtaining a regular data set file is: S401: extracting three parameters, namely, Young's modulus, yield strength and load output by a loading device, contained in the file name; S402: Calculate three waveform characteristics of curve amplitude, pulse width, and axis position corresponding to each parameter combination; S403: The three parameters and three waveform features are taken as a parameter set and saved in a local csv format file. Each parameter set represents a sample and has six data. The data set file is a matrix data containing all sample information.
7. The waveform shaper optimization method according to claim 6, characterized in that: In step S5, the method for constructing the waveform shaper optimization model is: S501: Select several algorithms, randomly extract several samples to test the algorithms, and obtain algorithms with beneficial performance as model algorithms; S502: constructing a waveform shaper optimization model based on the model algorithm, then setting hyperparameters, and performing hyperparameter optimization to obtain a final waveform shaper optimization model; S503: Packaging and encapsulating the final waveform shaper optimization model to obtain a portable model file.
8. The waveform shaper optimization method according to claim 7, characterized in that: In step S501, the model algorithm adopts the extreme gradient boosting regression algorithm, and the input parameters of the waveform shaper optimization model are: amplitude, pulse width, axis position, and the output parameters are: Young's modulus, yield strength of the waveform shaper and the load output by the loading device.
9. A method for testing a constant strain rate of a solid brittle material, implemented by using a waveform shaper selected by the waveform shaper optimization method according to any one of claims 1 to 8, characterized in that: The steps include: Step 1: Calculate the waveform shaper material: input the waveform characteristics into the waveform shaper optimization model to calculate the corresponding shaper material parameters; Step 2, test: prepare a waveform shaper according to the material parameters of the waveform shaper, and install it in a test device to test the dynamic mechanical response of the solid brittle material during loading; Step 3. Analyze the results: Calculate the incident wave based on the voltage signal of the Hopkinson bar, and then obtain the stress, strain, and strain rate of the sample. If the material strain rate is not constant, modify the loading stress wave and repeat the above steps until a constant strain rate is obtained.
10. The method for testing constant strain rate of solid brittle materials according to claim 9, characterized in that: In step 2, the material of the waveform shaper is copper, and the shape of the prepared copper waveform shaper is coin-shaped, and its Young's modulus and yield strength are obtained by the waveform shaper optimization model.
Citation Information
Patent Citations
Dynamic mechanical property testing device for amorphous alloy and method thereof
CN113484167A
