The Effect of a Phase Change on the Temperature Evolution during the Deposition Stage in Fused Filament Fabrication

: Additive Manufacturing Techniques such as Fused Filament Fabrication (FFF) produce 3D parts with complex geometries directly from a computer model without the need of using molds and tools, by gradually depositing material(s), usually in layers. Due to the rapid growth of these techniques, researchers have been increasingly interested in the availability of strategies, models or data that may assist process optimization. In fact, 3D printed parts often exhibit limited mechanical performance, which is usually the result of poor bonding between adjacent ﬁlaments. In turn, the latter is inﬂuenced by the temperature ﬁeld history during deposition. This study aims at evaluating the inﬂuence of the phase change from the melt to the solid state undergone by semi-crystalline polymers such as Polylactic Acid (PLA), on the heat transfer during the deposition stage. The energy equation considering solidiﬁcation is solved analytically and then inserted into a MatLab ® code to model cooling in FFF. The deposition and cooling of simple geometries is studied ﬁrst, in order to assess the differences in cooling of amorphous and semi-crystalline polymers. Acrylonitrile Butadiene Styrene (ABS) was taken as representing an amorphous material. Then, the deposition and cooling of a realistic 3D part is investigated, and the inﬂuence of the build orientation is discussed.


Introduction
Additive Manufacturing (AM) is a group of technologies that produce three-dimensional physical objects by gradually adding material [1,2]. Since the 1980s these technologies became adopted for a growing number of medical/engineering applications and have gradually entered our lives with the development of low-cost 3D printers [3,4]. In Fused Filament Fabrication (FFF) (also often denoted as Fused Deposition Modeling), parts are made layer by layer, each layer being obtained by the extrusion through a nozzle and the deposition of a molten plastic filament [5,6]. The nozzle movements are controlled by a computer, in accordance with a previously defined deposition sequence. Thus, FFF can produce a prototype or a finished product from a Computer Aided Design (CAD) model without the use of molds.
Despite the potential disruptive character of FFF, in practice 3D printed parts often show unsatisfactory mechanical resistance [7]. This is generally due to insufficient bonding between adjacent filaments, which in turn is determined by the temperature history upon cooling [8]. Consequently, knowledge of the temperature evolution during the deposition/cooling stage is valuable for process set-up and optimization.
The objective of this work was to compute the temperature evolution during deposition and cooling of FFF parts, taking into consideration the amorphous or semi-crystalline nature of polymers. This unique tool will not only enable an estimation of the magnitude of the effect of the phase change occurring during cooling/solidification of partially crystalline polymers, but will also give generality to the thermal model. The paper is organized It has been shown that during the deposition of a filament, the heat transfers by convection with the environment and by conduction with the support/adjacent filaments control its temperature history [32]. The corresponding energy balance can then be translated into a differential energy equation, which can be solved analytically to yield a mathematical expression to compute the temperature evolution with time [33]. In the simulation method developed by the authors, this expression is used by an algorithm developed using MatLab ® , which activates/deactivates contacts and thermal conditions arising as the deposition proceeds, depending on the part geometry, deposition sequence and operating conditions. By coupling a bonding criterion to the temperature profile history, it is also possible to predict the degree of bonding between adjacent filaments [28]. The following assumptions are considered in the model: The axial heat conduction is neglected. Given the low thermal conductivity of polymers and the small filaments radii, axial heat conduction is much smaller than convection and conduction between adjacent filaments; 2.
Computations are carried out when the Biot number is lower than 0.1, i.e., when the temperature gradient in each filament cross-section can be neglected; 3.
The thermal properties of the polymer are assumed to be temperature independent; 4.
The thermal contact conductance is assumed to be low (high thermal resistance) while bonding is not achieved, and high when bonding occurs.
The predictions of the code were experimentally validated for ABS filaments [29]. Comparison of calculations with experimental data for PLA showed excellent qualitative agreement [34].
As illustrated in Figure 1, the objective is to include the phase change condition in order to allow the study of semi-crystalline polymers such as PLA. history, it is also possible to predict the degree of bonding between adjacent filaments [28]. The following assumptions are considered in the model: 1. The axial heat conduction is neglected. Given the low thermal conductivity of polymers and the small filaments radii, axial heat conduction is much smaller than convection and conduction between adjacent filaments; 2. Computations are carried out when the Biot number is lower than 0.1, i.e., when the temperature gradient in each filament cross-section can be neglected; 3. The thermal properties of the polymer are assumed to be temperature independent; 4. The thermal contact conductance is assumed to be low (high thermal resistance) while bonding is not achieved, and high when bonding occurs.
The predictions of the code were experimentally validated for ABS filaments [29]. Comparison of calculations with experimental data for PLA showed excellent qualitative agreement [34].
As illustrated in Figure 1, the objective is to include the phase change condition in order to allow the study of semi-crystalline polymers such as PLA.

