1 Introduction

Additive manufacturing methods are frequently and increasingly employed manufacturing techniques of the 21st century [1,2,3,4,5]. They represent a new trend for prototyping as well as they may augment or even partly replace conventional manufacturing methods [6,7,8]. There are different additive manufacturing methods such as: Stereolithography (SLA), Selective Laser Melting (SLM), Binder Jetting, Direct Energy Deposition, Kinetic Fusion, Laminate Object Modeling (LOM), etc [9]. Among them, Fused Deposition Modeling (FDM) technique has been developed in the 1980s, and it is seen as a new candidate next to the conventional manufacturing methods such as turning, grinding, milling, casting, etc. [10].

In polymer Fused Deposition Modeling (FDM), the layered fabrication process enables increased design freedom. Design freedom makes FDM adequate for industries, where complex parts [11,12,13,14,15] are needed among others in aerospace, biomedical [16] automotive, aeronautics, biomechanical [17, 18] as well as research [19,20,21,22,23] especially for studying metamaterials [24,25,26,27]. In those fields, mechanical response must be predicted in the design phase [28,29,30].

For the computation of deformation in a structure, we need to model the material's response by means of a constitutive equation, also called the material model. Since additive manufacturing is using a layer-by-layer technique, there is an added inner structure related material response [31,32,33,34]. Finite element method (FEM) is the standard approach in solid bodies for computing structural response under mechanical loading. For a successful characterization of FDM materials by the FEM, material models are sought after in order to represent characteristics of FDM accurately [35,36,37,38].

Depending on the layer configurations at the microscale, a different mechanical response is expected at the macroscale. Effective properties at the macroscale are obtained by homogenization methods based on a representative volume element, which are well studied in the literature. Applied to the additive manufacturing, we refer to [39] for moduli prediction in FDM printed parts as a function of raster angle, to [40] for relations with the aid of void density analysis in the plane perpendicular to filaments. Topology optimization algorithm is developed specifically for carbon-fiber reinforced FDM products [41]. Homogenization techniques are applied for determining effective parameters depending on the reinforcement and build orientation of the FDM parts [42]. With the classical laminate theory, Tsai–Hill failure measure has been used for the characterization of FDM polymers [43]. Analogous to crystallographic anisotropy, material behavior of FDM polymers has been characterized by six independent constants [44]. For the computation of the product strength, a new methodology based on a digital model of microstructures depending on the working chamber orientation has been suggested [45]. The computation time of a 3D finite element analysis of FDM polymers has been reduced by means of a plate/shell assumption in [46]. Mechanical behavior of 3D printed PLA has been studied by varying printing pattern and infill density by means of experiments; and predictions are made by a machine learning based algorithm [47]. Effects of layer orientation and printing speed on mechanical properties of PLA have been investigated [48, 49]. Moreover, the mechanical properties of FDM-printed polymers (PLA and ABS) are increased by reinforcing PLA with natural fibers [50] as well as honeycomb sandwich structures [51] and ABS with boron nitride [52]. A multiscale relationship of the mechanical properties of FDM planar parts has been proposed [53]. Infill structures are investigated through topological optimization [35, 54]. As the FDM constructs layer-by-layer, the structure is composed of filaments like fibers and voids in between to be seen as inclusions. This composite material is heterogeneous and anisotropic at the macroscale, even if the fibers are homogeneous and isotropic at the microscale.

Characterization of the composite materials is well established by using the so-called classical laminate theory (CLT) [55,56,57]. CLT is seen as a candidate method for the characterization of FDM parts [58,59,60,61,62]. The elastic constants are required to characterize the mechanical behavior of the thin layers of FDM processed parts, as calculated by different methods in [63,64,65,66]. Nevertheless, the CLT uses assumptions with limited validity for FDM. According to the [59], bondings of filaments fail to be perfect. Hence, the FDM parts are composites of partially bonded filaments and voids. Because of this imperfect bonding, the existing methods [67, 68] of calculating elastic constants of solids with voids may be revised and extended. Furthermore, CLT formulations are based on linear elastic theories [69,70,71]. However, some filament materials show hyperelasticity [72,73,74]. Therefore, there is a need for an extended theory that characterizes the mechanical properties of FDM parts accurately.

FDM is a layer-by-layer production method where filaments are aligned along the nozzle path forming (straight) fibers. Overlapping is bridging the fibers in 3D printing, which increases the contact area between adjacent fibers [75]. Technically, bonding strength is supposed to remain unchanged under variation of overlap factor [76]. However, experimental investigations clearly show that the component strengths were improved [77], and stronger fiber-to-fiber bonds were formed [78,79,80] for increased overlap.

In this paper, we experimentally examine the effect of overlap and layer thickness in FDM PETG. Tensile specimens are prepared with three different overlap ratios (0%-10%-20%) and three different layer thickness configurations (0.2 mm-0.25 mm-0.3 mm). We demonstrate how the overlap factor and layer thickness change the porosity that is proposed herein as the measure of the macroscopic materials response. For determining porosity, each specimen was examined under the microscope and a machine learning code is developed and applied. A relation between the porosity and effective material properties has been proposed such that we demonstrate by a fit function how elasticity modulus changes with porosity. Furhermore, we prepare digital twin of these experiments by microscale computations using the FEM. CAD images are prepared by means of microscopy analysis in the open-source Salome platform, and elasto-static uniaxial tensile tests are computed by the open-source FEniCS computing platform. By using a direct homogenization technique for different loading cases, effective elasticity parameters are determined by the FEM. We stress that the role of process parameters is significant on the mechanical macroscale characterization. Herein we demonstrate qualitatively and quantitatively the effects of overlap ratio and layer thickness selection in the FDM process.

