1 Introduction

Fused deposition modeling (FDM) or Fused Filament Fabrication (FFF) are commonly used for 3 printing of composites. The process consists of polymer melting polymer in a vertical nozzle and depositing it on a horizontal build bed in layered form, where they are cooled and solidified. As a result, the shape, size, and mechanical properties of the machined parts are affected considerably. The experimental parameters such as nozzle velocity and temperature, nozzle dimension, chamber temperature, polymer viscosity, dimensions of the printed layer and filament, and bed temperature play an important role in the development of residual stresses and the evolution of temperature gradients [1,2,3]. These process parameters are usually set and optimized experimentally for specific materials. However, the process is time consuming and costly. Therefore, numerical techniques are used as an alternative solution to study the effect of process parameters on the thermo-mechanical behavior of 3D printed composite parts.

In the last years, several investigations focused on the prediction of the mechanical behavior of the printed polymer with FDM. For example, Croccolo et al. [4] developed an analytical model to predict the mechanical properties of FDM 3D printed parts and validated the model using experimental data. Domingo-Espin et al. [5] studied the mechanical properties of FDM polycarbonate specimens using numerical simulation techniques. A model capable to simulate FDM parts was developed by correlating the results of the numerical model with those of physical testing. Zhou et al. [6] modeled the temperature analysis in the FDM process using ANSYS software. The temperature evolution during the printing process was determined at various times. Costa et al. [7] investigated the thermal dissipation and the deformation of the specimen during the printing process of FDM parts. A 3D extruded head was taken into account for the convection and radiation phenomena. The evolution of the temperature in different zones of the part was reported [7]. Cattenone et al. [8] studied the impact of several parameters on the mechanical behavior of 3D printed components using ABAQUS software. The influence of simulation parameters such as the mesh size and meshing strategy and the time step was analyzed in detail. A model that simulates the FDM process capable to calculate the temperature and stress during the filament deposition was proposed by Macedo et al. [9]. The printing process without a heated print bed caused higher stresses. The part is subjected to rapid change in temperature which favors yielding higher stresses. Xia et al. [10] presented a first step towards developing a methodology for numerical simulations for the FDM process. The PLA polymer was tested considering their physical properties such as density, viscosity, thermal conductivity, and specific heat capacity. Such simulations provide the best results for the modelling of the FDM process. A finite element analysis (FEA) model using element activations has been used by Zhang et al. [11]. They have simulated the thermal and mechanical behavior and calculated the residual stress in the specimen. For the process optimization, the 3D model was also used to investigate the effects of process parameters, such as layer thickness and scan speed, on part warpage and distortions. Bertevas et al. [12] presented a numerical study of the FDM 3D printing of fiber-reinforced polymer composites. In this model, the classical microstructure-based fiber suspension model was considered and implemented with the help of the smoothed particle hydrodynamics (SPH) method. The effect of fiber distributions and orientations and their aspect ratio were investigated. Numerical simulation of FDM was also carried out by Comminal et al. [13] by means of finite volume methods considering the neat polymers without fibers reinforcement. Heller et al. [14, 15], Russel et al. [16], and Wang and Smith [17] proposed finite element simulations of fiber suspensions in 3D printing of polymer composites. An analytical modelling of the filament temperature development during the FDM process of polymers was proposed by Mohamed et al. [18].

In this paper, a numerical model was developed to simulate the 3D printing of composites with FDM process. The printed part consists of ASTM D638 Polyamide 12 (PA12). The temperature history was determined at various zones of the mapped part (through the thickness and along the length) which is used to predict the residual stress, stress concentration, and potential part distortion. Two different printing techniques of the FDM process were considered and compared: (a) layer deposit (layer by layer printing process) and (b) filament deposit (line by line process). The numerical model describes the real building up process parameters in the case of raster angle, nozzle temperature, platform (bed) temperature, chamber temperature, layer thickness, and the part dimension. While certain parameters of the FDM modeling approach were tested, the main interest lies in examining the evolution of the temperature during the printing process, the temperature gradient, the variation of the residual stresses, and distortion of the printed parts. Numerical results are verified and compared with experimental data. These results were used in the research of thermo-deformation of parts.

2 Problem setup and description of the physical mechanism

