1 Introduction

Additive manufacturing (AM) (also known as rapid prototyping) is a method that is rapidly developing in various industries and businesses due to the freedom of design, and it converts various design files into functional products [1]. This technology can affect various aspects of human life [2]. AM is utilized in biomedical, automotive, aerospace [3], building [4], and jewelry [5] applications. Besides, it has been introduced as an emerging process to solve global energy issues. It has recently been used in renewable energy applications due to the precision in dimensions and integrity in production [6]. This process has rapidly developed in different industries and businesses due to available designs and turned different designs into functional products. With rapid progress and the removal of restrictions, AM is transformed from a rapid prototyping process to a rapid production process [7]. Therefore, the parts assembled in several steps can be created in an integrated form with this process, which causes a reduction in fabrication costs. On the other hand, the production cost of AM equipment is decreased significantly and is caused to be widely used in laboratories, homes, and schools. Besides, the cost of proprietary production has declined dramatically by using the AM process in various applications, such as biomedical, to make unique products for a patient [4].

Like computer numerical control machines, this technology uses G-code commands to build the part. The difference is that placing the material layer by layer in the required positions instead of removing the material minimizes material waste. The AM technologies are such that they can create internal complexities of parts that are difficult and sometimes impossible to fabricate in conventional methods [8].

There are several methods for manufacturing metal, ceramic, polymer, and composite parts in AM. Meanwhile, the FFF method is the most common method for producing polymer parts [9]. This method guides filament thermoplastic polymers to the liquefier by gears (Fig. 1). It is heated according to the type of filament and converts into a molten state with a particular viscosity. A layer is created by moving the extruder in the X and Y directions, and then by moving in the Z direction, the final part is created layer by layer. Mechanical properties and surface quality of parts fabricated by FFF are inferior to conventional manufacturing methods such as extrusion, injection, and compression [10]. The process parameters in FFF determine the parts’ mechanical properties and printing quality. These parameters include raster angle, air gap, number of shells, raster width, printing speed, infill density, layer thickness, and build orientation [11]. Hence, changing these parameters and reaching optimal conditions can compensate for the limitation of mechanical properties and fabrication quality.

Fig. 1
figure 1

a 3D printer schematic representation, b build parameters in FFF

Garg and Bhattacharya [12] experimentally and numerically studied the fracture behavior of ABS parts with different raster angles and layer thicknesses. The inter- and intra-layer bonds were modeled by the finite element method. They found that the elongation increases with increasing layer thickness, and UTS first decreases and then increases. For raster angles of zero and 90, fracture of raster and delamination cause fracture of the sample, respectively. Tronvoll et al. [13] believed that the reason for the fracture of the samples that are loaded perpendicular to the raster angle is the reduction of the contact cross-section and the air gap between two adjacent filaments. Accordingly, using a statistical method, they studied the reduction in tensile strength caused by interlayer gaps. Dawoud et al. [14] compared the mechanical properties of ABS parts produced by injection molding and FDM and concluded that injection molding samples showed better properties in mechanical tests. However, negative air gap parameters and a raster angle of ± 45 in FDM led to mechanical properties that could compete with injection molding. Zhang et al. [15] studied the effect of printing speed and raster angle parameters on residual stress, porosity, and deformation properties in ABS and composite samples. They observed that high printing speed increased porosity and residual stress. Furthermore, the raster angle of ± 45 has minor porosity and deformation after heat treatment. The presence of fibers in the composite reduces residual stress and deformation, but the level of porosity increases due to cavities created by the presence of fibers. Also, DIC data revealed that heat treatment on the samples leads to the release of residual stress and lack of surface displacement in the samples.

Nomani et al. [16] studied ABS parts’ tensile properties and compressive strength with different layer thicknesses. The lower layer thickness showed better mechanical properties due to deposition layers and fewer gaps. In contrast, the larger layer thickness reduced the fabrication time of the samples. Rodriguez et al. [17] evaluated the compressive performance of ABS cylindrical samples. Samples were printed with two rectangular and honeycomb filling patterns and different filling percentages for longitudinal and transverse build orientation. Honeycomb samples had better compressive properties for longitudinal build orientation than rectangular samples, but the fabrication time increased. In general, specimens printed in the longitudinal direction (in the loading direction) had better compressive properties than specimens printed in the transverse direction. Rodriguez-Panes et al. [18] studied the behavior of the tensile properties of two filaments extensively used in FFF, including ABS and PLA. Variable parameters for both filaments include layer thickness, infill density, and build orientation. The infill density parameter was the most influential parameter for both filament types. Layer thickness had little effect on the tensile properties of ABS samples, while the mechanical properties decreased with increasing layer thickness for PLA. It was also shown that in the best case, in the combination of parameters for ABS, tensile properties were 22% lower than the filament raw material. Samykano et al. [20] investigated the properties of UTS, elastic modulus, yield strength, and fracture strain of ABS specimens with three parameters: layer thickness, infill density, and raster angle. The values obtained in the experimental tests for each of these properties were compared with those predicted by the mathematical model. The error values were obtained for each of the answers. The maximum layer thickness, infill density values and 55° raster angle led to optimal responses.

Kannan and Ramamoorthy [21] studied the mechanical properties of PC, ABS, and PC-ABS samples. PC-ABS is one of the materials used in the aerospace industry. Compared to pure ABS and PC, the UTS of PC-ABS was 24% and 16% higher, and also, for the elastic modulus, it was 24% and 41% higher, respectively. Hibbert et al. [22] studied the effect of build parameters, including layer thickness and infill style of ABS material, on tensile properties by the design of experiment and full-factorial method. The raster angle had the most significant effect on the toughness modulus. Likewise, infill style had the most consequential effect on yield strength and UTS. The layer thickness had a different effect on the tensile properties, and also, the strain rate was not very sensitive to the output responses.