The underlying work is structured by explaining the used material of PETG and production method of FDM as well as experimental setup in Sect. 2. Details of experiments and an analysis of results are in Sect. 3. Mechanical response has been measured by standard uniaxial tensile tests and optical investigation has been done by microscopy. Section 4 explains the computational study for determining the anisotropy for a variation of overlap ratio and layer thickness. Computation and experiments are compared in Sect. 5, followed by concluding remarks.

2 Materials and Methods

2.1 Fused Deposition Modeling

White-PETG filaments with 2.85 mm diameter were purchased from Materials4Print GmbH & Co. KG (Bad Oeynhausen, Germany). The samples were produced by the Ultimaker 3 Extended (Ultimaker B.V., Geldermalsen, Netherlands), an FDM type 3D printer. CAD geometries of tensile specimens were prepared in the Salome 9.3 and exported as stl files. These files were further processed by the Ultimaker Cura 4.3.0 (Ultimaker B.V., Geldermalsen, Netherlands) where the process parameters such as slicing speed, temperature, layer thickness, etc. were applied in G-codes. We provide the process parameters in Table 1. We refer to [81] for optimized process parameters and slicing strategies for reducing trial-and-error iterations, thereby a sustainable production.

Table 1 Process parameters of 3D printing
Fig. 1
figure 1

FDM equipment during printing

Specimen geometry is a unidirectional (UD) laminate along fibers called 0° orientation. The material properties obtained by the manufacturer are presented in Table 2 for PETG. We assume that the manufacturer parameters were extracted by using a mold specimen such that the porosity was expected to be almost zero. Therefore, these values are seen as an upper threshold for FDM polymers. We provide a photo of used FDM equipment during printing in Fig. 1.

Table 2 Material properties of PETG
Fig. 2
figure 2

Representation of the overlap and thickness parameters

Additively manufactured parts are produced layer-by-layer. The layer thickness is one of key parameters that strongly affects the mechanical properties and dimensional accuracy of the part. A relatively thicker layer decreases dimensional accuracy; yet reduces the production time. A thinner layer gives higher dimensional accuracy and also increases the strength [82]. Overlap is a process parameter of FDM, which decreases the gap between fibers’ axes [77]. Overlap results in a larger contact area, and thus, a stronger adhesion between filaments as in Fig. 2. Porosity is defined as the volume ratio of voids over the total volume. Here, we demonstrate how layer thickness and overlap parameters alter the inner structure, consequently, mechanical properties.

Thickness and overlap are two decisive process parameters varying the contact area of fibers and layers. Increased contact area results in an increased polymer infill with less voids, thus, a decreased porosity. We emphasize that the infill ratio is used in slicer softwares as a parameter introducing a repeating topology with voids and thus reducing the overall weight. An infill ratio, lower than 100%, introduces a substructure that produces a metamaterial [83], which is not studied herein. All specimens were produced with 100% infill ratio. Either for 100% infill ratio, the porosity is not zero. In molding, zero porosity may be reached, but in additive manufacturing, even with 100% infill ratio, process parameters alter the porosity. This situation results in different inner structures that we measure by porosity to be discussed in the following. For investigating this phenomenon, specifically, we have studied 3D printed specimens with three different layer thickness values (0.2 mm, 0.25 mm, 0.3 mm) and three different overlap ratios ( 0%, 10%, 20%). We provide the experimental design and used number of specimens in Table 3.

Table 3 Experimental design with three overlap ratios and three layer thicknesses, all produced and tested on more than five specimens in order to obtain a statistical confidence interval

Settings of overlap and layer thickness influence the contact surface. In order to visualize this phenomenon, we provide Fig. 3. When we increase the overlap ratio, the fibers get a larger contact area. We observed this phenomenon experimentally such that the fibers were produced with an overlapping sequence. In this case, the slicer software tries to produce more fibers in one layer. Therefore, contact areas of adjacent fibers are increased. More contact area means stronger bond formation and less voids in the microscale structure, which is quantified as porosity at the macroscale structure. It should be considered that very high overlap ratios can cause over-extrusion, which may be seen as a distortion of the geometry by a visual inspection. Herein, for the chosen material and geometry, by using less than 20% overlap ratio we never encountered any over-extrusion.

Fig. 3
figure 3

An illustration of how overlap and layer thickness variations affect the inner structure in FDM polymers. Black arrows demonstrate the interfiber (interface between fibers) regions in (a-c) and interlayer regions in (d-f), respectively

In Fig. 3d–f, we illustrate how the contact areas of two layers are changed with increased layer thickness. Thickness changes may cause different inner structures and mechanical responses; especially, if different slicer softwares are used for printing. Slicers have an utmost importance on flow characteristics [84], which affect the fiber geometries and production sequence in FDM. We used an Ultimaker Cura slicer in this study. When we decrease layer thickness, fibers become elliptical. There are bigger contact areas between adjacent layers, as it is seen in Fig. 3f. This shape leads to stronger bond formation between adjacent layers. Consequently, the porosity ratios decrease. This situation is resulted to denser structures. We emphasize that fibers have been designed by a constant 0.4 mm extrusion width in all cases (also in Fig. 3). Only geometrical modification by the layer thickness is considered.

Iteratively, we build the relationship between these process parameters and mechanical response in the following steps:

  • First, we investigate how porosity is constituted by overlap ratio and layer thickness.

  • Second, we study how these parameters alter the effective elasticity modulus.

  • Third, we relate the elasticity modulus to the porosity. This relation is compared with FEM simulations, where the detailed microscale structure is modeled by computationally costly FEM simulations.

2.2 Tensile Tests