2.1 FDM modeling technique for polymer composite

The numerical model focuses on the extrusion and deposition of a polymer material. Schematic representations and computational domain are shown in Fig. 1. The model was embedded in a cuboidal domain that includes the nozzle, chamber, bed, and printed polymers. The bottom of the chamber (or the bed) is a rigid plate but the side and top walls of the chamber were initialized with a chamber temperature. Printing nozzle moves line by line (filament deposit) or layer by layer (in the z-direction) as depicted in Fig. 2. This figure shows a simple geometry and deposition sequence.

Fig. 1
figure 1

A schematic illustration of the FDM 3D printing technology

Fig. 2
figure 2

Procedure of ASTM D638 printing process for polymer composites

To simulate the FDM 3D printing process, the element activation/deactivation function in the Digimat 2018.1 software was used [20]. Figure 3 shows the description of the element activation function for a single filament. The coupled thermomechanical element was chosen for the analysis of the temperature and mechanical fields. The temperature varies in printing time and then used to calculate residual stresses in the printed part. A small part of the geometry was activated sequentially, according to the tool path associated with each part. The patch file of ASTM D638 part was created with the help of the Slic3r software [19]. This file includes time and spatial position of the head, polymer deposition description, base, and contour of the part. These pieces of information are stored in a file referred to as GCode.

Fig. 3
figure 3

Element activation function

First, a model of the part was realized with the help of CAD software, then a triangular mesh of the generated part (STL file) is used an input file for the slicing software in order to define all process parameters. Figure 4a shows an example of the part model used in this study and Fig. 4b illustrates the sketch model of the part. The layer thickness chosen was 0.34 mm. To discretize the part, 72,000 voxel elements were used with a sequential order. An example of the meshed part was presented in Fig. 5. All the elements were deactivated before the process begins. The elements were activated in the order of their numbering sequence. Once all the elements were activated, the final results are then used for a thermomechanical coupled analysis in order to simulate the solidification process and the cooling phase.

Fig. 4
figure 4

3D printed part with a sketch model

Fig. 5
figure 5

Meshing of the solid part

