[Python code implementation] [XGBoost-Stress-Strain prediction] Mechanical property data of open-pore AlSi10Mg materials and open-pore AlSi10Mg-SiC composite materials with different pore diameters and strain rates

Welcome to this blog

Advantages of bloggers:Blog content should be as thoughtful and logical as possible for the convenience of readers.

Motto:He who travels a hundred miles is half as good as ninety.

The directory of this article is as follows:

Table of Contents

1 Overview

2 Operation results

3 References

4 Python code, data, articles


1 Overview

This data article describes the stress-strain curves, energy absorption, and energy absorption efficiency of open-cell AlSi10Mg materials and open-cell AlSi10Mg-SiC composite materials with different pore sizes and strain rates. Data were obtained with quasi-static compressive loading up to 001% strain at strain rates of 60.0 and 01.0 s in accordance with ISO 13,314:2011 standard. These data can be used to compare the effects of pore size and strain rate on the compressive properties of materials. These data are related to the research article entitled “Fabrication, experimental investigation and prediction of wear behavior of open-cell AlSi10Mg-SiC composites” (Kolev, M., Drenchev, L., and Petkov, V. (2023).

  • This data provides comprehensive information on the mechanical behavior of open-cell AlSi10Mg and AlSi10Mg-SiC materials with different pore sizes and strain rates that are under compression, including numerical data and stress-strain diagrams consisting of elastic regions, plastic plateaus and Tested porous materials consisting of densified areas that deformed up to 60%.

  • ?

    This data can be used to compare the effects of pore size and strain rate on material compressive properties such as compressive strength, plateau stress, plateau end stress, plateau end strain, energy absorption, and energy absorption efficiency.

  • ?

    Researchers and engineers interested in designing, optimizing, or evaluating open-cell metal matrix composites for various engineering applications such as aerospace, automotive, or biomedical devices can benefit from the data presented here.

  • ?

    By performing numerical simulations or analytical models based on experimental data, the reported data can be used/reused to further understand and/or develop the experiment.

  • ?

    Advanced data analysis techniques, such as machine learning or artificial intelligence methods, can also be applied to extract more features or patterns from the data.

  • This data set aims to provide comprehensive information on the compression properties of open-cell AlSi10Mg materials and open-cell AlSi10Mg-SiC composites with different pore sizes and strain rates. These composites are new porous metal composites with potential applications in high-strength and lightweight structures where high friction and wear resistance are required. This data set contains material stress-strain curves, energy absorption, and energy absorption efficiency properties derived from quasi-static compressive loading. This data set can be used to compare the effects of pore size and strain rate on the compressive behavior of a material and to validate numerical models or analytical formulas used to predict its response. This data set is related to our original research article [1] entitled “Fabrication, Experimental Investigation and Prediction of Wear Behavior of Open-Porous AlSi10Mg-SiC Composites”, in which we fabricated and characterized the composites.

2 Operation results

# Shadow effect objects with different transparency and smaller linewidth
pe1 = [patheffects.SimpleLineShadow(offset=(0.5,-0.5), alpha=0.4), patheffects.Normal()]

# create two subplots for the two multiplots
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(12, 6))

# Plot of the actual vs predicted stress-strain as a function of time for the first multiplot
ax1.scatter(X_test[:, 0], y_test,color='cyan',label='Actual test C', linewidth=1,alpha=0.9,zorder=1,path_effects=pe1)
ax1.scatter(X_test[:, 0], y_pred,color='orange',label='Predicted test C', linewidth=1,alpha=0.9,zorder=1,path_effects=pe1)
ax1.scatter(X_val[:, 0], y_val,color='green',label='Actual val C', linewidth=1,alpha=0.9,zorder=1,path_effects=pe1)
ax1.scatter(X_val[:, 0], y_val_pred,color='magenta',label='Predicted val C', linewidth=0.5,alpha=0.9,zorder=1,marker=' + ' ,path_effects=pe1)
ax1.scatter(X1_test[:, 0], y1_test,color='blue',label='Actual test SC', linewidth=1,alpha=0.9,zorder=1,path_effects=pe1)
ax1.scatter(X1_test[:, 0], y_pred1,color='red',label='Predicted test SC', linewidth=1,alpha=0.9,zorder=1,path_effects=pe1)
ax1.scatter(X1_val[:, 0], y1_val,color='yellow',label='Actual val SC', linewidth=1,alpha=0.9,zorder=1,path_effects=pe1)
ax1.scatter(X1_val[:, 0], y_val_pred1,color='black',label='Predicted val SC', linewidth=0.5,alpha=0.9,zorder=1,marker=' + ' ,path_effects=pe1)
ax1.set_xlabel('Stress, %', fontsize='15', fontweight='bold')
ax1.set_ylabel('Strain, MPa', fontsize='15', fontweight='bold')
ax1.legend(loc='lower right')

# Add title
ax1.set_title("Strain rate 0.01", fontsize='18', fontweight='bold')

# Add a legend with shadow and different font size
ax1.legend(shadow=True, prop={'size':'12'}, loc='upper left')
# Set the x axis limit to 60
ax1.set_xlim(0, 60) # use set_xlim instead of xlim
# Set the y axis limit to 60
ax1.set_ylim(0, 60) # use set_ylim instead of ylim
# Change the axes numbering size and font
ax1.tick_params(axis='both', which='major', labelsize=12, labelcolor='black')
ax1.grid() # add grid to the second subplot


