Next Article in Journal
Testing Low-Density Polyethylene Membranes for Lithium Isotope Electromigration System
Previous Article in Journal
Fibrous Microplastics Release from Textile Production Phases: A Brief Review of Current Challenges and Applied Research Directions
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Predicting the Compressive Properties of Carbon Foam Using Artificial Neural Networks

by
Debela N. Gurmu
1,2,
Krzysztof Wacławiak
1 and
Hirpa G. Lemu
2,*
1
Faculty of Materials Engineering, Silesian University of Technology, 40-019 Katowice, Poland
2
Faculty of Science and Technology, University of Stavanger, N-4306 Stavanger, Norway
*
Author to whom correspondence should be addressed.
Materials 2025, 18(11), 2516; https://doi.org/10.3390/ma18112516
Submission received: 15 April 2025 / Revised: 19 May 2025 / Accepted: 21 May 2025 / Published: 27 May 2025
(This article belongs to the Section Materials Simulation and Design)

Abstract

:
This article focusses on predicting the compressive properties of polyurethane-derived carbon foam using an artificial neural network (ANN) approach. To train the model, strain, pore density (20, 40, and 60 ppi), and solvents (acetone, ethanol, and methanol) were used as inputs, while compressive stress was used as output. Categorical variables like acetone, ethanol, and methanol were converted to binary form before training the ANN model by using one-hot encoding mechanism. Both inputs and outputs were normalized to prevent features with larger numerical ranges from dominating the training process. A feed-forward ANN with four hidden layers, each containing 100 neurons, was constructed. The performance of the ANN model was tested using three metrics: mean square error (MSE), mean absolute error (MAE), and coefficient of determination (R2). The Adam optimizer was used to optimize the weights and biases of the ANN. The model was trained for 10,000 epochs with a batch size of 50. Rectified Linear Unit (ReLU) and linear functions were used as activation functions for the hidden layers and the output layer, respectively. From the results, overall average MSE, MAE, RMSE, and R2 values of 36.34, 4.42, 6.00, and 0.9797, respectively, were obtained.

1. Introduction

Carbon materials can be designed into different dimensions, including carbon quantum dots, carbon nanotubes, graphene, carbon fiber, and foam-structured carbon materials [1]. Among these, carbon foams (CFs) have received the greatest attention due to their lightweight, controllable thermal conductivity, high specific strength, high-temperature tolerance (up to 3000 °C in inert atmosphere), abundant source, and low cost [2,3]. Carbon foam is mainly synthesized from polymer precursors like polyurethane and melamine foams, mesophase pitch, and coal tar pitch [4]. Due to its excellent electrical and thermal properties, CF has applications in various fields, including energy storage, thermal insulation, and lightweight structural components, making it a versatile material for three-dimensional structural applications [5,6].
Researchers have used many methods to investigate the properties of cellular solids. Most of the models available in the literature are either micro-mechanical or use complex mathematical relationships to predict the behavior of cellular solids. For instance, the Gibson model is a commonly used model based on a micro-mechanical model (cubic array unit cell), where deformation is controlled by bending of individual struts [7], while the Avalle model is based on macro-mechanical parameters [8]. The micro-mechanical analysis focuses on individual cells and struts, and it requires detailed knowledge of cell geometry, cell topology, and material properties. However, this model could be quite complex to manage because of its need for at least a rough analysis of the foam structure [9].
Additionally, the micro-mechanical model assumes that the cellular solid is a regular array of cells like cube [10], truncated cube [11], rhombic dodecahedron [12], diamond unit cells [13], and tetrakaidekahedral/kelvin unit cell [14]. It has been pointed out that micro-mechanics/unit cell-based models can provide important results; however, they are significantly limited by their inability to account for inherent microstructural imperfections like irregular cell shape and size, thickness variation in cell walls, non-uniform solid distribution in cell walls, and curved/corrugated cell walls which are common in most real cellular materials, whose cell structures are in practice non-periodic, non-uniform, and disordered [15]. In contrast, the macro-mechanical model focuses on the bulk behavior of the material and is simpler, with fewer computational resources needed. Additionally, the macro-mechanical model does not require the micro-structural features of the foam to be modeled. However, this modeling technique is difficult to employ when investigating the effect of micro-structural features on the foam’s overall behavior [16].
Both micro-mechanical and macro-mechanical models can be analyzed using either Euler–Bernoulli or Timoshenko beam theory [17]. While Euler–Bernoulli beam theory ignores the effect of shear deformation, Timoshenko beam theory takes shear deformation and rotational inertia effects into account in addition to Euler–Bernoulli beam theory, which only considers the effect of bending, twisting, and axial deformation [13,18]. In order to consider the effect of micro-structural imperfections, researchers currently employ an imaged-based analysis model (micro-tomography scan) that captures the real structure of cellular solids like local density, cell size, shape distribution, and cell wall thicknesses [19]. It provides geometries much closer to the real foam structure and has advantages including high resolution, three-dimensional imaging, and multiscale imaging from nanoscale to microscale. In contrast, this method is difficult to employ in geometry optimization as it cannot avoid artifacts, and not all materials are suitable for computed tomography scan (CT scan) [20].
Other models used to predict the properties of cellular solids are phenomenological models like the Rusch model, which only needs simple fitting of experimental data to understand mechanical behavior without direct relationship with the physics of the phenomenon [21]. However, this approach does not consider the effect of density at all, and it does not provide an explanation for the micro-structural deformation and failure mechanisms of the foam material, such as its weak spots, stress concentrations, and localized deformations. Furthermore, this model cannot describe the stress–strain relationship at high strain rates (105 s−1) or under explosive loading, and the densification region fits poorly at a relatively high density (low void porosity) [22].
One of the most practical ways to address this issue is to employ finite element analysis (FEA), which is a powerful tool to simulate the mechanical properties of cellular materials. This is because FEA approaches are widely used for simulating the mechanical behavior of cellular materials due to their exceptional flexibility in modeling complex material and structural behaviors [23]. However, the high cost of numerical analysis tools also presents other challenges in using this method. For this reason, researchers propose artificial neural networks (ANNs), which promise new methods with low cost and high accuracy to predict the properties of any structure and material regardless of its shape and structure.
ANNs are one of the most popular algorithms of machine learning algorithms and are widely used tools in various research disciplines [24,25]. They can accurately predict complex non-linear relationships between input and output of the system without the need for explicit model equations [26]. In addition, an ANN is considered as an effective alternative to traditional statistical techniques for function approximation and data fitting since it does not need a hypothetical premise concerning the mathematical models [27]. In the field of cellular solids, ANNs have become highly effective tools for modeling, optimizing, and predicting material properties. Lightweight materials such as carbon foam are characterized by their cellular structures and display complex mechanical and thermal behaviors due to their intricate microarchitecture. Using ANNs, researchers have estimated key properties such as the thermal analysis of a heat exchanger [28,29], mechanical properties [30], thermal conductivity [31], energy consumption [32], and energy absorption [33,34] based on material geometry and composition. Additionally, an ANN supports inverse design, facilitating the development of cellular structures tailored to specific needs. This integration of material science and computational intelligence has significantly advanced the creation of cutting-edge cellular materials for applications in aerospace, biomedical, and automotive fields [35].
Traditional approaches, such as support vector regression (SVR), Gaussian process regression (GPR), and other empirical models, often fail to capture the complex and non-linear relationships that govern the behavior of cellular solids like carbon foam. The most common challenges of these come from complex multi-effect interaction and non-linear damage/failure mechanisms of cellular solids (especially brittle foam such as carbon foam). These non-linear damage/failure mechanisms of cellular solids mainly result from progressive cell wall collapse [36,37]. These difficulties limit the application of SVR, GPR, and other empirical models to easily predict the properties of cellular solids like in the case of convectional materials. This challenge motivates researchers to find alternative methods that can easily predict the mechanical properties of cellular solids without knowing the complex and non-linear multi-scale interaction among cellular solids as well as the damage mechanisms. One of the most promising and interesting approaches proposed by researchers is data-driven methods such as ANNs, which have become important tools for studying multiscale materials, estimating the mechanical responses of materials based on the characteristic information of materials, and assisting in material design [38]. ANNs are particularly useful in modeling non-linear problems, where analytical solutions are rather complex [39]. Furthermore, with the advancements in computer hardware, machine learning has evolved into a data-driven tool capable of deciphering any non-linear relationships within the data. This offers a new avenue for exploring the intricate relationships between complex structures of cellular solids and their mechanical responses [40]. As shown in the summary of review of relevant articles shown in Table 1, ANNs are the most used tools in the area.
The observation from the reviewed and listed articles indicates that there are no research works that used the effect of pore density and solvents at the same time. Additionally, a research gap in applying the ANN method to highly non-linear and brittle cellular solids is observed. Furthermore, most reported articles used metallic foam and cement foam rather than carbon foam. Thus, the aim of this article was to predict the compressive properties of polyurethane-derived carbon foam to investigate the effect of pore density and solvents using artificial neural networks.