The literature review explains that many studies are conducted on the tensile properties of materials made by FFF. Researchers have tried to optimize the output responses of the tensile test, such as yield strength, Young’s modulus, ultimate tensile strength, and strain at failure, by changing various parameters. Most researchers have used strain gauges, extensometers, or displacement of the crosshead of the tensile testing machine to measure strain at failure. However, optical strain measurement techniques are relatively new methods that can calculate the full-field surface strain without size limitation contact with the part and predict the location of fracture or crack. One of these methods is the Digital Image Correlation (DIC) method. This method is rapidly becoming popular because of its relative ease of implementation. This study aims to understand better the effect of infill density, layer thickness, and raster angle parameters on tensile properties such as ultimate tensile strength and fracture strain. The values of stress and strain are obtained using the tensile testing device and 2D-DIC equipment, respectively. Furthermore, using the design of experiment (RSM method), it was tried to investigate the effect of the parameters and the interaction between them on the response and find the optimal parameters for reaching the maximum value of UTS and fracture strain of printed ABS plus.

2 Methodology

2.1 Material and preparation of the test specimen

The design of experiment (DOE) is required to predict the effect of parameters and their interaction on the response. DOE speeds up the design process and reduces costs [23]. There are several statistical methods for DOE; response surface methodology (RSM) is one of these methods. RSM helps to achieve the desired optimal parameters and individual and interaction impact between them after identifying important and influential parameters (parameter screening) with a minimum number of experiments [19]. This method aims to determine the relationship between the input and output of the test with the minimum error employing a mathematical model [24]. Besides, The RSM can provide several solutions according to the importance of each parameter for the user and multi-purpose. Hence, it is suitable for optimizing 3D printers [25]. In this research, three independent parameters, each with three levels, were studied using the RSM method and central composite design (CCD) with three replications at the central point using the Design-Expert software (version 11, Stat-Ease, USA). This research includes the effect of independent parameters of infill density (A, varying from 20 to 80%), layer thickness (B, varying from 0.1 to 0.3 mm), and raster angle (C, varying from 0 to 90°) on the ultimate tensile strength (UTS) and the fracture strain responses. It is finally aimed to obtain the values of the optimal parameters to reach the maximum value of both responses. The values of the parameters and their levels are shown in Table 1. Coded levels − 1, 0, and + 1 are low, medium, and high, respectively.

Table 1 Values of independent parameters and design of experiment levels

The material used in this study is ABS plus polymer filament with a diameter of 1.75 mm. This filament has higher strength and less elongation than ABS filament [26]. The ASTM D638 type IV [27] standard was used to make the specimens. The dimensions of this standard are shown in Fig. 2. The model of this geometry was first designed in the Solidworks 2018 software [28] and then converted to STL format. This format entered the slicer software, and the 3D printer started making the sample layer by layer by defining the build parameters for each specimen. The 3D printer used in this research (Creality Ender-6, Shenzhen, China) has dimensions of 250 mm × 250 mm × 400 mm.

Fig. 2
figure 2

Dimensions of the tensile test specimen according to ASTM D638 type IV standard

During the printing of the samples, the distortion phenomenon was noticed. For this purpose, Kapton glue was used to stick the first layer on the bed. Furthermore, some print parameters were selected by trial and error to minimize the distortion and warping of the printed samples. These parameters include the bed temperature that determines the cooling rate of the extruded filaments, the chamber temperature that can reduce the temperature difference between the upper and lower layers of filaments to the minimum, and the print speed. Therefore, no distortion was observed in the printed samples. This issue also applies to printing samples with optimal values of parameters. The constant build parameters are shown in Table 2.

Table 2 Constant build parameters and description

In previous studies, the three parameters of infill density, layer thickness, and raster angle were known as parameters affecting tensile properties [18, 20]. For the raster angle that determines the anisotropic properties of the samples, three levels of 0, 45, and 90° are considered (Fig. 3 (a)). For infill density, which is directly related to fabrication time and cost, three levels of 20, 50, and 80% were considered. (Fig. 3b). There is a significant disagreement among researchers about the effect of the layer thickness parameter on tensile properties. For example, Onwubolu and Rayegani [29] found the highest tensile properties using the lowest layer thickness. The opposite of this issue was observed in another study [20]. In fact, by changing the layer thickness, the number of layers of fused filament will change, which will lead to a change in mechanical properties. Three levels of 0.1, 0.2, and 0.3 mm are considered for the layer thickness. (Fig. 3c).

Fig. 3
figure 3

Schematic representation of the three variable parameters in FFF, a raster angle, b infill density, c layer thickness

2.2 Two-dimensional digital image correlation and tracking

Digital image correlation (DIC) measures full-field displacement and strain that, unlike conventional strain gauges, does not require contact with the sample surface. The basis of the DIC is a set of digital images taken from the test sample by a Charged coupled device (CCD) high-speed camera during the test to record the changes made. Various algorithms have been developed for the DIC method, all based on identifying the maximum similarity of the pixel intensity pattern in the selected subset in sequential digital images. To correlate and process digital images, each image must be defined as a two-dimensional array, each array representing a pixel indicated by a particular number [30]. Furthermore, the images taken from the sample surface must have high contrast so that the 2D-DIC algorithm can perform interception operations with high accuracy. Hence, as presented in Fig. 4, a pattern of random speckles is created on the samples printed using matte black spray paint to combine with the white surface to create a perfect contrast. The density of speckles affects the accuracy of strain measurement in DIC. The size and density of the speckles should be such that the DIC algorithm can detect them. Various DIC parameters, such as the subsets’ size, were used to evaluate the quality of the speckle’s pattern. However, the authors obtained the best pattern for conducting DIC based on the previous study [31].