# Plot of the actual vs predicted stress-strain as a function of time for the second multiplot
ax2.scatter(X2_test[:, 0], y2_test,color='cyan',label='Actual test C', linewidth=1,alpha=0.9,zorder=1,path_effects=pe1)
ax2.scatter(X2_test[:, 0], y_pred2,color='orange',label='Predicted test C', linewidth=1,alpha=0.9,zorder=1,path_effects=pe1)
ax2.scatter(X2_val[:, 0], y2_val,color='green',label='Actual val C', linewidth=1,alpha=0.9,zorder=1,path_effects=pe1)
ax2.scatter(X2_val[:, 0], y_val_pred2,color='magenta',label='Predicted val C', linewidth=0.5,alpha=0.9,zorder=1,marker=' + ' ,path_effects=pe1)
ax2.scatter(X3_test[:, 0], y3_test,color='blue',label='Actual test SC', linewidth=1,alpha=0.9,zorder=1,path_effects=pe1)
ax2.scatter(X3_test[:, 0], y_pred3,color='red',label='Predicted test SC', linewidth=1,alpha=0.9,zorder=1,path_effects=pe1)
ax2.scatter(X3_val[:, 0], y3_val,color='yellow',label='Actual val SC', linewidth=1,alpha=0.9,zorder=1,path_effects=pe1)
ax2.scatter(X3_val[:, 0], y_val_pred3,color='black',label='Predicted val SC', linewidth=0.5,alpha=0.9,zorder=1,marker=' + ' ,path_effects=pe1)
ax2.set_xlabel('Stress, %', fontsize='15', fontweight='bold')
ax2.set_ylabel('Strain, MPa', fontsize='15', fontweight='bold')


# Add title
ax2.set_title("Strain rate 0.001",fontsize='18', fontweight='bold')

# Add a legend with shadow and different font size
ax2.legend(shadow=True, prop={'size':'12'}, loc='upper left')
# Set the x axis limit to 60
ax2.set_xlim(0, 60) # use set_xlim instead of xlim
# Set the y axis limit to 60
ax2.set_ylim(0, 60) # use set_ylim instead of ylim
# Change the axes numbering size and font
ax2.tick_params(axis='both', which='major', labelsize=12, labelcolor='black')
ax2.grid() # add grid to the second subplot

fig.show()
# Save the plot with dpi=500 in 'png'
fig.savefig('results/pred_stress-strain_c_multi.png', dpi=500)

Part of the code:

# create a DataFrame from the variables for each dataset
df1 = pd.DataFrame({"Actual test": y_test, "Predicted test": y_pred, "Actual val": y_val, "Predicted val": y_val_pred})
df2 = pd.DataFrame({"Actual test": y1_test, "Predicted test": y_pred1, "Actual val": y1_val, "Predicted val": y_val_pred1})
df3 = pd.DataFrame({"Actual test": y2_test, "Predicted test": y_pred2, "Actual val": y2_val, "Predicted val": y_val_pred2})
df4 = pd.DataFrame({"Actual test": y3_test, "Predicted test": y_pred3, "Actual val": y3_val, "Predicted val": y_val_pred3})

# save the DataFrames to an Excel file with different sheets
with pd.ExcelWriter("results/pred_stress-strain_multi.xlsx") as writer:
 df1.to_excel(writer, sheet_name="C_0.01", index=False)
 df2.to_excel(writer, sheet_name="SC_0.01", index=False)
 df3.to_excel(writer, sheet_name="C_0.001", index=False)
 df4.to_excel(writer, sheet_name="SC_0.001", index=False)


#Descriptive statistics


# create a DataFrame from the descriptive statistics for each dataset
df1_stats = df1.describe()
df2_stats = df2.describe()
df3_stats = df3.describe()
df4_stats = df4.describe()

# rename the labels of the rows
df1_stats = df1_stats.rename(index={'50%': 'median'})
df2_stats = df2_stats.rename(index={'50%': 'median'})
df3_stats = df3_stats.rename(index={'50%': 'median'})
df4_stats = df4_stats.rename(index={'50%': 'median'})


# select only the standard deviation, mean, median, minimum, and maximum from each DataFrame
df1_stats = df1_stats.loc[['std', 'mean', 'median', 'min', 'max']]
df2_stats = df2_stats.loc[['std', 'mean', 'median', 'min', 'max']]
df3_stats = df3_stats.loc[['std', 'mean', 'median', 'min', 'max']]
df4_stats = df4_stats.loc[['std', 'mean', 'median', 'min', 'max']]

# print the selected statistics for each DataFrame
print("Statistics for C_0.01_stress-strain_data.xlsx")
print(df1_stats)
print("Statistics for SC_0.01_stress-strain_data.xlsx")
print(df2_stats)
print("Statistics for C_0.001_stress-strain_data.xlsx")
print(df3_stats)
print("Statistics for SC_0.001_stress-strain_data.xlsx")
print(df4_stats)

# save the DataFrames to an Excel file with different sheets
with pd.ExcelWriter("results/statistics_stress-strain.xlsx") as writer:
 df1_stats.to_excel(writer, sheet_name="C_0.01", index=True) # use index=True to write the row names
 df2_stats.to_excel(writer, sheet_name="SC_0.01", index=True) # use index=True to write the row names
 df3_stats.to_excel(writer, sheet_name="C_0.001", index=True) # use index=True to write the row names
 df4_stats.to_excel(writer, sheet_name="SC_0.001", index=True) # use index=True to write the row names

3 References

Some content in the article is quoted from the Internet, and the source will be indicated or cited as a reference. It is inevitable that there will be some unfinished information. If there is anything inappropriate, please feel free to contact us to delete it.

4 Python code, data, articles