2. Materials and Methods

2.1. Materials

In the study reported in this article, carbon foam derived from polyurethane foam was used. Pore density and solvents are two main factors that were varied in the research. Both the pore density and the solvent have three levels. Initially, polyurethane foam with different pore sizes (20, 40, and 60 ppi) was selected as the precursor and then immersed in a dilution of phenol-formaldehyde resin with different solvents (acetone, ethanol, and methanol). The purpose of adding solvents into phenol-formaldehyde is to reduce the viscosity of phenol-formaldehyde resin. This is because a higher viscosity of phenol-formaldehydes results in a closed wall carbon foam and higher non-uniform strut thickness. The purpose of covering foam with this mixture is to maintain the stability of pore size and shape, before and after carbonization process. The polyurethane foam was then dried at 69 °C for 4 h in a dryer and the samples were carbonized in the furnace at 1000 °C. Lastly, the samples with 96% carbon content in their chemical compositions with different pore sizes (Figure 1) were obtained and prepared for the uniaxial quasi-static compression test with steps shown in Figure 2. A uniaxial compression test was performed on a Zwick Roel universal testing machine (ZwickRoell GmbH & Co. KG, Ulm, Baden-Württemberg, Germany) of 2.5 kN at room temperature with a loading rate of 5 mm/min. The sample preparation and the stress–strain result for carbon foam with different pore density and different solvent was presented in a previously published paper [55].

2.2. Artificial Neural Networks

ANNs are among the best methods employed in ML and used to process complex and non-linear data [56]. Additionally, an ANN is a mathematical tool inspired by the biological human nervous system [57] and it is composed of input, hidden, and output layers, and neurons, weights, and biases [58]. The input layer handles the collection of input variables, while the hidden layer functions as the central processing unit of the system. The output layer handles the system’s output [59]. Weights are the parameters that adjust the strength of the connection between neurons in different layers of the network, while biases provide flexibility to the model by allowing neurons to adjust independently of their input. The flowchart shown in Figure 3a illustrates the process used to develop and optimize the ANN models in this article. It starts with the identification of the problem, followed by the preparation of data, which includes the normalization of inputs and outputs and the division of data into test, training, and validation sets. Then, the model is trained, and the best results are selected. The process stops when the performance of the ANN is satisfactory; otherwise, the dataset is improved and the process repeats. This iterative approach ensures that the model is refined for optimal accuracy and reliability.
In this study, a feed-forwarded ANN was developed to predict the compressive stress values of carbon foam based on input parameters, including pore density, solvents, and strain. These data were obtained from a quasi-static compression test of polyurethane-derived carbon foam. The ANN model consisted of an input layer followed by hidden layers that learn complex relationships within the data, and an output layer that provides the predicted compressive stress. Each neuron in the hidden layers applies the ReLU activation function (Figure 3b) to introduce non-linearity and enhance learning capability, while the output layer uses a linear activation function to generate continuous compressive stress values. The network was trained using backpropagation, with the Adam optimization algorithm to minimize the MSE loss function. The dataset was randomly divided into training, validation, and testing sets to ensure the model generalizes well to unseen data. The model performance was evaluated using metrics such MSE, MAE, RMSE, and R2 to assess prediction accuracy. The details of the way the ANN was built is discussed in Section 2.2.1, Section 2.2.2, Section 2.2.3 and Section 2.2.4.

2.2.1. Preparing the Training, Testing, and Validation Datasets

In this study, 22,074 data were used for training, testing and validation, which were obtained from quasistatic compression tests of polyurethane-derived carbon foam. The data were divided randomly into 70% (15,454) for training, 15% (3310) for testing, and 15% (3310) for validation. The purpose of adding a testing and validation dataset is to overcome the over-fitting problem [60], while the training process is the adjustment of weights and biases to obtain output data through applying a proper method [61]. The validation set was used to adjust the hyperparameters (epochs, learning rate, number of hidden neurons in a neural network). The validation subset was used to further check the network, confirm its accuracy, or assess its capability to predict unknown cases. The test set was used to assess the (generalization) performance of the neural network. During the random splitting of data into training, testing, and validation datasets, attention was given to avoid the imbalance across datasets because an imbalanced split of data affects model training and evaluation reliability. For instance, in our case, there were 1014, 1173, and 1123 data for 20, 40, and 60 ppi in testing datasets, respectively. Even though this difference is small compared to the size of our data, it was arranged manually to avoid the effect of data imbalance. Additionally, to prevent overriding between different numerical scales and premature saturation of hidden nodes, as well as to reduce the risk of having larger errors, the normalization of input and output data was performed using Equation (1) [62].
Normalization   ( N ) = X X m i n X m a x X m i n
where N, X, Xmin, and Xmax are the normalized values, the serial number of the dataset, and the minimum and maximum values in the data samples, respectively.

2.2.2. Construction of the ANN Model