Fig. 4
figure 4

Distribute random speckles on specimen surfaces to provide appropriate contrast

Figure 5 shows the histogram of one of the standard samples prepared for testing. The horizontal axis shows the pixel intensity, and the vertical axis shows the number of pixels at a specific intensity. As the values of this figure tend to the right side, it shows the number of pixels in light (white) color, and the tendency to the left side indicates the pixels in dark (black) color. The peak on the figure’s left and right sides means the appropriate contrast created to examine the image correlation operation.

Fig. 5
figure 5

Detect the contrast created on the sample’s surface by histogram

DIC parameters need to be adjusted before starting the experiment. Mercury RT software V2.6 was used for tracking settings and parameters in this research. The line probe (also known as optical extensometers) and strain computation window (also known as optical strain gauge) in the gauge area of the samples can be used to calculate the displacement and strain field, respectively (Fig. 6). The strains calculated by these two tools are slightly different (less than 5%). Therefore, only the results related to the strain computation window are used in this article. In general, the DIC algorithm’s displacement and strain calculations are based on the subsets’ pixel intensity [32]. If the yellow circles in Fig. 6, whose coordinates and size are determined in the reference image, are considered a hypothetical subset. In that case, the subset coordinates are traced until the moment before the fracture (Target image), and by repeating this process for the other subsets, the displacement vector, and consequently the differentiation, the strain values are calculated. The size of the subsets is adjusted (43px × 43px), which is proportional to the size of the speckles, the gauge of the printed samples, and the expected strains based on the loading conditions. The more speckles this window can include, the more accurate the calculations will be. Besides, the strain of the printed sample can affect its dimensions. By increasing this size, the tracking accuracy can be increased against the cost of longer computational time.

Fig. 6
figure 6

DIC parameters and image correlation operations to calculate longitudinal strain

2.3 Experimental set-up

Tensile tests were carried out employing SANTAM STM-150 universal testing machine (Santam Co., Iran). When placed in the fixture, the specimens are aligned so that the tensile axis of the specimen is in line with the traction of the movable jaw to minimize off-plane displacement values. As presented in Fig. 7, the equipment required for 2D-DIC includes a high-speed camera with a tripod for fixing the camera, a light source, and software for checking image correlation. The image correlation process is sensitive to vibration and causes misleading results, so a tripod completely fixes the camera. In the measurement of 2D-DIC, the optical axis of the camera CCD sensor must be perfectly perpendicular to the sample surface to ensure accurate measurements and a stable light source (preferably white) reflects on the sample’s surface [31]. Tensile testing is conducted at a constant 2 mm/min rate at ambient temperature (~ 23℃). After the sample is placed in the test machine, a reference image is taken, and the processing settings and parameters are conducted on the reference image. The data output frequency for the tensile test and DIC camera is 4 Hz. The output of the tensile testing machine is the force values in Newtons. The engineering stress values are obtained by dividing these values by the initial cross-section of the standard specimens (19 mm2). Also, using an optical strain gauge, the values of engineering strain can be calculated in the tensile direction. The coordinates of the optical strain gauges on the sample gauge, the DIC parameters, and the experiment settings are the same for all specimens.

Fig. 7
figure 7

Experimental set-up for DIC testing under tensile loading

3 Result and discussion

3.1 Stress–strain curve

ABS polymer is generally an amorphous thermoplastic polymer with multiple molecular chain entanglements in its structure [33]. If the stress values on the sample are too high, the entanglements will gradually open, and the specimen will fracture as the stress increases. According to Table 3 and DOE, 15 specimens with different fabrication conditions are printed, and each fabrication condition is repeated three times to reduce the error and data dispersion. The studied responses include ultimate tensile strength in MPa and fracture strain in percentage. These responses have been analyzed according to the average of three samples for each fabrication condition.

Table 3 Design matrix and experimental result

In Fig. 8, the stress–strain curves are drawn for various fabrication conditions according to the output data of the tensile tests. Based on the raster angle, the diagrams are divided into three categories. Figure 8 (a) is the stress–strain curves for 0° raster angle specimens (in the direction of tension). In the elastic area, where there is a linear relationship between stress and strain values, the molecular chains retain their structure and are completely amorphous. With increasing stress values, the samples reach the yield point, and then, a gradual decrease in stress values is observed, and the relationship between stress and strain is no longer linear. It is assumed that the chains are put together more compactly in this area, but the entanglements have not been removed. The first (ID = 20%, LT = 0.1 mm) and third (ID = 20%, LT = 0.3 mm) specimens experience fracture in this area due to their lower infill density than the other samples. The yield stress and the UTS occur at one point in many test specimens. After the yield point and stress drop, the specimen continues to extend without significant stress changes. In this area, the material loses its stress resistance, the molecular chains gradually open, and the so-called specimen enters the cold drawing phase and shows ductile behavior. The second (ID = 80%, LT = 0.1 mm), fourth (ID = 80%, LT = 0.3 mm) and thirteenth (ID = 50%, LT = 0.2 mm) specimen fracture at this stage. Also, the number and the size of voids increase by reducing the infill density, which can cause a decrease in the effective cross-sectional area and a reduction in strength. Besides, voids can become stress concentration zones and cause the initiation and further growth of cracks in the specimen.

Fig. 8
figure 8