Tensile specimens’ geometry are prepared according to ISO 527-2 standards, the details are provided in Table 4 and illustrated in Fig. 4 representing the initial state of an ISO 527-2 specimen clamped into test equipment—for a thorough discussion about the adequate geometry in 3D printing, we refer to [81]. In general, condensation polymers such as polyester and herein specifically PETG may attract water molecules from the environment. Due to this so-called hygroscopic nature, all specimens were preserved at 40°C in a vacuum oven against water uptake before mechanical tests. Uniaxial tensile tests were performed with a Zwick 1446 (Zwick, Ulm, Germany) testing machine (see Fig. 5). Experiments were conducted by controlling the displacement with a ramp speed of 2 mm/min. A mechanical extensometer was utilized to measure strain. Postprocessing was performed by the corresponding software leading to values of the ultimate tensile strength (UTS) and Young’s modulus. Engineering stress and engineering strain have been determined from experimental measurement of force and displacement. At least five samples were tested at each experimental configuration (see Table 3) for assessing the reliability by a margin of error.

Fig. 4
figure 4

Chosen tensile test specimen geometry in accordance with ISO 527-2 suggestion. Their specifications are provided in Table 4

Table 4 Specimen specifications in mm
Fig. 5
figure 5

A clamped ISO 527-2 specimen into a Zwick 1446 testing device with an extensometer (left), a loading cell (top) and a fixed mounting side (bottom). Displacement is applied vertically through the upper mounting side

2.3 Microscopy and Porosity Analysis by Machine Learning

Microscopy analysis was accomplished for investigating how thickness-overlap changes the inner structure. All configurations as given in Table 3 were 3D printed and then cut in the middle. Instead of milling, the specimens were manually cut to prevent distortion of the structure, since heat generation during milling may change the inner structure and phases. Leica Wild M3C Heerburg type polarized microscope was used in the analysis.

After microscopy, a digital image correlation (DIC) code has been developed for calculating porosity from 2D images. It is written in Python language with Tensor-flow packages [85]. The code utilizes a machine learning algorithm, namely, K-means cluster, which is used for collecting data with similar characteristics. In this method, K-centroids are first randomly selected, where K is equal to the number of clusters. Centroids are data points that represent the center of clusters. The algorithm has mainly two steps: expectation and maximization. In the expectation step, each data point is assigned to its nearest centroid. In the maximization step, the mean of all points for each cluster is computed and set the new centroids [86]. This process is repeated until the positions of centroids remain the same. Specifically, the algorithm is described below how we perform porosity analysis by K-means cluster:

  • The microscope images are imported by using PIL (Python Imaging Library) [87], and they are converted to 2D arrays by NumPy [88]. Then, they are binarized in order to calculate porosity accurately. Therefore, 140 (color range) threshold is applied to their arrays, and all colors in photographs are reduced to black-white. We address Fig. 6 for comparison of binarized micrograph and CAD image. Binarization allows effectively calculating the porosity by counting the number of pixels in black and then dividing by the total number of pixels. It prevents errors in porosity calculations.

  • The binarized pixels are assigned as data points in the K-means algorithm, and the first centroids are randomly initialized.

  • The distances between centroids and data points are calculated, and each data point is analogously assigned to its closest centroid (the expectation step).

  • Mean values of the points in each cluster are calculated. Centroids are refined by these mean values, and they are updated with the new ones, iteratively (the maximization step).

  • Finally, we collect the pixels into two clusters, namely black and white.

At the end of this analysis, the following equation is used for calculating porosity ratio,

$$\begin{aligned} p = (b / (b + w))\cdot 100, \end{aligned}$$
(1)

where p denotes porosity percentage. w and b are the number of white and black pixels, respectively.

Fig. 6
figure 6

An illustration of binarized CAD micrograph (an ideal case) for the specimens with 0.3 mm layer thickness and 10% overlap configuration. The dark fields (microporous areas) are distributed homogeneously as expected in this ideal case. See Fig. 1 for an example CAD micrograph used to generate the binarized version by means of the DIC code

3 Experimental Results

3.1 Mechanical Characterizations

Tensile tests were carried out for investigating how the inner structure affects the mechanical properties of FDM polymers. It is observed that elasticity modulus increased with lower layer thickness (see Table 5). As the layer thickness is decreased, more layers are printed in the specimens that cause to higher number of layers in the area (20 layers for 0.3 mm, 24 layers for 0.25 mm, and 30 layers for 0.2 mm). Therefore, the fibers with lower thickness are shaped more ellipsoid than circle. Thus, they possess a larger contact area to neighboring layers as seen in Fig. 3d–f.

Higher contact areas and, thereby, higher molecular diffusion are one of the most critical factors increasing mechanical properties of FDM polymers. Lower porosity ratios are occurred with decreasing layer thicknesses. FDM is adjusted to print more materials at a lower thickness. By doing so, a lower porosity ratio has been reached leading to a higher elasticity modulus. Mechanical properties increase with higher overlap ratios analogous to lower thickness values. Obviously, higher overlap leads to higher contact areas, also visualized in Fig. 3 and most likely to a better fusion between adjacent fibers. These altered contact areas result to lower porosities, too.

It is understood that lower porosity ratios and higher contact areas between adjacent fibers or layers are of utmost importance to achieve better mechanical properties. If a higher stiffness is aimed for, layer thickness needs to be decreased, and also overlap ratio is to be increased. We stress that these changes are sensitive to flow characteristics of slicers, printer types, and environmental conditions. Too high overlap ratios may cause over-extrusion, and thus, a dramatic decrease in mechanical properties. We observed that lower layer thickness not only increased elasticity modulus, and also gave higher design flexibility (higher resolutions in detailed geometries) to FDM parts.

Table 5 Elasticity modulus and ultimate tensile strength from experimental characterizations: mean value of tested specimens, for the test size, see Table 3
Fig. 7
figure 7

Comparison for different overlap ratios using three different thickness values of 0.3, 0.25, 0.2 mm and arithmetic mean values of several tests with an error of margin given as error bars, (a) showing the measured Young's modulus, whereas (b) presenting the ultimate tensile strength (UTS)