Before constructing the ANN model, the number of hidden layers, activation functions, learning rate, number of neurons per layer (especially in hidden layers), and architecture of the ANN are the main parameters of a neural network that require attention and must be defined before starting the training [63]. Nevertheless, there are no clear theories and methods used to decide these parameters. Evaluating the number of hidden layers and the number of neurons in each hidden layer is the most challenging task in developing the ANN model. For this reason, the number of neurons in hidden layers can only be found by trial and error. In this article, one input layer with 5 neurons, four hidden layers with 100 neurons each, and one output layer with one neuron were selected. The choice of the number of hidden layers and the number of neurons in each hidden layer was initially inspired by a previously published paper [64].
Furthermore, to give a better justification for fixing the number of hidden layers as well as the number of neurons in the hidden layers, a grid search approach was used to optimize the architecture of the ANNs. Accordingly, the optimal number of hidden layers was selected from 1, 2, 3, and 4 (where a higher number of hidden layers was found to be computationally expensive). In contrast, the number of neurons in hidden layers was varied from 25 up to 200 (with step size 25). The number of epochs was varied from 100, 1000, and 10,000, and the performance of the ANNs model was compared for each combination of number of hidden layers, number of neurons in each hidden layer and the number of epochs by recording the MAE, MSE, and R2 values. The recorded MAE, MSE, and coefficient of determination (R2) for comparison are shown in Table 2.
As can be observed from the values in this table, the lower values of MSE and MAE and higher value of R2 are seen in higher epochs (10,000) regardless of the selected hidden layer. In contrast, the higher values of MSE and MAE and lower value of R2 are observed in lower epochs (100). These results show that the ANN model with 1000 epochs predicts more accurately than that with 100 epochs. Even though 10,000 epochs gives accurate results, selecting the number of hidden layers and number of neurons in each hidden layer at 10,000 epochs was obtained from a grid search. As the number of hidden layers was increased from 1 to 4 with a constant 10,000 epochs, MSE and MAE decreased, while R2 increased regardless of the number of neurons in the hidden layer (Table 2), and the optimal result (lower MAE and MSE, and higher R2) was observed in the case with 4 hidden layers. The next step was to compare the MAE, MSE, and R2 of the ANN model with 4 hidden layers and 10,000 epochs by varying the number of neurons in the hidden layers from 25 up to 200 (step size = 25). The variation in MAE and MSE across the number of neurons in hidden layers is shown in Figure 4. Based on the data in the figure, the ANN model with 4 hidden layers and 100 neurons in each hidden layer was selected as the best ANN architecture.
The input parameters include strain, three pore density values (20, 40, and 60 ppi), and 3 solvents (acetone, ethanol, and methanol). Each solvent was used as separate input because categorical variables like ethanol, methanol, and acetone must be converted to binary form before training the ANN model. This method, known as one-hot encoding, transforms each category into a unique binary vector, allowing the ANN to interpret categorical data appropriately. Furthermore, the solvents were treated as categorical variables while the pore density contained numerical features. In this article, a multilayer perceptron neural network (MLPNN) model (Figure 5) was selected because the architecture provides universal approximators [65].
Another important step in building an ANN is the choice of activation function, which depends on the problem and the network architecture [66]. A transfer function, or activation function, is a mathematical representation that is applied to the weights between layers, translating the input signals to the output signals [67]. Nowadays, the commonly used activation functions are sigmoid, SoftMax, tanh, ReLU, Leaky ReLU, and binary step [68]. Figure A1 in Appendix A shows various plots of typical activation functions. Among these, ReLU is currently the most used and appropriate for hidden layers of deep networks due to its computational efficiency, ability to address the vanishing gradient problem, and effectiveness in capturing complex global patterns, and in practice it converges six times faster than tanh and sigmoid [69]. For this reason, ReLU and linear activation function were selected for the hidden layers and the output layer and evaluated using Equations (2) and (3), respectively.
R e L U x = max 0 , x                             i f   x 0 ,   R e L U x = x ,   i f   x < 0 ,   R e L U x = 0
f x = x                                                                                         f o r   a l l   x ,   f x = x
The Adam optimizer with a default learning rate (0.001), 10,000 epochs, and batch size of 50 was used to train the model. The Adam optimizer is a widely used optimization algorithm for training neural networks and has advantages such as fast convergence and good adaptation to local minima issue [70]. Additionally, the Adam optimizer is known for its speed and stability, making it suitable for optimization problems with large datasets and high-dimensional spaces [71]. This optimizer updates parameters (weights and bias) by using Equations (4)–(9) [72]. On the other hand, the Keras neural network framework written in Python 3.13.1 was utilized to build and train the ANNs [73]. General steps for Keras tensor flow is shown in Figure 6.
Gradient   of   the   loss   function                                                               g t = θ f ( θ t )
Update   biased   moment   estimates         m t = β 1 m t 1 + 1 β 1 g t
Update   biased   moment   estimates   v t = β 2 v t 1 + 1 β 2 g t 2
Bias   correction   m t ^ = m t 1 β 1 t
Bias   correction   v t ^ = v t ^ 1 β 2 t
Parameter   update                                                                                             ( θ t + 1 ) = θ t η v t ^ + ϵ   m t ^
where  v t  is the exponential moving average of the gradient,  g t  is the first derivative for loss function (the gradient),  η  is learning rate,  θ  is parameters to optimize, and  m t ^  and  v t ^  are correction biases for  m t  and  v t , respectively. β1 and β2 are their exponential decay rate, and  ϵ  is a very small constant to avoid the denominator being zero (usually 10−8). The default values for β1 and β2 are 0.9 and 0.999, respectively.

2.2.3. Evaluation of ANN Model Performance

The performance of the ANN is evaluated and compared using several criteria, including MAE, RMSE, MSE, R2, and relative error between actual and predicted value [30,66], where the parameter R2 score explains the prediction strength against experimental observations in terms of a quantity ranging from 0 to 1. These parameters can be calculated as follows (Equations (10)–(14)):
Mean   absolute   error = 1 n i = 1 n Y p r e d i c t e d Y a c t u a l
Mean   Squared   Error = 1 n i = 1 n Y p r e d i c t e d Y a c t u a l 2
Root   Mean   Squared   Error = 1 n i = 1 n Y p r e d i c t e d Y a c t u a l 2
Coefficient   of   Determination = 1 Y p r e d i c t e d Y a c t u a l 2 i = 1 n Y p r e d i c t e d Y a c t u a l 2
Relative   error   ( % ) = Y p r e d i c t e d Y a c t u a l Y a c t u a l × 100

2.2.4. Weight and Bias of the ANN Model

The weight and bias in the ANN are critical components that significantly influence the model’s performance and learning efficiency. The proper initialization and management of these parameters can enhance convergence speed and generalization capabilities [74]. In this article, the weight and bias were initialized by using default Keras and can be calculated by using the following equations.
From input to first hidden layer,
z [ 1 ] = W [ 1 ] x + b [ 1 ] ,   A i = R e L U W [ 1 ] x + b [ 1 ] = max 0 , W [ 1 ] x + b [ 1 ]
From the first hidden layer to the 2nd hidden layer,
z [ 2 ] = W [ 2 ] A + b [ 2 ] ,   B i = R e L U W [ 2 ] A + b [ 2 ] = max 0 , W [ 2 ] A + b [ 2 ]
From the 2nd hidden layer to the 3rd hidden layer,
z [ 3 ] = W [ 3 ] B + b [ 3 ] ,   C i = R e L U W [ 3 ] B + b [ 3 ] = max 0 , W [ 3 ] B + b [ 3 ]
From the 3rd hidden layer to the 4th hidden layer,
z [ 4 ] = W [ 4 ] C + b [ 4 ] ,   D i = R e L U W [ 4 ] C + b [ 4 ] = max 0 , W [ 4 ] C + b [ 4 ]
From the 4th hidden layer to the output layer,
z [ 5 ] = W [ 5 ] D + b [ 5 ] ,   O = l i n e a r W [ 5 ] D + b [ 5 ] = W [ 5 ] D + b [ 5 ]
where  x = X 1 , X 2 , X 3 , X 4 , X 5 T , A i = A 1 , A 2 A 100 T , B i = B 1 , B 2 B 100 T ,   C i = C 1 , C 2 C 100 T , D i = D 1 , D 2 D 100 T   a n d   O = O , and  W 1 R 100 × 5 , W 2 R 100 × 100 , W 3 R 100 × 100 , W 4 R 100 × 100 ,   a n d   W [ 5 ] R 1 × 100  is the weight matrix connecting the 5 input neurons to the 100 neurons in the first hidden layer, the weight matrix connecting the 100 neurons in the first hidden layer to the 100 neurons in the second hidden layer, weight matrix connecting the 100 neurons in the second hidden layer to the 100 neurons in the third hidden layer, the weight matrix connecting the 100 neurons in the third hidden layer to the 100 neurons in the fourth hidden layer, and the weight matrix connecting the 100 neurons in the fourth hidden layer to the output neuron, respectively. Additionally,  b [ 1 ] , b [ 2 ] , b [ 3 ] , b [ 4 ] ,   a n d   b [ 5 ]  are the bias vector for the first, second, third, and fourth hidden layers and output layer, respectively. Generally, the hyperparameters used in this article are shown in Table 3.

3. Discussion of Results

