Using MATLAB to Compute Heat Transfer in Free Form Extrusion

Rapid Prototyping (RP) is a group of techniques used to quickly fabricate a scale model of a part or assembly using three-dimensional computer aided design (CAD) data (Marsan, Dutta, 2000). A large number of RP technologies have been developed to manufacture polymer, metal, or ceramic parts, without any mould, namely Stereolithography (SL), Laminated Object Manufacturing (LOM), Selected Laser Sintering (SLS), Ink-jet Printing (3DP) and Fused Deposition Modeling (FDM). In Fused Deposition Modelling (developed by Stratasys Inc in U.S.A.), a plastic or wax filament is fed through a nozzle and deposited onto the support (Pérez, 2002; Ahn, 2002; Ziemian & Crawn, 2001) as a series of 2D slices of a 3D part. The nozzle moves in the X–Y plane to create one slice of the part. Then, the support moves vertically (Z direction) so that the nozzle deposits a new layer on top of the previous one. Since the filament is extruded as a melt, the newly deposited material fuses with the last deposited material. Free Form Extrusion (FFE) is a variant of FDM (Figure 1), where the material is melted and deposited by an extruder & die (Agarwala, Jamalabad, Langrana, Safari, Whalen & Danthord, 1996; Bellini, Shor & Guceri, 2005). FFE enables the use of a wide variety of polymer systems (e.g., filled compounds, polymer blends, composites, nanocomposites, foams), thus yielding parts with superior performance. Moreover, the adoption of coextrusion or sequential extrusion techniques confers the possibility to combine different materials for specific properties, such as soft/hard zones or transparent/opaque effects.

Due to their characteristics -layer by layer construction using melted materials -FDM and FFE may originate parts with two defects: i) excessive filament deformation upon cooling can jeopardize the final dimensional accuracy, ii) poor bonding between adjacent filaments reduces the mechanical resistance. Deformation and bonding are mainly controlled by the heat transfer, i. e., adequate bonding requires that the filaments remain sufficiently hot during enough time to ensure adhesion and, simultaneously, to cool down fast enough to avoid excessive deformation due to gravity (and weight of the filaments above them). Therefore, it is important to know the evolution in time of the filaments temperature and to understand how it is affected by the major process variables. Rodriguez (Rodriguez, 1999) studied the cooling of five elliptical filaments stacked vertically using via finite element methods and later found a 2D analytical solution for rectangular cross-sections (Thomas & Rodriguez, 2000). Yardimci and Guceri (Yardimci & S.I. Guceri, 1996) developed a more general 2D heat transfer analysis, also using finite element methods. Li and co-workers (Li, Sun, Bellehumeur & Gu, 2003;Sun, Rizvi, Bellehumeur & Gu, 2004) developed an analytical 1D transient heat transfer model for a single filament, using the Lumped Capacity method. Although good agreement with experimental results was reported, the model cannot be used for a sequence of filaments, as thermal contacts are ignored. The present work expands the above efforts, by proposing a transient heat transfer analysis of filament deposition that includes the physical contacts between any filament and its neighbours or supporting table. The analytical analysis for one filament is first discussed, yielding an expression for the evolution of temperature with deposition time. Then, a MatLab code is developed to compute the temperature evolution for the various filaments required to build one part. The usefulness of the results is illustrated with two case studies.

Heat transfer modelling
During the construction of a part by FDM or FFE, all the filaments are subjected to the same heat transfer mechanism but with different boundary conditions, depending on the part geometry and deposition sequence ( Figure 2). Consider that N is the total number of deposited filaments and that T r (x,t) is the temperature at length x of the r-th filament (r Є {1,…,N}) at instant t. The energy balance for an element dx of the r-th filament writes as: sup in int