Engineering stress and engineering strain have been calculated from experimental measurement of force and displacement. Engineering stress denotes the current force divided by the initial cross-section area, and engineering strain is obtained by dividing the elongation by the initial length. The stress-strain diagrams (plots, curves) until the failure are to be depicted in Fig. 8 for different overlap values (see Fig. 7).

Experimentally, we observed that lower thickness and higher overlap increased the ultimate tensile strength. We refer to Table 5, which presents experimental results in the ultimate tensile strength. The reason is analogous to the aforementioned better adhesion effected by larger contact areas and better fusion. It is known that FDM polymers show brittle behavior when they have weak interlayer (see Fig. 3d–f) and interfiber (see Fig. 3a–c) bonds [89]. 3D-printed polymers generally exhibit lower elastic modulus and reduced stress and strain at failure than injection molds. This phenomenon is justified by weaker interlayer and interfiber bonds.

We understand that the voids introduce microcracks, and thus, there is a relatively long softening behavior after the UTS has been reached. As seen in Fig. 8, the higher overlap in Fig. 8a, c, and e demonstrates a significantly higher energy release than the lower overlap in Fig. 8b, d and f. The energy is simply the area below the curve, and this phenomenon is devoted to the better fusion. The slope of the softening behavior may be seen as equivalent in overlap ratio variation, within the error of repeatability visible in Fig. 8. Hence, we claim that the topology of the interface is of importance for the UTS and modulus; however, the adhesion characteristics may be more dominant in the softening behavior as well as controlling the energy release rate.

Fig. 8
figure 8

Engineering stress vs. engineering strain for specimens with different thickness values in (b), (d), (f) and overlap values in (a), (c), (e)

We address the Table 6 for the relative error of elasticity modulus as well as for the maximum stresses. Concretely, we obtained admissible errors (less than 7%) in elasticity calculations of all configurations. Below we provide the equation for the error assessments,

$$\begin{aligned} R = \frac{S}{ m} \times 100, \end{aligned}$$
(2)

where the relative standard error, R in percent, is obtained by the standard deviation, S, and the arithmetic mean of all samples, m.

Table 6 The relative standard error of the mean value for elasticity modulus and maximum stress

3.2 Optical Characterization

Variation of width, as well as overlap, have been inspected by a microscopy analysis to be depicted in Fig. 9. We clearly observe that increasing overlap causes a wider contact, see for example, Fig. 9a–c, as well as decreasing layer thickness results in a wider contact area, too, as seen in Fig. 9a, d and g. This situation is the result of the increased material amount in the same cross-section.

Fig. 9
figure 9

Microscopy images of 3D-printed samples, by varying overlap values along rows like in (a), (b), (c) and layer thicknesses like in (a), (d), (g)

In microscopy images, light gray denotes an amorphous structure as expected from the PETG material, and dark gray is understood as a heterogeneous structure, possibly including micropores. Thus, we interpret the gray level as a measure of the microporosity within the structure.

There are relatively fewer contacts in specimens with 0% overlap, and also even lacking contact between fibers in some areas. Consequently, the molecular diffusion did not occur widely. Porosities and connections between fibers were not distributed uniformly, on the contrary, more distinct than other configurations.

In 10% overlap configurations, each fiber seemed to be in contact. Contact regions were more homogeneous than 0% overlap. As the molecular diffusion resulted in a fusion of fibers, and the dark gray areas in Fig. 9d–f indicate that the structure includes micropores to only some extent. We assume better molecular diffusion was occurred in specimens with 10% overlaps than 0% ones. By a visual inspection, consistently in every width variation, it was observed that 10% overlap caused an overall more uniform microstructure of the interface than 0% overlap.

Analogously, in specimens with 20% overlap, we observed relatively more contact area between fibers as well as layers. In Fig. 9c, f and i, lacking contacts between fibers were disappeared entirely. As seen in Fig. 9 from the gray level distribution, regarding 0% and 10%, specimens with 20% overlap caused nearly zero microporosity on the contact areas. In other words, molecular diffusion leads to an amorphous structure on the interface between fibers as good as within the fibers. Moreover, contact areas formed a continuous topology.

In addition to the visual inspection by the polarized microscopy analysis, we quantify the outcome with the aid of the aforementioned machine learning code developed for this purpose this purpose (see Fig. 10 for the binarized experimental image). Figures representing variations in layer thickness and overlap are read and normalized for determining a porosity value for each of them, the results are presented in Table 7. We emphasize the significant range in porosity values from 0.25% up to 10%. The underlying experimental analysis pointed out that the inner structure heterogeneity, and thus microporosity, depends greatly on the process parameters such as layer thickness and overlap.

Fig. 10
figure 10

Binarized experimental microscope image for specimens with 0.3 mm layer thickness and 10% overlap configurations. The dark fields (most likely microporous areas) of the image are distributed more heterogeneously than Fig. 6 due to FDM process-related characteristics

Table 7 Porosity quantification obtain from the microscopy images

4 Computational Homogenization

Simulations have been employed in order to determine effective parameters in a homogenized material model. All specimens were produced with a unidirectional (UD) orientation (see Fig. 1). We intend to build models representing FDM polymers most accurately. Therefore, CAD geometries are generated for UD laminates regarding the ideal case and an inverse analysis has been done by using computations, as explained in the following.

4.1 CAD Preparation

All preprocessing steps, i.e., CAD generation, marking boundary conditions, and triangulation (mesh generation), are accomplished in Salome 9.3.

By choosing the slicer parameters and printing the geometry with each layer thickness and overlap variations, we obtained 9 configurations. Each of this configuration has been analyzed by microscopy and machine learning leading to microstructural characteristics—length and height of contact lines of interfiber and interlayer region. By regarding these values, CAD models are prepared representing an ideal case. We provide the cross-section of CAD microstructures in Fig. 11, schematic explanation of CAD preparation in Fig. 12.