Tensile stress–strain curves for raster angle a 0°, b 45°, c 90° (RA = raster angle, ID = infill density, LT = layer thickness)

Figure 8 (b) presents the stress–strain curves for the 45° raster angle. Except for the ninth specimen (ID = 20%, LT = 0.2 mm), which experiences the cold drawing stage, the rest of the samples show brittle behavior in the yield area. Figure 8 (c) presents the stress–strain curve for a 90° raster angle, and it can be seen that all specimens show brittle behavior and fracture in the yield area. As observed, the specimens’ behavior changes from ductile to brittle by increasing the raster angle. The high importance of this parameter in producing ABS samples has also been mentioned in Cakan [34] and Ziemian et al. [35] studies.

Figure 9 (a) presents the UTS values based on the sample number. The variation range for UTS is the value of 14.31 MPa for the fifth specimen (ID = 20%, LT = 0.1 mm, RA = 90°) to 34.68 MPa for the second specimen (ID = 80%, LT = 0.1 mm, RA = 0°). The average UTS value is 23.94 MPa. Figure 9 (b) shows the fracture strain values in percentage for all specimens. The variation range for the fracture strain is 1.299% for the fifth specimen (ID = 20%, LT = 0.1 mm, RA = 90°) to 3.559% for the thirteenth specimen (ID = 50%, LT = 0.2 mm, RA = 0°). Therefore, the fifth specimen shows the weakest behavior for both UTS and fracture strain responses. The mean fracture strain is 2.44%.

Fig. 9
figure 9

Experimental values obtained from the tensile test for a UTS, b fracture strain responses

Figure 10 displays the location of the calculation window of strain distribution on the specimen gauge and the results for the strain contours in the direction of tension (\({\epsilon }_{yy}\)) from the data extracted by the DIC camera. According to the strain distribution, it is possible to understand the mechanical performance better and predict the failure location on the specimens in the experimental test [36]. It should be considered that the strain distribution is related to the surface of the specimens and does not show their internal structure. Therefore, based on observations and visual inspection, it is ensured that there is no gap or crack on the surface of any specimens after printing. As can be seen, the strain contours for the samples can vary according to the values of infill density, layer thickness, and raster angle.

Fig. 10
figure 10

DIC strain distribution prior to the fracture for different process parameters

As can be seen in most of the DIC figures, the maximum local strain is related to the upper section of the gauge length. This can be related to the geometry of tensile samples and the reduction of the effective cross-sectional area due to the presence of voids, so the local strain in that area increases. This area can be the initial stage of cracking. This factor was observed in experimental tests, and fracture occurred in the focus areas of the strain distribution. These images follow the previous results; accordingly, the likelihood of early fracture increases as the strain distribution gets more pervasive on the specimen.

3.2 Regression model and analysis of variance

Experimental tests can be sufficient to select the desired build parameters according to the expected application. However, if there is only the experimental results’ analysis, despite many tests and long processing time, the selected parameters for fabricating the part in the intended application may not be very accurate. Therefore, it is better to use statistical methods such as the design of experiment to reach a good understanding of the relationship between process parameters and response.

RSM is a set of statistical and mathematical techniques used when many input variables affect some considered responses. Since RSM provides the ability to create models with higher degrees and multi-objective optimization, it can be the most appropriate method to optimize the considered parameters [36]. Different RSM methods can be used according to the number of parameters and their levels. The central composite design (CCD) method is the most widely used RSM method, which has five levels for each parameter by default. In this method, if the axial distance is considered one, three levels can be considered for each factor. Srinivasa et al. [19] used the CCD method in the DOE. As a result, they reduced the number of tests to 27 for two numerical parameters and one nominal parameter with three levels.

Another RSM method is the Box-Behnken Design (BBD) method, which is almost similar to the CCD method, except that only three levels can be considered for each parameter. H Liu et al. [37] conducted 17 runs using this method for three parameters with three levels and five replications at the central point. Another method is Optimal (Custom) Design. Unlike CCD and BBD methods, which have a specific pattern for design points, optimal design points are selected by a specific algorithm. Omar et al. [38] used the I-optimal method to optimize the studied parameters. This method is suitable for a flexible design based on matching customized models so that the number of levels of each parameter can be defined separately. Also, the I-optimal design will be used when a combination of nominal and numerical parameters or cubic and higher-order models are needed. As mentioned in this research, the response surface methodology (RSM) based on the central composite design (CCD) was used to validate and predict the results.

According to this method, the desired level of optimal parameters and individual and the interaction effect between parameters can be achieved with a minimum number of experiments. Therefore, according to the number of parameters and their levels, 17 testing conditions are considered (3 replications at the central point). The repetition of the experiment at the central point (middle level in Table 1) is considered to predict the responses better and more accurately. Various models such as Mean, Linear, 2FL, Quadratic, and cubic were examined to analyze the results. The values obtained for statistical methods such as adjusted R2, the sum of squares, and P-value showed that the quadratic model is the most appropriate alternative for the regression model. This model had the most agreement with the experimental data related to UTS and failure strain. However, other models, such as the linear model, could not explain the mutual effect of the parameters on each other. Table 4 presents a combination of parameters for the fabrication of standard specimens, UTS, and fracture strain responses in experimental tests, as well as values predicted by the quadratic model. According to the comparison of the results of experimental tests and the predicted values, the average error observed for UTS and fracture strain are 2.96% (maximum is 8.84%) and 2.87% (maximum is 5.17%), respectively. Therefore, experimental tests have a suitable correlation with the predicted values, and the results are reliable.

Table 4 Comparative between the experimental and predicted value for UTS and fracture strain responses by the CCD