The performance of the ANN during training over epochs, which was evaluated using R2, MSE, MAE, and RMSE for training, validation, and testing is shown in Figure 7. The R2 for training, validation, and test datasets are increased as the number of epochs increased from 0 to 500 (Figure 7a), whereas MSE, MAE, and RMSE decreased as the number of epochs increased from 0 to 500 (Figure 7b–d). This graph shows that the performance of the ANN is showing rapid improvement. A possible reason for this variation is due to the first epochs, the model parameters (weights and biases) are initialized randomly and are far from their optimal values. Additionally, in the early epochs, the gradients computed during backpropagation are relatively large because the model’s predictions are significantly different from the actual outputs. In contrast, as the number of epochs further increases and approaches 10,000 epochs, no significant changes in R2, MSE, MAE, and RMSE are observed (Figure 8a–d). The lack of significant changes in R2, MSE, MAE, and RMSE at higher epochs shows that the model has reached a state of convergence, where further training no longer provides meaningful improvements in performance. Additionally, model parameters (weights and biases) are no longer undergoing significant updates as the number of epochs increased above 10,000 epochs. Furthermore, the variation in R2, MAE, MSE, and RMSE for training, validation, and testing for all epochs are summarized in Table 4.
Figure 9 shows the linear regression of actual (experimental) and predicted (ANN) values of compressive stress of carbon foam for various datasets (testing, training, and validation). The result shows that the R2 is close to 1 (0.9806, 0.9785, 0.9801, and 0.9797 for training, validation, testing, and average, respectively) for all datasets. This higher value of R2 in the linear regression (as shown by the blue trend lines in Figure 9) proves that the existence of a strong connection between the expected values and the observed experimental output. Additionally, the higher R2 values show excellent model performance with minimal variance across datasets, reflecting the strong predictive capability and generalization of the ANN. On the other hand, these results suggest that the ANN architecture (e.g., number of layers and neurons, activation functions) is well-suited for the problem.
As shown in Figure 10, the average residual for training, validation, testing, and average datasets is 0.4484, 0.4999, 0.4923, and 0.4627, respectively. Residual values were calculated as the difference between the predicted and experimental (measured) data values for each data record in the entire dataset [75]. Moreover, from these figures, the residuals are spread evenly around the line y = 0 (as shown by the blue lines) without showing any visible pattern. This suggests that the ANN model is appropriately fit to the data structure without significant bias or variance issues.
Additionally, Figure 11 shows the direct comparison of experimental (actual) and ANN predicted compressive stress values for 200 data indexes for training, testing, and validation datasets. From this result, the experimental compressive stress values are almost the same as the ANN-predicted values with only small relative errors. This further supports that the BP neural network model has a high accuracy for predicting the compressive strength of carbon foam.
The relative error (difference between predicted and true values, divided by the true value) plot for testing, training and validation datasets versus data index are shown in Figure 12. For all datasets (testing, training, and validation), the relative errors are tightly centered around the red dotted line (zero error line). This indicates that ANN model prediction is close to experimental values. The errors are spread evenly across the indices for all datasets, with no systematic pattern (e.g., increasing or decreasing trends). This suggests that the model has well captured the underlying relationships in the data. As shown in Figure 12, the relative errors lay in the range ±2.5%. Among these, most relative errors lay in the range of ±0.5%. Higher relative errors (e.g., greater than ±0.5%) could result from noise or anomalies in the data, and limitations in the model’s ability to capture certain complex patterns. On the other hand, the similar error behavior across testing, training, and validation datasets highlights the ANN’s strong generalization ability.
Additionally, the variation in the absolute relative error (ARE) at five different levels is shown in Figure 13. The range of absolute relative errors lies within 0 to |2|%. These levels include (i) 0% ≤ ARE < 0.25%, (ii) 0.25% ≤ ARE < 0.5%, (iii) 0.5% ≤ ARE < 0.75%, (iv) 0.75% ≤ ARE < 1%, and (v) ARE > 1%. For the validation datasets around 80.2% (2655 data), 17.5% (579 data), 1.5% (50 data), 0.45% (15 data), and 0.36% (12 data), the absolute relative error is 0% ≤ ARE < 0.25%, 0.25% ≤ ARE < 0.5%, 0.5% ≤ ARE < 0.75%, 0.75 ≤ ARE < 1%, and ARE > 1%, respectively. For the test datasets, 81.4% (2694 data), 16.3% (540 data), 1.5% (50 data), 0.45% (15 data), and 0.39% (13 data) have an absolute relative error of 0% ≤ ARE < 0.25%, 0.25% ≤ ARE < 0.5%, 0.5% ≤ ARE < 0.75%, 0.75% ≤ ARE < 1%, and ARE > 1%, respectively. Lastly, for the training datasets, 82.1% (12,689 data), 15.9% (2458 data), 1.3% (201 data), 0.4% (62 data) and 0.32% (49 data) have an absolute relative error of 0% ≤ ARE < 0.25%, 0.25% ≤ ARE < 0.5%, 0.5% ≤ ARE < 0.75%, 0.75% ≤ ARE < 1%, and ARE > 1%, respectively.
As shown in Table 5, the maximum ARE for the training, validation, and testing datasets is 1.95, 1.96, and 1.77, respectively. Conversely, the minimum error is 5.31 × 10−6, 6.18 × 10−6, and 0 for the training, validation, and testing datasets, respectively. The mean of the error is 8.16 × 10−2, 8.8 × 10−2, and 8.56 × 10−2 for the training, validation, and testing datasets, respectively. This result indicates that on average, the ANN-predicted values deviated by 8.16%, 8.8%, and 8.56% the from experimental values, respectively. Next, from the standard deviation values of the training, validation and testing datasets, the ANN-predicted compressive stress values deviated from the experimental values by 11.3, 12.2, and 12.1%, respectively. Finally, from the 95% CI, the results in this study show that the true mean error for the training, validation, and testing datasets lies in the range of 7.98 to 8.34%, 8.39 to 9.22%, and 8.17 to 9%, respectively. The lower range between the upper and lower 95% (0.0036 in the training, 0.0083 in the validation, and 0.0083 in the testing) in training, validation, and testing indicates a consistent ANN model performance and a sufficient sample size.

4. Conclusions

In this study, an ANN model was developed to predict the compressive properties of carbon foam based on various input parameters. The model was trained on historical data, and using multiple hidden layers and neurons, so that the ANN can capture complex relationships between the input features and the compressive stress values of the carbon foam. The network utilized the ReLU activation function in the hidden layers, which helped the model efficiently learn and represent non-linear relationships, while the output layer used a linear activation function to predict the continuous compressive strength values.
The results indicated that the ANN model has the potential to provide accurate predictions of compressive strength, offering valuable insights for the material design and optimization of carbon foams in industrial applications. The model can be further refined and tested on larger datasets to improve its generalization capability and predictive accuracy. By utilizing ANN-based modeling, significant improvements in the efficiency and cost-effectiveness of producing carbon foam materials can be achieved, potentially accelerating advancements in industries such as aerospace, automotive, and energy storage. Future work could explore the integration of additional features or the application of different ANN architectures, such as alternative deep learning models, to further enhance the prediction accuracy. Additionally, real-world data validation and testing will be essential to confirm the practical applicability of the model in predicting compressive strength under varying conditions and manufacturing processes.

Author Contributions

Conceptualization: D.N.G. and K.W.; Data curation: D.N.G.; Formal analysis: D.N.G.; Funding acquisition: K.W.; Investigation: D.N.G.; Methodology: D.N.G. and K.W.; Project administration: K.W.; Resources: K.W. and H.G.L.; Software: D.N.G. and K.W.; Supervision: K.W. and H.G.L.; Validation: K.W. and H.G.L.; Visualization: K.W. and H.G.L.; Writing—original draft: D.N.G.; and Writing—review and editing: H.G.L. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The raw data supporting the conclusions of this article will be made available by the authors on request.

Acknowledgments

The authors would like to acknowledge the contributions by Jerzy Myalsky from Silesian University of Technology for manufacturing the studied specimens and for consulting on this research. The publication fee support provided by University of Stavanger is also acknowledged.

Conflicts of Interest

The authors declare no conflicts of interest.

Appendix A

Figure A1. Types of activation functions.
Figure A1. Types of activation functions.
Materials 18 02516 g0a1