Fig. 11
figure 11

Cross-section microstructure of an ideal configuration constructed in CAD, with the same variation of overlap values along rows like in (a), (b), (c) and layer thicknesses like in (a), (d), (g) as in experiments shown in Fig. 9

Their porosities are the ideal case or an upper threshold for the manufacturing. The values of ideal case are presented in Table 8, whereas Table 7 show the obtained values from the manufactured specimens.

Table 8 Porosity quantification obtain from the CAD models prepared by using the ideal layer thickness and overlap configuration
Fig. 12
figure 12

Schematic explanation of CAD preparation. Microscopy images from tensile specimens are analyzed by machine learning and constructed their idealized CAD images

4.2 Inverse Analysis by Finite Element Computations

Computations utilize the finite element method (FEM) for the space discretization by using a suitable mesh after an h-convergence analysis. For details of implementation as well as theory of linear elasticity, we refer to [90]. An FEM based software has been implemented in the Python language with the aid of open-source packages developed under the FEniCS project [91, 92]. ParaView 5.6 is used for postprocessing. At the material level, the PETG material is modeled as linear elastic leading to the Hooke’s law between stress, \(\sigma _{ij}\), and strain, \(\varepsilon _{ij}\), with the stiffness tensor, \(C_{ijkl}\), as follows:

$$\begin{aligned} \sigma _{ij} = C_{ijkl}\varepsilon _{kl}, \end{aligned}$$
(3)

where we understand Einstein’s summation convention over repeated indices. Linear strain measure is used, \(\varepsilon _{ij} = \frac{1}{2} \big ( u_{i,j} + u_{j,i} \big )\,\), where a partial space derivative is denoted by a comma in indices. Deformation, \(\varvec{u}\), is computed by fulfilling the balance of momentum for the steady state, \(\sigma _{ji,j} = 0 \,\), by ignoring body forces since the deformation is mainly caused by surface loading (traction). Simulations are uniaxial tensile tests, where one end is clamped by using Dirichlet boundary conditions, and the other is moved by a given displacement along the tensile (fibers) axis. Deformation is computed by using linear shape functions via standard Lagrange elements with the Galerkin procedure. Equivalent von Mises stress is calculated on the mesh,

$$\begin{aligned} \sigma _\text {vM} = \sqrt{ \frac{3}{2} \sigma _{|ij|} \sigma _{|ij|} }\,,\nonumber \\ \sigma _{|ij|} = \sigma _{ij} - \frac{1}{3}\delta _{ij}\sigma _{kk} \, , \end{aligned}$$
(4)

where the latter is the deviatoric part of the stress tensor.

Inverse analysis by FEM was carried out for calculating the components of the elasticity matrix of FDM polymers. Transverse isotropic material model (with a symmetry axis of \(x_2\) and \(x_3\) directions ) has been used because all specimens are produced by fibers oriented along \(x_1\)-axis. Its compliance matrix in Voigt’s notation reads

$$\begin{aligned} \mathbf{S} = \begin{bmatrix} \frac{1}{E_1} &{} - \frac{\nu _{12}}{E_1} &{}- \frac{\nu _{12}}{E_1} &{} 0 &{} 0 &{} 0 \\ &{} \frac{1}{E_2} &{} - \frac{\nu _{23}}{E_2} &{} 0 &{} 0 &{} 0 \\ &{} &{} \frac{1}{E_2} &{} 0 &{} 0 &{} 0 \\ &{} &{} &{}\frac{2(1+\nu _{23})}{E_2} &{} 0 &{} 0 \\ &{} \text {sym} &{} &{} &{} \frac{1}{G_{12}} &{} 0 \\ &{} &{} &{} &{} &{} \frac{1}{G_{12}} \\ \end{bmatrix}\,. \end{aligned}$$
(5)

There are 5 engineering constants: elasticity moduli, \(E_{\mathrm {x}}\), Poisson’s ratios, \(\nu _{\mathrm {x}\mathrm {x}}\), shear moduli, \(G_{\mathrm {x}}\). Because of the transverse isotropic material, the effective elastic constants read \(E_1\), \(E_2\), \(G_{12}\), \(\nu _{12}\), \(\nu _{23}\).

The FEM uses the ideal CAD geometry as the computational domain. The corresponding models are given in Fig. 13 (0° in (a), 90° in (b), and 45° in (c)), respectively. A detailed modeling at the microscale enables to capture the material response at the macroscale. Hence, in the microscale analysis, we model the structure with its substructure, including fibers and voids with a full bonding on the interface. In the microscale analysis by using the FEM, we model PETG as an isotropic material with the elasticity modulus: 2150 MPa (Table 1), and Poisson’s ratio: 0.35.

Fig. 13
figure 13

An illustration of CAD models with different orientations

Fig. 14
figure 14

FEM of uniaxial tensile test along the fibers (X-direction), where the colors denote the magnitude of the displacement. A suitable mesh after an h-convergence analysis is used

Table 9 Elasticity moduli, \(E_1\), along fibers determined by the computational homogenization