The quadratic model concerning multiple regression analysis is generally presented according to Eq. 1. In this equation, \({Y}_{i}\) is the predicted response, \({\beta }_{0}\) is a constant coefficient, \({\beta }_{i}\) is the individual term coefficient, \({\beta }_{ii}\) is the quadratic term coefficient, \({\beta }_{ij}\) is the interaction term coefficient, \({X}_{i}\) and \({X}_{j}\) are independent coded variables.

$${Y}_{i}={\beta }_{0}+{\sum }_{i}{\beta }_{i}{X}_{i}+{\sum }_{ii}{\beta }_{ii}{X}_{i}^{2}+{\sum }_{ij}{\beta }_{ij}{X}_{i}{X}_{j}$$
(1)

The analysis of the results of experimental tests for each response is used to determine the coefficients in the quadratic equation. The quadratic model must pass the analysis of variance (ANOVA) filter to check the importance of each parameter, the interaction between them, and the overall validity of the model for the response. Moreover, different conditions must be met for the existing models and terms to obtain knowledge of their validity and importance.

To investigate the effect of each parameter and the interaction between them and specify the ANOVA parameters, Eqs. 2 to 11 are used. “Adeq. precision” is measured by Eq. 2 which determines the signal-to-noise ratio. It compares the range of the predicted values at the design points to the mean prediction error. Ratios greater than four show suitable model discrimination [39].

$$\eta =-10\mathrm{log}\left[\frac{1}{P}\sum_{i=1}^{p}\frac{1}{{w}_{i}^{2}}\right]$$
(2)

where \(\eta\), \(p\), and \({w}_{i}\) are Adeq. precision, the number of runs in the design, and the \(i\) th result of the experiment, respectively. The total sum of square deviation \((SST)\), the total degree of freedom \({(f}_{T})\), the sum of square deviation of \(j\) th factor \(({SS}_{j})\), and its degree of freedom (\({f}_{j}\)) can be calculated as follows:

$$SST=\sum_{i=1}^{n}{\eta }_{i}^{2}-\frac{{T}^{2}}{n}$$
(3)
$${f}_{T}=n-1$$
(4)
$${SS}_{j}=\frac{1}{r}\sum_{i=1}^{m}{T}_{i}^{2}-\frac{{T}^{2}}{n}(j=\mathrm{1,2},\dots k)$$
(5)
$${f}_{j}=m-1$$
(6)

Besides, the sum of square of error \((SSE)\), its degree of freedom \(({f}_{e})\), The variance of \(j\) th parameter \(({MS}_{j})\) and the variance of error \((MSE)\) can be calculated as follows:

$$SSE=SST-\sum_{j=1}^{k}{SS}_{j}$$
(7)
$${f}_{e}={f}_{T}-\sum_{j=1}^{k}{f}_{j}$$
(8)
$${MS}_{j}={SS}_{j}/{f}_{i}$$
(9)
$$MSE=SSE/{f}_{e}$$
(10)

Thus, F-value of \(j\) th factor can be calculated as follows:

$${F}_{j}={MS}_{j}/MSE$$
(11)

where \(n\), \(m\), \(k\), \(T\), and \({T}_{i}\) are the total number of experiments, the number of levels for each factor, the number of columns of orthogonal array, the sum of Adeq. precision, and the sum of Adeq. precision when the level of factors is fixed on \(i\) th row for an arbitrary column, respectively. F- and P-value indicate the importance of each term. A P-value of less than 0.05 indicates that the model or particular term is significant or vice versa. According to Table 5, which shows ANOVA for the quadratic model related to the UTS response, the low P-value (< 0.0001) and the high F-value (36.41) for the model indicate its importance. The P-value obtained for all three individual terms indicates the significant impact of these factors on the UTS response. The interaction terms AB and AC are also significant terms in the response. However, the BC term, which is the interaction between the layer thickness and raster angle parameters, due to a P-value greater than 0.05 (0.0829), has little effect on the UTS response. Also, square terms A2 and B2 are significant, and the term C2 is insignificant. A slight lack of fit with a P-value of 0.6380 indicates that the model is consistent with duplicate data. The value of Adeq. precision, which measures the amount of signal to noise, is desirable for a value higher than 4. Here the ratio is 22.14. Therefore, this model provides enough signals required for the design space. The value of R-square is 0.98, which indicates that 98% of the experimental data are consistent with the data predicted by the model. Also, the values of adjusted R2 and predicted R2 are equal to 0.95 and 0.85, respectively. The difference between these two parameters must be less than 0.2, which is confirmed.

Table 5 ANOVA for response surface quadratic model for UTS

Therefore, multiple regression analysis was used in the CCD for the significance level of the coefficients in the UTS response, and the reduced quadratic model (removal of insignificant coefficients BC and C2) was presented by the actual parameters for the UTS response as Eq. 12.

$$\mathrm{UTS }\left(\mathrm{MPa}\right)= +14.9349-0.2851 \left(\mathrm{A}\right)+132.61 \left(\mathrm{B}\right)-0.0622 \left(\mathrm{C}\right)-0.4425 \left(\mathrm{A}\times \mathrm{B}\right)-9.4\times {10}^{-4} \left(\mathrm{A}\times \mathrm{C}\right)+5.3\times {10}^{-5} {(\mathrm{A}}^{2})-213.24{ (\mathrm{B}}^{2})$$
(12)