Energy in at one face Heat loss by convection with surroundings
Heat loss by conduction with adjacent filaments or with port Change ernal energy Energy out at opposite face This can be expressed as a differential equation. After some assumptions and simplifications (Costa, Duarte & Covas, 2008): where P is filament perimeter, ρ is density, C is heat capacity, A is area of the filament crosssection, h conv is heat transfer coefficient, n is number of contacts with adjacent filaments or with the support, λ i is fraction of P that in contact with an adjacent filament, T E is environment temperature, h i is thermal contact conductance for contact i ( {1,..., } in ∈ ) and i r T is temperature of the adjacent filament or support at contact i ( {1,..., 1} i rN ∈ + , i rr ≠ , T 1 ,…, T N are temperatures of filaments, T N+1 is support temperature). In this expression, variables i r a are defined as (see Figure 3): In this expression, t r is the instant at which the r-th filament starts to cool down or contact with another filament and 0 () rr r TT t = is the temperature of the filament at instant t r . Taking k as thermal conductivity, the Biot number can be defined (Bejan, 1993

Computer modelling
Equations (5) and (7) quantify the temperature of a single filament fragment along the deposition time. In practice, consecutive filament fragments are deposited during the manufacture of a part. Thus, it is convenient to generalize the computations to obtain the temperature evolution of each filament fragment at any point x of the part, for different deposition techniques and 3D configuration structures. (3), sets in the contacts for the r-th filament (i∈ {1,...,n}, where n is the number of contacts). Simultaneous computation of the filaments temperature: During deposition, some filaments are reheated when new contacts with hotter filaments arise; simultaneously, the latter cool down due to the same contacts. This implies the simultaneous computation of the filaments temperature via an iterative procedure. The convergence error was set at ε = 10 -3 , as a good compromise between accuracy and the computation time.

www.intechopen.com
Deposition sequence: The deposition sequence defines the thermal conditions TCV-1, TCV-2 and TCV-3. Three possibilities were taken in: unidirectional and aligned filaments, unidirectional and skewed filaments, perpendicular filaments (see Figure 4). In all cases, the filaments are deposited continuously under constant speed (no interruptions occur between successive layers). Some parts with some geometrical features may require the use of a support material, to be removed after manufacture. This possibility is considered in the algorithm for unidirectional and aligned filaments.

Computing the temperatures
The computational flowchart is presented in Figure 5 and a MatLab code was generated. In order to visualize the results using another software (Excel, Tecplot...), a document in txt format is generated after the computations, that includes all the temperature results along deposition time.

MatLab code for one filament layer
In order to illustrate how the MatLab code "FFE.m" was implemented, the segment dealing with the temperature along the deposition time for the first layer of filaments, using one or two distinct materials, is presented here. The code has the same logic and structure for the remaining layers.

Input variables
Two arguments need to be introduced in this MatLab function: -A matrix representing the deposition sequence, containing m rows and n columns, for the number of layers and maximum number of filaments in a layer, respectively. Each cell is attributed a value of 0, 1, or 2 for the absence of a filament, the presence of a filament of material A or of a filament of material B, respectively. An example is given in Figure 6. - The vertical cross section of the part (along the filament length) where the user wishes to know the temperature evolution with time. The code includes one initial section where all the variables are defined (Figure 7), namely environment and extrusion temperatures, material properties, process conditions, etc. The dimensions of all matrixes used are also defined.

Computation of the temperatures for the first filament of the first layer
Computation of the temperatures starts with the activation of the contact between the first filament and the support. Parameters b and Q (equation (3)) are calculated (Figure 9).

www.intechopen.com
The temperatures are computed at each time increment; confirmation of the value of Biot number (Eq. (6)) is also made: if greater than 0.1, the code devolves a warning message ( Figure 10).

Results
In order to demonstrate the usefulness of the code developed, two case studies will be discussed. The first deals with a part constructed with two distinct materials, while the second illustrates the role of the deposition sequence.

Case study 1
Consider the small part with the geometry presented in Figure 14, to be manufactured under the processing conditions summarized in Table 1.  The production of this part requires the use of a support material. Figure 15 shows the deposition sequence and corresponding material matrix, while Figure 16 presents the evolution of temperature of every filament with deposition time. As expected, once a new filament is deposited, the temperature of the preceding adjacent filaments increases and their rate of cooling decreases.   Figure 15.

Case study 2
Consider now the parallelepipedic part depicted in Figure 17, to be built using unidirectional and aligned and perpendicular sequences, respectively, under the processing conditions summarized in Table 2. Figures 18 and 19 depict the deposition sequence and corresponding temperatures (this required an additional part of the code together with the use of the Tecplot software). At each time increment, a 1 mm or a 0.35 mm filament portion was deposited, for unidirectional and aligned and perpendicular filaments, respectively. This lower value is related with the lower contact area arising from this deposition mode. Consequently, the total computation time was circa 7 minutes for unidirectional and aligned deposition and more than two and a half hours for perpendicular filaments for a conventional portable PC. As the manufacture is completed (t = 14.4 sec), the average part temperature is approximately 120 ºC or 90 ºC depending on the deposition mode. This information is relevant for practical purposes, such as evaluating the quality of the adhesion between adjacent filaments, or the extent of deformation.

Conclusion
In Free Form Extrusion, FFE, a molten filament is deposited sequentially to produce a 3D part without a mould. This layer by layer construction technique may create problems of adhesion between adjacent filaments, or create dimensional accuracy problems due to excessive deformation of the filaments, if the processing conditions are not adequately set. This chapter presented a MatLab code for modelling the heat transfer in FFE, aiming at determining the temperature evolution of each filament during the deposition stage. Two case studies illustrated the use of the programme. A well-known statement says that the PID controller is the â€oebread and butterâ€ of the control engineer. This is indeed true, from a scientific standpoint. However, nowadays, in the era of computer science, when the paper and pencil have been replaced by the keyboard and the display of computers, one may equally say that MATLAB is the â€oebreadâ€ in the above statement. MATLAB has became a de facto tool for the modern system engineer. This book is written for both engineering students, as well as for practicing engineers. The wide range of applications in which MATLAB is the working framework, shows that it is a powerful, comprehensive and easy-to-use environment for performing technical computations. The book includes various excellent applications in which MATLAB is employed: from pure algebraic computations to data acquisition in real-life experiments, from control strategies to image processing algorithms, from graphical user interface design for educational purposes to Simulink embedded systems.