Insertion of a Phase Change
The architecture of the macromolecular chains of a polymer determines the kinetics of cooling and solidification from the melt. In the case of amorphous polymers (such as ABS), the chains gradually rearrange upon cooling and retain a random structure upon solidification. Contrarily, the chains of partially crystalline polymers (such as PLA) rearrange upon freezing and form partly ordered regions, becoming aligned and folded. The heat of solidification of a partially crystalline polymer (the degree of crystallinity of commercial polymer usually ranges between 20-70%) is the change in enthalpy due to the heat absorbed to progress from liquid to a solid. Usually, material data refers instead to the heat of fusion (also known as enthalpy of fusion, or latent heat of fusion), which is equal but the opposite of the heat of solidification, as this property can be readily obtained from Differential Scanning Calorimetry [30].
Therefore, when a molten filament of a partially-crystalline polymer cools down, a phase change from liquid to solid will occur in the time interval , , where is the instant at which the filament reaches the solidification temperature and is the end of the phase change ( Figure 2).

Insertion of a Phase Change
The architecture of the macromolecular chains of a polymer determines the kinetics of cooling and solidification from the melt. In the case of amorphous polymers (such as ABS), the chains gradually rearrange upon cooling and retain a random structure upon solidification. Contrarily, the chains of partially crystalline polymers (such as PLA) rearrange upon freezing and form partly ordered regions, becoming aligned and folded. The heat of solidification of a partially crystalline polymer (the degree of crystallinity of commercial polymer usually ranges between 20-70%) is the change in enthalpy due to the heat absorbed to progress from liquid to a solid. Usually, material data refers instead to the heat of fusion (also known as enthalpy of fusion, or latent heat of fusion), which is equal but the opposite of the heat of solidification, as this property can be readily obtained from Differential Scanning Calorimetry [30].
Therefore, when a molten filament of a partially-crystalline polymer cools down, a phase change from liquid to solid will occur in the time interval [τ l , τ s ], where τ l is the instant at which the filament reaches the solidification temperature T solid and τ s is the end of the phase change ( Figure 2). All filaments are sub-divided into elementary axial segments, each being deposited at a given time instant determined by the extrusion velocity. Then, the following phase change condition for each filament can be defined in the interval ∆ = : For the deposited filament segment ( ∈ 1, … , ): where ℎ is the convective heat transfer coefficient (W/m ℃), is the environment temperature (℃), is the number of physical contacts of the filament with adjacent filament segments or with the support of the 3D printer, ℎ is the thermal contact conductance for contact (W/m ℃), is the temperature of the adjacent filament segment or support for contact (℃), is the mass of the filament segment (kg), is the latent heat of fusion (J/kg), is the area exposed to the environment (m ) and is the area of contact for the filament segment (m ), which are given by: is the cross-section perimeter ( ), is the filament segment length ( ), is the fraction of that is in contact with another segment or with the support and is defined by, ∀ ∈ 1, … , , ∀ ∈ 1, … , : Inserting Equation (3) into Equation (2) and rearranging: where is density ( kg/m ) and is the cross-section area ( m ). The following assumptions are made: 1. Crystallization development during cooling does not affect the thermal properties, which are taken as temperature independent; 2. When the temperature of the filament segment reaches , the thermal conditions used to compute are activated at ; All filaments are sub-divided into N elementary axial segments, each being deposited at a given time instant determined by the extrusion velocity. Then, the following phase change condition for each filament can be defined in the interval ∆t = τ s − τ l : For the r th deposited filament segment (r ∈ {1, . . . , N}): where h conv is the convective heat transfer coefficient (W/m 2 • C), T E is the environment temperature ( • C), n is the number of physical contacts of the filament with adjacent filament segments or with the support of the 3D printer, h i is the thermal contact conductance for contact i (W/m 2 • C), (T r ) i is the temperature of the adjacent filament segment or support for contact i ( • C), m is the mass of the filament segment (kg), λ is the latent heat of fusion (J/kg), (A r ) conv is the area exposed to the environment (m 2 ) and (A r ) i is the area of contact i for the r th filament segment (m 2 ), which are given by: P is the cross-section perimeter (m), L is the filament segment length (m), α i is the fraction of P that is in contact with another segment or with the support and (a r ) i is defined by, ∀i ∈ {1, . . . , n}, ∀r ∈ {1, . . . , N}: (a r ) i = 1, if the r th filament segment has the i th contact 0, otherwise Inserting Equation (3) into Equation (2) and rearranging: where ρ is density (kg/m 3 ) and A is the cross-section area (m 2 ). The following assumptions are made: 1. Crystallization development during cooling does not affect the thermal properties, which are taken as temperature independent; 2.
When the temperature of the r th filament segment reaches T solid , the thermal conditions used to compute τ s are activated at τ l ; 3.
If ((T r ) i ) 0 is the temperature of the adjacent filament segment for contact i at instant τ l , the value of (T r ) i will be assumed as the average between ((T r ) i ) 0 and T E ; 4.
If during a phase change a filament contacts a new hotter filament, its phase change is interrupted and the temperatures are re-computed. When its temperature reaches again T solid , τ s is computed for the new thermal conditions; Equation (5) and the assumptions above were inserted in the algorithm. At each time increment, the filaments starting a phase change are identified. Their temperature during the phase change is kept constant, unless a new adjacent filament interrupts the process. A simplified flowchart is presented in Figure 3 and the respective section of the MatLab ® code is shown in Figure 4. This section was inserted in the computer code previously developed by the authors [35]. 3. If is the temperature of the adjacent filament segment for contact a instant , the value of will be assumed as the average between and ; 4. If during a phase change a filament contacts a new hotter filament, its phase change is interrupted and the temperatures are re-computed. When its temperature reaches again , is computed for the new thermal conditions; Equation (5) and the assumptions above were inserted in the algorithm. At each time increment, the filaments starting a phase change are identified. Their temperature during the phase change is kept constant, unless a new adjacent filament interrupts the process A simplified flowchart is presented in Figure 3 and the respective section of the MatLab ® code is shown in Figure 4. This section was inserted in the computer code previously developed by the authors [35].   3. If is the temperature of the adjacent filament segment for contact at instant , the value of will be assumed as the average between and ; 4. If during a phase change a filament contacts a new hotter filament, its phase change is interrupted and the temperatures are re-computed. When its temperature reaches again , is computed for the new thermal conditions; Equation (5) and the assumptions above were inserted in the algorithm. At each time increment, the filaments starting a phase change are identified. Their temperature during the phase change is kept constant, unless a new adjacent filament interrupts the process. A simplified flowchart is presented in Figure 3 and the respective section of the MatLab ® code is shown in Figure 4. This section was inserted in the computer code previously developed by the authors [35].