References

  1. Liu, H.; Yang, Y.; Tian, N.; You, C.; Yang, Y. Foam-Structured Carbon Materials and Composites for Electromagnetic Interference Shielding: Design Principles and Structural Evolution. Carbon 2024, 217, 118608. [Google Scholar] [CrossRef]
  2. Fan, R.; Zheng, N.; Sun, Z. Enhanced Photothermal Conversion Capability of Melamine Foam-Derived Carbon Foam-Based Form-Stable Phase Change Composites. Energy Convers. Manag. 2022, 263, 115693. [Google Scholar] [CrossRef]
  3. Li, H.; Wang, B.; Zhang, Y.; Li, Y.; Hu, M.; Xu, J.; Cao, S. Synthesis of Carbon Nanofibers from Carbon Foam Composites via Oxyacetylene Torch Ablation. Mater. Manuf. Process 2015, 30, 54–58. [Google Scholar] [CrossRef]
  4. Bagal, R.; Bahir, M.; Lenka, N.; Patro, T.U. Polymer Derived Porous Carbon Foam and Its Application in Bone Tissue Engineering: A Review. Int. J. Polym. Mater. Polym. Biomater. 2023, 72, 909–924. [Google Scholar] [CrossRef]
  5. Seo, S.W.; Kang, S.C.; Im, J.S. Synthesis and Formation Mechanism of Pitch-Based Carbon Foam for Three-Dimensional Structural Applications. Inorg. Chem. Commun. 2023, 156, 111285. [Google Scholar] [CrossRef]
  6. Narasimman, R.; Prabhakaran, K. Preparation of Carbon Foams with Enhanced Oxidation Resistance by Foaming Molten Sucrose Using a Boric Acid Blowing Agent. Carbon 2013, 55, 305–312. [Google Scholar] [CrossRef]
  7. Kornievsky, A.; Nasedkin, A. Numerical Investigation of Mechanical Properties of Foams Modeled by Regular Gibson–Ashby Lattices with Different Internal Structures. Materialia 2022, 26, 101563. [Google Scholar] [CrossRef]
  8. Iqbal, N.; Mubashar, A.; Ahmed, S.; Arif, N.; Din, E.-U. Investigating Relative Density Effects on Quasi-Static Response of High-Density Rigid Polyurethane Foam (RPUF). Mater. Today Commun. 2022, 31, 103320. [Google Scholar] [CrossRef]
  9. Avalle, M.; Belingardi, G.; Ibba, A. Mechanical Models of Cellular Solids: Parameters Identification from Experimental Tests. Int. J. Impact Eng. 2007, 34, 3–27. [Google Scholar] [CrossRef]
  10. Ashby, M.F.; Medalist, R.F.M. The Mechanical Properties of Cellular Solids. Metall. Trans. A 1983, 14, 1755–1769. [Google Scholar] [CrossRef]
  11. Hedayati, R.; Sadighi, M.; Mohammadi-Aghdam, M.; Zadpoor, A.A. Mechanical Properties of Regular Porous Biomaterials Made from Truncated Cube Repeating Unit Cells: Analytical Solutions and Computational Models. Mater. Sci. Eng. C 2016, 60, 163–183. [Google Scholar] [CrossRef] [PubMed]
  12. Babaee, S.; Jahromi, B.H.; Ajdari, A.; Nayeb-Hashemi, H.; Vaziri, A. Mechanical Properties of Open-Cell Rhombic Dodecahedron Cellular Structures. Acta Mater. 2012, 60, 2873–2885. [Google Scholar] [CrossRef]
  13. Ahmadi, S.M.; Campoli, G.; Amin Yavari, S.; Sajadi, B.; Wauthle, R.; Schrooten, J.; Weinans, H.; Zadpoor, A.A. Mechanical Behavior of Regular Open-Cell Porous Biomaterials Made of Diamond Lattice Unit Cells. J. Mech. Behav. Biomed. Mater. 2014, 34, 106–115. [Google Scholar] [CrossRef]
  14. Li, K.; Gao, X.-L. Micromechanical Modeling of Three-Dimensional Open-Cell Foams. In Advances in Soft Matter Mechanics; Springer: Berlin/Heidelberg, Germany, 2012; pp. 213–258. ISBN 978-3-642-19372-9. [Google Scholar]
  15. An, Y.; Wen, C.; Hodgson, P.D.; Yang, C. Investigation of Cell Shape Effect on the Mechanical Behaviour of Open-Cell Metal Foams. Comput. Mater. Sci. 2012, 55, 1–9. [Google Scholar] [CrossRef]
  16. Shakibanezhad, R.; Sadighi, M.; Hedayati, R. Numerical and Experimental Study of Quasi-Static Loading of Aluminum Closed-Cell Foams Using Weaire–Phelan and Kelvin Tessellations. Transp. Porous Media 2022, 142, 229–248. [Google Scholar] [CrossRef]
  17. El Ghezal, M.I.; Maalej, Y.; Doghri, I. Micromechanical Models for Porous and Cellular Materials in Linear Elasticity and Viscoelasticity. Comput. Mater. Sci. 2013, 70, 51–70. [Google Scholar] [CrossRef]
  18. Gong, L.; Kyriakides, S.; Jang, W.-Y. Compressive Response of Open-Cell Foams. Part I: Morphology and Elastic Properties. Int. J. Solids Struct. 2005, 42, 1355–1379. [Google Scholar] [CrossRef]
  19. Gencel, O.; Nodehi, M.; Bozkurt, A.; Sarı, A.; Ozbakkaloglu, T. The Use of Computerized Tomography (CT) and Image Processing for Evaluation of the Properties of Foam Concrete Produced with Different Content of Foaming Agent and Aggregate. Constr. Build. Mater. 2023, 399, 132433. [Google Scholar] [CrossRef]
  20. Ghazi, A.; Berke, P.; Tiago, C.; Massart, T.J. Computed Tomography Based Modelling of the Behaviour of Closed Cell Metallic Foams Using a Shell Approximation. Mater. Des. 2020, 194, 108866. [Google Scholar] [CrossRef]
  21. Goga, V. New Phenomenological Model for Solid Foams. In Computational Modelling and Advanced Simulations; Murín, J., Kompiš, V., Kutiš, V., Eds.; Springer: Dordrecht, The Netherlands, 2011; pp. 67–82. ISBN 978-94-007-0317-9. [Google Scholar]
  22. Luo, G.; Zhu, Y.; Zhang, R.; Cao, P.; Liu, Q.; Zhang, J.; Sun, Y.; Yuan, H.; Guo, W.; Shen, Q.; et al. A Review on Mechanical Models for Cellular Media: Investigation on Material Characterization and Numerical Simulation. Polymers 2021, 13, 3283. [Google Scholar] [CrossRef]
  23. Daxner, T. Finite Element Modeling of Cellular Materials. In Cellular and Porous Materials in Structures and Processes; Altenbach, H., Öchsner, A., Eds.; CISM International Centre for Mechanical Sciences; Springer: Vienna, Austria, 2010; Volume 521, pp. 47–106. ISBN 978-3-7091-0296-1. [Google Scholar]
  24. Martinsen, Ø.G.; Heiskanen, A. Data and Models. In Bioimpedance and Bioelectricity Basics; Elsevier: Amsterdam, The Netherlands, 2023; pp. 345–433. ISBN 978-0-12-819107-1. [Google Scholar]
  25. Casalino, G. [INVITED] Computational Intelligence for Smart Laser Materials Processing. Opt. Laser Technol. 2018, 100, 165–175. [Google Scholar] [CrossRef]
  26. Mears, L.; Stocks, S.M.; Sin, G.; Gernaey, K.V. A Review of Control Strategies for Manipulating the Feed Rate in Fed-Batch Fermentation Processes. J. Biotechnol. 2017, 245, 34–46. [Google Scholar] [CrossRef] [PubMed]
  27. Rahman, A.A.; Zhang, X. Prediction of Oscillatory Heat Transfer Coefficient for a Thermoacoustic Heat Exchanger through Artificial Neural Network Technique. Int. J. Heat Mass Transf. 2018, 124, 1088–1096. [Google Scholar] [CrossRef]
  28. Mohanraj, M.; Jayaraj, S.; Muraleedharan, C. Applications of Artificial Neural Networks for Thermal Analysis of Heat Exchangers—A Review. Int. J. Therm. Sci. 2015, 90, 150–172. [Google Scholar] [CrossRef]
  29. Yadav, D.; Naruka, D.S.; Kumar Singh, P. Employing ANN Model for Prediction of Thermal Conductivity of CNT Nanofluids. In Proceedings of the 2020 International Conference on Contemporary Computing and Applications (IC3A), Lucknow, India, 5–7 February 2020; IEEE: New York, NY, USA, 2020; pp. 163–168. [Google Scholar]
  30. Habeeb, M.; Woon You, H.; Balasaheb Aher, K.; Balasaheb Bhavar, G.; Suryabhan Pawar, S.; Dnyaneshwar Gaikwad, S. Artificial Neural Networks for the Prediction of Mechanical Properties of CGNP/PLGA Nanocomposites. Mater. Today Proc. 2023; in press. [Google Scholar] [CrossRef]
  31. Elsheikh, A.H.; Sharshir, S.W.; Ismail, A.S.; Sathyamurthy, R.; Abdelhamid, T.; Edreis, E.M.A.; Kabeel, A.E.; Haiou, Z. An Artificial Neural Network Based Approach for Prediction the Thermal Conductivity of Nanofluids. SN Appl. Sci. 2020, 2, 235. [Google Scholar] [CrossRef]
  32. Hong, G.; Seong, N. Optimization of the ANN Model for Energy Consumption Prediction of Direct-Fired Absorption Chillers for a Short-Term. Buildings 2023, 13, 2526. [Google Scholar] [CrossRef]
  33. Dadrasi, A.; Albooyeh, A.R.; Fooladpanjeh, S.; Shad, M.D.; Beynaghi, M. RSM and ANN Modeling of the Energy Absorption Behavior of Steel Thin-Walled Columns: A Multi-Objective Optimization Using the Genetic Algorithm. J. Braz. Soc. Mech. Sci. Eng. 2020, 42, 563. [Google Scholar] [CrossRef]
  34. Di Benedetto, R.M.; Botelho, E.C.; Janotti, A.; Ancelotti Junior, A.C.; Gomes, G.F. Development of an Artificial Neural Network for Predicting Energy Absorption Capability of Thermoplastic Commingled Composites. Compos. Struct. 2021, 257, 113131. [Google Scholar] [CrossRef]
  35. Xiao, S.; Li, J.; Bordas, S.P.A.; Kim, T.-Y. Artificial Neural Networks and Their Applications in Computational Materials Science: A Review and a Case Study. In Advances in Applied Mechanics; Elsevier: Amsterdam, The Netherlands, 2023; Volume 57, pp. 1–33. ISBN 978-0-443-13705-1. [Google Scholar]
  36. Sriram, R.; Vaidya, U.K.; Kim, J.-E. Blast Impact Response of Aluminum Foam Sandwich Composites. J. Mater. Sci. 2006, 41, 4023–4039. [Google Scholar] [CrossRef]
  37. Maheo, L.; Viot, P.; Bernard, D.; Chirazi, A.; Ceglia, G.; Schmitt, V.; Mondain-Monval, O. Elastic Behavior of Multi-Scale, Open-Cell Foams. Compos. Part B Eng. 2013, 44, 172–183. [Google Scholar] [CrossRef]
  38. Zhuang, W.; Wang, E.; Zhang, H. Prediction of Compressive Mechanical Properties of Three-Dimensional Mesoscopic Aluminium Foam Based on Deep Learning Method. Mech. Mater. 2023, 182, 104684. [Google Scholar] [CrossRef]
  39. Raj, R.E.; Daniel, B.S.S. Prediction of Compressive Properties of Closed-Cell Aluminum Foam Using Artificial Neural Network. Comput. Mater. Sci. 2008, 43, 767–773. [Google Scholar] [CrossRef]
  40. Capuano, G.; Rimoli, J.J. Smart Finite Elements: A Novel Machine Learning Application. Comput. Methods Appl. Mech. Eng. 2019, 345, 363–381. [Google Scholar] [CrossRef]
  41. Zhuang, W.; Wang, E.; Zhang, H. Prediction of the Compressive Mechanical Properties and Reverse Structural Design of Two-Dimensional Mesoscopic Aluminum Foam Based on Deep Learning Methods. J. Mater. Sci. 2024, 59, 11416–11439. [Google Scholar] [CrossRef]
  42. Rodríguez-Sánchez, A.E.; Plascencia-Mora, H. A Machine Learning Approach to Estimate the Strain Energy Absorption in Expanded Polystyrene Foams. J. Cell Plast. 2022, 58, 399–427. [Google Scholar] [CrossRef]
  43. Hangai, Y.; Sakaguchi, Y.; Kitahara, Y.; Takagi, T.; Kenji, O.; Yuuki, T. Plateau Stress Estimation of Aluminum Foam by Machine Learning Using X-Ray Computed Tomography Images. Int. J. Adv. Manuf. Technol. 2024, 132, 5053–5061. [Google Scholar] [CrossRef]
  44. Hangai, Y.; Ozawa, S.; Okada, K.; Tanaka, Y.; Amagai, K.; Suzuki, R. Machine Learning Estimation of Plateau Stress of Aluminum Foam Using X-Ray Computed Tomography Images. Materials 2023, 16, 1894. [Google Scholar] [CrossRef]
  45. Rodríguez-Sánchez, A.E.; Plascencia-Mora, H. Modeling Hysteresis in Expanded Polystyrene Foams under Compressive Loads Using Feed-Forward Neural Networks. J. Cell Plast. 2023, 59, 269–292. [Google Scholar] [CrossRef]
  46. Rodríguez-Sánchez, A.E.; Plascencia-Mora, H.; Acevedo-Alvarado, M. Neural Network-Driven Interpretability Analysis for Evaluating Compressive Stress in Polymer Foams. J. Cell Plast. 2024, 60, 237–258. [Google Scholar] [CrossRef]
  47. Stręk, A.M.; Dudzik, M.; Machniewicz, T. Specifications for Modelling of the Phenomenon of Compression of Closed-Cell Aluminium Foams with Neural Networks. Materials 2022, 15, 1262. [Google Scholar] [CrossRef] [PubMed]
  48. Ozan, S.; Taskin, M.; Kolukisa, S.; Ozerdem, M.S. Application of ANN in the Prediction of the Pore Concentration of Aluminum Metal Foams Manufactured by Powder Metallurgy Methods. Int. J. Adv. Manuf. Technol. 2008, 39, 251–256. [Google Scholar] [CrossRef]
  49. Gahlen, P.; Mainka, R.; Stommel, M. Prediction of Anisotropic Foam Stiffness Properties by a Neural Network. Int. J. Mech. Sci. 2023, 249, 108245. [Google Scholar] [CrossRef]
  50. Pech-Mendoza, M.I.; Rodríguez-Sánchez, A.E.; Plascencia-Mora, H. Neural Networks-Based Modeling of Compressive Stress in Expanded Polystyrene Foams: A Focus on Bead Size Parameters. Proc. Inst. Mech. Eng. Part J. Mater. Des. Appl. 2024, 238, 1331–1341. [Google Scholar] [CrossRef]
  51. Aengchuan, P.; Boonpuek, P.; Klinsuk, J. Prediction of Stress Relaxation Behavior of Polymer Foam Using Artificial Neural Network. Mater. Sci. Forum 2024, 1126, 37–42. [Google Scholar] [CrossRef]
  52. Sheini Dashtgoli, D.; Taghizadeh, S.; Macconi, L.; Concli, F. Comparative Analysis of Machine Learning Models for Predicting the Mechanical Behavior of Bio-Based Cellular Composite Sandwich Structures. Materials 2024, 17, 3493. [Google Scholar] [CrossRef]
  53. Abdellatief, M.; Wong, L.S.; Din, N.M.; Ahmed, A.N.; Hassan, A.M.; Ibrahim, Z.; Murali, G.; Mo, K.H.; El-Shafie, A. Sustainable Foam Glass Property Prediction Using Machine Learning: A Comprehensive Comparison of Predictive Methods and Techniques. Results Eng. 2025, 25, 104089. [Google Scholar] [CrossRef]
  54. Salami, B.A.; Iqbal, M.; Abdulraheem, A.; Jalal, F.E.; Alimi, W.; Jamal, A.; Tafsirojjaman, T.; Liu, Y.; Bardhan, A. Estimating Compressive Strength of Lightweight Foamed Concrete Using Neural, Genetic and Ensemble Machine Learning Approaches. Cem. Concr. Compos. 2022, 133, 104721. [Google Scholar] [CrossRef]
  55. Wacławiak, K.; Myalski, J.; Gurmu, D.N.; Sirata, G.G. Experimental Analysis of the Mechanical Properties of Carbon Foams Under Quasi-Static Compressive Loads. Materials 2024, 17, 5605. [Google Scholar] [CrossRef]
  56. Bai, J.; Li, M.; Shen, J. Prediction of Mechanical Properties of Lattice Structures: An Application of Artificial Neural Networks Algorithms. Materials 2024, 17, 4222. [Google Scholar] [CrossRef]
  57. Mauro, A.W.; Revellin, R.; Viscito, L. Development and Assessment of Performance of Artificial Neural Networks for Prediction of Frictional Pressure Gradients during Two-Phase Flow. Int. J. Heat Mass Transf. 2024, 221, 125106. [Google Scholar] [CrossRef]
  58. Moheimani, R.; Gonzalez, M.; Dalir, H. An Integrated Nanocomposite Proximity Sensor: Machine Learning-Based Optimization, Simulation, and Experiment. Nanomaterials 2022, 12, 1269. [Google Scholar] [CrossRef] [PubMed]
  59. Srivastava, N.; Singh, L.K.; Yadav, M.K. Utilization of ANN for the Prediction of Mechanical Properties in AlP0507-MWCNT-RHA Composites. Met. Mater. Int. 2024, 30, 1106–1122. [Google Scholar] [CrossRef]
  60. Akdag, U.; Komur, M.A.; Akcay, S. Prediction of Heat Transfer on a Flat Plate Subjected to a Transversely Pulsating Jet Using Artificial Neural Networks. Appl. Therm. Eng. 2016, 100, 412–420. [Google Scholar] [CrossRef]
  61. Shafabakhsh, G.H.; Ani, O.J.; Talebsafa, M. Artificial Neural Network Modeling (ANN) for Predicting Rutting Performance of Nano-Modified Hot-Mix Asphalt Mixtures Containing Steel Slag Aggregates. Constr. Build. Mater. 2015, 85, 136–143. [Google Scholar] [CrossRef]
  62. Jiang, H.; Xi, Z.; Rahman, A.A.; Zhang, X. Prediction of Output Power with Artificial Neural Network Using Extended Datasets for Stirling Engines. Appl. Energy 2020, 271, 115123. [Google Scholar] [CrossRef]
  63. Merayo, D.; Rodríguez-Prieto, A.; Camacho, A.M. Prediction of Mechanical Properties by Artificial Neural Networks to Characterize the Plastic Behavior of Aluminum Alloys. Materials 2020, 13, 5227. [Google Scholar] [CrossRef]
  64. Xue, J.; Shao, J.F.; Burlion, N. Estimation of Constituent Properties of Concrete Materials with an Artificial Neural Network Based Method. Cem. Concr. Res. 2021, 150, 106614. [Google Scholar] [CrossRef]
  65. Merayo Fernández, D.; Rodríguez-Prieto, A.; Camacho, A.M. Prediction of the Bilinear Stress-Strain Curve of Aluminum Alloys Using Artificial Intelligence and Big Data. Metals 2020, 10, 904. [Google Scholar] [CrossRef]
  66. Shi, C.; Zhao, Z.; Jia, Z.; Hou, M.; Yang, X.; Ying, X.; Ji, Z. Artificial Neural Network-Based Shelf Life Prediction Approach in the Food Storage Process: A Review. Crit. Rev. Food Sci. Nutr. 2024, 64, 12009–12024. [Google Scholar] [CrossRef]
  67. Bhagya Raj, G.V.S.; Dash, K.K. Comprehensive Study on Applications of Artificial Neural Network in Food Process Modeling. Crit. Rev. Food Sci. Nutr. 2022, 62, 2756–2783. [Google Scholar] [CrossRef]
  68. Chen, Y.; Huang, Y.; Zhang, Z.; Wang, Z.; Liu, B.; Liu, C.; Huang, C.; Dong, S.; Pu, X.; Wan, F. Plant Image Recognition with Deep Learning: A Review. Comput. Electron. Agric. 2023, 212, 108072. [Google Scholar] [CrossRef]
  69. Linkon, A.H.M.; Labib, M.M.; Hasan, T.; Hossain, M. Deep Learning in Prostate Cancer Diagnosis and Gleason Grading in Histopathology Images: An Extensive Study. Inform. Med. Unlocked 2021, 24, 100582. [Google Scholar] [CrossRef]
  70. Liu, K.; Zhang, J. A Dual-Layer Attention-Based LSTM Network for Fed-Batch Fermentation Process Modelling. In Computer Aided Chemical Engineering; Elsevier: Amsterdam, The Netherlands, 2021; Volume 50, pp. 541–547. ISBN 978-0-323-88506-5. [Google Scholar]
  71. Parsa, M.; Rad, H.Y.; Vaezi, H.; Hossein-Zadeh, G.-A.; Setarehdan, S.K.; Rostami, R.; Rostami, H.; Vahabie, A.-H. EEG-Based Classification of Individuals with Neuropsychiatric Disorders Using Deep Neural Networks: A Systematic Review of Current Status and Future Directions. Comput. Methods Prog. Biomed 2023, 240, 107683. [Google Scholar] [CrossRef]
  72. Reyad, M.; Sarhan, A.M.; Arafa, M. A Modified Adam Algorithm for Deep Neural Network Optimization. Neural Comput. Appl. 2023, 35, 17095–17112. [Google Scholar] [CrossRef]
  73. Team, K. Keras Documentation: Getting Started with Keras. Available online: https://keras.io/getting_started/ (accessed on 11 March 2025).
  74. Pundhir, S.; Kumari, V.; Ghose, U. Performance Interpretation of Supervised Artificial Neural Network Highlighting Role of Weight and Bias for Link Prediction. In International Conference on Artificial Intelligence and Sustainable Engineering; Sanyal, G., Travieso-González, C.M., Awasthi, S., Pinto, C.M.A., Purushothama, B.R., Eds.; Lecture Notes in Electrical Engineering; Springer Nature: Singapore, 2022; Volume 836, pp. 109–119. ISBN 978-981-16-8541-5. [Google Scholar]
  75. Moosavi, S.R.; Wood, D.A.; Ahmadi, M.A.; Choubineh, A. ANN-Based Prediction of Laboratory-Scale Performance of CO2-Foam Flooding for Improving Oil Recovery. Nat. Resour. Res. 2019, 28, 1619–1637. [Google Scholar] [CrossRef]