As stated, the quadratic model was used for fracture strain according to the experimental values and regression analysis. Like the UTS response, analysis of variance is used to determine the importance of the model, the impact of each term, and the interaction between them. Table 6 presents the analysis of variance for the quadratic model related to the fracture strain response, so the low P-value (< 0.0001) and the high F-value (70.87) for the quadratic model indicate its significance. The P-value obtained for all three parameters indicates these factors’ significant impact on the fracture strain response. The interaction terms AC and BC are also significant in the response. However, the term AB, which is the interaction between infill density and layer thickness parameters, has a negligible effect due to a P-value greater than 0.05 (0.2292) on the response. Also, the square terms A2 and B2 are significant, and the term C2 with a P-value of 0.2322 has little effect on the response. A slight lack of fit with a P-value of 0.5297 indicates that the model conforms to duplicate data and an Adeq. precision of 27.78 indicates sufficient signals required for the design space. A value of R-square of 0.99 indicates a good agreement between the experimental and predicted data. Also, adjusted R2 and predicted R2 are equal to 0.97 and 0.82, respectively. These values are suitable because of the difference of less than 0.2.

Table 6 ANOVA for response surface quadratic model for fracture strain

Therefore, according to the significance of the terms on the fracture strain response and removing the insignificant terms AB and C2, the quadratic model for the fracture strain response is presented as Eq. 13.

$$\mathrm{FS}\left(\mathrm{\%}\right)= +0.5045+0.0285 \left(\mathrm{A}\right)+23.26 \left(\mathrm{B}\right)-0.0171 \left(\mathrm{C}\right)-6.6\times {10}^{-5} \left(\mathrm{A}\times \mathrm{C}\right)+0.0342 \left(\mathrm{B}\times \mathrm{C}\right)-1.9\times {10}^{-4} {(\mathrm{A}}^{2})-64.69{ (\mathrm{B}}^{2})$$
(13)

3.3 Analysis of the variable parameters using 3D response surface plots

The relative impact of the individual terms, the interaction between them, and the square terms for the UTS and fracture strain responses are shown in the bar graph in Fig. 11. The relative impact is obtained according to the F-value in Eq. 11. A higher F-value indicates a more significant effect of that parameter on the response. Statistical analysis shows that terms with a P-value greater than 0.05 have a relative effect of less than 2.36 on the response. This value separates the significance and insignificance terms in the form of a vertical line in Fig. 11. Individual terms had a greater impact than the interaction and square terms for the UTS response. Meanwhile, the raster angle parameter (C) has the most significant effect on UTS and fracture strain responses with a relative effect of 12.26 and 18.60, respectively. Additionally, the B2 term, with a relative impact of 10.69, had a greater effect on the fracture strain response than the individual parameters of infill density (A) and layer thickness (B), with a relative impact of 6.15 and 3.28, respectively. The interaction of layer thickness and raster angle (BC), with a relative effect of 4.22, has a greater effect on the fracture strain response than the individual layer thickness parameter (B). Accordingly, the importance of the DOE for analyzing the results of experimental tests and the interaction between parameters is quite evident in this research.

Fig. 11
figure 11

The relative impact of individual, interaction, and square terms on UTS and fracture strain responses

Figure 12 includes 3D response surface plots that can graphically represent comprehensive information about the effect of individual parameters, their interactions, and the optimal values for the response. Figure 12 (a) presents a 3D plot of the effects of the interaction between infill density and raster angle (AC) parameters for the UTS response. The interaction between these two parameters, according to Table 5, had a significant effect on the UTS response (P = 0.0255). The highest value of UTS (36.2804 MPa) is obtained when the infill density is at the highest level (80%) and the raster angle is at the lowest level (0°). The individual effect of infill density and raster angle parameters on UTS, with relative impacts of 8.29 and 12.26, respectively, is greater than the interaction between these two parameters, with a relative impact of 2.83 (Fig. 11). Increasing the infill density from 20 to 50% does not show much effect in UTS. However, with an increase from 50 to 80%, UTS increases significantly. This issue can be seen by comparing the samples (10 and 15) with the constant parameters of layer thickness and raster angle (B = 0.2 mm, C = 45°) and increasing infill density from 50 to 80%, the value of UTS increased by 45% (Table 4).

Fig. 12
figure 12

3D response surface plots of the interaction between a infill density and raster angle (AC), b infill density and layer thickness (AB) for UTS response

It is because increasing the infill density increases polymer content, reduces the space (Voids), and consequently increases the polymer chain connections in the ABS plus specimens, which can withstand more load. The voids formation is one of the common defects of the parts fabricated by FFF, which can be minimized by choosing the correct process parameters. Voids can be seen between the internal and external links of the layer or even in the cross-section of the filament. In the current work, the infill density is considered a variable parameter, and the voids become less with the increase of the infill density and the polymer content. In the current work, the infill density is considered a variable parameter, and the voids become less with the increase of the infill density and the polymer content. However, the highest density value is 80%, and none of the printed parts is full density (solid). Therefore, there is no bond between the adjacent layers in the melted filaments. However, voids are observed in the interlayer bonds during stacking layers and the filament cross-section. The 0.1 mm thickness of the layer has led to the proper connection between the layers and the reduction of voids compared to the thickness of 0.3 mm. Nevertheless, the sample with a 0.3 mm layer thickness has a lower cooling rate than the 0.1 mm layer thickness due to the greater heat capacity of the extruded filaments, which leads to the reduction of voids in the cross-section of the deposited filament. Nevertheless, increasing the infill density increases the material (manufacturing cost), weight, and manufacturing time. Therefore, based on the application of the sample, it is necessary to balance mechanical properties and items such as cost, weight, and build time.