Application of the Code to Simple 3D Printed Structures
This section deals with using the code to predict the cooling of simple 3D parts. The first example concerns the deposition of a single filament (Figure 5a), whereas the second considers the structure with 10 filaments illustrated in Figure 5b. Table 1 presents the main properties of ABS (P400 ABS, Stratasys ® ) and PLA (881N PLA, Filkemp ® ). Table 2 identifies the process parameters and computational variables. The heat transfer coefficient hconv was deduced using the correlation of Churchill and Chu [36], a high conductance between adjacent filaments was assumed, and an intermediate value for the extrusion temperature was considered to be suitable for both ABS and PLA. The version 9.2.0.556344 (R2017a) of MatLab ® was used.

Application of the Code to Simple 3D Printed Structures
This section deals with using the code to predict the cooling of simple 3D parts. The first example concerns the deposition of a single filament (Figure 5a), whereas the second considers the structure with 10 filaments illustrated in Figure 5b. Table 1 presents the main properties of ABS (P400 ABS, Stratasys ® , Edina, MI, USA) and PLA (881N PLA, Filkemp ® , Algueirão-Mem Martins, Portugal). Table 2 identifies the process parameters and computational variables. The heat transfer coefficient h conv was deduced using the correlation of Churchill and Chu [36], a high conductance between adjacent filaments was assumed, and an intermediate value for the extrusion temperature was considered to be suitable for both ABS and PLA. The version 9.2.0.556344 (R2017a) of MatLab ® was used. Figure 6 shows the temperature evolution of the cross-section of a single PLA filament (at x = 30 mm, i.e., at a section in the middle of the filament) from an initial temperature of 230 • C, with and without phase change, as predicted by the code presented above. The latter starts at t = 3.25 s and lasts 0.75 s. During this period, the temperature remains constant, whereas it decreases continuously if the phase change is not considered. This results in a temperature difference of 13.9 • C (at t = 4 s) between the two cooling processes.