The model developed can be applied to any material. Polyamide was selected for this study, given its widespread utilization in the 3D printing process. Parts of 160 mm × 20 mm × 4 mm were simulated using the Digimat software. The material used was Polyamide 12 with the physical properties as listed in Tables 1, 2, and 3. The operating conditions and the parameters of the 3D printing process are given in Table 4. The temperature-dependent mechanical properties of PA12 polymer were taken from the literature (https://www.e-xstream.com/products/digimat/about-digimat). Tables 2 and 3 illustrate the thermomechanical behavior of the polymer. This variation is presented in Fig. 6. The numerical model to be built is a cuboid of dimension 200 × 200 × 200 mm3. The initial temperature of the polymer is equal to the temperature of the nozzle, and for the platform fabrication (bed), one has considered a temperature near to the glass transition temperature of polymers [20].

Table 1 Physical properties of the printed part
Table 2 Temperature depending physical properties of PA12
Table 3 Temperature depending thermal properties of PA12
Table 4 Process parameters
Fig. 6
figure 6

Variation of the mechanical properties of PA12 vs temperature (https://www.e-xstream.com/products/digimat/about-digimat)

The 3D printing process of polymer composites is monitored by the injection rate \( \dot{Q} \), the printing velocity Up, the injection temperature Tinj, the bed temperature Tb, the ambient temperature and the other filament properties as the density ρ, the viscosity μ ,and the thermal diffusivity α. The coefficient of heat transfer between the deposited filament and the bed was determined using the Hilper equation [21].

$$ {h}_{\mathrm{conv}}=\frac{Nu.k}{d} $$
(1)

where k is the thermal conductivity, d is the diameter, and Nu is the Nusselt number defined by the equation [22].

$$ \mathrm{Nu}={C}_{\mathrm{H}}{\operatorname{Re}}^n{\Pr}^{1/3} $$
(2)

In this equation, Re is the Reynolds number, CH and n are empirical constants estimated from Hilpert data [22] and Pr is the Prandtl number. The expression of the Reynolds number is expressed as:

$$ \operatorname{Re}=\frac{\rho .\vartheta .d}{\mu } $$
(3)

2.2 Constitutive mechanical and thermal models

2.2.1 Mechanical analysis

In order to use the FEA model to predict the thermomechanical behavior of FDM printing parts, it is necessary to define the constitutive equation that governs its mechanical behavior. The linear elasticity of polymer composites is described by Hooke’s law, which determines the relationship between stress and strain. In 3D form, this relationship is given as:

$$ \left(\begin{array}{l}{\varepsilon}_{11}\\ {}{\varepsilon}_{22}\\ {}{\varepsilon}_{33}\\ {}{\gamma}_{12}\\ {}{\gamma}_{23}\\ {}{\gamma}_{31}\end{array}\right)=\left(\begin{array}{l}{S}_{11}\kern0.75em {S}_{12}\kern0.75em {S}_{13}\kern0.75em {S}_{14}\kern0.75em {S}_{15}\kern0.75em {S}_{16}\\ {}\kern2em {S}_{22}\kern0.75em {S}_{23}\kern0.75em {S}_{24}\kern0.75em {S}_{25}\kern0.75em {S}_{26}\\ {}\kern4.25em {S}_{33}\kern0.75em {S}_{34}\kern0.75em {S}_{35}\kern0.75em {S}_{36}\\ {}\kern6.25em {S}_{44}\kern0.75em {S}_{45}\kern1em {S}_{46}\\ {}\kern8.5em {S}_{55}\kern1em {S}_{56}\\ {}\kern11em {S}_{66}\ \end{array}\right)=\left(\begin{array}{l}{\sigma}_{11}\\ {}{\sigma}_{22}\\ {}{\sigma}_{33}\\ {}{\tau}_{12}\\ {}{\tau}_{23}\\ {}{\tau}_{31}\end{array}\right) $$
(4)

where ε is the deformation, γ is the shearing strain, τ is the shearing stress, and σ is the normal stress. Considering the conventional engineering constants, Eq. (4) can be written in terms of Young’s modulus, Poisson ratio, and shear modulus as:

$$ \left(\begin{array}{l}{\varepsilon}_{11}\\ {}{\varepsilon}_{22}\\ {}{\varepsilon}_{33}\\ {}{\gamma}_{12}\\ {}{\gamma}_{23}\\ {}{\gamma}_{31}\end{array}\right)=\left(\begin{array}{l}1/{E}_{11}\kern0.75em -{\vartheta}_{12}/{E}_{11}\kern0.75em -{\vartheta}_{13}/{E}_{11}\kern1.5em 0\kern1.75em 0\kern2em 0\\ {}\kern3.75em 1/{E}_{22}\kern1.5em -{\vartheta}_{23}/{E}_{22}\kern1.5em 0\kern1.75em 0\kern2em 0\\ {}\kern8.25em 1/{E}_{33}\kern2.75em 0\kern1.75em 0\kern2.25em 0\\ {}\kern12.25em 1/{G}_{23}\kern1em 0\kern2.25em 0\ \\ {}\kern14.75em 1/{G}_{13}\kern1.25em 0\kern0.5em \\ {}\kern17em 1/{G}_{12}\end{array}\right)=\left(\begin{array}{l}{\sigma}_{11}\\ {}{\sigma}_{22}\\ {}{\sigma}_{33}\\ {}{\tau}_{12}\\ {}{\tau}_{23}\\ {}{\tau}_{31}\end{array}\right) $$
(5)

The compliance matrix is obtained by inverting the stiffness matrix, and we have:

$$ \left(\begin{array}{l}{\sigma}_{11}\\ {}{\sigma}_{22}\\ {}{\sigma}_{33}\\ {}{\tau}_{12}\\ {}{\tau}_{23}\\ {}{\tau}_{31}\end{array}\right)=\left(\begin{array}{l}{C}_{11}\kern0.75em {C}_{12}\kern0.75em {C}_{13}\kern0.75em {C}_{14}\kern0.75em {C}_{15}\kern0.75em {C}_{16}\\ {}\kern2em {C}_{22}\kern0.75em {C}_{23}\kern0.75em {C}_{24}\kern0.75em {C}_{25}\kern0.75em {C}_{26}\\ {}\kern4.25em {C}_{33}\kern0.75em {C}_{34}\kern0.75em {C}_{35}\kern0.75em {C}_{36}\\ {}\kern6.25em {C}_{44}\kern0.75em {C}_{45}\kern1em {C}_{46}\\ {}\kern8.5em {C}_{55}\kern1em {C}_{56}\\ {}\kern11em {C}_{66}\ \end{array}\right)=\left(\begin{array}{l}{\varepsilon}_{11}\\ {}{\varepsilon}_{22}\\ {}{\varepsilon}_{33}\\ {}{\gamma}_{12}\\ {}{\gamma}_{23}\\ {}{\gamma}_{31}\end{array}\right) $$
(6)

where

$$ {C}_{11}=\frac{\left({S}_{22}.{S}_{33}-{S}_{23}^2\right)}{S},{C}_{22}=\frac{\left({S}_{11}.{S}_{33}-{S}_{13}^2\right)}{S},{C}_{33}=\frac{\left({S}_{11}.{S}_{22}-{S}_{12}^2\right)}{S} $$
(7)
$$ {C}_{12}=\frac{\left({S}_{23}.{S}_{13}-{S}_{12}.{S}_{33}\right)}{S},{C}_{13}=\frac{\left({S}_{12}.{S}_{23}-{S}_{22}.{S}_{13}\right)}{S},{C}_{23}=\frac{\left({S}_{12}.{S}_{13}-{S}_{11}.{S}_{23}\right)}{S} $$
(8)
$$ {C}_{44}=\frac{1}{{\mathrm{S}}_{44}},{C}_{55}=\frac{1}{S_{55}},{C}_{66}=\frac{1}{S_{66}} $$
(9)
$$ S={S}_{11}{S}_{22}{S}_{33}+2{S}_{12}{S}_{23}{S}_{13}-{S}_{13}^2{S}_{22}-{S}_{23}^2{S}_{11}-{S}_{13}^2{S}_{33} $$
(10)

Young’s modulus and Poisson’s ratio can be obtained as:

$$ {E}_{11}=\frac{\sigma_{11}}{\varepsilon_{11}}\ \mathrm{and}\ {\vartheta}_{12}=-\frac{\varepsilon_{22}}{\varepsilon_{11}} $$
(11)

The in-plane shear modulus can be obtained from ± 45° oriented specimen using the equation:

$$ {G}_{12}=\frac{E_{11}}{2\left(1+{\vartheta}_{12}\right)} $$
(12)

For the case of polymers, the material is considered as anisotropic behavior and the stress-strain behavior can be written in Cartesian co-ordinates as follows [23]:

$$ {\varepsilon}_{11}=\frac{1}{E}\left[{\sigma}_{11}\vartheta \left({\sigma}_{22}+{\sigma}_{33}\right)\right]+{\alpha}_e\Delta T $$
(13)
$$ {\varepsilon}_{22}=\frac{1}{E}\left[{\sigma}_{22}\vartheta \left({\sigma}_{11}+{\sigma}_{33}\right)\right]+{\alpha}_e\Delta T $$
(14)
$$ {\varepsilon}_{33}=\frac{1}{E}\left[{\sigma}_{33}\vartheta \left({\sigma}_{11}+{\sigma}_{22}\right)\right]+{\alpha}_e\Delta T $$
(15)
$$ {\varepsilon}_{xy}=\frac{1+\vartheta }{E}{\sigma}_{xy},\kern0.5em {\varepsilon}_{xz}=\frac{1+\vartheta }{E}{\sigma}_{xz},\kern0.5em {\varepsilon}_{yz}=\frac{1+\vartheta }{E}{\sigma}_{yz} $$
(16)

where αe is the thermal expansion coefficient. The thermal stain can be found as:

$$ {\varepsilon}_{th}={\alpha}_e\Delta T $$
(17)

The effective and Von Mises stress can be computed as:

$$ {\sigma}_{eff}=\sqrt{\sigma_{11}^2+{\sigma}_{22}^2+{\sigma}_{33}^2}+2\vartheta \left({\sigma}_{11}{\sigma}_{22}+{\sigma}_{11}{\sigma}_{33}+{\sigma}_{22}{\sigma}_{33}\right) $$
(18)
$$ {\sigma}_{Mises}=\sqrt{\frac{1}{2}\Big[{\left({\sigma}_{11}^2-{\sigma}_{22}^2\right)}^2+{\left({\sigma}_{22}^2-{\sigma}_{33}^2\right)}^2+{\left({\sigma}_{33}^2-{\sigma}_{11}^2\right)}^2}\Big] $$
(19)

2.2.2 Thermal analysis

Digimat 2018.1 provides the capability of using indirect sequentially coupled thermomechanical analysis for both stress and heat analysis. A heat transfer is considered in the numerical model in order to calculate the profile of the temperature and the variation of the temperature during the printing process. The governing partial differential equation of the heat transfer is:

$$ \rho {C}_p\frac{\partial T}{\partial t}=k\left(\frac{\partial^2T}{\partial {x}^2}+\frac{\partial^2T}{\partial {y}^2}+\frac{\partial^2T}{\partial {z}^2}\right) $$
(20)

In which ρ, Cp, and k represent the density, the specific heat capacity, and the thermal conductivity of the polymer, respectively. The associated energy with the phase solidification is approximated as:

$$ H=\int \rho {C}_p(T) dT $$
(21)

The printed layers were deposited in the thickness direction. A new deposited layer at temperature Tm cools with the chamber temperature Tc. During the printing process, the underlying layers are re-heated by the conduction and their temperature exceeds Tg. The thickness of the part was printed in the z-direction with a constant chamber temperature Tc. In this direction, the evolution of the temperature T (z, t) for each position at time t satisfies the following heat equation:

$$ \rho {C}_p\frac{\partial T}{\partial t}=k\frac{\partial^2T}{\partial {z}^2} $$
(22)

This equation has the following solution [24]:

$$ T={T}_{\mathrm{c}}+\frac{H}{\rho {C}_{\mathrm{p}}}\frac{1}{\sqrt{\pi \varphi t}}\exp \left(-\frac{Z^2}{4\varphi t}\right) $$
(23)

where φ = k/ρCp is the thermal diffusivity of the polymer. If the FDM part has a sufficiently high dimension with high thickness h compared to the layer thickness ∆h, the heat energy of the layer is obtained as [2]:

$$ H=\rho {C}_{\mathrm{p}}\Delta h\left({T}_{\mathrm{m}}-{T}_{\mathrm{c}}\right) $$
(24)

And the variation of the temperature throughout the part thickness can be obtained as:

$$ T={T}_{\mathrm{c}}+\left({T}_{\mathrm{m}}-{T}_{\mathrm{c}}\right)\frac{\Delta h}{\sqrt{\pi \varphi t}}\exp \left(-\frac{Z^2}{4\varphi t}\right) $$
(25)

This equation (Eq. 25) allows calculating the variation of the temperature at Z position. For example, in order to determine the layer that the temperature T reaches Tg (T = Tg) at a given time t, we have:

$$ Z=2\sqrt{\varphi t}\sqrt{\ln \left(\frac{\Delta h}{\sqrt{\pi \varphi}}\ \frac{T_{\mathrm{m}}-{T}_{\mathrm{c}}}{T_{\mathrm{g}}-{T}_{\mathrm{c}}}\right)-\mathit{\ln}\sqrt{t}} $$
(26)

The parameters commonly used for polymer composites are Tm = 190–300 °C, Tg = 90–110 °C, and Tc = 70–80 °C.

3 Results and discussion

3.1 Validation of the numerical model

The present numerical FDM model was validated by comparing the numerical solutions with the experimental results [22]. The experiment tests were conducted using a mini-single screw extruder occupied by a nozzle. The polymer was deposited on a 3D bed actuated by 3 step motors controlled with CAD/CAM software. The maximum displacement in the x- and y-directions was 150 mm and 100 mm in the z-direction. The surface temperature of the filament was recorded by an infrared FLIR camera SC640 positioned above the extrusion head. Figure 7 shows the different mechanisms used for the experimental characterization of the FDM process. Thermal images were recorded with a frequency of 7.5 Hz. The printing conditions were listed in Table 5. Under these operating conditions, the variation of the temperature predicted by the numerical model shows a good agreement with the experimental results. This comparison is presented in Fig. 8. This figure shows that the temperature first rapidly decreases, from 190 °C (extruder temperature), and tends to stabilize after 30 s. The final part temperature is about 55°, which represents the bed temperature.

Fig. 7
figure 7

Experimental procedure [22]

Table 5 FDM conditions
Fig. 8
figure 8

Time evolution of the temperature: comparison between numerical and experimental data

3.2 Application for ASTM D638 polymer composites

The variation of the temperature and the Von Mises stress were captured at different positions of the specimen. Most previous works have interest to design the industrial parts during the additive manufacturing process, while the temperature was the major parameter affecting the mechanical behavior of polymer composites. In this section, the temperature evolution and the stress field during the fabrication of the ASTM D638 specimen are studied for two different configurations, namely (1) the filament deposit FDM process and (b) the layer deposit FDM process. The properties were analyzed in different positions of the part as shown in Fig. 9.

Fig. 9
figure 9

Strategy for scanning different layers of ASTM D638 part

The accuracy of the numerical model was examined and the number of elements was maximized in order to obtain a good distribution of the stress concentration [25,26,27]. In this section, we simulated a representative part in order to demonstrate the capabilities of the model to print an ASTM D638 polymer part. Figure 10 shows several frames from a simulation of the deposit layer process, composed of the 1st layer, the 6th layer, and the 12th layer. This figure shows also the part temperature at various instances of the printing process. It appears that the newest layer part is always the hottest one (the 2nd layer is hotter than the 1st layer) and cools down gradually. This phenomenon is better seen in the image of Fig. 10. As a second layer part is deposited, the temperature of the first one increases and so their cooling is delayed. For different composite thickness, the frame of different printed layers with the distribution of the temperature is presented in Fig. 10. The hottest zone of the first layer corresponds to the top surface with maximum temperatures around 57.4 °C. However, the temperature of the bottom surface is reduced to the bed temperature (55 °C). The analysis of the composite thickness, in the case of the 1st layer, shows a low temperature gradient ranging from 55 to 58 °C. The subjacent layer is reheated when the upper layer is printed, which assumes the adhesion between layers and modify the gradient of the temperature and the crystallinity process of the polymer. By analyzing the 6th layer, with 2 mm in thickness, it appears that the temperature of the surface increases generating an important gradient compared with the case of 1st layer. The printing process continues, and at 460 s, the 12th layer starts to take place, corresponding to the total thickness of the composite, and from this step, the element cools down gradually.

Fig. 10
figure 10

A few frames for 3D printing of polymer composites using layer deposit FDM process: variation of the temperature

Figure 11 shows the variation of the temperature and the Von Mises stress during the printing process in three different zones of the composite thickness: zone A (1st layer, with 0.4 mm in thickness), zone B (6th layer, with 2 mm in thickness), and zone C (12th layer, with 4 mm in thickness). For more illustration, the snapshot of the temperature and the stress concentration of the printed part are presented in Fig. 12. From this figure, it appears that the maximum of the stress is observed between the first and the second layers and decrease gradually with the composite thickness. This concentration does not exceed 70 MPa and is generated by the distortion of the part due to the difference between the bed temperature (55 °C) and heated polymers (190 °C). It depends also on the thermal stresses due to heat conduction from the last deposited layer. However, when the solidification phase of the part begins, the stress concentration starts to increase and reaches its maximum at t = 480 s (Fig. 11c). At t = 200 s, the temperature of the layer stabilizes around 55 °C, while the stress increases rapidly.

Fig. 11
figure 11

Profile of the temperature and the Von Mises stress at different positions of the composite thickness using layer deposit process

Fig. 12
figure 12

Maps of the temperature distribution and the associated Von Mises stress in 4 mm of the composite part

Figure 13 shows the simulation of the 3D printing process using the filament deposit process, composed of 1st filament, 2nd filaments, ½ of the 1st layer, 1st layer, 1st filament of the 2nd layer, etc. This figure gives the variation of the filament temperature at various instances of the printing process. It appears that the newest filament part is always the hottest zone with a temperature of 119 °C. This filament cools down rapidly by the bed and reheated with depositing the 2nd filament. The temperature of the 1st filament goes from 119 °C to 70, 65, and 55 °C with the printing of the 2nd and 3rd filaments and the 1st layer, respectively. This phenomenon is better seen in Fig. 13, which depicts the evolution of the temperature vs the filament deposit. As the number of the printed layer increases, the temperature drops and changes gradually along the composite thickness. For example, when the 2nd layer is totally printed, the results indicate that the lateral area is the hottest zone in the part and the top of the bottom filament has been reheated a little by the hot adjacent filament. This phenomenon was observed from 0.8 (2nd layer) to 4 mm of the composite thickness (12 layers). The variation of the temperature and the Mises stress throughout the composite thickness is presented in Fig. 14 for this process. The temperature changes gradually in the composite thickness and the concentration of the stress was observed between the 1st and 2nd layers and does not exceed 55 MPa.

Fig. 13
figure 13

A few frames for 3D printing of polymer composites using filament deposit FDM process

Fig. 14
figure 14

Profile of the temperature and the concentration of the stress in 4 mm of the composite with filament deposit FDM process

To examine the effect of the printing process type on the parameters, the temperature and the stress vs printing time were compared for the two processes and presented in Figs. 15 and 16. From these figures, it appears that as the layer (filament) is printed, the top of the bottom layer (filament) is reheated and the temperature changes which affect the distortion of the part. For the case of the layer deposit process, the temperature of the specimen remained fairly constant throughout the printed layers and close to the platform fabrication temperature (55 °C), while in the case of filament deposit process, the temperature varies in the same layer and their effect on the part distortion becomes important. The temperature of the 1st layer decreases drastically in a rapid time compared with the other layers.

Fig. 15
figure 15

Comparison of the temperature profile for two printing techniques

Fig. 16
figure 16

Variation of the stress concentration for two processes

The maximum stress was obtained around the 1st layer, as shown in Fig. 16, and was approximately equal to 65 MPa. This concentration was generated by the difference of the temperature generated with the platform fabrication and the printed layers (reheating phenomenon). In addition, the variation of the stress would be similar for two processes and increases with the solidification of the part. However, at the end of the solidification phase, the cooling phase start and the residual stress decreased considerably.

The deformation induced by the thermal stress was discussed for two processes. The deformation was determined by measuring the difference between the dimensions of the original part and that following the printing process. Figures 17 and 18 show the displacement and the deformation of the part at different positions with a maximum value of 0.20 mm for the 12th layer. This value corresponds to a deformation of \( \frac{\Delta \mathrm{l}}{\mathrm{l}}=0.12\% \). Therefore, the deformation was not noticeable at this stage. It appears that the maximum displacement was obtained in the corner of the part.

Fig. 17
figure 17

Deformation of the part

Fig. 18
figure 18

Distortion of the part after the cooling phase

4 Conclusions

This paper presents a 3D numerical model to simulate the variation of the temperature and the residual stress during the FDM process. ASTM D638 polymer composite part was manufactured and printed using two types of processes: filament deposit process and layer deposit process. The accuracy of the numerical model was verified by experimental results and the properties of the printed part were then predicted as a function of printing time. The main conclusions are summarized as follows:

The availability and accuracy of numerical tools can help to understand the effect of processing parameters on 3D printed part.

  • The difference in the temperature between numerical simulation and experiments was less than 5%. Therefore, the numerical methodology developed in this study was successful to predict the variation of the temperature and the residual stress evolution.

  • The highest temperature gradient was recorded during filament deposition. In the case of the layer deposition, the temperature was uniform throughout the part surface, while different values were recorded in the surface of the printed part with filament deposit.

  • High Von Mises stresses were predicted within the 1st and the 2nd layers caused by the difference of the temperature between the platform plate and the part layers. The stress magnitude increases with printing time, which induced by the decrease of the temperature and the solidification of the part. During the cooling phase, the Von Mises stress takes its maximal value; it takes 65 MPa for the layer deposit process and 55 MPa for the filament deposit process.

  • The stresses varied in time within the part layers because the temperature changed and decreased during printing. An important gradient in the temperature was observed throughout the composite thickness. It appears that the concentration of stresses was higher if the temperatures of the printed part varied rapidly. Those stresses can lead to delamination between the layers of the printed part.

  • Finally, the analysis of this case study demonstrated the usefulness of this technique to optimize the processes parameters of the 3D printing of polymer composites.