As can be seen, the effect of the raster angle on the UTS response at higher infill density is relatively more significant than at lower infill density because, at low infill density, the applied load causes fracture of the specimen. In general, according to Fig. 12 (a), the value of UTS decreases linearly by increasing the raster angle from 0 to 45 and then from 45 to 90. By comparing the samples (13 and 15), this issue can be seen that with the constant parameters of infill density and layer thickness (A = 50%, B = 0.2 mm) and increasing the raster angle from 0° to 45°, the value of UTS decreased by 31%. By comparing the samples (14 and 15), it can be seen that by increasing the raster angle from 45° to 90°, the UTS value decreased by 10% (Table 4). The raster angle is directly related to how the load is transferred within the specimen, and for the raster angle of 0°, the applied load is parallel to the raster angle. This issue makes the fused filament fibers, composed of strong molecular chains, bear the applied load.

In contrast, as the raster angle increases, the role of the filament fibers to withstand the load decreases, and this factor causes the specimen to fracture with less force. Choosing the right raster angle can dramatically reduce the cost, weight, and build time of the part. For example, by comparing specimens (1 and 6) with the same layer thickness of 0.1 mm, the raster angle of 0° leads to the first specimen with an infill density of 20% having a higher UTS value of 10% than the specimen 6 with an infill density of 80%. The same behavior is observed in comparing specimens (3 and 8). According to the 3D response surface plots, the behavior of the infill density parameter (A) is curved, and the raster angle (C) is linear, which leads to the significance and insignificance of the terms (A2) and (C2) in UTS response, respectively (Table 5).

Figure 12 (b) presents the 3D response surface plots of the interaction between the layer thickness and infill density (AB) parameters on the UTS response. According to Table 5, the interaction between these two parameters significantly affected the UTS response (P = 0.0209). The highest value of UTS (30.6942 MPa) was obtained with an average layer thickness (approximately 0.23 mm) and the highest infill density level (80%), and also, the lowest UTS value was obtained with the lowest layer thickness (0.1 mm) and low infill density levels. The individual effect of layer thickness and infill density parameters on UTS, with relative impacts of 6.29 and 8.29, respectively, is greater than the interaction between these two parameters, with a relative impact of 2.97 (Fig. 11). According to the 3D diagram, the UTS value increased steadily by increasing the layer thickness from 0.1 to 0.3 mm for low to medium infill densities. For example, by comparing the specimens (11 and 15) with infill density and raster angle constant parameters (A = 50%, C = 45°) and increasing the layer thickness from 0.1 to 0.2 mm, the value of UTS increased by 22% and similarly with the comparison of specimens (12 and 15) by increasing the layer thickness from 0.2 to 0.3 mm, the UTS value increased by 8% (Table 5). In the case of higher infill densities, a slight decrease in UTS values is observed with increasing layer thickness. In general, a higher layer thickness, in addition to reducing build time, has greater heat capacity and a lower cooling rate (due to the greater mass of the filament), and it can also lead to stronger inter-layer bonding. This issue reduces distortion and residual stresses in the specimens and can withstand more force to some extent.

Figure 13 (a) presents the 3D response surface plots of the interaction effects between the infill density and the raster angle parameters (AC) on the fracture strain response. The interaction between these two parameters, according to Table 6, had a significant effect on the fracture strain response (P = 0.0452). The highest amount of fracture strain (3.64%), like UTS, occurs at the lowest raster angle (0°) and high levels of infill density. The individual effect of infill density and raster angle parameters on the fracture strain, with relative impacts of 6.15 and 18.60, respectively, is greater than the interaction between these two parameters, with a relative effect of 2.56 (Fig. 11). The response surface plot shows that the effect of infill density on the fracture strain response is less than its effect on UTS. The fracture strain generally increases with increasing infill density from 20 to 50%. By the comparison of the specimens (9 and 15), it can be seen that with the constant parameters of layer thickness and raster angle (B = 0.2 mm, C = 45°) and increasing infill density from 20 to 50%, the amount of fracture strain increased by 17% (Table 4). However, insignificant changes are observed with increasing infill density from 50 to 80.

Fig. 13
figure 13

3D response surface plots of the interaction between a infill density and raster angle (AC), b layer thickness and raster angle (BC) for fracture strain response

As the raster angle increases, the fracture strain and UTS response decrease linearly. With comparing the specimens (13 and 15), it was observed that with the constant parameters of infill density and layer thickness (A = 50%, B = 0.2 mm), with increasing the raster angle from 0° to 45°, the amount of fracture strain decreased by 17%, and by comparing specimens (14 and 15) with increasing the raster angle from 45° to 90°, the fracture strain decreased by 18% (Table 4). In fact, for the raster angle of 0°, the fused filaments withstand the applied tension until the moment they fracture, but with increasing the raster angle, the role of the fused filaments decreases in the applied tension, and the sample fails with less longitudinal strain. As with the UTS response, the correct selection of raster angle can significantly reduce the cost, weight, and manufacturing time of specimens. For example, by comparing specimens (1 and 6) with the same layer thickness of 0.1 mm, the raster angle of 0° leads to the first specimen with an infill density of 20% to have a value of fracture strain 77% higher than specimen 6 with an infill density of 80%, which is a significant amount. The same behavior is observed in the comparison of specimens (3 and 8).

Figure 13 (b) shows the 3D response surface plots of the interaction effects between the raster angle and the layer thickness parameters (BC) on the fracture strain response. According to Table 6, the interaction between these two parameters (P = 0.0039) significantly affected the fracture strain response. The highest fracture strain (3.55%) occurs at the lowest raster angle (0°) and the middle layer thickness. The effect of the interaction between these two parameters, with a relative impact of 4.22 is greater than the individual effect of the layer thickness parameter (B), with a relative effect of 3.28 and less than the raster angle parameter (C), with a relative effect of 18.60 (Fig. 11). The fracture strain increased with increasing layer thickness from 0.1 to 0.2 mm and then decreased with increasing layer thickness from 0.2 to 0.3 mm. For example, by comparing specimens (11 and 15) with constant infill density and raster angle parameters (A = 50%, C = 45°), by increasing the layer thickness from 0.1 to 0.2 mm, the amount of fracture strain increased by 24%.