Application of the Code to Simple 3D Printed Structures
This section deals with using the code to predict the cooling of simple 3D parts. The first example concerns the deposition of a single filament (Figure 5a), whereas the second considers the structure with 10 filaments illustrated in Figure 5b. Table 1 presents the main properties of ABS (P400 ABS, Stratasys ® ) and PLA (881N PLA, Filkemp ® ). Table 2 identifies the process parameters and computational variables. The heat transfer coefficient hconv was deduced using the correlation of Churchill and Chu [36], a high conductance between adjacent filaments was assumed, and an intermediate value for the extrusion temperature was considered to be suitable for both ABS and PLA. The version 9.2.0.556344 (R2017a) of MatLab ® was used.     0.001 Figure 6 shows the temperature evolution of the cross-section of a single PLA filament (at x = 30 mm, i.e., at a section in the middle of the filament) from an initial temperature of 230 ℃, with and without phase change, as predicted by the code presented above. The latter starts at t = 3.25 s and lasts 0.75 s. During this period, the temperature remains constant, whereas it decreases continuously if the phase change is not considered. This results in a temperature difference of 13.9 ℃ (at t = 4 s) between the two cooling processes. When 10 filaments are deposited, contacts with adjacent filaments and support arise. Figure 7 shows the temperature evolution of the cross-section of filament 2 at x = 30 mm, with and without phase change, again for PLA and an initial temperature of 230 ℃. In the computations, the travel time along the -axis is not considered (Figure 5), that is, the deposition of a new layer starts immediately after concluding the deposition of the previous one. The phase change occurs at t = 3.68 s and lasts 0.4 s, due to the thermal contacts with filaments 1 and 3. The peak initiated at t = 10 s is created by the new thermal contact with filament 7. The maximum temperature difference of 18.9 ℃ between the two curves is observed at approximately t = 8 s. This difference is higher than in the previous example ( Figure 6) due to the contacts developing between filaments. As the temperature of each filament remains constant during its phase change, those filaments that are in contact with filaments that are undergoing a phase change cool more slowly, i.e., the temperature of each filament is influenced by its own phase change and by the phase change of the other filaments. When 10 filaments are deposited, contacts with adjacent filaments and support arise. Figure 7 shows the temperature evolution of the cross-section of filament 2 at x = 30 mm, with and without phase change, again for PLA and an initial temperature of 230 • C. In the computations, the travel time along the z-axis is not considered (Figure 5), that is, the deposition of a new layer starts immediately after concluding the deposition of the previous one. The phase change occurs at t = 3.68 s and lasts 0.4 s, due to the thermal contacts with filaments 1 and 3. The peak initiated at t = 10 s is created by the new thermal contact with filament 7. The maximum temperature difference of 18.9 • C between the two curves is observed at approximately t = 8 s. This difference is higher than in the previous example ( Figure 6) due to the contacts developing between filaments. As the temperature of each filament remains constant during its phase change, those filaments that are in contact with filaments that are undergoing a phase change cool more slowly, i.e., the temperature of each filament is influenced by its own phase change and by the phase change of the other filaments.
ABS and PLA having distinct thermal properties (Table 1) apart from their amorphous/partially crystalline character, their cooling rates should also differ. As seen in Figure 8, which shows the temperature evolution of the cross-section of filament 2, at x = 30 mm, the ABS filament cools faster, a maximum temperature difference of 39.1 • C being obtained for the two materials at approximately t = 6 s. In principle, this would mean that this particular PLA is a better option for FFF, as slower cooling favors bonding between filaments [28]. ABS and PLA having distinct thermal properties (Table 1) apart from their amorphous/partially crystalline character, their cooling rates should also differ. As seen in Figure 8, which shows the temperature evolution of the cross-section of filament 2, at x = 30 mm, the ABS filament cools faster, a maximum temperature difference of 39.1 ℃ being obtained for the two materials at approximately t = 6 s. In principle, this would mean that this particular PLA is a better option for FFF, as slower cooling favors bonding between filaments [28].   ABS and PLA having distinct thermal properties (Table 1) apart from their amorphous/partially crystalline character, their cooling rates should also differ. As seen in Figure 8, which shows the temperature evolution of the cross-section of filament 2, at x = 30 mm, the ABS filament cools faster, a maximum temperature difference of 39.1 ℃ being obtained for the two materials at approximately t = 6 s. In principle, this would mean that this particular PLA is a better option for FFF, as slower cooling favors bonding between filaments [28].