We obtain the effective parameters as follows:

  1. 1.

    In consideration of the CAD models in Fig. 11, where the fibers are aligned with 0° orientation (see Fig. 13a), we expect a linear displacement along the tensile direction, leading to constant strain for the unit length, \(\tilde{\epsilon }_{XX}\) = 0.1, for computing \(E_1\) being the effective modulus at the macroscale, i.e in the homogenized material model. To this end, we apply the following Dirichlet boundary conditions: on one end, \(X = 0\), it is clamped, \(u_X = 0\), and on the other end, \(X = 5\), it is set to \(u_X = 0.5\). In simulation, strain energy is calculated by \(U = \frac{1}{2}\int {\sigma _{ij}\varepsilon _{ij}dV}\). We reformulate this equation and determine elasticity modulus by \(E_1=\frac{U}{0.5\tilde{\epsilon }_{XX}^2V}\). Moreover, \(\tilde{\epsilon }_{YY}\) is obtained by, \(\bigg (\varvec{u}(l/2, 0, h/2) - \varvec{u}(l/2, w, h/2)\bigg )/w\), where, l, w, h are length, width, and height of specimens, respectively. Displacement, \(\varvec{u}\), is the computed function. \(\nu _{12}\) is calculated by \(\nu _{12} = - \displaystyle \frac{\tilde{\epsilon }_{XX}}{\tilde{\epsilon }_{YY}}.\)

    We address Table 9 for \(E_1\) results of all configurations. It is observed that there is less than 3% difference between elasticity modulus from experiments and simulations (see Table 5). These results present an adequate accuracy for validating the microscopy-machine learning combined analysis and, thereby, FEM simulations. Elasticity moduli, which are calculated by FEM simulations, increase with lower layer thickness and higher overlap ratios as observed in experimental characterizations. We depict an example of FEM uniaxial tensile test in Fig. 14.

  2. 2.

    We assume analogously a constant strain for the unit length \(\tilde{\epsilon }_{XX}\) = 0.1 for computation of \(E_2\), where the fibers are aligned 90° in Fig. 13c. Thus, we use the following Dirichlet boundary conditions: \(X = 0\), it is clamped and on the other end, \(X = 5\), it is set to \(u_X = 0.5\). Elasticity modulus is calculated by the reformulation of strain energy equations in \(E_2=\frac{U}{0.5\tilde{\epsilon }_{XX}^2V}\). From these characterizations, \(\tilde{\epsilon }_{ZZ}\) is analogously determined, and \(\nu _{23}\) is calculated from the \(\nu _{23} = - \displaystyle \frac{\tilde{\epsilon }_{YY}}{\tilde{\epsilon }_{ZZ}}.\)

  3. 3.

    We need one more elasticity modulus, \(\bar{E}\), for calculating the \(G_{12}\). 45° is chosen (see Fig. 13b) in order to carry out some simplifications in the trigonometric part of further equations as we explain in the following. We assume a constant strain for the unit length \(\tilde{\epsilon }_{XX}\) = 0.1. To this end, we apply the following boundary conditions: \(X = 0\), it is clamped and on the other end, \(X = 5\), it is set to \(u_X = 0.5\). After the reformulation of strain energy equations, elasticity modulus is measured by \(\bar{E} = \frac{U}{0.5\tilde{\epsilon }_{XX}^2V}\). In order to obtain shear modulus \(G_{ 12 }\), the following calculations are carried out,

    $$\begin{aligned} \overline{\mathbf{S }} = \mathbf{T} ^T \cdot \mathbf{S} \cdot \mathbf{T} \, , \end{aligned}$$
    (6)

    which gives the relation that is needed for the transformation of compliance matrix from a 1-2 coordinate to an x-y coordinate system. \(\mathbf{T}\) is the transformation matrix. \(\mathbf{S}\) and \(\overline{\mathbf{S }}\) denote compliance and the transformed compliance matrices, respectively. Below, the open form of the equation is provided

    $$\begin{aligned} \mathbf{T} &= \begin{bmatrix} \cos ^2{(\theta )} &{} \sin ^2{(\theta )} &{} 2 \sin {(\theta )}\cos {(\theta )}\\ \sin ^2{(\theta )} &{} \cos ^2{(\theta )} &{} -2 \sin {(\theta )}\cos {(\theta )}\\ -\sin {(\theta )}\cos {(\theta )} &{} \sin {(\theta )}\cos {(\theta )} &{} \cos ^2{(\theta )}-\sin ^2{(\theta )} \\ \end{bmatrix}, \\ \overline{\mathbf{S }} &= \begin{bmatrix} \overline{S_{11}} &{} \overline{S_{12}} &{} \overline{S_{16}} \\ \overline{S_{21}} &{} \overline{S_{22}} &{} \overline{S_{26}} \\ \overline{S_{61}} &{} \overline{S_{62}} &{} \overline{S_{66}} \\ \end{bmatrix}. \end{aligned}$$
    (7)

    After necessary calculations are done in Eq. (7), each component of the transformed compliance matrix (\(\overline{S}_{ij}\)) are computed. We use only \(\overline{S}_{11}\) in this study,

    $$\begin{aligned} \overset{-}{S}_{11} = S_{11}\cos ^4{(\theta )} + (S_{66} + 2S_{12})\sin ^2{(\theta )}\cos ^2{(\theta )} + S_{22}\sin ^4{(\theta )}, \end{aligned}$$
    (8)
    $$\begin{aligned} \overset{-}{S}_{11} =\frac{1}{E_x}, \; S_{11} = \frac{1}{E}_1, \;S_{12} = \frac{\nu _{12}}{E_1},\; S_{22} = \frac{1}{E_2} , \end{aligned}$$
    (9)
    $$\begin{aligned} \frac{1}{E_x} = \frac{1}{E_1}\cos ^4{(\theta )} + \bigg (\frac{1}{G}_{12} - \frac{2\nu _{12}}{E_1} \bigg )\sin ^2{(\theta )}\cos ^2{(\theta )} + \frac{1}{E_2}\sin ^4{(\theta )}, \end{aligned}$$
    (10)

    where, Eq. (9) is inserted in Eq. (8). \(E_x\) denotes the elasticity modulus of specimens with \((\theta )\) fiber orientation. Furthermore, (\(\theta\) = 45°) is substituted and the following equation is achieved,

    $$\begin{aligned} \frac{1}{\bar{E}} = \frac{1}{4}\bigg [\frac{1}{E_1} - \frac{2\nu _{12}}{E_1} + \frac{1}{G}_{12} + \frac{1}{E_2}\bigg ], \end{aligned}$$
    (11)
    $$\begin{aligned} G_{12} = \frac{1}{\frac{4}{\bar{E}}- \frac{1}{E_1} - \frac{1}{E_2} +\frac{2\nu _{12}}{E_1}}, \end{aligned}$$
    (12)

    where, we rewrite Eq. (11) and, insert the already calculated engineering constants in this equation. We calculate \(G_{ 12 }\) by Eq. (12).