Similarly, by comparing samples (12 and 15) by increasing the layer thickness from 0.2 to 0.3 mm, the fracture strain value decreased by 26% (Table 4). In general, a considerable reduction in the layer thickness leads to the early phenomenon of necking during tension, and the specimen fractures sooner. Also, if the layer thickness is too high, the fused filaments will not be able to cover the voids and cavities well. This issue will cause the fracture to occur in those areas before the fused filaments experience the phenomenon of necking. Accordingly, it seems that a medium layer thickness can provide more longitudinal strain for FFF components. The curved-like behavior of the layer thickness parameter indicates the significance of the term (B2), and the linear behavior of the raster angle parameter indicates the insignificance of the term (C2) in the fracture strain response (Table 6).

Optimization depends on our goals in conducting experiments for each parameter and response. For all three parameters, the target is within the range of levels defined in the DOE, and for UTS and failure strain responses, the maximum value has been selected as the target. It is also possible to specify the importance of each parameter and answer according to the intended goals. For each of the parameters and answers, equal importance was considered. Desirability function analysis was used to optimize all variables simultaneously. In this function, each answer is converted into an individual desirability on a scale of 0 to 1, and the average desirability of these two answers is known as the main desirability. Desirability 1 is the most suitable mode for answers [39]. The prediction of the results shows that the maximum values for UTS and failure strain responses are 34.92 MPa and 3.59%, respectively, with an overall desirability of 1. The optimal parameters to maximize the responses are 73.42% infill density, 0.277 mm layer thickness, and 0° raster angle. An experimental test with three repetitions was performed to validate these results, and the results are presented in Table 7.

Table 7 Validation experiment of optimal parameters

3.4 Fractography studies

In order to provide a better understanding of the failure mechanism of the printed samples, their failed cross-sectional view was evaluated using a field emission scanning electron microscope (FESEM). Figure 14 shows the fracture cross-section morphology of the printed specimens with 0° raster angle and 80% infill density, the layer-by-layer fabrication mechanism being completely clear. No intra-layer bonding is observed between adjacent filaments, as none of the specimens are produced by solid infill density. As mentioned earlier, for 0° raster angle, individual filaments experience tension separately, and their rupture leads to sample failure. Proper overlapping of layers stacked on each other for the sample with a layer thickness of 0.1 mm leads to strong interlayer bonds and reduced voids between layers. Thus, a smooth and uniform fracture surface is created so that the interlayer bonding line is hard to see (Fig. 14 (a, b)).

Fig. 14
figure 14

FESEM image of fracture cross-section at 0° raster angle and 80% infill density for ab 0.1 mm, cd 0.3 mm layer thickness, ef porosity, void, and cavities on individual fiber cross-section

However, for the thickness of the layer of 0.3 mm, the cylindrical cross-section leads to weak bonding between the layers, and as a result, the size of the voids has increased compared to the thickness of the layer of 0.1 mm. Nevertheless, as evident in the figure, the number of interlayer bonds in the thickness of 0.3 mm has significantly decreased, and they have given their place to the strong bond of polymer chains in the melted filaments (Fig. 14 (c, d)). During printing, factors such as porosity, gap, and hidden voids may occur in the fiber’s cross-section, which affects the mechanical properties of the FFF samples (Fig. 14 (e, f)). These factors can be minimized by choosing the proper nozzle temperature and print speed parameters related to the fibers’ viscosity and cooling rate, respectively.

4 Conclusion

The present article evaluated the effect of infill density, layer thickness, and raster angle parameters on the mechanical properties of the ultimate tensile strength and fracture strain of specimens produced by fused filament fabrication (FFF). The digital image correlation (DIC) technique was used to calculate the displacement and full-field surface-strain field. Strain distribution data extracted from the DIC technique can show a better understanding of the mechanical performance and predict the location of the damage on the specimens in the experimental test. The design of experiment and response surface method (RSM) were used to validate the experimental results. The RSM method helped to achieve the desired optimal parameters, individual, and the interaction effect between them in UTS and fracture strain responses with a minimum number of experiments. Statistical analysis showed that a quadratic model is the most suitable option for the regression of experimental data. A comparison of the predicted values using the quadratic model and experimental values shows that the average error observed for UTS and fracture strain are 2.96 and 2.87%, respectively, which indicates a good agreement between the experimental and predicted data. 3D response surface plots show that with increasing infill density from 20 to 50%, insignificant changes are observed in UTS values, but there is a significant increase with increasing infill density from 50 to 80%. Also, the increase in infill density increased the fracture strain values, but the changes were small. Also, by increasing layer thickness, UTS values increase, but for fracture strain, a high response level can be reached with a medium layer thickness (approximately 0.2 mm). The raster angle parameter was identified as the most crucial parameter for both responses. This parameter is directly related to how the load is transferred within the specimen. The behavior of fused filaments in FFF can be considered similar to the behavior of fiber in composites. Accordingly, printing the sample with a raster angle of 0° (parallel to the tension direction) resulted in the highest amount of UTS and fracture strain. The statistical results show that the optimal parameters for 3D printing of ABS plus are 73.42, 0.227 mm, and 0° for infill density, layer thickness, and raster angle, respectively. Experimental tests have validated these results and can be used to produce ABS plus polymer parts with FFF technology.