Applied Case Study
This section considers the manufacture by FFF of a rectangular tile with 90 × 60 × 30 mm using PLA or ABS. 3D printing will be carried out using a unidirectional and aligned strategy (i.e., filaments will be deposited along the x axis direction). Six build orientations (labelled P1 to P6) are feasible, as demonstrated in Figure 9. Orientations P1 and P2 entai

Applied Case Study
This section considers the manufacture by FFF of a rectangular tile with 90 × 60 × 30 mm using PLA or ABS. 3D printing will be carried out using a unidirectional and aligned strategy (i.e., filaments will be deposited along the x axis direction). Six build orientations (labelled P1 to P6) are feasible, as demonstrated in Figure 9. Orientations P1 and P2 entail the longest filaments (90 mm), whilst P5 and P6 require the shortest filaments (30 mm). If the filaments are circular (with a diameter of 0.25 mm) and the deposition velocity is set to 30 mm/s, it will take 24 h to perform the 3D printing of this part. Each build orientation will involve a different number of filaments and contact area with the support, as presented in Table 3. The materials properties (PLA and ABS) and the process parameters are defined in Tables 1 and 2. Computers 2021, 10,19 the longest filaments (90 mm), whilst P5 and P6 require the shortest filaments (30 the filaments are circular (with a diameter of 0.25 mm) and the deposition velocit to 30 mm/s, it will take 24 h to perform the 3D printing of this part. Each build orie will involve a different number of filaments and contact area with the supp presented in Table 3. The materials properties (PLA and ABS) and the process para are defined in Tables 1 and 2.  Given the high number of filaments necessary to perform the 3D printing of t in order to identify more easily the differences in cooling associated with eac orientation, as well as understand the rates of cooling of ABS and PLA (here repre the behavior of amorphous and partially crystalline polymers, respectivel temperature evolution for one filament will be followed. The data presented in Fig  and 11 concerns the central filament on the 20th layer counting from the suppor 3D printer. This corresponds to filament no. 2341 for orientations P1 and P4, no. 4 P2 and P5, and no. 7021 for orientations P3 and P6. As before, the data presented r the cross-section in the middle of the filament length, that is, at = 45 m orientations P1 and P2, = 30 mm for orientations P3 and P4 and = 15 m orientations P5 and P6. For an easier comparison of the thermal history associated with each material an orientation, Figure 9 exhibits the temperature evolution during the first 3800 s fr  Given the high number of filaments necessary to perform the 3D printing of the part, in order to identify more easily the differences in cooling associated with each build orientation, as well as understand the rates of cooling of ABS and PLA (here representing the behavior of amorphous and partially crystalline polymers, respectively), the temperature evolution for one filament will be followed. The data presented in Figures 10 and 11 concerns the central filament on the 20th layer counting from the support of the 3D printer. This corresponds to filament no. 2341 for orientations P1 and P4, no. 4681 for P2 and P5, and no. 7021 for orientations P3 and P6. As before, the data presented refers to the cross-section in the middle of the filament length, that is, at x = 45 mm for orientations P1 and P2, x = 30 mm for orientations P3 and P4 and x = 15 mm for orientations P5 and P6. figures are magnifications of the progress of temperature during short time periods, evidencing either specific features of the curves or differences between the two materials.  figures are magnifications of the progress of temperature during short time periods, evidencing either specific features of the curves or differences between the two materials.    Table 4.
Each of the two graphs of Figure 10 essentially displays 3 sets of curves, which are due to the similitudes in heat transfer between P1 and P2, P3 and P4 and P5 and P6. In the initial seconds, the cooling rate is higher for P1 and P2, followed by P3 and P4, and finally by P5 and P6. This is directly related to the length of the filaments for each build orientation (90, 60 and 30 mm, respectively), which leads to different deposition times (3, 2 and 1 s, respectively) and determines the period of time elapsed between contacts. Indeed, the figures clearly show that the cooling of the filament is influenced by the physical contact with filaments that are deposited later, as well as by heat transfer from newer filaments belonging to other more recent layers. The peaks around 500 s are a good example of the latter effect. Also, a comparison between the two graphs will show that at analogous cooling times the filament temperatures are generally higher for PLA, due to the occurrence of a phase change (and the inherent thermal properties of each material), but this is more clearly seen in Figure 11.
As discussed above, Figure 11 reveals in more detail how the temperature of the mid cross-section of the filament selected evolves with time for the various build orientations and for the two materials. In each graph, the initial sharp temperature decrease results from the deposition of the filament. The inset clearly shows that the differences in the cooling rate between ABS and PLA are due to their intrinsic thermal properties (influencing the slope of the curve) as well as by their crystalline character, with PLA exhibiting a plateau due to the phase change. In the same inset, the first temperature peak arises due to the physical contact with the next filament being deposited. The remaining peaks in each graph were caused by the heat transfer developing due to the deposition of new hotter filaments in the same layer and in the layers above.
The magnitude of the initial peak is small, but varies with build orientation. Also, the time at which it develops differs with build orientation. The longer the filament, the larger the time elapsed between the successive contributions to heat transfer from new filaments, and consequently the lower the re-heating effect. As the deposition of the part continues, the filament being studied reaches the environment temperature. From then onwards, the intensity of the temperature peaks decreases, because the distance between this filament and any new filament being deposited also increases. Table 4 quantifies some of the features of the curves in Figure 11, thus evidencing the temperature differences upon cooling of ABS and PLA for the part being considered. It includes the maximum temperature difference between the two materials that was observed during the global deposition/cooling sequence. This amounts to approximately 40 ℃ and depends little on build orientation. Once the filament reaches the environment temperature, the temperatures of the next 3 peaks (denoted A, B and C in Figure 11) were  Table 4. Table 4. The effect of the type of material (ABS vs. PLA) on the temperature of the cross-section at the middle of the central filament of the 20th layer (counting from the support) for six build orientations, P1 to P6 (maximum temperature difference and temperatures of peaks A, B and C in Figure 11). For an easier comparison of the thermal history associated with each material and build orientation, Figure 9 exhibits the temperature evolution during the first 3800 s from the instant the cross-section of the filaments highlighted was deposited. The actual time elapsed since building of the part started is identified in the figures labels. Figure 11 uses the real time scale to study in greater detail the temperature development during cooling, again for the six build orientations (this is why the time values in the x axis change with build orientation), and directly comparing the curves for ABS and PLA. The insets in the figures are magnifications of the progress of temperature during short time periods, evidencing either specific features of the curves or differences between the two materials.

Maximum
Each of the two graphs of Figure 10 essentially displays 3 sets of curves, which are due to the similitudes in heat transfer between P1 and P2, P3 and P4 and P5 and P6. In the initial seconds, the cooling rate is higher for P1 and P2, followed by P3 and P4, and finally by P5 and P6. This is directly related to the length of the filaments for each build orientation (90, 60 and 30 mm, respectively), which leads to different deposition times (3, 2 and 1 s, respectively) and determines the period of time elapsed between contacts. Indeed, the figures clearly show that the cooling of the filament is influenced by the physical contact with filaments that are deposited later, as well as by heat transfer from newer filaments belonging to other more recent layers. The peaks around 500 s are a good example of the latter effect. Also, a comparison between the two graphs will show that at analogous cooling times the filament temperatures are generally higher for PLA, due to the occurrence of a phase change (and the inherent thermal properties of each material), but this is more clearly seen in Figure 11.
As discussed above, Figure 11 reveals in more detail how the temperature of the mid cross-section of the filament selected evolves with time for the various build orientations and for the two materials. In each graph, the initial sharp temperature decrease results from the deposition of the filament. The inset clearly shows that the differences in the cooling rate between ABS and PLA are due to their intrinsic thermal properties (influencing the slope of the curve) as well as by their crystalline character, with PLA exhibiting a plateau due to the phase change. In the same inset, the first temperature peak arises due to the physical contact with the next filament being deposited. The remaining peaks in each graph were caused by the heat transfer developing due to the deposition of new hotter filaments in the same layer and in the layers above.
The magnitude of the initial peak is small, but varies with build orientation. Also, the time at which it develops differs with build orientation. The longer the filament, the larger the time elapsed between the successive contributions to heat transfer from new filaments, and consequently the lower the re-heating effect. As the deposition of the part continues, the filament being studied reaches the environment temperature. From then onwards, the intensity of the temperature peaks decreases, because the distance between this filament and any new filament being deposited also increases. Table 4 quantifies some of the features of the curves in Figure 11, thus evidencing the temperature differences upon cooling of ABS and PLA for the part being considered. It includes the maximum temperature difference between the two materials that was observed during the global deposition/cooling sequence. This amounts to approximately 40 • C and depends little on build orientation. Once the filament reaches the environment temperature, the temperatures of the next 3 peaks (denoted A, B and C in Figure 11) were also registered and are included in the Table. As expected, the magnitude of these peaks decreases as the deposition of the 3D part proceeds, because the new individual filaments that are deposited are gradually more distant from the cross-section being monitored. Naturally, the temperature differences between the two materials also decrease (from approximately 10 • C for peak A, to circa 6 • C for peak B, to around 4 • C for peak C). Also, the temperatures for PLA are consistently higher than those for ABS, obviously due to the phase change undertook by the former. Build orientation has an effect on the temperature of peaks A to C, particularly for the first. A difference of almost 20 • C was registered for orientation P1 (64.8 • C) relative to P5 (83.6 • C). Again, the higher temperatures occur for the build orientations dealing with shorter filaments, where the contacts between filaments at any given vertical cross-section of the part are more frequent. These re-heating peaks may contribute significantly to the quality of the 3D printed part, because if sufficiently high temperatures are attained, bonding between contiguous filaments is favored.

Conclusions
A simulation method to predict quantitatively the temperature evolution of filaments during deposition and cooling in FFF, capable of dealing with both amorphous and semicrystalline polymers, was implemented. The simulation can be applied to any thermoplastic or composite as long as its thermal properties are known. When depositing a single filament of PLA, a temperature difference of almost 14 • C is observed when considering a phase chance relative to ignoring it. In the case of structures with several filaments, the temperature difference can raise to about 20 • C, due to the re-heating effects of neighboring filaments. The differences between the two types of materials were highlighted studying the deposition of a single filament and a simple structure with 10 filaments, made with ABS or PLA. The evolution of temperature with time can become significantly different for the two polymers (differences of up to 40 • C), especially when several filaments come into contact with each other.
An applied case study was also presented, by considering the 3D printing of a 90 × 60 × 30 mm brick-like part, which would take 24 h to manufacture under the usual deposition velocity of 30 mm/s. The influence of the build orientation selected was investigated. It was shown that the time evolution of the filaments temperature depends on their length, as this determines the frequency at which heat transfer from newly deposited filaments contributes to re-heating. Temperature differences of around 30 • C were predicted. The temperature of PLA filaments was always higher than that of ABS for all the 3D printing orientations, due to the inherent thermal properties of the two materials and the existence of a phase change in PLA.
The work presented is a first step towards predicting the properties of parts produced by FFF. Knowing the evolution of temperature with time as the deposition proceeds, it is possible to predict bonding between contiguous filaments by means of a healing criterion, as well as part shrinkage and warpage arising due to local temperature gradients. As a further step, the mechanical properties of 3D parts could be estimated; for example, with the use of sintering models.