Afterward, the transverse isotropic material model is accomplished. For 0.3 mm layer thickness and 0% overlap, we have determined effective parameters and thereby, its stiffness matrix in Voigt notation reads

$$\begin{aligned} \mathbf{C} = \begin{bmatrix} 2514 &{} 1064 &{}1064 &{} 0 &{} 0 &{} 0 \\ 1064 &{} 1860 &{} 1181 &{} 0 &{} 0 &{} 0 \\ 1064 &{} 1181 &{} 1860 &{} 0 &{} 0 &{} 0 \\ 0 &{} 0 &{} 0 &{}339 &{} 0 &{} 0 \\ 0 &{} 0 &{} 0 &{} 0 &{} 406 &{} 0 \\ 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 406 \\ \end{bmatrix}. \end{aligned}$$
(13)

It incorporates the effects of the experimental conditions, filament properties, and the slicer type. For an UD laminate the stiffness matrix is the necessary information in the classical laminate theory (CLT). By using a rotation matrix, Eq. (13) and tensor algebra, one finds all different stacking options. We compare and validate the results with experimental observation for assessing the accuracy.

5 A Comparative Analysis Between Experiments and Computations

As we have seen in previous sections, process parameters change the porosity ratios and elasticity modulus. By a comparative analysis, we propose a simple relation between these parameters such that experimental results may be used directly in simulations.

5.1 Comparison of Parameters-Porosity Relationship

We investigate how the different layer thickness and overlap change the porosity ratios both in experimental and simulation results. Diagrams of porosity-parameters are depicted in Fig. 15.

We examine the relation between overlap and porosity by dint of experimental characterizations in Fig. 15a. There is a dramatic porosity decrease between the overlaps 0 to 10%. All configurations (experimental curves) show the similar tendency. As discussed in a former section, there are lacking contacts between fibers in specimens with 0% overlap (see Fig. 9a). Hence, the porosities are significantly high. In specimens with 10% overlap, each fiber appeared to be in contact with neighboring fibers. We interpret that homogeneous microstructural arrangement is the main reason for the sharp decrease between 0 to 10% overlap in Fig. 15a.

Fig. 15
figure 15

Relationship between parameters (overlap value in (a) and layer thickness in (b)) and porosity

In Fig. 15a, the comparison of porosity-overlap relation is visible as obtained by experimental and numerical studies. Obviously, the numerical result has the same slope for different layer thicknesses, justified by a linear relation between porosity and layer thickness. We stress that the interface is modeled ideally in the FEM. Hence, this result is an ideal configuration and may be expected from experimental results. However, we observe a slope change in experimental results from layer thickness 0.3 mm to 0.2 mm in a monotonous fashion. This phenomenon may be explained by the increased lack of contact areas in smaller overlap values (we refer to Fig. 9) that is tantamount to an unknown threshold of minimum contact area for an adequate molecular diffusion within the interface. The same information is visible in Fig. 15b, where parallel lines in the numerical study denote a linear ideal relation, yet in reality this case fails to occur.

5.2 Comparison of Parameters-Elasticity Relationship

In this section, we investigate how different overlap ratio and layer thickness affect the elasticity modulus of FDM polymers both from experiments and simulations. The parameter-elasticity graphs are depicted in Fig. 16.

Fig. 16
figure 16

Relationship between parameters (overlap value in (a) and layer thickness in (b)) and elasticity modulus

Analogous to Fig. 15, we observe an experimental as well as numerical evidence that the elasticity modulus increases with increasing overlap ratios. There is again a significant deviation in slope between experimental and numerical results in Fig. 16a. In spite of the Fig. 15, this slope change is less dominant. Therefore, a linear relation between modulus and porosity seems to be inadequate. The same information is illustrated in Fig. 16b. We hypothetically comprehend the porosity increases in Fig. 15b are the main reason of the elasticity decrease in Fig. 16b for FEM curves.

We find out that parameter-porosity and parameter-elasticity diagrams are quite correlative. These comparisons show that the porosity ratio is one of the main factors that affect the elasticity modulus of FDM polymers. Different process parameters (layer-thickness & overlap ratio) change first the porosity of the inner structure. Thereby porosity is a possible measure to quantify the elastic modulus variation regarding process parameters.

5.3 Stiffness Dependency on Porosity

All curves were depicted only by considering porosity and their elasticity results regardless of their layer thickness and overlap ratio information. The diagram is given in Fig. 17. The two curves in Fig. 17 indicate the experimental and FEM results as well as their curve fits, respectively.

Fig. 17
figure 17

Relationship between porosity and elastictiy modulus (\(E_1\) and p denote the elasticity modulus and porosity, respectively). Details of curve fit equations are given below

The FEM curve in Fig. 17 shows that the porosity-elasticity modulus relation is linear. We utilize a curve fit algorithm based on standard non-linear least squares minimization [93]. In this way, for the following equation the parameters are determined,

$$\begin{aligned} E_1 = a\cdot p+b, a = -22.054, b = 2101.1, R^2 = 0.9993, \end{aligned}$$
(14)

where \(E_1\), and p denote the elasticity modulus and porosity, respectively. The nearly \(R^2=1\) value indicate an adequate fit. The experimental curve presents that the porosity-elasticity modulus relationship is nonlinear. Especially, elasticity increases sharply in smaller than 3% porosity values. Analogously, the porosity-elasticity formulation for experimental results are determined by the same method and we obtain