Figure 1. Carbon foam samples of different density: (a) 60, (b) 40, and (c) 20 ppi (reused from [55], an open access article distributed under the terms of the Creative Commons CC-BY license).
Figure 1. Carbon foam samples of different density: (a) 60, (b) 40, and (c) 20 ppi (reused from [55], an open access article distributed under the terms of the Creative Commons CC-BY license).
Materials 18 02516 g001
Figure 2. Sample preparation procedure.
Figure 2. Sample preparation procedure.
Materials 18 02516 g002
Figure 3. (a) General steps of ANN, and (b) architecture of ANN with input layer, hidden layer, and output layer.
Figure 3. (a) General steps of ANN, and (b) architecture of ANN with input layer, hidden layer, and output layer.
Materials 18 02516 g003
Figure 4. Variation in MSE and MAE for validation and test datasets across number of neurons in (a) hidden layer #1, (b) hidden layer #2, (c) hidden layer #3 and (d) hidden layer #4.
Figure 4. Variation in MSE and MAE for validation and test datasets across number of neurons in (a) hidden layer #1, (b) hidden layer #2, (c) hidden layer #3 and (d) hidden layer #4.
Materials 18 02516 g004
Figure 5. Architecture of backpropagation neural network.
Figure 5. Architecture of backpropagation neural network.
Materials 18 02516 g005
Figure 6. Keras TensorFlow steps to train ANN model.
Figure 6. Keras TensorFlow steps to train ANN model.
Materials 18 02516 g006
Figure 7. Variation of (a) R2, (b) MSE, (c) MAE, and (d) RMSE for selected epochs from 0–500.
Figure 7. Variation of (a) R2, (b) MSE, (c) MAE, and (d) RMSE for selected epochs from 0–500.
Materials 18 02516 g007
Figure 8. Variation of (a) R2, (b) MSE, (c) MAE, and (d) RMSE for epochs from 0–10,000.
Figure 8. Variation of (a) R2, (b) MSE, (c) MAE, and (d) RMSE for epochs from 0–10,000.
Materials 18 02516 g008
Figure 9. Regression of training, validation, testing, and average dataset.
Figure 9. Regression of training, validation, testing, and average dataset.
Materials 18 02516 g009
Figure 10. Residual plot for training, validation, testing, and average.
Figure 10. Residual plot for training, validation, testing, and average.
Materials 18 02516 g010aMaterials 18 02516 g010b
Figure 11. Comparisons between predicted and exact compressive stress values for 200 datasets.
Figure 11. Comparisons between predicted and exact compressive stress values for 200 datasets.
Materials 18 02516 g011
Figure 12. Relative errors (REs) of the predicted compressive stress values.
Figure 12. Relative errors (REs) of the predicted compressive stress values.
Materials 18 02516 g012
Figure 13. Proportion of errors across datasets for (a) validation, (b) testing, and (c) training.
Figure 13. Proportion of errors across datasets for (a) validation, (b) testing, and (c) training.
Materials 18 02516 g013
Table 1. Summary of reviewed articles relevant to this study.
Table 1. Summary of reviewed articles relevant to this study.
NoAuthor(s)ObjectivesMaterialsMethodologyKey Findings/Results
1Zhuang et al. [41]To predict mechanical properties of aluminum foamAluminum foam2D convolutional neural network (2D-CNN) and conditional generative adversarial network (CGAN)Achieved < 3% error in predicting mechanical properties of aluminum foam by using 2D-CNN.
2Rodríguez-Sánchez et al. [42]To map compressive stress response and energy absorption parameters of an expanded polystyrene foamExpanded polystyrene foamsANNANN model outperformed prediction capabilities of compressive strength and strain energy absorption of polystyrene foam and obtained errors around 2% of experimental data only.
3Hangai et al. [43]To estimate the plateau stress of aluminum foam Aluminum foamSupervised learning neural network model and X-ray computed tomography (CT)Using an ANN is the most promising method and can train results obtained from advanced 3D imaging techniques such as CT-scan.
4Hangai et al. [44]To estimate the plateau stress of aluminum foam Aluminum foamCNN and X-ray CT The plateau stresses estimated by machine learning and those obtained by the compression test were almost identical.
5Rodríguez-Sánchez and Plascencia-Mora [45]Predict the mechanical response of expanded polystyrene foam Expanded polystyrene foamsFeed-forward ANNANN predicted the mechanical response almost the same with experimental values (errors of less than 3%).
6Rodríguez-Sánchez and Plascencia-Mora [46]Predict compressive stress responses of polymer foam by taking density, loading rate, and strain as input parameterExpanded Polypropylene and expanded polystyrene foamsFeed-forwarded ANN with interpretability toolIntegration of interpretability tools with ANN models offers a robust method for material response analysis (compressive properties) and contributing to a deeper understanding of material science.
7Stręk et al. [47]Verify the possibility of describing compression phenomenon of closed-cell aluminum by ANNsClosed-cell aluminum foamsANNs and experimentalANNs were found to be appropriate tools for building models of the compression phenomenon of aluminum foams.
8Zhuang et al. [38]To investigate the mechanical properties of Voronoi modeled aluminum foamAluminum foam3D-CNN and FEADeep learning has more advantages in efficiency and accuracy of predicting mechanical properties of cellular solids and is an effective alternative to numerical simulation.
9Ozan et al. [48]To study effect of fabrication parameters on the pore concentration of aluminum metal foamAluminum foamANN and experimentalThe ANN was successfully used to predict the pore concentration % (volume) of aluminum foam related to fabrication parameters.
10Gahlen et al. [49]To predict the orthotropic stiffness tensor of anisotropic foam structures utilizing a tessellation-based foam RVE databaseLow-density closed-cell PURFEA and ANNThe anisotropy of complex foam structures can be determined via the ANN within seconds instead of performing time-consuming simulations (up to hours).
11Pech-Mendoza et al. [50]To predict the compressive stress responses of polystyrene foamsExpanded polystyreneANNThe utility of ANNs in modeling the compressive behavior of polystyrene foams resulted in errors of less than 3% as compared to the experiment.
12Aengchuan et al. [51]To predict the stress relaxation of polymer foamPolymer foamFeed-forward ANNThe results demonstrate that the ANN model achieved highly accurate predictions for the relaxation stress of polymer foam.
13Dashtgoli et al. [52]To investigate the mechanical behavior of biocomposite cellular sandwich structures under quasi-static out-of-plane compressionBio-based cellular compositeMachine learning (ML)Advanced ML models gave accurate predictions of the mechanical behavior of biocomposites, enabling more efficient and cost-effective development.
14Abdellatief et al. [53]To predict porosity and compressive strength of foam glass Foam glass (FG)Gradient boosting (GB), random forest (RF), gaussian process regression (GPR), and linear regression (LR)The optimization of FG was production by providing reliable tools for predicting and controlling porosity and compressive strength, reducing material waste, enhancing product quality, and streamlining manufacturing processes.
15Salami et al. [54]To develop ANN, GEP, and GBT models for predicting compressive strength of foamed concreteFoamed concreteANN, gene expression programming (GEP), and gradient boosting tree (GBT) modelsA GBT model offered reliable accuracy in predicting the compressive strength of foamed concrete.
Table 2. Summary of grid search results.
Table 2. Summary of grid search results.
Number of
Hidden Layers
EpochsNumber of Neurons
in Hidden Layers
ValidationTesting
MSER2MAEMSER2MAE
1100150158.160.91308.34137.650.92107.98
1000125117.100.93577.43103.490.94097.15
10,00020067.990.96306.1964.190.96336.08
210020081.880.95506.4472.470.95906.27
100017560.510.96685.7254.880.96865.51
10,00020049.690.97305.1142.520.97604.86
310012568.570.96206.1761.580.96505.92
100020053.150.97085.3547.580.97285.14
10,00017539.930.97804.6236.440.97904.46
410010065.740.96405.9961.220.96505.89
100020050.310.97245.2145.470.97405.04
10,00010039.100.97854.6035.000.98014.40
Table 3. Summary of hyperparameters of the ANN model.
Table 3. Summary of hyperparameters of the ANN model.
ParametersSpecification
ANN typesFeed-forward Neural Networks
Loss function Mean square error
OptimizerAdam
Number of neurons in input layer5
Number of hidden layers4
Number of neurons in hidden layers100
Number of neurons in output layer1
Activation function in hidden layerReLU
Activation function in output layerLinear
InputStrain, pore density, and solvents
OutputCompressive stress
Table 4. Performance of the developed ANN model.
Table 4. Performance of the developed ANN model.
TrainingValidation DataTest
MSEMAERMSER2MSEMAERMSER2MSEMAERMSER2
34.934.285.890.980639.14.66.220.9785354.45.890.9801
Table 5. Descriptive statistics of ARE for training, validation, and testing datasets.
Table 5. Descriptive statistics of ARE for training, validation, and testing datasets.
Statical ParametersTraining DatasetsValidation DatasetsTesting Datasets
Minimum Error5.31 × 10−66.18 × 10−60
Maximum Error1.951.961.77
Mean8.16 × 10−28.8 × 10−28.58 × 10−2
Standard Deviation1.13 × 10−11.22 × 10−11.21 × 10−1
Lower 95% CI of mean7.98 × 10−28.39 × 10−28.17 × 10−2
Upper 95% CI of mean8.34 × 10−29.22 × 10−29 × 10−2
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Gurmu, D.N.; Wacławiak, K.; Lemu, H.G. Predicting the Compressive Properties of Carbon Foam Using Artificial Neural Networks. Materials 2025, 18, 2516. https://doi.org/10.3390/ma18112516

AMA Style

Gurmu DN, Wacławiak K, Lemu HG. Predicting the Compressive Properties of Carbon Foam Using Artificial Neural Networks. Materials. 2025; 18(11):2516. https://doi.org/10.3390/ma18112516

Chicago/Turabian Style

Gurmu, Debela N., Krzysztof Wacławiak, and Hirpa G. Lemu. 2025. "Predicting the Compressive Properties of Carbon Foam Using Artificial Neural Networks" Materials 18, no. 11: 2516. https://doi.org/10.3390/ma18112516

APA Style

Gurmu, D. N., Wacławiak, K., & Lemu, H. G. (2025). Predicting the Compressive Properties of Carbon Foam Using Artificial Neural Networks. Materials, 18(11), 2516. https://doi.org/10.3390/ma18112516

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop