1 Introduction

The production of advanced multi-material metal components through additive manufacturing (AM) provides an opportunity to overcome the limitations of traditional materials by combining different and tailored properties in a single structure while maintaining a high degree of design freedom [1, 2]. In particular, additively manufactured functionally graded materials (FGMs), which provide a smooth transition between the two dissimilar materials, are increasingly emerging [3]. In this way, issues related to a sharp interface between the two materials with different physical properties are minimized, including the formation of brittle intermetallic compounds, solidification cracking, and more severe residual stress formation due to the sudden change in thermal properties [1, 4]. FGMs are distinguished as either discontinuous or continuous. In the former, the spatial variation in composition and properties follows a discrete stepwise pattern, while in the latter, this occurs continuously (cFGMs) [3, 5]. Directed Energy Deposition-Laser Beam (DED-LB) and Powder Bed Fusion-Laser Beam (PBF-LB) are the most widely employed powder-based AM technologies for the fabrication of multi-material structures [2, 6]. Furthermore, because additive manufacturing typically involves layer-by-layer construction, the majority of research has focused on structures where the spatial variation of the composition is along the build direction, especially using DED-LB. In contrast, studies where this is within the layer and utilizing PBF-LB are less common and have only recently been realized [2, 6,7,8,9].

PBF-LB exploits a laser source that melts the powder in a highly localized manner into a melt pool, which then undergoes rapid solidification to build a three-dimensional part in a layer-by-layer strategy. However, due to the extremely steep thermal gradients generated and the repeated thermal cycles to which the material is subjected, a complex and large residual stress field is developed, which can also cause the manufacturing process to fail [10, 11]. In the absence of appropriate analysis and control, residual stresses can give rise to cracking during the manufacturing process, detachment from the build platform, and significant distortion in the final part [2, 10,11,12]. They also have a major influence on the fatigue properties of AM parts, so that post-process machining or heat treatments are often required to improve their mechanical behavior [13,14,15].

The onset of residual stresses in AM is attributed to two mechanisms: the temperature gradient mechanism (TGM) and the cool-down phase, as defined by Mercelis and Kruth in [16]. The TGM defines that residual stresses are formed due to the occurrence of significant thermal gradients in close proximity to the laser spot. Following the passage of the laser beam, the irradiated area is characterized by tensile stresses, with a compressive region surrounding it. The cool-down phase, on the other hand, is associated with the shrinkage of the molten top layer, which is constrained by the underlying solid material during solidification, thereby producing tensile stresses in the upper layer and compression in the layers below. In addition, the process parameters used, as well as the material properties, size, and geometry, are critical not only to the manufacture of the part but also to the complexity and magnitude of the residual stresses [10, 11, 17,18,19,20,21,22,23,24]. Laser power, scan speed, and scan strategy must be optimized to achieve a fully dense part while minimizing residual stresses and are also material dependent [10, 22, 25,26,27,28,29]. The deposition strategy, which conditions the temperature history to which the part is subjected, exerts a profound impact on the shape characteristics and magnitude of the residual stress field and on the distortion of the final part [26,27,28,29].

Notwithstanding the steady growth of studies on the fabrication of FGM structures, the analysis of the contextual residual stresses generated is scarce, even considering all metallic AM technologies. In particular, residual stress measurements on FGM specimens are poorly reported in the literature. Woo et al. measured the through-thickness residual stress field in five different DED-LB discontinuous between-layer FGM ferritic-austenitic steel specimens using various techniques [8]. They found that by using a bidirectional scanning strategy, the stress trend took on a sinusoidal shape as the number of interlayers increased. In addition, due to the large change in the thermal expansion coefficient observed between the fully austenitic composition and the 50% austenitic and 50% ferritic composition, a significant change from tension to compression is measured, up to 950 MPa. However, by modifying the scanning strategy to orthogonal or island scanning, the residual stress range drops significantly to about 430 MPa and the stress profile across the thickness (direction of composition change) returns to a smoother trend. In a subsequent study, Shan et al. developed a multiscale framework based on the inherent strain method to predict residual stresses and distortion in FGMs fabricated by DED-LB [30]. The authors extended the previous study [8] with a numerical model and found that increasing the number of interlayers to nine mitigated residual stress oscillations and reduced distortion in the final part. This suggests that moving towards continuous composition variation, i.e., cFGMs, makes the residual stress field more uniform. Furthermore, coupling this effect with the use of an island scanning strategy also leads to a reduction in the residual stress range through the thickness. Ghanavati et al. [31] found similar results, where mitigating sharp changes in residual stress was achieved by adopting a smoother compositional change in a between-layer multi-material SS316L-IN718 structure realized by DED-LB. Li et al. found that implementing buffer layers of AISI 316L and Inconel 718 in multi-material depositions of Cu on AISI 304L by using DED-LB resulted in lower maximum tensile residual stress and defect-free copper [32]. In their investigation, Shin et al. measured only surface residual stresses by X-ray diffraction in steel FGM specimens produced by DED-LB, in which the composition changed from fully ferritic to austenitic along the build direction, by exploiting 3 interlayers of 5 mm each [33]. Zhao et al. have developed a numerical model for residual stress analysis of between-layer TC4-Inconel 718 FGMs [34]. However, their work did not take into account the typical process parameters of PBF-LB, which generate different residual stress fields, and in particular did not consider within-layer FGMs. Rodrigues et al. used wire and arc additive manufacturing to build an AISI 316L stainless steel to Inconel 625 FGM, with a smooth transition along the build direction in steps of 5% composition changes [35]. Compared to a direct transition between the two materials, the FGM specimen exhibited higher residual stresses as measured by neutron diffraction. This result was caused by the greater formation of detrimental precipitates in FGM, which created volumetric mismatches that ultimately generated higher residual stresses. Bodner et al. fabricated a between-layer AISI 316L-Inconel 625 cFGM specimen using a novel deposition technique called liquid dispersed metal PBF [36]. The authors observed that the residual stresses exhibited a C-shaped profile through the thickness of the specimen with superimposed fluctuations at the interfaces between the materials. Subsequently, the same authors measured residual stresses in a multi-material structure fabricated using the same technology, with both between-layer and intra-layer variations of these materials [37]. Extremely high residual stresses, even exceeding 900 MPa, developed as a result of the process. In addition, stress concentrations were observed at transitions between materials, both between- and intra-layer. However, to the authors’ knowledge, there is no work that has measured residual stresses in FGMs made by PBF-LB. Furthermore, only Rodrigues et al. analyzed a structure with smooth composition variation, but due to the high number of precipitates, they obtained a counterintuitive result with a direct interface that performed better than FGM; therefore, smooth variations in composition certainly require further investigation [35]. In addition, only Bodner et al. analyzed residual stresses in an intra-layer multi-material structure [37]. In fact, the feasibility of manufacturing such layer-level FGMs by using PBF-LB has been only recently demonstrated, and the contextual residual stress characterization is still lacking in the literature. The mechanical properties of additively manufactured specimens are significantly influenced by the building direction [38,39,40]. This also applies to the direction in which the variation in material composition is made in FGMs. As a result, the quantification of residual stresses cannot be simply inferred from analogous studies on between-layer multi-material PBF-LB manufactured samples. Finally, none of the above studies analyzed the influence of material-specific process parameters on residual stresses in FGM structures.

The main objective of this work is to measure residual stresses in cFGM structures of AISI 316L steel and 18Ni Maraging 300 fabricated via PBF-LB, where the continuous variation in composition is within the same layer. To achieve this goal, the contour method, a destructive measurement technique capable of providing a 2D map of residual stresses normal to a section plane, was used [41]. This measurement technique has emerged especially for measurements on welds because it is insensitive to microstructural gradients, which also makes it particularly suitable for AM components [8, 42,43,44]. Additionally, it is more readily available than other techniques providing in-depth measurements, like neutron diffraction or synchrotron X-ray diffraction [42, 45]. In addition, the effect on residual stresses of solution annealing and aging heat treatment, which are required to improve the mechanical properties of martensitic steel, was investigated. Finally, by varying the scanning speed, the impact of adopting material-differentiated process parameters on the residual stress field has been examined.

2 Materials and methods

2.1 Experimental procedures and materials for sample preparation

The continuous and functional gradient was obtained between two steels with different metallurgical and mechanical properties. Specifically, the materials studied were AISI 316L austenitic steel and 18Ni Maraging 300 martensitic steel. Both powder materials were derived from a standard gas atomization process and therefore have a spherical shape, making them suitable for the PBF-LB process. Prior to printing, the powders were sieved to obtain a particle size in the range of 15–45 µm. The chemical composition of both materials, shown in Table 1, was provided by the manufacturers. Additional information regarding the investigated materials can be found in the study [46]. Table 2 shows the mechanical property values of the materials used, obtained from previous experiments [9], which were subsequently adopted in the FE model to measure residual stresses using the contour method.

Table 1 Nominal chemical compositions (wt%) of the martensitic steel powder (18Ni Maraging 300) and austenitic stainless steel powder (AISI 316L) utilized to manufacture the cFGM samples
Table 2 Mechanical properties of materials obtained from static tensile tests on single material specimens [9]

To study the evolution of residual stresses in components made of cFGMs within the same layer, four parallelepiped-shaped specimens with dimensions of 75 × 10 × 12 mm were fabricated. The height of the specimens was chosen to reduce distortion after the removal of the build platform [47, 48]. The cFGM samples were produced on Concept Laser’s traditional M1 machine, which was modified in-house to fabricate cFGM samples within the same layer [49]. An illustrative diagram of the setup used is shown in Fig. 1. The dimension of 75 mm was divided into three regions of 25 mm each, with the central section having a continuous graded transition from 18Ni Maraging 300 to AISI 316L.

Fig. 1
figure 1

Schematic diagram of the operation of the powder spreading system, showing the movements of the various moving parts of the machine: the distributor blade, at the end of scanning each layer, moves from left to right; the building platform descends by an amount equal to the layer thickness, while the powder platform rises by the same amount; the distributor blade then moves from right to left, resulting in the appearance of a mixture with a linearly variable composition in the powder mixing zone

The PBF-LB process for fabricating the samples was performed by keeping all process parameters constant, with the exception of the laser beam scanning speed, which was varied within the same sample, resulting in a total of three cases. As shown in Fig. 2, specimen AM-1 was divided into two processing zones and manufactured with two distinct scanning speeds: V1, equal to 180 mm/s on the AISI 316L side, and V3, equal to 120 mm/s on the 18Ni Maraging 300 side. For specimens AM-2 and AM-3, the scanning speed V1 was kept constant throughout the specimen. Finally, specimen AM-4 was divided into three processing zones and manufactured with three different scanning speeds: the AISI 316L region was produced with a scanning speed of V1, the 18Ni Maraging 300 region with a scanning speed of V3, and the continuous functionally graded region with an intermediate scanning speed of 150 mm/s (V2). The laser power of 80 W, laser beam diameter of 200 µm, layer thickness of 30 µm, and track spacing of 140 µm were consistent process parameters for all samples. Additionally, the three different values of laser beam scanning speed result in three distinct values of volumetric energy density (VED) [50]. Specifically, VED1 is equal to 105.82 J/mm3, VED2 is equal to 126.98 J/mm3, and VED3 is equal to 158.73 J/mm3. Figure 2 displays the three distinct case studies obtained along with the replication for the second case (AM-2 and AM-3).

Fig. 2
figure 2

Schematic illustration of cFGM sample dimensions and the three case studies. The island strategy is visible on the specimens’ surface with three colors identifying the three composition zones: light red for zones wholly composed of AISI 316L, light blue for those entirely composed of 18Ni Maraging 300, and light green for the composition gradient zones. Solid lines in cyan indicate the boundaries between zones produced at different laser scan speeds. The scanning speeds indicated by V1, V2, and V3 are equal to 180 mm/s, 150 mm/s, and 120 mm/s, respectively. Additionally, dashed red lines indicate the cutting planes along which the contour method was applied

The process parameters selected for the fabrication of the samples were optimized in previous works by the same authors on the same materials, resulting in a final density of the fabricated samples greater than 99% (tested by Archimedes’ method) [51, 52].

In addition, all samples were fabricated using Concept Laser’s patented random island scanning strategy, which uses a square island size with one side equal to 5 mm. Furthermore, between the different layers, the islands undergo a variation in the XY plane with an offset of 1 mm in both directions. These solutions aim to reduce the thermal stresses generated during the PBF-LB process, as has been demonstrated in the literature [8, 10, 19, 53, 54].

All specimens produced, except for sample AM-2 (see Fig. 2), were subjected to heat treatment in order to enhance the mechanical properties of the martensitic steel. In accordance with previous studies in the literature [46, 55, 56], a solution annealing treatment was performed at a temperature of 815 °C for 1 h followed by air cooling, and then an aging treatment was performed at a temperature of 480 °C for 5 h followed by air cooling. Figure 3 shows a photograph of the specimens produced.

Fig. 3
figure 3

Image of cFGM specimens fabricated by the PBF-LB process

2.2 Metallographic characterization

In order to evaluate the quality of the joint obtained in the four samples produced, the latter were subjected to metallurgical analyses, such as macro- and microstructural analyses and chemical examinations. The metallographic characterization was performed on the cross sections (YZ plane) of each specimen. The specimens were prepared in accordance with the required methodology to evaluate the distribution of defects, such as porosity, and to characterize the interface area by studying the possible presence of lack of fusion along the grading direction between the two materials, which could compromise the joint. The specimens were observed using an inverted optical microscope (Nikon Eclipse MA200, Nikon Corporation) with a digital camera. The analyses were carried out in image analysis software such as ImageJ and Matlab, with bespoke algorithms developed to obtain the desired results.

Subsequently, a microstructural analysis was performed on the same samples by chemical etching in order to reveal the phases present in the different zones and especially in the gradient zone. The chemical reagent used to reveal the microstructure was composed of nitric acid, hydrochloric acid, and lactic acid in a ratio of 1:2:6.

Finally, the samples were chemically characterized to reveal the possible presence of contamination in the areas of pure materials and the gradual and continuous evolution of the chemical composition between the two materials. For this purpose, a microanalysis using an energy-dispersive X-ray spectroscopy (EDS) probe was performed to allow a quantitative pointwise analysis of the chemical composition of the cFGM specimens fabricated. The chemical examination was conducted along the YZ plane. Characterization was performed using a scanning electron microscope (SEM, ZEISS GeminiSEM 500) coupled with an Oxford Instruments X-Max Extreme EDS detector.

2.3 Residual stress measurement set-up and procedure

The residual stresses were determined utilizing the contour method, which generates a two-dimensional map of residual stresses perpendicular to a cross-section with a single measurement [41]. This measurement method, as in other destructive techniques, leverages stress relaxation post-material removal, producing measurable displacements. With respect to other relaxation methods where an inverse solution is required to compute residual stresses from the strains, for instance, hole drilling, the contour method determines residual stresses from the measured deformations by directly utilizing a finite element static analysis. This is possible because the displacements are measured at the location of stress relief rather than on a pre-existing free surface. The ideal theoretical implementation of the contour method is based on a variation of Bueckner’s superposition principle. Consider three states: A, B, and C. State A represents the undisturbed part, which is affected by the residual stresses to be measured. In State B, the part was cut into two parts and deformed along the cut plane due to the relaxation of residual stresses. In State C, the geometry of the deformed part, but without the presence of residual stresses, is restored to its initial shape. Thus, superimposing State B with State C yields the original residual stresses present in State A:

$${\Sigma }^{\text{A}}={\Sigma }^{\text{B}}+{\Sigma }^{\text{C}}$$
(1)

where \(\Sigma\) is the stress tensor. Given that the residual stresses are zero on the cut and deformed surface of State B, this technique allows for the determination of residual stresses only at the cut plane. However, since it is not possible to experimentally measure tangential displacements after cutting, but only normal displacements, only residual stresses normal to the cut plane can be measured with the contour method. Therefore, on the cut plane, Eq. (1) becomes:

$${\Sigma }_{\perp }^{B}=0 \to {\Sigma }_{\perp }^{A}={\Sigma }_{\perp }^{C}$$
(2)

where the subscript indicates the normal component of the stress tensor.

In the contour method, stress relief is attained through the precise sectioning of the component using wire electrical discharge machining (WEDM). The contours of the two newly formed surfaces are measured using high-accuracy techniques, and after processing this data, a finite element analysis is exploited to infer the stresses originally present along the cut plane, imposing the measured displacements as boundary conditions [41, 42, 45]. Consequently, the contour method is a measurement technique comprising several steps. Firstly, the component is sectioned through WEDM. Secondly, the two cut surfaces, which have undergone relaxation of residual stresses and thus exhibit deformations, are measured. Subsequently, the point clouds of measured displacements are processed. Finally, the residual stresses are calculated from the displacements through finite element analysis.

Prior to measurements, the cFGM specimens were removed from the build platform with a single WEDM cut and finishing cutting parameters. Detachment from the build platform can cause distortion in the component or alteration in residual stresses. Nevertheless, in [47, 48], it has been shown that specimens with a thickness greater than 10 mm experience significantly reduced distortions compared to thinner specimens. In addition, it has been reported in [57,58,59] that for parallelepiped-shaped specimens residual stress relaxation subsequent to detachment is more pronounced in the longitudinal direction, while the stress component in the transverse direction is minimally impacted and remains present even at high values. Furthermore, Clausen et al. [60] stated that for samples without internal features, residual stress changes due to build platform removal decrease monotonically with increasing distance from the cut surface, in accordance with St. Venant’s principle [61].

In this research study, transverse residual stresses were measured by cutting the specimens along the YZ plane, as depicted by the dashed red lines in Fig. 2. Consequently, the contour method allowed for the analysis of residual stresses along the plane with the composition gradient. At the same time, the stress component least affected by the build platform removal was measured. The material composition gradient, in fact, impacts on the level of residual stresses on such a direction. Furthermore, as previously stated, the AM-2 sample was examined prior to heat treatment to investigate its effect on the residual stress state of the cFGM components.

Contour method cuts were performed with an Agiecut Classic 2S WEDM machine equipped with a 250 µm diameter brass wire. To reduce the stresses induced by cutting and prevent the formation of a recast layer, the specimens were immersed in deionized water, clamped symmetrically as close to the cutting plane as possible, and skim cut settings were used. Before measuring the deformed surfaces, the sectioned specimens were held for several hours in a temperature-controlled laboratory to ensure thermal equilibrium. Displacements in the direction perpendicular to the cut surfaces were measured by means of fringe projection, a full-field optical technique recently proposed by the authors [62]. The schematic set-up representation is displayed in Fig. 4. A sequence of sinusoidal fringe patterns is projected onto the surface to be acquired, consequently, these fringes are modulated in phase by the height distribution of the surface itself and acquired by a camera with a resolution of 2 MPix (1624 × 1234 pixels). By analyzing the images, the 3D coordinates of the sample surface are reconstructed from the acquired phase map [62,63,64]. For each specimen analyzed, the point clouds measured on the two sides of the cut were aligned and averaged to eliminate the contribution of shear stresses [62]. The peak-to-valley range of the averaged contour was between 30 and 40 µm for all samples, with no significant variation in the displacement profile across all examined specimens. To reduce the effect of noise on the calculated stresses, cubic bivariate splines were employed. The fitting splines’ parameters were chosen by minimizing the residual stress uncertainty, following the procedure outlined by Prime et al. in [65]. Afterwards, the experimentally measured perimeter of the deformed surface was extruded to generate a three-dimensional elastic finite element model of the cut part using the ABAQUS software. The model mesh was generated using linear brick elements with reduced integration C3D8R, with dimensions of 0.1 mm × 0.1 mm × 0.1 mm on the cut plane and becoming coarser away from it. The regions completely composed of AISI 316L and those entirely made of 18Ni Maraging 300 were assigned Young’s moduli and Poisson’s ratios indicated in Table 2. These elastic moduli were experimentally measured in a previous study [9] by static tensile tests on single-material specimens. Conversely, the continuous functional gradient zone from austenitic to martensitic steel was divided into nine discrete parts in the longitudinal direction and assigned the corresponding elastic properties derived by the rule of mixtures. This is a weighted average based on the percentage of composition, specifically \(E=f{E}_{AISI 316L}+\left(1-f\right){E}_{\text{MARAGING}}\), where \(f\) is the percentage of AISI 316L in the composition of the gradient region. Finally, the smoothed displacements were changed in sign and imposed on the finite element model as boundary conditions. Furthermore, three additional displacement constraints were applied to prevent rigid body motions (Fig. 5a), and a static analysis was conducted.

Fig. 4
figure 4

Fringe projection set-up for surface contour measurements

Fig. 5
figure 5

a Finite element model divided into zones with different material properties, one region of 18Ni Maraging 300, one region of AISI 316L, and the gradient zone divided into nine regions with increasing percentage \(f\) of AISI 316L. b Structured mesh with linear brick elements with reduced integration

3 Results and discussions

Observation of the polished samples using an optical microscope revealed the presence of discontinuities within the fabricated volume. For each specimen, an area with a height of 3.5 mm and a width of 35 mm centered on the transition zone between the two materials was photographed and subsequently examined by image analysis. A binary filter (threshold) was applied to the images to maximize the contrast between the discontinuities and the material surrounding them.

Figure 6a–d shows the analyzed images after the application of the threshold and the results of the analysis. The discontinuities detected can all be classified as porosity or lack of fusion based on their shape and no cracks were observed. The porosities were characterized according to their quantity (Fig. 6e) and their area (Fig. 6f). Using a bin width of 5 mm for both graphs, the first and last bins represent the results obtained in 18Ni Maraging 300 and AISI 316L, respectively. The remaining five central bins, on the other hand, show the trend of porosity within the mixing zone and are an indication of its gradualness. On the left vertical axis of Fig. 6e are the percentages of the number of discontinuities for each bin compared to the total number of discontinuities for each sample, which can be read from the bar graph, while on the right vertical axis are the quantities for each bin, represented by the line graph. The same type of representation has been used in the graph in Fig. 6f. All trends show that there is a gradual reduction in the number of discontinuities and their extent as one moves from 18Ni Maraging 300 to AISI 316L. The only exception is specimen AM-1, which has a high concentration of discontinuities in the area where the process parameters change, in the middle of the mixing zone. It is also important to note that, unlike the AM-1 specimen, the AM-4 specimen does not show any peaks in the pore distribution, even though it was produced using variable process parameters.

Fig. 6
figure 6

Discontinuity analysis. ad Appearance of the metallographic specimens after threshold application; trend of discontinuities (e) and their extent (f) detected in the metallographic specimens along the Y-direction with 5 mm interval. The bars indicate the percentage for each interval of the total for each specimen, and the lines indicate the absolute amount for each interval

The microstructure in the different zones shown in Fig. 7 was determined by metallographic examination under an optical microscope on the same specimens after chemical etching. Figure 7 shows how the identifiable structural constituents and the proportions between them vary from one end of the specimen to the other. The transition from a fully martensitic to an austenitic structure is gradual, and in the gradient zone both are visible at the same time.

Fig. 7
figure 7

OM analysis, where it is possible to observe the change in microstructure from a martensitic in the zone consisting of 18Ni Maraging 300 steel, b duplex structure in the gradient zone, and c austenitic where only AISI 316L steel is present

Information about the different phases can also be deduced by analyzing the chemical concentrations of the elements in the two materials involved. Figure 8 shows the chemical composition determined in the central region of samples AM-1, AM-3, and AM-4. The analysis was conducted on the cross sections (YZ plane) of each sample. The study area is equal to 30 mm along the Y-direction and includes within it the graded interface equal to 25 mm between the two materials. From the results of the chemical analysis by energy dispersive spectroscopy (EDS), it is possible to confirm the existence of a gradual and continuous transition of chemical properties between the two materials, which is very similar to the desired transition in the process of powder separation. In particular, by analyzing the evolution of the concentrations of chromium (for AISI 316L) and cobalt (for 18Ni Maraging 300), a transition can be observed from maximum values corresponding to the zones of each material (on opposite sides of the area studied) to zero values at the end, where these elements are absent. This result is significant because it shows that the equipment developed in this work can prevent contamination in the different single material zones. Contamination is a well-known problem in the literature [66, 67] that hinders the fabrication of functionally graded material components at the layer level using a traditional PBF-LB system (with a powder platform from below) and a blade/roller powder distribution method. In addition, as shown in Fig. 8, the concentrations of these elements gradually diffuse within the transition zone created by the powder separation system, contributing to the strengthening of the interface [68]. The results of the EDS analysis shown in Fig. 8, confirm a firm and favorable bond between the two materials, in agreement with what has been reported in the studies of Wei et al. [69] and Tan et al. [70]. Finally, it is important to note that the measurement values obtained from the three different samples overlap, indicating a uniform distribution of the different phases in the different samples prepared.

Fig. 8
figure 8

Chemical composition analysis of the cross-section of samples AM-1, AM-3, and AM-4, within the restricted area of the YZ plane

In order to obtain the stress maps by the contour method, the procedure proposed by Prime in [65] for selecting splines to fit the experimental data was applied. Cubic bivariate splines were used. Two knots were used in the z-direction, which represents the building direction, while in the y-direction, which represents the longitudinal direction, the number of knots was varied uniformly from 3 to 15. FE analyses were performed for each case. At each node in the FE model, the standard deviation of the residual stress obtained for one smoothing spline compared to that obtained with the immediately coarser smoothing spline with one knot less was calculated to estimate the uncertainty at each node. The root mean square of the uncertainties at each FE node was then calculated to estimate the global uncertainty over the entire stress map. Finally, the spline with the lowest residual stress uncertainty was selected together with the corresponding residual stress map. The selected knot spacing in the specimen longitudinal direction y and the estimated global stress uncertainties for each specimen analyzed are reported in Table 3.

Table 3 Knot spacing in the longitudinal direction y and global stress uncertainties for specimens AM-1, AM-2, AM-3, and AM-4

Figure 9 depicts the transverse residual stress map of the non-heat-treated AM-2 specimen, as measured by the contour method. Dashed lines indicate separating planes between different materials and the composition gradient zone. To aid in the visualization of residual stress trends throughout the specimen’s thickness and in different material composition zones, five vertical scan lines were extracted from the residual stress map. Measurements were collected from specific longitudinal lengths in different zones of the specimen: 12 mm for the fully maraging zone, 24.5 mm for the interface between the maraging and composition gradient zones, 37 mm at the center of the gradient zone, 49.5 mm for the interface between the gradient zone and AISI 316L, and 62 mm for the fully AISI 316L zone (Fig. 9b). The two-dimensional transverse stress map reveals tensile stress concentrations at the top and bottom of the specimen, balanced by compression in the center. Notably, the Maraging zone displays the highest tensile stresses, surpassing 800 MPa. Similarly, elevated residual stress levels were reported by Bodner et al. in [37] in an intra-layer multi-material structure of Inconel 625 and AISI 316L. Furthermore, the upper region of the map exhibits tensile stresses that initiate from the left edge of the Maraging, extend throughout the gradient zone, and reduce approximately halfway towards the AISI 316L area, where a decrease to a stress-free region is found at the right edge of the specimen. The reduced residual stresses in the austenitic steel may result from utilizing process parameters that were optimized for AISI 316L and applied uniformly throughout the AM-2 specimen [51]. Additionally, this decrease can be attributed to the different cooling conditions across the specimen due to the varying thermal conditions of the surrounding material during construction, as highlighted by de Oliveira et al. [71]. Figure 9b clearly illustrates the C-shaped distribution of residual stresses along the thickness of the specimen. In addition, it can be seen that the 18Ni Maraging 300 is characterized by the most significant change from tensile at the surface to compressive at the center, from approximately 850 to almost − 200 MPa. The generation of residual stresses in the maraging steel using the PBF-LB method significantly depends on the process parameters used, which can also affect a partial transformation from austenite to martensite [40, 71]. De Baere et al. [72] noted that for a nominal power density similar to that used in this work, an effective laser power of about 50 W, which is defined as the product of the nominal laser power and the laser absorption coefficient (between 0.3 and 0.5 for 18Ni Maraging 300 [73, 74]), results in the development of a tensile stress field on the surface. Consequently, a subsequent heat treatment is necessary to induce the austenite–martensite transformation, which enhances the surface hardness [46] and modifies the residual stress state of the component.

Fig. 9
figure 9

a Transverse residual stress map of sample AM-2. Dashed vertical lines indicate the separation planes between the materials. b Residual stresses throughout the height of the specimen extracted along the vertical scan lines in a, respectively located at longitudinal lengths of 12 mm (Maraging), 24.5 mm (Maraging-Gradient zone), 37 mm (Gradient zone), 49.5 mm (Gradient zone-AISI 316 L), and 62 mm (AISI 316L). The markers are included to aid visualization; the actual measurement points are spaced at 0.1 mm intervals

The transverse residual stress map for the AM-3 sample, produced using a single scan speed of 180 mm/s throughout the whole specimen and then subjected to heat treatment, is shown in Fig. 10. The maximum stress is now localized at the interface between the 18Ni Maraging 300 and the gradient zone, and is approximately 800 MPa after heat treatment. Moreover, the tensile zone at the specimen’s top has reduced in size and is now concentrated in the mixed zone between the two materials. It extends about halfway across the base materials and gradually becomes stress-free towards the lateral edges. Additionally, the magnitude of the tensile zone in the lower section of the specimen has significantly decreased. Specifically, the highest local stress, which is observed in the gradient zone, has reduced from 520 MPa to nearly 280 MPa, resulting in a 45% decrease. After heat treatment, an overall reduction in peak residual stresses in the top surface of the specimen can be appreciated from Fig. 10b. Nevertheless, the 18Ni Maraging 300 base material displays the most significant relief in tensile residual stresses, with surface compression now occurring up to 10 mm from the left lateral edge. Furthermore, as displayed in Fig. 10b, the residual stresses at the top surface of the maraging steel have decreased by almost 50% from 850 to 450 MPa. Becker et al. [75] similarly reported decreased residual stress in maraging steel after solution annealing and subsequent precipitation age hardening heat treatments, as measured through hole drilling. Tensile residual stresses were reduced by as much as 70%.

Fig. 10
figure 10

a Transverse residual stress map of sample AM-3. Dashed vertical lines indicate the separation planes between the materials. b Residual stresses throughout the height of the specimen extracted along the vertical scan lines in a, respectively located at longitudinal lengths of 12 mm (Maraging), 24.5 mm (Maraging-Gradient zone), 37 mm (Gradient zone), 49.5 mm (Gradient zone-AISI 316 L), and 62 mm (AISI 316L). The markers are included to aid visualization; the actual measurement points are spaced at 0.1 mm intervals

Figures 11 and 12 display the transverse residual stress maps for AM-1 and AM-4 specimens, respectively. Figure 11 illustrates that specimen AM-1, produced with two scanning speeds (refer to Fig. 2), exhibits slightly reduced residual tensile stresses on the upper surface compared to specimen AM-3, particularly in the section composed entirely of 18Ni Maraging 300. The highest stress seen in Fig. 11b occurs at the intersection of the gradient zone and AISI 316L, measuring approximately 700 MPa. This value is 12% lower compared to the cFGM sample produced utilizing a single scanning speed for all regions with distinct material compositions, as shown in Fig. 10b. From the results presented in Fig. 12a, it is evident that utilizing varying scan speeds for the three regions, each with different material composition, leads to reduced residual stresses across the component. This is especially noticeable on the upper surface of the specimen, where the area with the highest level of tensile stress is now of lower magnitude, ranging between 400 and 550 MPa, and is also significantly smaller in extension. The highest tensile stress of approximately 560 MPa occurs at the interface between the 18Ni Maraging 300 and the region of composition gradient. Thus, by using material differentiated process parameters, the maximum residual stress was reduced by 30% compared to the one-set condition, with even greater reductions in other areas of the specimen.

Fig. 11
figure 11

a Transverse residual stress map of sample AM-1. Dashed vertical lines indicate the separation planes between the materials. b Residual stresses throughout the height of the specimen extracted along the vertical scan lines in a, respectively located at longitudinal lengths of 12 mm (Maraging), 24.5 mm (Maraging-Gradient zone), 37 mm (Gradient zone), 49.5 mm (Gradient zone-AISI 316 L), and 62 mm (AISI 316L). The markers are included to aid visualization; the actual measurement points are spaced at 0.1 mm intervals

Fig. 12
figure 12

a Transverse residual stress map of sample AM-4. Dashed vertical lines indicate the separation planes between the materials. b Residual stresses throughout the height of the specimen extracted along the vertical scan lines in a, respectively located at longitudinal lengths of 12 mm (Maraging), 24.5 mm (Maraging-Gradient zone), 37 mm (Gradient zone), 49.5 mm (Gradient zone-AISI 316 L), and 62 mm (AISI 316L). The markers are included to aid visualization; the actual measurement points are spaced at 0.1 mm intervals

Residual stress comparison along the lengthwise direction of the samples is shown in Fig. 13. The data were obtained by analyzing contour method maps at locations of maximum stress. The measurements were extracted at a distance of 0.3 mm from the top surface of the specimen to eliminate any potential measurement errors that might occur in the surface area. It is acknowledged that the contour method is more susceptible to error than other measurement techniques in the perimetral region [42, 43, 45]. The residual stress fields in specimens AM-2 and AM-3, which were produced using a single scanning speed throughout, display fluctuations along the direction of variation in material composition, as depicted in Fig. 13. Woo et al. found a similar oscillatory residual stress pattern along the composition change direction as a result of inadequate scanning strategies [8]. In their research work, since the material composition varied along the specimen’s build direction, the intrinsic “cool-down phase” phenomenon in AM exacerbated this oscillatory pattern. Moreover, Fig. 13 clearly shows that implementing material-specific process parameters for the three composition zones, coupled with the appropriate heat treatment for the austenite-to-martensite transformation in 18Ni Maraging 300, leads to the AM-4 specimen having the least tensile residual stresses. Furthermore, the residual stress field exhibits a smoother and less oscillating pattern along the direction of the material’s compositional change compared to using the same process parameters for the entire sample. Finally, Table 4 presents the percentage reduction in the maximum tensile residual stress at a depth of 0.3 mm from the top surface with respect to the specimen AM-2, which was not subjected to heat treatment and was manufactured using a single scan speed. In sample AM-3, heat treatment alone resulted in a reduction in residual stresses in the Maraging region, as illustrated in Fig. 13. However, the maximum tensile stress was reduced by only 8%. The adoption of two distinct scan velocities in the fabrication of specimen AM-1 resulted in a reduction of 20%. Nevertheless, in the sample AM-4, by utilizing a different scan speed for each material region of the cFGM samples, a reduction of 35% was obtained.

Fig. 13
figure 13

Comparison of residual stresses throughout the longitudinal length of the four specimens, extracted from the contour method stress maps along a horizontal line at 0.3 mm below the top surface. The markers are included to aid visualization; the actual measurement points are spaced at 0.1 mm intervals

Table 4 Percentage decrease with respect to specimen AM-2, not heat treated and produced with a single scan speed, of the maximum tensile residual stress at 0.3 mm below the top surface

4 Conclusions

In this study, the transverse residual stress field was measured in cFGM specimens composed of AISI 316L and 18Ni Maraging 300 by employing the contour method. These samples were manufactured via PBF-LB and the continuous variation in composition was realized within the same build layer. Furthermore, the study analyzed the influence of solution annealing and aging heat treatments on residual stresses. Finally, this research investigated the impact of adjusting the process parameters for each composition region, namely 18Ni Maraging 300, AISI 316L, and the continuous gradient zone between them, on the residual stress field, the discontinuities distribution and the chemical composition.

Optical microscopy revealed a gradual reduction in the number and extent of discontinuities from 18Ni Maraging 300 to AISI 316L. However, specimen AM-1, divided into two processing zones and fabricated utilizing different scanning speeds, exhibited a significant concentration of porosity in the region where the processing parameters were changed. In contrast, specimen AM-4, which was manufactured with differentiated process parameters for each of the three composition zones, did not exhibit any concentration of discontinuities in regions where scan speeds varied.

The results of EDS analysis at the interface confirmed the high quality of metallurgical bonding between the two materials. Moreover, the trends in the transition region were gradual and continuous for all the different samples produced, exhibiting overlapping distributions.

Residual stress analysis, utilizing the contour method, indicated that in specimen AM-2, produced with a single scanning speed of 180 mm/s and without heat treatment, the residual stress field revealed tensile stress concentrations situated at the top and bottom surfaces. These were counterbalanced by compression at the center, and the most significant stress was identified on the top surface of 18Ni Maraging 300, measuring 850 MPa. Moreover, the utilization of heat treatment resulted in a decrease of the peak residual stresses observed on the specimen’s upper surface. And specifically, the base material 18Ni Maraging 300 experienced the largest stress relaxation, resulting in a nearly 50% decrease in the maximum tensile stress, from 850 to 450 MPa. Additionally, the use of two different scan speeds in case AM-1 resulted in a reduction of the maximum tensile stress to 700 MPa. Furthermore, in specimen AM-4, the maximum tensile stress was further lowered to approximately 560 MPa. Notably, a decrease in residual stresses throughout the component was observed. This was achieved through the utilization of three different process parameters for each of the three composition zones, in conjunction with an appropriate heat treatment. In particular, with respect to sample AM-2, at a distance of 0.3 mm from the top surface, specimens AM-3, AM-1, and AM-4 exhibited a reduction in the maximum tensile residual stress of 8%, 20%, and 35%, respectively.