$$\begin{aligned} E_1 = c\cdot p^{d}, c = 1943.8, d = -0.045, R^2 = 0.9959. \end{aligned}$$
(15)

Although the elasticity modulus of simulations and experiments seem to be in the same order of magnitude, by a comparison of Tables 5 and 9, they show different tendencies (linear versus nonlinear). In experimental characterizations, porosity ratios are lower than in simulations. Therefore, a detailed comparison is necessary. Porosity and corresponding elasticity moduli from experiments and simulations are compiled in Table 10.

Table 10 Comparison of experimental vs CAD porosity and elasticity moduli

We stress that molecular diffusion is the main reason of the difference between experimental and FEM results in Fig. 17. We assume that fibers, as well as their interface, are homogeneous in FEM. However, this homogeneity fails to happen in reality, and there exist production conditions related to microporosity along the contact surfaces. As demonstrated in Fig. 9, there are heterogeneous interfaces in the structure. Moreover, molecular diffusion is one of the significant factors that affect the mechanical properties of FDM polymers. The molecules are oriented and diffused in contact regions differently than inner areas. The reason is different solidification times of fibers, which is a result of the production method employed in FDM [94]. These differences cause heterogeneity and leads to lower elasticity moduli than in homogeneous cases.

Lower layer thickness and higher overlap ratio cause greater contact areas between adjacent fibers and layers. These larger contact surfaces enable an adequate molecular diffusion leading to a nonlinear increase in elasticity modulus in Fig. 17, see the experimental curve and its curve fit. Since the molecular effects have been excluded in the numerical analysis, the results have been, as expected, in a linear relation between modulus and porosity as to be seen in Fig. 17, see FEM curve and its curve fit.

The elasticity moduli for the same porosity ratio of FEM and experiments are compared for comprehending the differences between them. This comparison is examined in two steps:

  1. 1.

    First, two porosity ratios and their elasticity modulus from both experiments and simulations are compared. They are given in Table 11.

    Table 11 Relative error of elasticity moduli for similar experimental vs FEM porosities
  2. 2.

    Second, different elasticity modulus for 1-15% porosity ratios are calculated from functions that are previously determined in experimental Eq. 15 and FEM Eq. 14 cases. Their relative errors are calculated, and all results are given in Table 12.

Table 12 Estimated elasticity moduli (\(E_1\)) from curve-fit equations for porosities 1 to 15%

We emphasize that the process parameters also affect the heterogeneity of the inner structure. Porosity versus elasticity modulus nonlinear relation is of importance to be seen as a nonlinear dependence because of this existing heterogeneity. We recommend that slicing strategy, temperature, and slicing speed are to be optimized for minimizing the heterogeneity of inner structure [81]. However, this may still be inadequate. In Table 12, there are (arithmetic mean of 6.5%) deviation between FEM and experimental outcomes. This difference is occurred because the FDM process causes heterogeneity in the microstructures, and FEM is overestimating the interface stiffness that depends on the production parameters.

The perfect bonding in interface is analogous to the simplification necessary in the classical laminate theory (CLT). Hence, the FEM results are representative for CLT results, where a linear porosity and modulus are obtained by the mixture rule linearly depending on the volume ratio of fiber and matrix (herein fiber and void). So, the differences between FEM and experimental results in Table 12 are also representative for CLT.

We suggest that FEM can be used to calculate the elasticity modulus of FDM polymers if 7-8% errors are admissible. If the effect of the interface (contribution at the molecular level) needs to be captured, experimental characterizations have to be carried out.

6 Conclusions

In this work, we tried to investigate the variation of the inner structure as a result of chosen process parameters in additive manufacturing. Therefore, we prepared nine different experimental configurations. Tensile and microscopy characterizations were carried out. FEM simulations have been computed representing experimental topology for a comparison. We have examined the manufacturing (process) parameter influence on porosity and elasticity modulus, both for experiments and simulations.

  • We performed tensile tests for the specimens with three different layer thickness (0.2 mm, 0.25 mm, 0.3 mm) and three different overlap ratios ( 0%, 10%, 20%). In total for 9 configurations, we observed that higher overlap and lower layer thickness increased the elasticity modulus as well as the ultimate tensile strength.

  • We conducted microscopy analysis to investigate the microstructures of the specimens. We observed that increasing overlap and decreasing layer thickness resulted in a wider contact area between neighboring fibers and layers. Furthermore, we developed a digital image correlation code augmented by a machine learning algorithm. By means of this code, we calculated the porosity ratios for 9 configurations.

  • Considering the porosity ratios, contact area of fibers and layers, digital twins of 9 configurations have been generated and simulated by the FEM. For UD laminate we determined the transversal isotropic stiffness matrix by a computational homogenization. We emphasize that this elasticity matrix depends on the process parameters.

  • We have investigated the process parameter for a better explanation of the differences between experimental results and simulations.

Porosity appears to be an adequate measure for modeling the stiffness dependency on the process parameters. We propose elasticity modulus depending on the porosity under these observations:

  1. 1.

    Curve fits have been applied for finding elasticity modulus dependency on the porosity. Elasticity modulus estimation is possible with a high accuracy (2-15% for FEM and 0.2-9.4% for experimental results).

  2. 2.

    Deviation of computed elasticity modulus from the experimental results, for the same porosity levels, is quantified in the following way. First, for two similar porosity ratios and elasticity modulus from experiments and FEM were compared. Second, elasticity modulus were calculated by fit-functions within 1-15% porosity ratios and compared each other. Thereby, the relative error was calculated, which is representative for classical laminate theory (CLT). We found 7 - 8% differences.

  3. 3.

    Experimental observation shows that elasticity modulus depends on the porosity nonlinearly. We explain that by larger contacts between neighboring fibers and layers enabling a sufficient molecular diffusion leading to a nonlinear increase in elasticity modulus (see Fig. 17).